OpenFPM_data  0.1.0
Project that contain the implementation and interfaces for basic structure like vectors, grids, graph ... .
 All Data Structures Namespaces Functions Variables Typedefs Friends
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 72 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
 

Public Member Functions

void setx (T x_)
 
void sety (T y_)
 
void setz (T z_)
 
void sets (T s_)
 
void setv (size_t i, T v_)
 
void sett (size_t i, size_t j, T t_)
 
template<unsigned int i>
boost::fusion::result_of::at
< type, boost::mpl::int_< i >
>::type 
get ()
 
 Point_test ()
 Default constructor.
 
bool operator== (const Point_test< float > &p) const
 check if two point match
 
template<unsigned int dim, typename Mem >
 Point_test (const encapc< dim, Point_test< T >, Mem > &p)
 constructor from encapc
 
template<unsigned int dim, typename Mem >
 Point_test (const encapg< dim, Point_test< T >, Mem > &p)
 constructor from encapg
 
 Point_test (const Point_test< T > &p)
 constructor from another point
 
Point_test< T > operator= (const Point_test< T > &p)
 constructor from another point
 
void fill ()
 fill More...
 

Static Public Member Functions

static bool noPointers ()
 noPointers function More...
 

Data Fields

type data
 

Static Public Attributes

static constexpr bool stag_mask [] ={false,false,false,true,true,true}
 
static const unsigned int x = 0
 
static const unsigned int y = 1
 
static const unsigned int z = 2
 
static const unsigned int s = 3
 
static const unsigned int v = 4
 
static const unsigned int t = 5
 
static const unsigned int max_prop = 6
 

Member Function Documentation

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

fill

Fill the point with data

Definition at line 227 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 220 of file Point_test.hpp.


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