ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
|
Adapt a magnetostatics solver to remove contributions from the z-direction. More...
#include <dlc.hpp>
Public Types | |
using | BaseSolver = std::variant< std::shared_ptr< DipolarP3M >, std::shared_ptr< DipolarDirectSum > > |
Public Member Functions | |
DipolarLayerCorrection (dlc_data &¶meters, BaseSolver &&solver) | |
void | on_activation () |
void | on_boxl_change () |
Recalculate all box-length-dependent parameters. | |
void | on_node_grid_change () const |
void | on_periodicity_change () const |
void | on_cell_structure_change () const |
void | init () |
void | sanity_checks () const |
void | recalc_box_h () |
void | recalc_far_cut () |
double | energy_correction (ParticleRange const &particles) const |
Calculate the dipolar energy correction. | |
void | add_force_corrections (ParticleRange const &particles) const |
Add the dipolar force and torque corrections. | |
void | adapt_solver () |
void | release_solver () |
Public Member Functions inherited from Dipoles::Actor< DipolarLayerCorrection > | |
void | set_prefactor (double new_prefactor) |
Public Member Functions inherited from System::Leaf< Class > | |
void | bind_system (std::shared_ptr< System > const &system) |
void | detach_system (std::shared_ptr< System > const &system) |
Public Attributes | |
dlc_data | dlc |
BaseSolver | base_solver |
Magnetostatics solver that is adapted. | |
Variables from the adapted solver. | |
double | prefactor |
double | epsilon |
double | epsilon_correction |
Public Attributes inherited from Dipoles::Actor< DipolarLayerCorrection > | |
double | prefactor |
Magnetostatics prefactor. | |
Additional Inherited Members | |
Protected Member Functions inherited from System::Leaf< Class > | |
auto & | get_system () |
auto & | get_system () const |
Protected Attributes inherited from System::Leaf< Class > | |
std::weak_ptr< System > | m_system |
Adapt a magnetostatics solver to remove contributions from the z-direction.
For details see [8].
using DipolarLayerCorrection::BaseSolver = std::variant< std::shared_ptr<DipolarP3M>, std::shared_ptr<DipolarDirectSum> > |
DipolarLayerCorrection::DipolarLayerCorrection | ( | dlc_data && | parameters, |
BaseSolver && | solver | ||
) |
Definition at line 527 of file dlc.cpp.
References adapt_solver().
void DipolarLayerCorrection::adapt_solver | ( | ) |
Definition at line 488 of file dlc.cpp.
References base_solver, epsilon, epsilon_correction, and P3M_EPSILON_METALLIC.
Referenced by DipolarLayerCorrection().
void DipolarLayerCorrection::add_force_corrections | ( | ParticleRange const & | particles | ) | const |
Add the dipolar force and torque corrections.
Definition at line 305 of file dlc.cpp.
References Particle::calc_dip(), calc_slab_dipole(), Particle::dipm(), dipolar_force_corrections(), dlc, epsilon, epsilon_correction, dlc_data::far_cut, Particle::force(), System::Leaf< Class >::get_system(), P3M_EPSILON_METALLIC, prefactor, ParticleRange::size(), Particle::torque(), and vector_product().
double DipolarLayerCorrection::energy_correction | ( | ParticleRange const & | particles | ) | const |
Calculate the dipolar energy correction.
Definition at line 357 of file dlc.cpp.
References calc_slab_dipole(), dipolar_energy_correction(), dlc, epsilon, epsilon_correction, dlc_data::far_cut, System::Leaf< Class >::get_system(), P3M_EPSILON_METALLIC, prefactor, Utils::sqr(), and this_node.
|
inline |
Definition at line 125 of file dlc.hpp.
References recalc_box_h(), and recalc_far_cut().
|
inline |
Definition at line 98 of file dlc.hpp.
References System::Leaf< Class >::m_system, recalc_box_h(), and recalc_far_cut().
|
inline |
Recalculate all box-length-dependent parameters.
Definition at line 110 of file dlc.hpp.
References recalc_box_h(), and recalc_far_cut().
|
inline |
|
inline |
|
inline |
void DipolarLayerCorrection::recalc_box_h | ( | ) |
Definition at line 516 of file dlc.cpp.
References dlc_data::box_h, dlc, dlc_data::gap_size, and System::Leaf< Class >::get_system().
Referenced by init(), on_activation(), and on_boxl_change().
|
inline |
Definition at line 137 of file dlc.hpp.
References dlc, dlc_data::far_calculated, and dlc_data::far_cut.
Referenced by init(), on_activation(), and on_boxl_change().
|
inline |
Definition at line 150 of file dlc.hpp.
References epsilon, epsilon_correction, and prefactor.
BaseSolver DipolarLayerCorrection::base_solver |
Magnetostatics solver that is adapted.
Definition at line 94 of file dlc.hpp.
Referenced by adapt_solver().
dlc_data DipolarLayerCorrection::dlc |
Definition at line 91 of file dlc.hpp.
Referenced by add_force_corrections(), energy_correction(), recalc_box_h(), and recalc_far_cut().
double DipolarLayerCorrection::epsilon |
Definition at line 88 of file dlc.hpp.
Referenced by adapt_solver(), add_force_corrections(), energy_correction(), AdaptSolver::operator()(), AdaptSolver::operator()(), and release_solver().
double DipolarLayerCorrection::epsilon_correction |
Definition at line 89 of file dlc.hpp.
Referenced by adapt_solver(), add_force_corrections(), energy_correction(), and release_solver().
double DipolarLayerCorrection::prefactor |
Definition at line 87 of file dlc.hpp.
Referenced by add_force_corrections(), energy_correction(), AdaptSolver::operator()(), AdaptSolver::operator()(), and release_solver().