Processing math: 100%
ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages Concepts
velocity_verlet_npt.cpp File Reference
#include "config/config.hpp"
#include "velocity_verlet_npt.hpp"
#include "BoxGeometry.hpp"
#include "Particle.hpp"
#include "ParticleRange.hpp"
#include "cell_system/CellStructure.hpp"
#include "communication.hpp"
#include "errorhandling.hpp"
#include "npt.hpp"
#include "system/System.hpp"
#include "thermostat.hpp"
#include "thermostats/npt_inline.hpp"
#include <utils/Vector.hpp>
#include <utils/math/sqr.hpp>
#include <boost/mpi/collectives.hpp>
#include <cmath>
#include <functional>
+ Include dependency graph for velocity_verlet_npt.cpp:

Go to the source code of this file.

Functions

static void velocity_verlet_npt_propagate_vel_final (NptIsoParameters const &nptiso, InstantaneousPressure &npt_inst_pressure, ParticleRangeNPT const &particles, double time_step)
 Propagate the particle's velocity.
 
static void velocity_verlet_npt_finalize_p_inst (NptIsoParameters &nptiso, InstantaneousPressure &npt_inst_pressure, double time_step)
 Scale and communicate instantaneous NpT pressure and propagate the conjugate momentum for volume.
 
static void velocity_verlet_npt_propagate_pos (ParticleRangeNPT const &particles, IsotropicNptThermostat const &npt_iso, double time_step, System::System &system)
 
static void velocity_verlet_npt_propagate_vel (ParticleRangeNPT const &particles, double time_step)
 Propagate the particle's velocity.
 
void velocity_verlet_npt_step_1 (ParticleRangeNPT const &particles, IsotropicNptThermostat const &npt_iso, double time_step, System::System &system)
 Special propagator for NpT isotropic.
 
void velocity_verlet_npt_step_2 (ParticleRangeNPT const &particles, double time_step, System::System &system)
 Final integration step of the Velocity Verlet+NpT integrator.
 

Function Documentation

◆ velocity_verlet_npt_finalize_p_inst()

static void velocity_verlet_npt_finalize_p_inst ( NptIsoParameters nptiso,
InstantaneousPressure npt_inst_pressure,
double  time_step 
)
static

Scale and communicate instantaneous NpT pressure and propagate the conjugate momentum for volume.

p_{\epsilon}(t+dt) = p_{\epsilon}(t) + (P_{\text{inst}} - P_{\text{ext}})*0.5*dt

Definition at line 72 of file velocity_verlet_npt.cpp.

References comm_cart, NptIsoParameters::dimension, NptIsoParameters::geometry, NptIsoParameters::nptgeom_dir, NptIsoParameters::p_epsilon, NptIsoParameters::p_ext, InstantaneousPressure::p_inst, InstantaneousPressure::p_vel, InstantaneousPressure::p_vir, this_node, and NptIsoParameters::volume.

Referenced by velocity_verlet_npt_propagate_pos(), and velocity_verlet_npt_step_2().

◆ velocity_verlet_npt_propagate_pos()

◆ velocity_verlet_npt_propagate_vel()

static void velocity_verlet_npt_propagate_vel ( ParticleRangeNPT const &  particles,
double  time_step 
)
static

Propagate the particle's velocity.

v(t+0.5*dt) = v(t) + 0.5*dt * a(t)

Definition at line 235 of file velocity_verlet_npt.cpp.

References System::get_system(), System::System::npt_inst_pressure, NptIsoParameters::nptgeom_dir, System::System::nptiso, and Utils::sqr().

Referenced by velocity_verlet_npt_step_1().

◆ velocity_verlet_npt_propagate_vel_final()

static void velocity_verlet_npt_propagate_vel_final ( NptIsoParameters const &  nptiso,
InstantaneousPressure npt_inst_pressure,
ParticleRangeNPT const &  particles,
double  time_step 
)
static

Propagate the particle's velocity.

v(t+dt) = v(t+0.5*dt) + 0.5*dt * a(t+dt)

Definition at line 48 of file velocity_verlet_npt.cpp.

References NptIsoParameters::geometry, NptIsoParameters::nptgeom_dir, InstantaneousPressure::p_vel, and Utils::sqr().

Referenced by velocity_verlet_npt_step_2().

◆ velocity_verlet_npt_step_1()

void velocity_verlet_npt_step_1 ( ParticleRangeNPT const &  particles,
IsotropicNptThermostat const &  npt_iso,
double  time_step,
System::System system 
)

Special propagator for NpT isotropic.

Propagate the velocities and positions. Integration steps before force calculation of the Velocity Verlet integrator:

v(t+0.5 \Delta t) = v(t) + 0.5 \Delta t \cdot F(t)/m

x(t+\Delta t) = x(t) + \Delta t \cdot v(t+0.5 \Delta t)

Propagate pressure, box_length (2 times) and positions, rescale positions and velocities and check Verlet list criterion (only NpT).

Definition at line 253 of file velocity_verlet_npt.cpp.

References velocity_verlet_npt_propagate_pos(), and velocity_verlet_npt_propagate_vel().

Referenced by integrator_step_1().

◆ velocity_verlet_npt_step_2()

void velocity_verlet_npt_step_2 ( ParticleRangeNPT const &  particles,
double  time_step,
System::System system 
)

Final integration step of the Velocity Verlet+NpT integrator.

Finalize instantaneous pressure calculation:

v(t+\Delta t) = v(t+0.5 \Delta t) + 0.5 \Delta t \cdot F(t+\Delta t)/m

Definition at line 260 of file velocity_verlet_npt.cpp.

References System::System::npt_inst_pressure, System::System::nptiso, velocity_verlet_npt_finalize_p_inst(), and velocity_verlet_npt_propagate_vel_final().

Referenced by integrator_step_2().