oomph::Euler Class Reference

#include <explicit_timesteppers.h>

+ Inheritance diagram for oomph::Euler:

Public Member Functions

 Euler ()
 Constructor, set the type. More...
 
 Euler (const Euler &)=delete
 Broken copy constructor. More...
 
void operator= (const Euler &)=delete
 Broken assignment operator. More...
 
void timestep (ExplicitTimeSteppableObject *const &object_pt, const double &dt)
 Euler timestepping x^{t+1} = x^{t} + dt M^{-1} L(x^{t}) More...
 
- Public Member Functions inherited from oomph::ExplicitTimeStepper
 ExplicitTimeStepper ()
 Empty Constructor. More...
 
 ExplicitTimeStepper (const ExplicitTimeStepper &)=delete
 Broken copy constructor. More...
 
void operator= (const ExplicitTimeStepper &)=delete
 Broken assignment operator. More...
 
virtual ~ExplicitTimeStepper ()
 Empty virtual destructor — no memory is allocated in this class. More...
 

Additional Inherited Members

- Protected Attributes inherited from oomph::ExplicitTimeStepper
std::string Type
 

Detailed Description

=========================================================== Simple first-order Euler Timestepping

Constructor & Destructor Documentation

◆ Euler() [1/2]

oomph::Euler::Euler ( )
inline

Constructor, set the type.

166  {
167  Type = "Euler";
168  }
std::string Type
Definition: explicit_timesteppers.h:136

References oomph::ExplicitTimeStepper::Type.

◆ Euler() [2/2]

oomph::Euler::Euler ( const Euler )
delete

Broken copy constructor.

Member Function Documentation

◆ operator=()

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

Broken assignment operator.

◆ timestep()

void oomph::Euler::timestep ( ExplicitTimeSteppableObject *const &  object_pt,
const double dt 
)
virtual

Euler timestepping x^{t+1} = x^{t} + dt M^{-1} L(x^{t})

Overload function that is used to advance time in the object reference by object_pt by an amount dt

Implements oomph::ExplicitTimeStepper.

165  {
166  object_pt->actions_before_explicit_timestep();
167  object_pt->actions_before_explicit_stage();
168 
169  // Vector that will hold the inverse mass matrix multiplied by the
170  // residuals
171  DoubleVector minv_res;
172  // Get M^{-1} R
173  object_pt->get_dvaluesdt(minv_res);
174 
175  // Add the result to the unknowns
176  object_pt->add_to_dofs(dt, minv_res);
177  // Increment the time by the appropriate amount
178  object_pt->time() += dt;
179 
180  // Call any actions required after the change in the unknowns
181  object_pt->actions_after_explicit_stage();
182  object_pt->actions_after_explicit_timestep();
183  }
std::vector< double > DoubleVector
loads clump configuration
Definition: ClumpInput.h:26

References oomph::ExplicitTimeSteppableObject::actions_after_explicit_stage(), oomph::ExplicitTimeSteppableObject::actions_after_explicit_timestep(), oomph::ExplicitTimeSteppableObject::actions_before_explicit_stage(), oomph::ExplicitTimeSteppableObject::actions_before_explicit_timestep(), oomph::ExplicitTimeSteppableObject::add_to_dofs(), oomph::ExplicitTimeSteppableObject::get_dvaluesdt(), and oomph::ExplicitTimeSteppableObject::time().


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