OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
fill_prop< dim, lin_id, dT, G_v, v, impl > Class Template Reference

This class work as a functor. More...

Detailed Description

template<unsigned int dim, int lin_id, typename dT, typename G_v, typename v, int impl>
class fill_prop< dim, lin_id, dT, G_v, v, impl >

This class work as a functor.

For each number in the boost::mpl::vector (for example 3 6) set the properties of the vertex at the specified id (3 6) with pos[d] * spacing[d] with d running from 0 to 1, pos[d] the position id of the vertex spacing the grid spacing

Example

if we give a grid_key of dimension 2 4x4 the expression "pos[d] * spacing[d]" will assume the value

(0.0 0.0) (0.25 0.0) ...... (1.0 0.0) (0.0 0.25)................. (1.0 0.25) .................................... (0.0 1.0).................. (1.0 1.0)

and the properties 3 6 will be filled with the numbers 0.0 0.0 ....... 1.0 1.0 progressively

Template Parameters
dimDimensionality of the cartesian grid
dTtype of the domain
G_vvertex type object
vboost::mpl::vector containing all the index to fill
is_stubwhen is true, produce a trivial operator(), to use when v is an empty vector to avoid compilation error

Definition at line 77 of file CartesianGraphFactory.hpp.

#include <CartesianGraphFactory.hpp>

Public Member Functions

 fill_prop (G_v &g_v, const dT(&szd)[dim], grid_key_dx< dim > &gk, const grid_sm< dim, void > &gs, const Box< dim, dT > &domain)
 Fill the object from where to take the properties.
 
template<typename T >
void operator() (T &t) const
 It call the function for each property we want to copy.
 

Private Attributes

const Box< dim, dT > & domain
 Domain.
 
const dT(& szd )[dim]
 Reference to an array containing the spacing.
 
grid_key_dx< dim > & gk
 grid_key_dx Reference containing the actual position
 
G_v & g_v
 Vertex object to fill.
 
const grid_sm< dim, void > & gs
 grid info
 

Constructor & Destructor Documentation

◆ fill_prop()

template<unsigned int dim, int lin_id, typename dT , typename G_v , typename v , int impl>
fill_prop< dim, lin_id, dT, G_v, v, impl >::fill_prop ( G_v &  g_v,
const dT(&)  szd[dim],
grid_key_dx< dim > &  gk,
const grid_sm< dim, void > &  gs,
const Box< dim, dT > &  domain 
)
inline

Fill the object from where to take the properties.

Definition at line 97 of file CartesianGraphFactory.hpp.

Member Function Documentation

◆ operator()()

template<unsigned int dim, int lin_id, typename dT , typename G_v , typename v , int impl>
template<typename T >
void fill_prop< dim, lin_id, dT, G_v, v, impl >::operator() ( T &  t) const
inline

It call the function for each property we want to copy.

Definition at line 104 of file CartesianGraphFactory.hpp.

Field Documentation

◆ domain

template<unsigned int dim, int lin_id, typename dT , typename G_v , typename v , int impl>
const Box<dim,dT>& fill_prop< dim, lin_id, dT, G_v, v, impl >::domain
private

Domain.

Definition at line 80 of file CartesianGraphFactory.hpp.

◆ g_v

template<unsigned int dim, int lin_id, typename dT , typename G_v , typename v , int impl>
G_v& fill_prop< dim, lin_id, dT, G_v, v, impl >::g_v
private

Vertex object to fill.

Definition at line 89 of file CartesianGraphFactory.hpp.

◆ gk

template<unsigned int dim, int lin_id, typename dT , typename G_v , typename v , int impl>
grid_key_dx<dim>& fill_prop< dim, lin_id, dT, G_v, v, impl >::gk
private

grid_key_dx Reference containing the actual position

Definition at line 86 of file CartesianGraphFactory.hpp.

◆ gs

template<unsigned int dim, int lin_id, typename dT , typename G_v , typename v , int impl>
const grid_sm<dim, void>& fill_prop< dim, lin_id, dT, G_v, v, impl >::gs
private

grid info

Definition at line 92 of file CartesianGraphFactory.hpp.

◆ szd

template<unsigned int dim, int lin_id, typename dT , typename G_v , typename v , int impl>
const dT(& fill_prop< dim, lin_id, dT, G_v, v, impl >::szd)[dim]
private

Reference to an array containing the spacing.

Definition at line 83 of file CartesianGraphFactory.hpp.


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