OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
FD::grid_dist_expression< prp, grid, NORM_EXPRESSION > Class Template Reference

Main class that encapsulate a grid properties operand to be used for expressions construction. More...

Detailed Description

template<unsigned int prp, typename grid>
class FD::grid_dist_expression< prp, grid, NORM_EXPRESSION >

Main class that encapsulate a grid properties operand to be used for expressions construction.

Template Parameters
prpproperty involved
gridinvolved

Definition at line 517 of file FD_expressions.hpp.

#include <FD_expressions.hpp>

Public Types

typedef grid gtype
 The type of the internal grid.
 

Public Member Functions

void setVarId (int var_id)
 
 grid_dist_expression (grid &g)
 constructor for an external grid
 
gridgetGrid ()
 Return the grid on which is acting.
 
const gridgetGrid () const
 Return the grid on which is acting.
 
void init () const
 This function must be called before value.
 
auto value (const grid_dist_key_dx< grid::dims > &k, comb< grid::dims > &c_where) const -> decltype(grid_dist_expression_value_impl< type_proc >::template value_n< prp >(g, k))
 Evaluate the expression.
 
template<unsigned int nc>
auto value (const grid_dist_key_dx< grid::dims > &k, comb< grid::dims > &c_where, const int(&comp)[nc]) const -> decltype(grid_dist_expression_value_impl< type_proc >::template value_n< prp >(g, k, comp))
 Evaluate the expression.
 
auto value_ref (const grid_dist_key_dx< grid::dims > &k, comb< grid::dims > &c_where) const -> decltype(grid_dist_expression_value_impl< type_proc >::template value_ref< prp >(g, k))
 Evaluate the expression.
 
template<unsigned int nc>
auto value_ref (const grid_dist_key_dx< grid::dims > &k, comb< grid::dims > &c_where, const int(&comp)[nc]) const -> decltype(grid_dist_expression_value_impl< type_proc >::template value_ref< prp >(g, k, comp))
 Evaluate the expression.
 
template<unsigned int prp2, typename grid_type >
gridoperator= (const grid_dist_expression< prp2, grid_type, NORM_EXPRESSION > &g_exp)
 Fill the grid property with the evaluated expression.
 
template<typename exp1 , typename exp2 , typename op >
gridoperator= (const grid_dist_expression_op< exp1, exp2, op > &g_exp)
 Fill the grid property with the evaluated expression.
 
gridoperator= (double d)
 Fill the grid property with the double.
 
template<typename Sys_eqs , typename gmap_type , typename unordered_map_type >
void value_nz (const gmap_type &g_map, grid_dist_key_dx< Sys_eqs::dims > &key, const grid_sm< Sys_eqs::dims, void > &gs, typename Sys_eqs::stype(&spacing)[Sys_eqs::dims], unordered_map_type &cols, typename Sys_eqs::stype coeff, unsigned int comp, comb< Sys_eqs::dims > &c_where) const
 
grid_dist_expression_op< grid_dist_expression< prp, grid, NORM_EXPRESSION >, boost::mpl::int_< 1 >, g_compoperator[] (int comp)
 
gtype::stype get (grid_dist_key_dx< gtype::dims > &key)
 
int isConstant ()
 

Data Fields

int var_id = 0
 

Static Public Attributes

static const unsigned int prop = prp
 Property id of the point.
 

Private Types

typedef boost::mpl::at< typenamegrid::value_type::type, boost::mpl::int_< prp > >::type type_proc
 

Private Attributes

gridg
 The grid.
 

Member Typedef Documentation

◆ gtype

template<unsigned int prp, typename grid >
typedef grid FD::grid_dist_expression< prp, grid, NORM_EXPRESSION >::gtype

The type of the internal grid.

Definition at line 527 of file FD_expressions.hpp.

◆ type_proc

template<unsigned int prp, typename grid >
typedef boost::mpl::at<typenamegrid::value_type::type,boost::mpl::int_<prp>>::type FD::grid_dist_expression< prp, grid, NORM_EXPRESSION >::type_proc
private

Definition at line 522 of file FD_expressions.hpp.

Constructor & Destructor Documentation

◆ grid_dist_expression()

template<unsigned int prp, typename grid >
FD::grid_dist_expression< prp, grid, NORM_EXPRESSION >::grid_dist_expression ( grid g)
inline

constructor for an external grid

Definition at line 540 of file FD_expressions.hpp.

Member Function Documentation

◆ get()

template<unsigned int prp, typename grid >
gtype::stype FD::grid_dist_expression< prp, grid, NORM_EXPRESSION >::get ( grid_dist_key_dx< gtype::dims > &  key)
inline

Definition at line 734 of file FD_expressions.hpp.

◆ getGrid() [1/2]

template<unsigned int prp, typename grid >
grid & FD::grid_dist_expression< prp, grid, NORM_EXPRESSION >::getGrid ( )
inline

Return the grid on which is acting.

It return the grid used in getVExpr, to get this object

Returns
the grid

Definition at line 551 of file FD_expressions.hpp.

◆ getGrid() [2/2]

template<unsigned int prp, typename grid >
const grid & FD::grid_dist_expression< prp, grid, NORM_EXPRESSION >::getGrid ( ) const
inline

Return the grid on which is acting.

It return the grid used in getVExpr, to get this object

Returns
the grid

Definition at line 563 of file FD_expressions.hpp.

◆ init()

template<unsigned int prp, typename grid >
void FD::grid_dist_expression< prp, grid, NORM_EXPRESSION >::init ( ) const
inline

This function must be called before value.

it initialize the expression if needed

Definition at line 573 of file FD_expressions.hpp.

◆ isConstant()

template<unsigned int prp, typename grid >
int FD::grid_dist_expression< prp, grid, NORM_EXPRESSION >::isConstant ( )
inline

Definition at line 741 of file FD_expressions.hpp.

◆ operator=() [1/3]

template<unsigned int prp, typename grid >
template<unsigned int prp2, typename grid_type >
grid & FD::grid_dist_expression< prp, grid, NORM_EXPRESSION >::operator= ( const grid_dist_expression< prp2, grid_type, NORM_EXPRESSION > &  g_exp)
inline

Fill the grid property with the evaluated expression.

Parameters
v_expexpression to evaluate
Returns
itself

Definition at line 633 of file FD_expressions.hpp.

◆ operator=() [2/3]

template<unsigned int prp, typename grid >
template<typename exp1 , typename exp2 , typename op >
grid & FD::grid_dist_expression< prp, grid, NORM_EXPRESSION >::operator= ( const grid_dist_expression_op< exp1, exp2, op > &  g_exp)
inline

Fill the grid property with the evaluated expression.

Parameters
v_expexpression to evaluate
Returns
itself

Definition at line 661 of file FD_expressions.hpp.

◆ operator=() [3/3]

template<unsigned int prp, typename grid >
grid & FD::grid_dist_expression< prp, grid, NORM_EXPRESSION >::operator= ( double  d)
inline

Fill the grid property with the double.

Parameters
dvalue to fill
Returns
the internal grid

Definition at line 689 of file FD_expressions.hpp.

◆ operator[]()

template<unsigned int prp, typename grid >
grid_dist_expression_op< grid_dist_expression< prp, grid, NORM_EXPRESSION >, boost::mpl::int_< 1 >, g_comp > FD::grid_dist_expression< prp, grid, NORM_EXPRESSION >::operator[] ( int  comp)
inline

Definition at line 722 of file FD_expressions.hpp.

◆ setVarId()

template<unsigned int prp, typename grid >
void FD::grid_dist_expression< prp, grid, NORM_EXPRESSION >::setVarId ( int  var_id)
inline

Definition at line 534 of file FD_expressions.hpp.

◆ value() [1/2]

template<unsigned int prp, typename grid >
auto FD::grid_dist_expression< prp, grid, NORM_EXPRESSION >::value ( const grid_dist_key_dx< grid::dims > &  k,
comb< grid::dims > &  c_where 
) const -> decltype(grid_dist_expression_value_impl<type_proc>::template value_n<prp>(g,k))
inline

Evaluate the expression.

Parameters
kwhere to evaluate the expression
Returns
the result of the expression

Definition at line 583 of file FD_expressions.hpp.

◆ value() [2/2]

template<unsigned int prp, typename grid >
template<unsigned int nc>
auto FD::grid_dist_expression< prp, grid, NORM_EXPRESSION >::value ( const grid_dist_key_dx< grid::dims > &  k,
comb< grid::dims > &  c_where,
const int(&)  comp[nc] 
) const -> decltype(grid_dist_expression_value_impl<type_proc>::template value_n<prp>(g,k,comp))
inline

Evaluate the expression.

Parameters
kwhere to evaluate the expression
Returns
the result of the expression

Definition at line 596 of file FD_expressions.hpp.

◆ value_nz()

template<unsigned int prp, typename grid >
template<typename Sys_eqs , typename gmap_type , typename unordered_map_type >
void FD::grid_dist_expression< prp, grid, NORM_EXPRESSION >::value_nz ( const gmap_type &  g_map,
grid_dist_key_dx< Sys_eqs::dims > &  key,
const grid_sm< Sys_eqs::dims, void > &  gs,
typename Sys_eqs::stype(&)  spacing[Sys_eqs::dims],
unordered_map_type &  cols,
typename Sys_eqs::stype  coeff,
unsigned int  comp,
comb< Sys_eqs::dims > &  c_where 
) const
inline

Definition at line 710 of file FD_expressions.hpp.

◆ value_ref() [1/2]

template<unsigned int prp, typename grid >
auto FD::grid_dist_expression< prp, grid, NORM_EXPRESSION >::value_ref ( const grid_dist_key_dx< grid::dims > &  k,
comb< grid::dims > &  c_where 
) const -> decltype(grid_dist_expression_value_impl<type_proc>::template value_ref<prp>(g,k))
inline

Evaluate the expression.

Parameters
kwhere to evaluate the expression
Returns
the result of the expression

Definition at line 608 of file FD_expressions.hpp.

◆ value_ref() [2/2]

template<unsigned int prp, typename grid >
template<unsigned int nc>
auto FD::grid_dist_expression< prp, grid, NORM_EXPRESSION >::value_ref ( const grid_dist_key_dx< grid::dims > &  k,
comb< grid::dims > &  c_where,
const int(&)  comp[nc] 
) const -> decltype(grid_dist_expression_value_impl<type_proc>::template value_ref<prp>(g,k,comp))
inline

Evaluate the expression.

Parameters
kwhere to evaluate the expression
Returns
the result of the expression

Definition at line 621 of file FD_expressions.hpp.

Field Documentation

◆ g

template<unsigned int prp, typename grid >
grid& FD::grid_dist_expression< prp, grid, NORM_EXPRESSION >::g
private

The grid.

Definition at line 520 of file FD_expressions.hpp.

◆ prop

template<unsigned int prp, typename grid >
const unsigned int FD::grid_dist_expression< prp, grid, NORM_EXPRESSION >::prop = prp
static

Property id of the point.

Definition at line 530 of file FD_expressions.hpp.

◆ var_id

template<unsigned int prp, typename grid >
int FD::grid_dist_expression< prp, grid, NORM_EXPRESSION >::var_id = 0

Definition at line 532 of file FD_expressions.hpp.


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