OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
 
Loading...
Searching...
No Matches
shift< dim, T > Class Template Reference

Detailed Description

template<unsigned int dim, typename T>
class shift< dim, T >

This Class apply a shift transformation before converting to Cell-ID

Definition at line 26 of file CellDecomposer.hpp.

#include <CellDecomposer.hpp>

Public Member Functions

__device__ __host__ shift (const Matrix< dim, T > &t, const Point< dim, T > &s)
 Constructor.
 
__device__ __host__ T transform (const T(&s)[dim], const size_t i) const
 Shift the point transformation.
 
__device__ __host__ T transform (const Point< dim, T > &s, const size_t i) const
 Shift the point transformation.
 
template<typename Mem >
__device__ __host__ T transform (const encapc< 1, Point< dim, T >, Mem > &s, const size_t i) const
 Shift the point transformation.
 
__device__ __host__ void setTransform (const Matrix< dim, T > &mat, const Point< dim, T > &orig)
 Set the transformation Matrix and shift.
 
const Point< dim, T > & getOrig () const
 Get the shift vector.
 
const Matrix< dim, T > & getMat () const
 Get the transformation Matrix.
 
bool operator== (const shift< dim, T > &s)
 It return true if the shift match.
 
bool operator!= (const shift< dim, T > &s)
 It return true if the shift is different.
 

Private Attributes

Point< dim, T > sh
 Shift point.
 
Matrix< dim, T > mat
 Matrix transformation.
 

Constructor & Destructor Documentation

◆ shift()

template<unsigned int dim, typename T >
__device__ __host__ shift< dim, T >::shift ( const Matrix< dim, T > &  t,
const Point< dim, T > &  s 
)
inline

Constructor.

Parameters
tMatrix transformation
sshift

Definition at line 42 of file CellDecomposer.hpp.

Member Function Documentation

◆ getMat()

template<unsigned int dim, typename T >
const Matrix< dim, T > & shift< dim, T >::getMat ( ) const
inline

Get the transformation Matrix.

Returns
the transformation matrix

Definition at line 114 of file CellDecomposer.hpp.

◆ getOrig()

template<unsigned int dim, typename T >
const Point< dim, T > & shift< dim, T >::getOrig ( ) const
inline

Get the shift vector.

Returns
the shift vector

Definition at line 104 of file CellDecomposer.hpp.

◆ operator!=()

template<unsigned int dim, typename T >
bool shift< dim, T >::operator!= ( const shift< dim, T > &  s)
inline

It return true if the shift is different.

Parameters
sshift to compare with
Returns
true if the shift is different

Definition at line 138 of file CellDecomposer.hpp.

◆ operator==()

template<unsigned int dim, typename T >
bool shift< dim, T >::operator== ( const shift< dim, T > &  s)
inline

It return true if the shift match.

Parameters
sshift to compare with
Returns
true if it match

Definition at line 126 of file CellDecomposer.hpp.

◆ setTransform()

template<unsigned int dim, typename T >
__device__ __host__ void shift< dim, T >::setTransform ( const Matrix< dim, T > &  mat,
const Point< dim, T > &  orig 
)
inline

Set the transformation Matrix and shift.

Parameters
matMatrix transformation
origorigin point

Definition at line 93 of file CellDecomposer.hpp.

◆ transform() [1/3]

template<unsigned int dim, typename T >
template<typename Mem >
__device__ __host__ T shift< dim, T >::transform ( const encapc< 1, Point< dim, T >, Mem > &  s,
const size_t  i 
) const
inline

Shift the point transformation.

Parameters
ssource point
icoordinate
Returns
the transformed coordinate

Definition at line 82 of file CellDecomposer.hpp.

◆ transform() [2/3]

template<unsigned int dim, typename T >
__device__ __host__ T shift< dim, T >::transform ( const Point< dim, T > &  s,
const size_t  i 
) const
inline

Shift the point transformation.

Parameters
ssource point
icoordinate
Returns
the transformed coordinate

Definition at line 69 of file CellDecomposer.hpp.

◆ transform() [3/3]

template<unsigned int dim, typename T >
__device__ __host__ T shift< dim, T >::transform ( const T(&)  s[dim],
const size_t  i 
) const
inline

Shift the point transformation.

Parameters
ssource point
icoordinate
Returns
the transformed coordinate

Definition at line 56 of file CellDecomposer.hpp.

Field Documentation

◆ mat

template<unsigned int dim, typename T >
Matrix<dim,T> shift< dim, T >::mat
private

Matrix transformation.

Definition at line 32 of file CellDecomposer.hpp.

◆ sh

template<unsigned int dim, typename T >
Point<dim,T> shift< dim, T >::sh
private

Shift point.

Definition at line 29 of file CellDecomposer.hpp.


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