ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
particle_coupling.cpp File Reference
#include "lb/particle_coupling.hpp"
#include "BoxGeometry.hpp"
#include "LocalBox.hpp"
#include "Particle.hpp"
#include "cell_system/CellStructure.hpp"
#include "communication.hpp"
#include "config/config.hpp"
#include "errorhandling.hpp"
#include "random.hpp"
#include "system/System.hpp"
#include "thermostat.hpp"
#include <utils/Counter.hpp>
#include <utils/Vector.hpp>
#include <boost/mpi.hpp>
#include <caliper/cali.h>
#include <cmath>
#include <cstdint>
#include <initializer_list>
#include <limits>
#include <stdexcept>
#include <vector>
+ Include dependency graph for particle_coupling.cpp:

Go to the source code of this file.

Namespaces

namespace  LB
 

Functions

static Thermostat::GammaType lb_handle_particle_anisotropy (Particle const &p, double lb_gamma)
 
static Utils::Vector3d lb_drag_force (Particle const &p, double lb_gamma, Utils::Vector3d const &v_fluid)
 
Utils::Vector3d lb_drag_force (LB::Solver const &lb, double lb_gamma, Particle const &p, Utils::Vector3d const &shifted_pos)
 Calculate drag force on a single particle.
 
static bool in_local_domain (LocalBox const &local_box, Utils::Vector3d const &pos, double halo=0.)
 Check if a position is within the local box + halo.
 
static bool in_box (Utils::Vector3d const &pos, Utils::Vector3d const &lower_corner, Utils::Vector3d const &upper_corner)
 
bool in_local_halo (LocalBox const &local_box, Utils::Vector3d const &pos, double agrid)
 Check if a position is within the local LB domain plus halo.
 
static void positions_in_halo_impl (Utils::Vector3d const &pos_folded, Utils::Vector3d const &halo_lower_corner, Utils::Vector3d const &halo_upper_corner, BoxGeometry const &box_geo, std::vector< Utils::Vector3d > &res)
 
std::vector< Utils::Vector3dpositions_in_halo (Utils::Vector3d const &pos, BoxGeometry const &box_geo, LocalBox const &local_box, double agrid)
 Return a vector of positions shifted by +,- box length in each coordinate.
 
static auto lees_edwards_vel_shift (Utils::Vector3d const &pos_shifted_by_box_l, Utils::Vector3d const &orig_pos, BoxGeometry const &box_geo)
 
static void LB::lb_coupling_sanity_checks (Particle const &p)
 

Function Documentation

◆ in_box()

static bool in_box ( Utils::Vector3d const &  pos,
Utils::Vector3d const &  lower_corner,
Utils::Vector3d const &  upper_corner 
)
static

◆ in_local_domain()

static bool in_local_domain ( LocalBox const &  local_box,
Utils::Vector3d const &  pos,
double  halo = 0. 
)
static

Check if a position is within the local box + halo.

Parameters
local_boxLocal geometry
posPosition to check
haloHalo
Returns
True iff the point is inside of the box up to halo.

Definition at line 92 of file particle_coupling.cpp.

References Utils::Vector< T, N >::broadcast(), LocalBox::my_left(), and LocalBox::my_right().

Referenced by in_local_halo().

◆ in_local_halo()

bool in_local_halo ( LocalBox const &  local_box,
Utils::Vector3d const &  pos,
double  agrid 
)

Check if a position is within the local LB domain plus halo.

Returns
True iff the point is inside of the domain.

Definition at line 107 of file particle_coupling.cpp.

References in_local_domain().

◆ lb_drag_force() [1/2]

Utils::Vector3d lb_drag_force ( LB::Solver const &  lb,
double  lb_gamma,
Particle const &  p,
Utils::Vector3d const &  shifted_pos 
)

Calculate drag force on a single particle.

See section II.C. and eq. 9 in [2].

Parameters
[in]lbThe coupled fluid
[in]lb_gammaThe friction coefficient
[in]pThe coupled particle
[in]shifted_posThe particle position in MD units with optional shift
Returns
The viscous coupling force

Definition at line 76 of file particle_coupling.cpp.

References LB::Solver::get_coupling_interpolated_velocity(), and lb_drag_force().

◆ lb_drag_force() [2/2]

static Utils::Vector3d lb_drag_force ( Particle const &  p,
double  lb_gamma,
Utils::Vector3d const &  v_fluid 
)
static

◆ lb_handle_particle_anisotropy()

static Thermostat::GammaType lb_handle_particle_anisotropy ( Particle const &  p,
double  lb_gamma 
)
static

◆ lees_edwards_vel_shift()

static auto lees_edwards_vel_shift ( Utils::Vector3d const &  pos_shifted_by_box_l,
Utils::Vector3d const &  orig_pos,
BoxGeometry const &  box_geo 
)
static

◆ positions_in_halo()

std::vector< Utils::Vector3d > positions_in_halo ( Utils::Vector3d const &  pos,
BoxGeometry const &  box_geo,
LocalBox const &  local_box,
double  agrid 
)

Return a vector of positions shifted by +,- box length in each coordinate.

Definition at line 163 of file particle_coupling.cpp.

References Utils::Vector< T, N >::broadcast(), BoxGeometry::folded_position(), in_box(), LocalBox::my_left(), LocalBox::my_right(), and positions_in_halo_impl().

Referenced by lb_tracers_add_particle_force_to_fluid().

◆ positions_in_halo_impl()

static void positions_in_halo_impl ( Utils::Vector3d const &  pos_folded,
Utils::Vector3d const &  halo_lower_corner,
Utils::Vector3d const &  halo_upper_corner,
BoxGeometry const &  box_geo,
std::vector< Utils::Vector3d > &  res 
)
static