![]() |
ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
|
#include <BoxGeometry.hpp>
Public Member Functions | |
| BoxGeometry () | |
| BoxGeometry (BoxGeometry const &rhs) | |
| void | set_periodic (unsigned coord, bool val) |
| Set periodicity for direction. | |
| constexpr bool | periodic (unsigned coord) const |
| Check periodicity in direction. | |
| Utils::Vector3d const & | length () const |
| Box length. | |
| Utils::Vector3d const & | length_inv () const |
| Inverse box length. | |
| Utils::Vector3d const & | length_half () const |
| Half box length. | |
| void | set_length (Utils::Vector3d const &box_l) |
| Set box side lengths. | |
| double | volume () const |
| Box volume. | |
| template<typename T > | |
| T | get_mi_coord (T a, T b, unsigned coord) const |
| Get the minimum-image distance between two coordinates. | |
| template<typename T > | |
| ESPRESSO_ATTR_ALWAYS_INLINE Utils::Vector< T, 3 > | get_mi_vector (const Utils::Vector< T, 3 > &a, const Utils::Vector< T, 3 > &b) const |
| Get the minimum-image vector between two coordinates. | |
| template<typename T > | |
| ESPRESSO_ATTR_ALWAYS_INLINE Utils::Vector< T, 3 > | get_mi_vector (T const &a0, T const &a1, T const &a2, T const &b0, T const &b1, T const &b2) const |
| Get the minimum-image vector between two coordinates. | |
| BoxType | type () const |
| void | set_type (BoxType type) |
| LeesEdwardsBC const & | lees_edwards_bc () const |
| void | set_lees_edwards_bc (LeesEdwardsBC bc) |
| void | lees_edwards_update (double pos_offset, double shear_velocity) |
| Update the Lees-Edwards parameters of the box geometry for the current simulation time. | |
| Utils::Vector3d | velocity_difference (Utils::Vector3d const &x, Utils::Vector3d const &y, Utils::Vector3d const &u, Utils::Vector3d const &v) const |
| Calculate the velocity difference including the Lees-Edwards velocity. | |
| void | fold_position (Utils::Vector3d &pos, Utils::Vector3i &image_box) const |
| Fold coordinates to primary simulation box in-place. | |
| auto | folded_position (Utils::Vector3d const &pos) const |
| Calculate coordinates folded to primary simulation box. | |
| auto | folded_image_box (Utils::Vector3d const &pos, Utils::Vector3i const &image_box) const |
| Calculate image box of coordinates folded to primary simulation box. | |
| auto | image_shift (Utils::Vector3i const &image_box) const |
| Calculate image box shift vector. | |
| auto | unfolded_position (Utils::Vector3d const &pos, Utils::Vector3i const &image_box) const |
| Unfold particle coordinates to image box. | |
Definition at line 104 of file BoxGeometry.hpp.
|
inline |
Definition at line 106 of file BoxGeometry.hpp.
References CUBOID, set_length(), set_periodic(), and set_type().
|
inline |
Definition at line 113 of file BoxGeometry.hpp.
References length(), periodic(), set_length(), set_periodic(), and type().
|
inline |
Fold coordinates to primary simulation box in-place.
Lees-Edwards offset is ignored.
| [in,out] | pos | coordinates to fold |
| [in,out] | image_box | image box offset |
Definition at line 308 of file BoxGeometry.hpp.
References Algorithm::periodic_fold().
Referenced by fold_and_reset(), LeesEdwards::Push::operator()(), AtomDecomposition::resort(), serialize_and_reduce(), vs_com_update_particles(), and vs_relative_update_particles().
|
inline |
Calculate image box of coordinates folded to primary simulation box.
| [in] | pos | coordinates |
| [in] | image_box | image box to fold |
Definition at line 347 of file BoxGeometry.hpp.
References Algorithm::periodic_fold().
|
inline |
Calculate coordinates folded to primary simulation box.
| [in] | pos | coordinates to fold |
Definition at line 330 of file BoxGeometry.hpp.
References Algorithm::periodic_fold().
Referenced by gather_particle_data(), is_valid_position(), LB::ParticleCoupling::kernel(), and positions_in_halo().
|
inline |
Get the minimum-image distance between two coordinates.
| a | Coordinate of the terminal point. |
| b | Coordinate of the initial point. |
| coord | Direction |
b to a across periodic images, i.e. a - b. Can be negative. Definition at line 198 of file BoxGeometry.hpp.
References coord().
Referenced by get_mi_vector(), and get_mi_vector().
|
inline |
Get the minimum-image vector between two coordinates.
| T | Floating point type. |
| a | Coordinate of the terminal point. |
| b | Coordinate of the initial point. |
b to a that minimizes the distance across periodic images, i.e. a - b. Definition at line 217 of file BoxGeometry.hpp.
References CUBOID, LeesEdwardsBC::distance(), get_mi_coord(), LEES_EDWARDS, lees_edwards_bc(), Algorithm::periodic_fold(), LeesEdwardsBC::shear_plane_normal, and type().
Referenced by add_bonded_force(), add_bonded_two_body_force(), add_oif_global_forces(), BondBreakage::bond_handler(), calc_bonded_energy(), calc_bonded_four_body_force(), calc_bonded_three_body_force(), calc_bonded_three_body_pressure_tensor(), calc_bonded_virial_pressure_tensor(), IBMTribend::calc_forces(), OifLocalForcesBond::calc_forces(), calc_oif_mesh(), calculate_positional_correction(), calculate_velocity_correction(), calculate_vs_relate_to_params(), elc_data::dielectric_layers_contribution(), elc_data::dielectric_layers_contribution(), image_sum(), IBMTribend::initialize(), IBMTriel::initialize(), is_valid_position(), and ForcesKernel::operator()().
|
inline |
Get the minimum-image vector between two coordinates.
| T | Floating point type. |
| a0 | x element of the terminal point. |
| a1 | y element of the terminal point. |
| a2 | z element of the terminal point. |
| b0 | x element of the initial point. |
| b1 | y element of the initial point. |
| b2 | z element of the initial point. |
b to a that minimizes the distance across periodic images, i.e. a - b. Definition at line 251 of file BoxGeometry.hpp.
References CUBOID, LeesEdwardsBC::distance(), get_mi_coord(), LEES_EDWARDS, lees_edwards_bc(), Algorithm::periodic_fold(), LeesEdwardsBC::shear_plane_normal, and type().
|
inline |
Calculate image box shift vector.
Definition at line 361 of file BoxGeometry.hpp.
|
inline |
Definition at line 272 of file BoxGeometry.hpp.
Referenced by get_mi_vector(), get_mi_vector(), lees_edwards_vel_shift(), positions_in_halo_impl(), LeesEdwards::shear_direction(), LeesEdwards::velocity_shift(), LeesEdwards::verlet_list_offset(), and Writer::H5md::File::write().
|
inline |
Update the Lees-Edwards parameters of the box geometry for the current simulation time.
Definition at line 279 of file BoxGeometry.hpp.
References LEES_EDWARDS, LeesEdwardsBC::pos_offset, LeesEdwardsBC::shear_velocity, and type().
Referenced by LeesEdwards::LeesEdwards::update_box_params().
|
inline |
Box length.
Definition at line 160 of file BoxGeometry.hpp.
Referenced by BoxGeometry(), dipolar_energy_correction(), dipolar_force_corrections(), get_simulation_box(), image_sum(), RegularDecomposition::max_cutoff(), Observables::SanityChecksLB::mismatch(), LeesEdwards::Push::operator()(), positions_in_halo_impl(), prepare_sc_cache(), random_position(), Observables::SanityChecksLB::SanityChecksLB(), setup_PoQ(), setup_PQ(), ParticlePropertyRange::unfolded_pos_range(), and Writer::H5md::write_box().
|
inline |
Half box length.
Definition at line 172 of file BoxGeometry.hpp.
Referenced by velocity_difference().
|
inline |
Inverse box length.
Definition at line 166 of file BoxGeometry.hpp.
Referenced by add_PQ_force(), dipolar_energy_correction(), dipolar_force_corrections(), prepare_sc_cache(), setup_PoQ(), and setup_PQ().
|
inlineconstexpr |
Check periodicity in direction.
| coord | Direction to check |
Definition at line 151 of file BoxGeometry.hpp.
References coord().
Referenced by BoxGeometry(), get_n_cut(), and get_simulation_box().
|
inline |
Definition at line 273 of file BoxGeometry.hpp.
|
inline |
Set box side lengths.
| box_l | Length that should be set. |
Definition at line 178 of file BoxGeometry.hpp.
Referenced by BoxGeometry(), and BoxGeometry().
|
inline |
Set periodicity for direction.
| coord | The coordinate to set the periodicity for. |
| val | True if this direction should be periodic. |
Definition at line 143 of file BoxGeometry.hpp.
References coord().
Referenced by BoxGeometry(), and BoxGeometry().
|
inline |
|
inline |
Definition at line 269 of file BoxGeometry.hpp.
Referenced by BoxGeometry(), get_mi_vector(), get_mi_vector(), LB::ParticleCoupling::kernel(), lees_edwards_update(), lees_edwards_vel_shift(), positions_in_halo_impl(), set_type(), LeesEdwards::LeesEdwards::update_box_params(), velocity_difference(), LeesEdwards::velocity_shift(), LeesEdwards::verlet_list_offset(), and vs_relative_update_particles().
|
inline |
Unfold particle coordinates to image box.
Definition at line 366 of file BoxGeometry.hpp.
Referenced by add_oif_global_forces(), OifLocalForcesBond::calc_forces(), calc_oif_mesh(), GatherPos::kernel(), GatherCom::kernel(), and vs_com_update_particles().
|
inline |
Calculate the velocity difference including the Lees-Edwards velocity.
Definition at line 286 of file BoxGeometry.hpp.
References LEES_EDWARDS, length_half(), Utils::sgn(), LeesEdwardsBC::shear_plane_normal, and type().
Referenced by dpd_pair_force().
|
inline |
Box volume.
Definition at line 188 of file BoxGeometry.hpp.
References Utils::product().