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

#include <integrator.h>

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

Public Member Functions

 Integrator ()=default
virtual ~Integrator ()=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)=0
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)=0
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)=0
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)=0
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)=0

Detailed Description

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

Base interface for classes that carry out the integration of the velocity and position of particles with inertia.

Template Parameters
dimAn integer that denotes the number of spatial dimensions.
PropertiesIndexIndex of the properties used within the ParticleHandler.

Definition at line 20 of file integrator.h.

Constructor & Destructor Documentation

◆ Integrator()

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

The constructor to the integrator class is currently blank Eventually it might be a good idea to have the integration class contain the index to the velocity property, the force property and the acceleration property manually.

◆ ~Integrator()

template<int dim, typename PropertiesIndex>
virtual Integrator< dim, PropertiesIndex >::~Integrator ( )
virtualdefault

Member Function Documentation

◆ integrate() [1/2]

template<int dim, typename PropertiesIndex>
virtual void Integrator< 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 )
pure virtual

Integrate particles' velocity and position.

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

Implemented in ExplicitEulerIntegrator< dim, PropertiesIndex >, and VelocityVerletIntegrator< dim, PropertiesIndex >.

◆ integrate() [2/2]

template<int dim, typename PropertiesIndex>
virtual void Integrator< 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 )
pure virtual

◆ integrate_end() [1/2]

template<int dim, typename PropertiesIndex>
virtual void Integrator< 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 )
pure virtual

Integrate the closing step of the scheme, which is carried out once the final position is reached. The positions are never modified. Schemes that store the velocities staggered by half a time step advance them by half a time step here, which synchronizes them with the positions. Schemes whose velocities are already synchronized leave them untouched.

Whatever the scheme, the force and the torque containers are reset, since they have been filled by the force evaluation that precedes this call.

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 at the end of the integration
forceForce acting on particles. It is reset to zero at the end of the integration
MOIA container of moment of inertia of particles

Implemented in ExplicitEulerIntegrator< dim, PropertiesIndex >, and VelocityVerletIntegrator< dim, PropertiesIndex >.

◆ integrate_end() [2/2]

template<int dim, typename PropertiesIndex>
virtual void Integrator< 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 )
pure virtual

Integrate the closing step of the scheme when the adaptive sparse contacts are enabled. Only the particles located in mobile cells have their velocities advanced, the other ones only have their force and torque reset.

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 at the end of the integration
forceForce acting on particles. It is reset to zero at the end of the integration
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

Implemented in ExplicitEulerIntegrator< dim, PropertiesIndex >, and VelocityVerletIntegrator< dim, PropertiesIndex >.

◆ integrate_start()

template<int dim, typename PropertiesIndex>
virtual void Integrator< 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 )
pure virtual

Integrate the opening step of the scheme, which is carried out once, at the very first time step. Whatever the scheme, this advances the positions by a full time step, exactly like integrate() does. Schemes that are not self-starting, that is, schemes that store the velocities staggered by half a time step with respect to the positions, use it to bring their velocities to t(1/2) while the positions reach t(1). Self-starting schemes simply carry out a regular step.

Calling this at the first time step is unconditional: it is up to the scheme, and not to the solver, to decide what an opening step means.

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 at the end of the integration
forceForce acting on particles. It is reset to zero at the end of the integration
MOIA container of moment of inertia of particles

Implemented in ExplicitEulerIntegrator< dim, PropertiesIndex >, and VelocityVerletIntegrator< dim, PropertiesIndex >.


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