OpenFPM_pdata  1.1.0
Project that contain the implementation of distributed structures
 All Data Structures Namespaces Functions Variables Typedefs Enumerations Friends Pages
Point_test< T > Class Template Reference

Test structure used for several test. More...

Detailed Description

template<typename T>
class Point_test< T >

Test structure used for several test.

It is a test structure used for several test it contain 4 scalar "x,y,z,s" one vector property v[3] and one tensor or rank 2 t[3][3]

It is the format for type parsing of in the openfpm structures see openFPM_data wiki for more information

Declaration of a point

Create a type definition

Access the members

p.get<P::v>()[0] = 1.0 + i;
p.get<P::v>()[1] = 2.0 + i;
p.get<P::v>()[2] = 7.0 + i;
p.get<P::t>()[0][0] = 10.0 + i;
p.get<P::t>()[0][1] = 13.0 + i;
p.get<P::t>()[0][2] = 8.0 + i;
p.get<P::t>()[1][0] = 19.0 + i;
p.get<P::t>()[1][1] = 23.0 + i;
p.get<P::t>()[1][2] = 5.0 + i;
p.get<P::t>()[2][0] = 4.0 + i;
p.get<P::t>()[2][1] = 3.0 + i;
p.get<P::t>()[2][2] = 11.0 + i;

Definition at line 105 of file Point_test.hpp.

#include <Point_test.hpp>

Public Types

typedef boost::fusion::vector
< T, T, T, T, T[3], T[3][3]> 
type
 declaration of what the Point_test store
 
typedef boost::fusion::vector
< T, T, T, T, T[3], T[3][3]> 
type_real
 declaration of what the Point_test store
 

Public Member Functions

void setx (T x_)
 set the x property More...
 
void sety (T y_)
 set the y property More...
 
void setz (T z_)
 set the z property More...
 
void sets (T s_)
 set the s property More...
 
void setv (size_t i, T v_)
 set the v property More...
 
void sett (size_t i, size_t j, T t_)
 set the t property More...
 
template<unsigned int i>
boost::fusion::result_of::at
< type, boost::mpl::int_< i >
>::type 
get ()
 getter method for a general property i
 
 Point_test ()
 Default constructor.
 
bool operator== (const Point_test< float > &p) const
 check if two point match More...
 
Point_test< float > & operator+= (const Point_test< float > &p)
 Sum the point. More...
 
template<unsigned int dim, typename Mem >
 Point_test (const encapc< dim, Point_test< T >, Mem > &p)
 Copy constructor from encapc (encapsulated point) More...
 
 Point_test (const Point_test< T > &p)
 constructor from another point More...
 
Point_test< T > operator= (const Point_test< T > &p)
 Copy the point. More...
 
void fill ()
 fill More...
 

Static Public Member Functions

static bool noPointers ()
 noPointers function More...
 

Data Fields

type data
 The object itself.
 

Static Public Attributes

static constexpr bool stag_mask [] ={false,false,false,true,true,true}
 in case usage with a staggered grid indicate which properties are staggered in the cell
 
static const unsigned int x = 0
 x property is at position 0 in the boost::fusion::vector
 
static const unsigned int y = 1
 y property is at position 1 in the boost::fusion::vector
 
static const unsigned int z = 2
 z property is at position 2 in the boost::fusion::vector
 
static const unsigned int s = 3
 s property is at position 3 in the boost::fusion::vector
 
static const unsigned int v = 4
 v property is at position 4 in the boost::fusion::vector
 
static const unsigned int t = 5
 t property is at position 5 in the boost::fusion::vector
 
static const unsigned int max_prop = 6
 number of properties in the boost::fusion::vector
 
static const unsigned int max_prop_real = 6
 number of properties in the boost::fusion::vector
 

Constructor & Destructor Documentation

template<typename T>
template<unsigned int dim, typename Mem >
Point_test< T >::Point_test ( const encapc< dim, Point_test< T >, Mem > &  p)
inline

Copy constructor from encapc (encapsulated point)

Parameters
pecapsulated point

Definition at line 281 of file Point_test.hpp.

template<typename T>
Point_test< T >::Point_test ( const Point_test< T > &  p)
inline

constructor from another point

Parameters
ppoint to copy

Definition at line 305 of file Point_test.hpp.

Member Function Documentation

template<typename T>
void Point_test< T >::fill ( )
inline

fill

Fill the point with data

Definition at line 366 of file Point_test.hpp.

template<typename T>
static bool Point_test< T >::noPointers ( )
inlinestatic

noPointers function

It notify that Point_test does not have any pointer and is safe to send

Returns
true

Definition at line 359 of file Point_test.hpp.

template<typename T>
Point_test<float>& Point_test< T >::operator+= ( const Point_test< float > &  p)
inline

Sum the point.

Parameters
ppoint to sum
Returns
this

Definition at line 257 of file Point_test.hpp.

template<typename T>
Point_test<T> Point_test< T >::operator= ( const Point_test< T > &  p)
inline

Copy the point.

Parameters
ppoint
Returns
this

Definition at line 331 of file Point_test.hpp.

template<typename T>
bool Point_test< T >::operator== ( const Point_test< float > &  p) const
inline

check if two point match

Parameters
ppoint to compare

Definition at line 229 of file Point_test.hpp.

template<typename T>
void Point_test< T >::sets ( s_)
inline

set the s property

Parameters
s_

Definition at line 197 of file Point_test.hpp.

template<typename T>
void Point_test< T >::sett ( size_t  i,
size_t  j,
t_ 
)
inline

set the t property

Parameters
icomponent to set
jcomponent to set
t_value

Definition at line 214 of file Point_test.hpp.

template<typename T>
void Point_test< T >::setv ( size_t  i,
v_ 
)
inline

set the v property

Parameters
icomponent to set
v_value

Definition at line 205 of file Point_test.hpp.

template<typename T>
void Point_test< T >::setx ( x_)
inline

set the x property

Parameters
x_

Definition at line 176 of file Point_test.hpp.

template<typename T>
void Point_test< T >::sety ( y_)
inline

set the y property

Parameters
y_

Definition at line 183 of file Point_test.hpp.

template<typename T>
void Point_test< T >::setz ( z_)
inline

set the z property

Parameters
z_

Definition at line 190 of file Point_test.hpp.


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