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

Detailed Description

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

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

Definition at line 149 of file CellDecomposer.hpp.

#include <CellDecomposer.hpp>

Public Member Functions

 shift_only ()
 Default constructor.
 
 shift_only (const Matrix< dim, T > &t, const Point< dim, T > &s)
 Constructor.
 
__device__ __host__ T transform (const T *s, const int i) const
 Shift the point transformation.
 
__device__ __host__ T transform (const T(&s)[dim], const int i) const
 Shift the point transformation.
 
__device__ __host__ T transform (const Point< dim, T > &s, const int i) const
 Shift the point transformation.
 
template<typename Mem >
__device__ __host__ T transform (const encapc< 1, Point< dim, T >, Mem > &s, const int i) const
 Shift the point transformation.
 
void setTransform (const Matrix< dim, T > &mat, const Point< dim, T > &orig)
 Set the transformation Matrix and shift.
 
__device__ __host__ const Point< dim, T > & getOrig () const
 Get the shift vector.
 
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.
 

Constructor & Destructor Documentation

◆ shift_only() [1/2]

template<unsigned int dim, typename T >
shift_only< dim, T >::shift_only ( )
inline

Default constructor.

Definition at line 159 of file CellDecomposer.hpp.

◆ shift_only() [2/2]

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

Constructor.

Parameters
tMatrix transformation
sshift

Definition at line 170 of file CellDecomposer.hpp.

Member Function Documentation

◆ getOrig()

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

Get the shift vector.

Returns
the shift vector

Definition at line 244 of file CellDecomposer.hpp.

◆ operator!=()

template<unsigned int dim, typename T >
bool shift_only< 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 269 of file CellDecomposer.hpp.

◆ operator==()

template<unsigned int dim, typename T >
bool shift_only< 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 257 of file CellDecomposer.hpp.

◆ setTransform()

template<unsigned int dim, typename T >
void shift_only< 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 233 of file CellDecomposer.hpp.

◆ transform() [1/4]

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

Shift the point transformation.

Parameters
ssource point
icoordinate
Returns
the transformed coordinate

Definition at line 222 of file CellDecomposer.hpp.

◆ transform() [2/4]

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

Shift the point transformation.

Parameters
ssource point
icoordinate
Returns
the transformed coordinate

Definition at line 209 of file CellDecomposer.hpp.

◆ transform() [3/4]

template<unsigned int dim, typename T >
__device__ __host__ T shift_only< dim, T >::transform ( const T *  s,
const int  i 
) const
inline

Shift the point transformation.

Parameters
ssource point
icoordinate
Returns
the transformed coordinate

Definition at line 183 of file CellDecomposer.hpp.

◆ transform() [4/4]

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

Shift the point transformation.

Parameters
ssource point
icoordinate
Returns
the transformed coordinate

Definition at line 196 of file CellDecomposer.hpp.

Field Documentation

◆ sh

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

Shift point.

Definition at line 152 of file CellDecomposer.hpp.


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