OpenFPM_pdata  1.1.0
Project that contain the implementation of distributed structures
 All Data Structures Namespaces Functions Variables Typedefs Enumerations Friends Pages
interpolate< vector, grid, kernel > Class Template Reference

Main class for interpolation Particle to mest p2m and Mesh to particle m2p. More...

Detailed Description

template<typename vector, typename grid, typename kernel>
class interpolate< vector, grid, kernel >

Main class for interpolation Particle to mest p2m and Mesh to particle m2p.

This function is the main class to interpolate from particle to mesh and mesh to particle

Template Parameters
vectortype of vector for interpolation
gridtype of grid for interpolation
interpolationkernel

Definition at line 503 of file interpolation.hpp.

#include <interpolation.hpp>

Data Structures

struct  Box_vol
 

Public Member Functions

 interpolate (vector &vd, grid &gd)
 construct an interpolation object between a grid and a vector More...
 
template<unsigned int prp_v, unsigned int prp_g>
void p2m (vector &vd, grid &gd)
 Interpolate particles to mesh. More...
 
template<unsigned int prp_g, unsigned int prp_v>
void m2p (grid &gd, vector &vd)
 Interpolate mesh to particle. More...
 
template<unsigned int prp_v, unsigned int prp_g>
void p2m (vector &vd, grid &gd, const vect_dist_key_dx &p)
 Interpolate particles to mesh. More...
 
template<unsigned int prp_g, unsigned int prp_v>
void m2p (grid &gd, vector &vd, const vect_dist_key_dx &p)
 Interpolate mesh to particle. More...
 

Private Types

typedef vector::stype arr_type
 Type of the calculations.
 

Private Member Functions

void calculate_the_offsets (openfpm::vector< agg_arr< openfpm::math::pow(kernel::np, vector::dims)>> &offsets, size_t(&sz)[vector::dims])
 It calculate the interpolation stencil offsets. More...
 

Private Attributes

CellList< vector::dims,
typename vector::stype,
Mem_fast<>, shift
< vector::dims, typename
vector::stype > > 
geo_cell
 Cell list used to convert particles position to sub-domain.
 
vector & vd
 particles
 
gridgd
 grid
 
openfpm::vector< agg_arr
< openfpm::math::pow(kernel::np,
vector::dims)> > 
offsets
 the offset for each sub-sub-domain
 
size_t sz [vector::dims]
 kernel size
 
vector::stype dx [vector::dims]
 grid spacing
 
Box< vector::dims, typename
vector::stype > 
domain
 Simulation domain.
 

Constructor & Destructor Documentation

template<typename vector, typename grid, typename kernel>
interpolate< vector, grid, kernel >::interpolate ( vector &  vd,
grid gd 
)
inline

construct an interpolation object between a grid and a vector

When possible and easy to do we suggest to retain the object

Parameters
vdinterpolation vector
gdinterpolation grid

Definition at line 600 of file interpolation.hpp.

Member Function Documentation

template<typename vector, typename grid, typename kernel>
void interpolate< vector, grid, kernel >::calculate_the_offsets ( openfpm::vector< agg_arr< openfpm::math::pow(kernel::np, vector::dims)>> &  offsets,
size_t(&)  sz[vector::dims] 
)
inlineprivate

It calculate the interpolation stencil offsets.

Parameters
offsetsarray where to store the linearized offset of the kernel stencil for each local-grid (sub-domain)
szkernel stencil points in each direction

Definition at line 562 of file interpolation.hpp.

template<typename vector, typename grid, typename kernel>
template<unsigned int prp_g, unsigned int prp_v>
void interpolate< vector, grid, kernel >::m2p ( grid gd,
vector &  vd 
)
inline

Interpolate mesh to particle.

Most of the time the particle set and the mesh are the same as the one used in the constructor. They also can be different as soon as they have the same decomposition

Parameters
gdgrid or mesh
vdparticle set

Definition at line 708 of file interpolation.hpp.

template<typename vector, typename grid, typename kernel>
template<unsigned int prp_g, unsigned int prp_v>
void interpolate< vector, grid, kernel >::m2p ( grid gd,
vector &  vd,
const vect_dist_key_dx p 
)
inline

Interpolate mesh to particle.

Most of the time the particle set and the mesh are the same as the one used in the constructor. They also can be different as soon as they have the same decomposition

Parameters
gdgrid or mesh
vdparticle set
pparticle

Definition at line 796 of file interpolation.hpp.

template<typename vector, typename grid, typename kernel>
template<unsigned int prp_v, unsigned int prp_g>
void interpolate< vector, grid, kernel >::p2m ( vector &  vd,
grid gd 
)
inline

Interpolate particles to mesh.

Most of the time the particle set and the mesh are the same as the one used in the constructor. They also can be different as soon as they have the same decomposition

Parameters
gdgrid or mesh
vdparticle set

Definition at line 662 of file interpolation.hpp.

template<typename vector, typename grid, typename kernel>
template<unsigned int prp_v, unsigned int prp_g>
void interpolate< vector, grid, kernel >::p2m ( vector &  vd,
grid gd,
const vect_dist_key_dx p 
)
inline

Interpolate particles to mesh.

Most of the time the particle set and the mesh are the same as the one used in the constructor. They also can be different as soon as they have the same decomposition

Parameters
gdgrid or mesh
vdparticle set
pparticle

Definition at line 758 of file interpolation.hpp.


The documentation for this class was generated from the following file: