ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
integrate.cpp File Reference

Molecular dynamics integrator. More...

#include "integrate.hpp"
#include "integrators/Propagation.hpp"
#include "integrators/brownian_inline.hpp"
#include "integrators/steepest_descent.hpp"
#include "integrators/stokesian_dynamics_inline.hpp"
#include "integrators/symplectic_euler_inline.hpp"
#include "integrators/velocity_verlet_inline.hpp"
#include "integrators/velocity_verlet_npt.hpp"
#include "BoxGeometry.hpp"
#include "PropagationMode.hpp"
#include "accumulators/AutoUpdateAccumulators.hpp"
#include "bond_breakage/bond_breakage.hpp"
#include "bonded_interactions/bonded_interaction_data.hpp"
#include "cell_system/CellStructure.hpp"
#include "cell_system/for_each_particle.hpp"
#include "cells.hpp"
#include "collision_detection/CollisionDetection.hpp"
#include "communication.hpp"
#include "errorhandling.hpp"
#include "lb/particle_coupling.hpp"
#include "lb/utils.hpp"
#include "lees_edwards/lees_edwards.hpp"
#include "nonbonded_interactions/nonbonded_interaction_data.hpp"
#include "npt.hpp"
#include "rattle.hpp"
#include "rotation.hpp"
#include "signalhandling.hpp"
#include "stokesian_dynamics/sd_interface.hpp"
#include "system/System.hpp"
#include "system/System.impl.hpp"
#include "thermostat.hpp"
#include "thermostats/langevin_inline.hpp"
#include "virtual_sites/com.hpp"
#include "virtual_sites/lb_tracers.hpp"
#include "virtual_sites/relative.hpp"
#include <instrumentation/fe_trap.hpp>
#include <boost/mpi/collectives/all_reduce.hpp>
#include "caliper_utils.hpp"
#include <callgrind.h>
#include <algorithm>
#include <cassert>
#include <cmath>
#include <csignal>
#include <functional>
#include <limits>
#include <sstream>
#include <stdexcept>
#include <string>
#include <utility>
+ Include dependency graph for integrate.cpp:

Go to the source code of this file.

Namespaces

namespace  anonymous_namespace{integrate.cpp}
 
namespace  LeesEdwards
 

Functions

void walberla_tau_sanity_checks (std::string const &method, double tau, double time_step)
 
void walberla_agrid_sanity_checks (std::string const &method, Utils::Vector3d const &geo_left, Utils::Vector3d const &geo_right, Utils::Vector3d const &lattice_left, Utils::Vector3d const &lattice_right, double agrid)
 
static void resort_particles_if_needed (System::System &system)
 
static bool integrator_step_1 (CellStructure &cell_structure, Propagation const &propagation, System::System &system, double time_step)
 Calls the hook for propagation kernels before the force calculation.
 
static auto make_step2_particle_kernel (Propagation const &propagation, double time_step)
 Build the per-particle half-kick callable for step_2.
 
static void integrator_step_2 (CellStructure &cell_structure, Propagation const &propagation, System::System &system, double time_step)
 
static void integrator_step_2_filtered (CellStructure &cell_structure, Propagation const &propagation, double time_step, bool interior_pass)
 Restricted step_2 for the split-phase ghost-force-reduce overlap.
 

Variables

volatile std::sig_atomic_t anonymous_namespace{integrate.cpp}::ctrl_C = 0
 

Detailed Description

Molecular dynamics integrator.

For more information about the integrator see integrate.hpp.

Definition in file integrate.cpp.

Function Documentation

◆ integrator_step_1()

◆ integrator_step_2()

◆ integrator_step_2_filtered()

static void integrator_step_2_filtered ( CellStructure cell_structure,
Propagation const &  propagation,
double  time_step,
bool  interior_pass 
)
static

Restricted step_2 for the split-phase ghost-force-reduce overlap.

Called twice per step: once with interior_pass = true (while the ghost reduce is in flight) and once with interior_pass = false (after CellStructure::ghosts_reduce_forces_finish completes). The per-particle kernel is identical to the one used by integrator_step_2 — shared via make_step2_particle_kernel.

NPT is absent here: the eligibility check in calculate_forces() guarantees TRANS_LANGEVIN_NPT is never active when this path runs.

Definition at line 585 of file integrate.cpp.

References ESPRESSO_CALI_MARK_FUNCTION, CellStructure::for_each_boundary_particle(), CellStructure::for_each_interior_particle(), INTEG_METHOD_STEEPEST_DESCENT, Propagation::integ_switch, make_step2_particle_kernel(), PropagationMode::TRANS_LANGEVIN_NPT, and Propagation::used_propagations.

Referenced by System::System::integrate().

◆ make_step2_particle_kernel()

static auto make_step2_particle_kernel ( Propagation const &  propagation,
double  time_step 
)
static

Build the per-particle half-kick callable for step_2.

Returns a lambda that captures propagation and time_step by reference and applies the velocity (and torque, if ROTATION is enabled) update for a single particle. Virtual sites are skipped.

Shared verbatim by integrator_step_2 (full pass) and integrator_step_2_filtered (interior / boundary passes): the lambda is constructed once, then handed to for_each_local_particle, for_each_interior_particle, or for_each_boundary_particle.

NPT particles are intentionally absent: the NPT arm must run only on the ineligible (full-reduce-then-step_2) path and is handled separately inside integrator_step_2.

Definition at line 501 of file integrate.cpp.

References INTEG_METHOD_SYMPLECTIC_EULER, Propagation::integ_switch, PropagationMode::ROT_EULER, PropagationMode::ROT_LANGEVIN, Propagation::should_propagate_with(), symplectic_euler_propagator_2(), symplectic_euler_rotator_2(), PropagationMode::TRANS_LANGEVIN, PropagationMode::TRANS_LB_MOMENTUM_EXCHANGE, PropagationMode::TRANS_NEWTON, velocity_verlet_propagator_2(), and velocity_verlet_rotator_2().

Referenced by integrator_step_2(), and integrator_step_2_filtered().

◆ resort_particles_if_needed()

static void resort_particles_if_needed ( System::System system)
static

◆ walberla_agrid_sanity_checks()

void walberla_agrid_sanity_checks ( std::string const &  method,
Utils::Vector3d const &  geo_left,
Utils::Vector3d const &  geo_right,
Utils::Vector3d const &  lattice_left,
Utils::Vector3d const &  lattice_right,
double  agrid 
)

Definition at line 358 of file integrate.cpp.

References this_node.

Referenced by EK::EKWalberla::sanity_checks(), and LB::LBWalberla::sanity_checks().

◆ walberla_tau_sanity_checks()

void walberla_tau_sanity_checks ( std::string const &  method,
double  tau,
double  time_step 
)