Lethe Open-Source Library version 1.2.0
Developer Guide
Loading...
Searching...
No Matches
ExplicitEulerIntegrator< dim, PropertiesIndex > Class Template Reference

#include <explicit_euler_integrator.h>

Inheritance diagram for ExplicitEulerIntegrator< dim, PropertiesIndex >:
[legend]

Public Member Functions

 ExplicitEulerIntegrator ()=default
virtual void integrate_start (Particles::ParticleHandler< dim > &particle_handler, const Tensor< 1, 3 > &body_force, const double time_step, std::vector< Tensor< 1, 3 > > &torque, std::vector< Tensor< 1, 3 > > &force, const std::vector< double > &MOI) override
virtual void integrate_end (Particles::ParticleHandler< dim > &particle_handler, const Tensor< 1, 3 > &body_force, const double time_step, std::vector< Tensor< 1, 3 > > &torque, std::vector< Tensor< 1, 3 > > &force, const std::vector< double > &MOI) override
virtual void integrate_end (Particles::ParticleHandler< dim > &particle_handler, const Tensor< 1, 3 > &body_force, const double time_step, std::vector< Tensor< 1, 3 > > &torque, std::vector< Tensor< 1, 3 > > &force, const std::vector< double > &MOI, const parallel::distributed::Triangulation< dim > &triangulation, AdaptiveSparseContacts< dim, PropertiesIndex > &sparse_contacts_object) override
virtual void integrate (Particles::ParticleHandler< dim > &particle_handler, const Tensor< 1, 3 > &body_force, const double time_step, std::vector< Tensor< 1, 3 > > &torque, std::vector< Tensor< 1, 3 > > &force, const std::vector< double > &MOI) override
virtual void integrate (Particles::ParticleHandler< dim > &particle_handler, const Tensor< 1, 3 > &body_force, const double time_step, std::vector< Tensor< 1, 3 > > &torque, std::vector< Tensor< 1, 3 > > &force, const std::vector< double > &MOI, const parallel::distributed::Triangulation< dim > &triangulation, AdaptiveSparseContacts< dim, PropertiesIndex > &sparse_contacts_object) override
Public Member Functions inherited from Integrator< dim, PropertiesIndex >
 Integrator ()=default
virtual ~Integrator ()=default

Detailed Description

template<int dim, typename PropertiesIndex>
class ExplicitEulerIntegrator< dim, PropertiesIndex >

Implementation of a classical explicit euler scheme for the integration of the particle motion. Note that reinitialization of force and torque is also integrated into integration class.

Note
Euler is a first-order integration scheme. Calculation proceudre:
Template Parameters
dimAn integer that denotes the number of spatial dimensions.
PropertiesIndexIndex of the properties used within the ParticleHandler.

x(n+1) = x(n) + v(n) * dt v(n+1) = v(n) + a(n) * dt a(n+1) = F(n+1) / m

Definition at line 25 of file explicit_euler_integrator.h.

Constructor & Destructor Documentation

◆ ExplicitEulerIntegrator()

template<int dim, typename PropertiesIndex>
ExplicitEulerIntegrator< dim, PropertiesIndex >::ExplicitEulerIntegrator ( )
default

Member Function Documentation

◆ integrate() [1/2]

template<int dim, typename PropertiesIndex>
void ExplicitEulerIntegrator< dim, PropertiesIndex >::integrate ( Particles::ParticleHandler< dim > & particle_handler,
const Tensor< 1, 3 > & body_force,
const double time_step,
std::vector< Tensor< 1, 3 > > & torque,
std::vector< Tensor< 1, 3 > > & force,
const std::vector< double > & MOI )
overridevirtual

Integrate motion of all particles by using the acceleration with the explicit Euler method.

Parameters
particle_handlerThe particle handler whose particle motion we wish to integrate
body_forceA constant volumetric body force applied to all particles
time_stepThe value of the time step used for the integration
torqueTorque acting on particles
forceForce acting on particles
MOIA container of moment of inertia of particles

Implements Integrator< dim, PropertiesIndex >.

Definition at line 68 of file explicit_euler_integrator.cc.

References point_nd_to_3d().

◆ integrate() [2/2]

template<int dim, typename PropertiesIndex>
void ExplicitEulerIntegrator< dim, PropertiesIndex >::integrate ( Particles::ParticleHandler< dim > & particle_handler,
const Tensor< 1, 3 > & body_force,
const double time_step,
std::vector< Tensor< 1, 3 > > & torque,
std::vector< Tensor< 1, 3 > > & force,
const std::vector< double > & MOI,
const parallel::distributed::Triangulation< dim > & triangulation,
AdaptiveSparseContacts< dim, PropertiesIndex > & sparse_contacts_object )
overridevirtual

◆ integrate_end() [1/2]

template<int dim, typename PropertiesIndex>
void ExplicitEulerIntegrator< dim, PropertiesIndex >::integrate_end ( Particles::ParticleHandler< dim > & particle_handler,
const Tensor< 1, 3 > & body_force,
const double time_step,
std::vector< Tensor< 1, 3 > > & torque,
std::vector< Tensor< 1, 3 > > & force,
const std::vector< double > & MOI )
overridevirtual

Integrate the closing step of the scheme. The velocities of the explicit Euler scheme are already synchronized with the positions, so they are left untouched. The force and the torque containers are still reset, since they have been filled by the force evaluation that precedes this call and would otherwise be accumulated into by the next time step.

Parameters
particle_handlerThe particle handler whose particle motion we wish to integrate
body_forceA constant volumetric body force applied to all particles
time_stepThe value of the time step used for the integration
torqueTorque acting on particles. It is reset to zero
forceForce acting on particles. It is reset to zero
MOIA container of moment of inertia of particles

Implements Integrator< dim, PropertiesIndex >.

Definition at line 34 of file explicit_euler_integrator.cc.

◆ integrate_end() [2/2]

template<int dim, typename PropertiesIndex>
void ExplicitEulerIntegrator< dim, PropertiesIndex >::integrate_end ( Particles::ParticleHandler< dim > & particle_handler,
const Tensor< 1, 3 > & body_force,
const double time_step,
std::vector< Tensor< 1, 3 > > & torque,
std::vector< Tensor< 1, 3 > > & force,
const std::vector< double > & MOI,
const parallel::distributed::Triangulation< dim > & triangulation,
AdaptiveSparseContacts< dim, PropertiesIndex > & sparse_contacts_object )
overridevirtual

Integrate the closing step of the scheme when the adaptive sparse contacts are enabled. The velocities of the explicit Euler scheme are already synchronized with the positions, so they are left untouched and only the force and the torque containers are reset. Note that the adaptive sparse contacts are not supported by the explicit Euler scheme in the first place.

Parameters
particle_handlerThe particle handler whose particle motion we wish to integrate
body_forceA constant volumetric body force applied to all particles
time_stepThe value of the time step used for the integration
torqueTorque acting on particles. It is reset to zero
forceForce acting on particles. It is reset to zero
MOIA container of moment of inertia of particles
triangulationThe triangulation of the background mesh
sparse_contacts_objectThe object that stores the mobility status of the cells

Implements Integrator< dim, PropertiesIndex >.

Definition at line 53 of file explicit_euler_integrator.cc.

References integrate_end().

◆ integrate_start()

template<int dim, typename PropertiesIndex>
void ExplicitEulerIntegrator< dim, PropertiesIndex >::integrate_start ( Particles::ParticleHandler< dim > & particle_handler,
const Tensor< 1, 3 > & body_force,
const double time_step,
std::vector< Tensor< 1, 3 > > & torque,
std::vector< Tensor< 1, 3 > > & force,
const std::vector< double > & MOI )
overridevirtual

Integrate the opening step of the scheme. The explicit Euler scheme is self-starting and keeps the velocities synchronized with the positions, so the first time step needs no special treatment: this function simply carries out a regular step.

Parameters
particle_handlerThe particle handler whose particle motion we wish to integrate
body_forceA constant volumetric body force applied to all particles
time_stepThe value of the time step used for the integration
torqueTorque acting on particles
forceForce acting on particles
MOIA container of moment of inertia of particles

Implements Integrator< dim, PropertiesIndex >.

Definition at line 17 of file explicit_euler_integrator.cc.

References integrate().


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