Public Member Functions | Static Private Attributes | List of all members
oomph::ExplicitTimeSteppableObject Class Reference

Class for objects than can be advanced in time by an Explicit Timestepper. WARNING: For explicit time stepping to work the object's residual function (as used by get_inverse_mass_matrix_times_residuals(..)) MUST be in the form r = f(t, u) - [timestepper approximation to dudt]! Standard implicit time stepping will work with plenty of residuals that don't fit into this form. Some examples where implicit time stepping will work fine but explicit will fail: 1) The negation of the above formula, this implementation will end up using dudt = - f(u,t). 2) A residual which is implicit or non-linear in dudt, such as r = dudt. More...

#include <explicit_timesteppers.h>

+ Inheritance diagram for oomph::ExplicitTimeSteppableObject:

Public Member Functions

 ExplicitTimeSteppableObject ()
 Empty constructor. More...
 
 ExplicitTimeSteppableObject (const ExplicitTimeSteppableObject &)=delete
 Broken copy constructor. More...
 
void operator= (const ExplicitTimeSteppableObject &)=delete
 Broken assignment operator. More...
 
virtual ~ExplicitTimeSteppableObject ()
 Empty destructor. More...
 
virtual void get_dvaluesdt (DoubleVector &minv_res)
 A single virtual function that returns the residuals vector multiplied by the inverse mass matrix. More...
 
virtual void get_dofs (DoubleVector &dofs) const
 Function that gets the values of the dofs in the object. More...
 
virtual void get_dofs (const unsigned &t, DoubleVector &dofs) const
 Function that gets the history values of the dofs in the object. More...
 
virtual void set_dofs (const DoubleVector &dofs)
 Function that sets the values of the dofs in the object. More...
 
virtual void add_to_dofs (const double &lambda, const DoubleVector &increment_dofs)
 Function that adds the values to the dofs. More...
 
virtual void actions_before_explicit_stage ()
 Empty virtual function to do anything needed before a stage of an explicit time step (Runge-Kutta steps contain multiple stages per time step, most others only contain one). More...
 
virtual void actions_after_explicit_stage ()
 Empty virtual function that should be overloaded to update any dependent data or boundary conditions that should be advanced after each stage of an explicit time step (Runge-Kutta steps contain multiple stages per time step, most others only contain one). More...
 
virtual void actions_before_explicit_timestep ()
 Empty virtual function that can be overloaded to do anything needed before an explicit step. More...
 
virtual void actions_after_explicit_timestep ()
 Empty virtual function that can be overloaded to do anything needed after an explicit step. More...
 
virtual double & time ()
 Broken virtual function that should be overloaded to return access to the local time in the object. More...
 
virtual Timetime_pt () const
 Virtual function that should be overloaded to return a pointer to a Time object. More...
 

Static Private Attributes

static double Dummy_time_value = 0.0
 Dummy value of time always set to zero. More...
 

Detailed Description

Class for objects than can be advanced in time by an Explicit Timestepper. WARNING: For explicit time stepping to work the object's residual function (as used by get_inverse_mass_matrix_times_residuals(..)) MUST be in the form r = f(t, u) - [timestepper approximation to dudt]! Standard implicit time stepping will work with plenty of residuals that don't fit into this form. Some examples where implicit time stepping will work fine but explicit will fail: 1) The negation of the above formula, this implementation will end up using dudt = - f(u,t). 2) A residual which is implicit or non-linear in dudt, such as r = dudt.

Definition at line 64 of file explicit_timesteppers.h.

Constructor & Destructor Documentation

◆ ExplicitTimeSteppableObject() [1/2]

oomph::ExplicitTimeSteppableObject::ExplicitTimeSteppableObject ( )
inline

Empty constructor.

Definition at line 71 of file explicit_timesteppers.h.

◆ ExplicitTimeSteppableObject() [2/2]

oomph::ExplicitTimeSteppableObject::ExplicitTimeSteppableObject ( const ExplicitTimeSteppableObject )
delete

Broken copy constructor.

◆ ~ExplicitTimeSteppableObject()

virtual oomph::ExplicitTimeSteppableObject::~ExplicitTimeSteppableObject ( )
inlinevirtual

Empty destructor.

Definition at line 80 of file explicit_timesteppers.h.

Member Function Documentation

◆ actions_after_explicit_stage()

virtual void oomph::ExplicitTimeSteppableObject::actions_after_explicit_stage ( )
inlinevirtual

Empty virtual function that should be overloaded to update any dependent data or boundary conditions that should be advanced after each stage of an explicit time step (Runge-Kutta steps contain multiple stages per time step, most others only contain one).

Definition at line 108 of file explicit_timesteppers.h.

Referenced by oomph::RungeKutta< ORDER >::timestep(), oomph::LowStorageRungeKutta< ORDER >::timestep(), oomph::Euler::timestep(), and oomph::EBDF3::timestep().

◆ actions_after_explicit_timestep()

virtual void oomph::ExplicitTimeSteppableObject::actions_after_explicit_timestep ( )
inlinevirtual

Empty virtual function that can be overloaded to do anything needed after an explicit step.

Reimplemented in oomph::Problem.

Definition at line 116 of file explicit_timesteppers.h.

Referenced by oomph::RungeKutta< ORDER >::timestep(), oomph::LowStorageRungeKutta< ORDER >::timestep(), oomph::Euler::timestep(), and oomph::EBDF3::timestep().

◆ actions_before_explicit_stage()

virtual void oomph::ExplicitTimeSteppableObject::actions_before_explicit_stage ( )
inlinevirtual

Empty virtual function to do anything needed before a stage of an explicit time step (Runge-Kutta steps contain multiple stages per time step, most others only contain one).

Definition at line 102 of file explicit_timesteppers.h.

Referenced by oomph::RungeKutta< ORDER >::timestep(), oomph::LowStorageRungeKutta< ORDER >::timestep(), oomph::Euler::timestep(), and oomph::EBDF3::timestep().

◆ actions_before_explicit_timestep()

virtual void oomph::ExplicitTimeSteppableObject::actions_before_explicit_timestep ( )
inlinevirtual

Empty virtual function that can be overloaded to do anything needed before an explicit step.

Reimplemented in oomph::Problem.

Definition at line 112 of file explicit_timesteppers.h.

Referenced by oomph::RungeKutta< ORDER >::timestep(), oomph::LowStorageRungeKutta< ORDER >::timestep(), oomph::Euler::timestep(), and oomph::EBDF3::timestep().

◆ add_to_dofs()

void oomph::ExplicitTimeSteppableObject::add_to_dofs ( const double &  lambda,
const DoubleVector increment_dofs 
)
virtual

Function that adds the values to the dofs.

Function that adds the lambda multiplied by the increment_dofs vector to the dofs in the object.

Reimplemented in oomph::Problem.

Definition at line 112 of file explicit_timesteppers.cc.

Referenced by oomph::RungeKutta< ORDER >::timestep(), oomph::LowStorageRungeKutta< ORDER >::timestep(), and oomph::Euler::timestep().

◆ get_dofs() [1/2]

void oomph::ExplicitTimeSteppableObject::get_dofs ( const unsigned &  t,
DoubleVector dofs 
) const
virtual

Function that gets the history values of the dofs in the object.

Function that should get the values of the dofs in the object.

Reimplemented in oomph::Problem.

Definition at line 77 of file explicit_timesteppers.cc.

◆ get_dofs() [2/2]

void oomph::ExplicitTimeSteppableObject::get_dofs ( DoubleVector dofs) const
virtual

Function that gets the values of the dofs in the object.

Function that should get the values of the dofs in the object.

Reimplemented in oomph::Problem.

Definition at line 60 of file explicit_timesteppers.cc.

Referenced by oomph::RungeKutta< ORDER >::timestep(), and oomph::EBDF3::timestep().

◆ get_dvaluesdt()

void oomph::ExplicitTimeSteppableObject::get_dvaluesdt ( DoubleVector minv_res)
virtual

A single virtual function that returns the residuals vector multiplied by the inverse mass matrix.

Reimplemented in oomph::Problem.

Definition at line 41 of file explicit_timesteppers.cc.

Referenced by oomph::RungeKutta< ORDER >::timestep(), oomph::LowStorageRungeKutta< ORDER >::timestep(), oomph::Euler::timestep(), and oomph::EBDF3::timestep().

◆ operator=()

void oomph::ExplicitTimeSteppableObject::operator= ( const ExplicitTimeSteppableObject )
delete

Broken assignment operator.

◆ set_dofs()

void oomph::ExplicitTimeSteppableObject::set_dofs ( const DoubleVector dofs)
virtual

Function that sets the values of the dofs in the object.

Reimplemented in oomph::Problem.

Definition at line 95 of file explicit_timesteppers.cc.

Referenced by oomph::RungeKutta< ORDER >::timestep(), and oomph::EBDF3::timestep().

◆ time()

double & oomph::ExplicitTimeSteppableObject::time ( )
virtual

Broken virtual function that should be overloaded to return access to the local time in the object.

Virtual function that should be overloaded to return access to the local time in the object.

Reimplemented in oomph::Problem.

Definition at line 132 of file explicit_timesteppers.cc.

References Dummy_time_value.

Referenced by oomph::RungeKutta< ORDER >::timestep(), oomph::LowStorageRungeKutta< ORDER >::timestep(), oomph::Euler::timestep(), and oomph::EBDF3::timestep().

◆ time_pt()

Time * oomph::ExplicitTimeSteppableObject::time_pt ( ) const
virtual

Virtual function that should be overloaded to return a pointer to a Time object.

Reimplemented in oomph::Problem.

Definition at line 147 of file explicit_timesteppers.cc.

Referenced by oomph::EBDF3::timestep().

Member Data Documentation

◆ Dummy_time_value

double oomph::ExplicitTimeSteppableObject::Dummy_time_value = 0.0
staticprivate

Dummy value of time always set to zero.

Definition at line 67 of file explicit_timesteppers.h.

Referenced by time().


The documentation for this class was generated from the following files: