ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
dlc.cpp File Reference
#include "config/config.hpp"
#include "magnetostatics/dlc.hpp"
#include "magnetostatics/dipolar_direct_sum.hpp"
#include "magnetostatics/dipoles.hpp"
#include "magnetostatics/dp3m.hpp"
#include "p3m/common.hpp"
#include "BoxGeometry.hpp"
#include "Particle.hpp"
#include "cell_system/CellStructure.hpp"
#include "communication.hpp"
#include "errorhandling.hpp"
#include "system/System.hpp"
#include <utils/math/sqr.hpp>
#include <boost/mpi/collectives/all_reduce.hpp>
#include <boost/mpi/collectives/reduce.hpp>
#include <boost/mpi/operations.hpp>
#include <mpi.h>
#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <functional>
#include <limits>
#include <numbers>
#include <numeric>
#include <stdexcept>
#include <variant>
#include <vector>
+ Include dependency graph for dlc.cpp:

Go to the source code of this file.

Classes

struct  AdaptSolver
 Lock an actor and modify its parameters. More...
 

Functions

static double calc_mu_max (System::System const &system)
 Calculate the maximal dipole moment in the system.
 
static double g1_DLC_dip (double g, double x)
 
static double g2_DLC_dip (double g, double x)
 
static Utils::Vector3d calc_slab_dipole (ParticleRange const &particles)
 Compute the box magnetic dipole.
 
static void dipolar_force_corrections (int kcut, std::vector< Utils::Vector3d > &fs, std::vector< Utils::Vector3d > &ts, ParticleRange const &particles, BoxGeometry const &box_geo)
 Compute the dipolar force and torque corrections.
 
static double dipolar_energy_correction (int kcut, ParticleRange const &particles, BoxGeometry const &box_geo)
 Compute the dipolar DLC energy correction.
 
static int count_magnetic_particles (System::System const &system)
 

Function Documentation

◆ calc_mu_max()

static double calc_mu_max ( System::System const &  system)
static

Calculate the maximal dipole moment in the system.

Definition at line 71 of file dlc.cpp.

References System::System::cell_structure, and comm_cart.

◆ calc_slab_dipole()

static Utils::Vector3d calc_slab_dipole ( ParticleRange const &  particles)
static

Compute the box magnetic dipole.

Definition at line 96 of file dlc.cpp.

References Particle::calc_dip(), comm_cart, and Particle::dipm().

Referenced by DipolarLayerCorrection::add_force_corrections(), and DipolarLayerCorrection::energy_correction().

◆ count_magnetic_particles()

static int count_magnetic_particles ( System::System const &  system)
static

◆ dipolar_energy_correction()

static double dipolar_energy_correction ( int  kcut,
ParticleRange const &  particles,
BoxGeometry const &  box_geo 
)
static

Compute the dipolar DLC energy correction.

Algorithm implemented accordingly to [8].

Definition at line 248 of file dlc.cpp.

References Particle::calc_dip(), comm_cart, Particle::dipm(), BoxGeometry::length(), BoxGeometry::length_inv(), Particle::pos(), and this_node.

Referenced by DipolarLayerCorrection::energy_correction().

◆ dipolar_force_corrections()

static void dipolar_force_corrections ( int  kcut,
std::vector< Utils::Vector3d > &  fs,
std::vector< Utils::Vector3d > &  ts,
ParticleRange const &  particles,
BoxGeometry const &  box_geo 
)
static

Compute the dipolar force and torque corrections.

Algorithm implemented accordingly to [8].

Definition at line 112 of file dlc.cpp.

References Particle::calc_dip(), comm_cart, Particle::dipm(), BoxGeometry::length(), BoxGeometry::length_inv(), Particle::pos(), ParticleRange::size(), and vector_product().

Referenced by DipolarLayerCorrection::add_force_corrections().

◆ g1_DLC_dip()

static double g1_DLC_dip ( double  g,
double  x 
)
static

Definition at line 81 of file dlc.cpp.

◆ g2_DLC_dip()

static double g2_DLC_dip ( double  g,
double  x 
)
static

Definition at line 89 of file dlc.cpp.