ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
|
#include <utils/index.hpp>
#include <utils/math/bspline.hpp>
#include <algorithm>
#include <cassert>
#include <cstddef>
#include <span>
#include <tuple>
#include <utility>
#include <vector>
Go to the source code of this file.
Classes | |
struct | InterpolationWeights< cao > |
Interpolation weights for one point. More... | |
class | p3m_interpolation_cache |
Cache for interpolation weights. More... | |
Functions | |
template<int cao> | |
InterpolationWeights< cao > | p3m_calculate_interpolation_weights (const Utils::Vector3d &position, const Utils::Vector3d &ai, P3MLocalMesh const &local_mesh) |
Calculate the P-th order interpolation weights. | |
template<int cao, class Kernel > | |
void | p3m_interpolate (P3MLocalMesh const &local_mesh, InterpolationWeights< cao > const &weights, Kernel kernel) |
P3M grid interpolation. | |
InterpolationWeights< cao > p3m_calculate_interpolation_weights | ( | const Utils::Vector3d & | position, |
const Utils::Vector3d & | ai, | ||
P3MLocalMesh const & | local_mesh | ||
) |
Calculate the P-th order interpolation weights.
As described in from [22] 5-189 (or 8-61). The weights are also tabulated in [10] [11].
position shift for calc. of first assignment mesh point.
Definition at line 140 of file interpolation.hpp.
References Utils::Vector< T, N >::broadcast(), Utils::bspline(), P3MLocalMesh::dim, Utils::get_linear_index(), InterpolationWeights< cao >::ind, P3MLocalMesh::ld_pos, Utils::ROW_MAJOR, InterpolationWeights< cao >::w_x, InterpolationWeights< cao >::w_y, and InterpolationWeights< cao >::w_z.
void p3m_interpolate | ( | P3MLocalMesh const & | local_mesh, |
InterpolationWeights< cao > const & | weights, | ||
Kernel | kernel | ||
) |
P3M grid interpolation.
This runs an kernel for every interpolation point in a set of interpolation weights with the linear grid index and the weight of the point as arguments.
local_mesh | Mesh info. |
weights | Set of weights |
kernel | The kernel to run. |
Definition at line 192 of file interpolation.hpp.
References P3MLocalMesh::q_21_off, and P3MLocalMesh::q_2_off.
Referenced by anonymous_namespace{dp3m.cpp}::AssignTorques< cao >::operator()(), anonymous_namespace{dp3m.cpp}::AssignForces< cao >::operator()(), AssignForces< cao >::operator()(), and anonymous_namespace{p3m.cpp}::AssignCharge< cao >::operator()().