OpenFPM_pdata  4.1.0
Project that contain the implementation of distributed structures
Padding< dim > Class Template Reference

Class that contain Padding information on each direction positive and Negative direction. More...

Detailed Description

template<unsigned int dim>
class Padding< dim >

Class that contain Padding information on each direction positive and Negative direction.

It is equivalent to a Ghost<dim,size_t>

See also
Ghost

Definition at line 126 of file Ghost.hpp.

#include <Ghost.hpp>

+ Inheritance diagram for Padding< dim >:

Public Member Functions

 Padding (std::initializer_list< long int > p1, std::initializer_list< long int > p2)
 Constructor from initializer list. More...
 
- Public Member Functions inherited from Ghost< dim, long int >
 Ghost (std::initializer_list< long int > p1, std::initializer_list< long int > p2)
 Constructor from initializer list. More...
 
 Ghost (long int r)
 
Ghost< dim, long int > & operator/= (const Point< dim, long int > &p)
 Divide component wise the ghost box with a point. More...
 
bool isInvalidGhost ()
 check if the Ghost is valid More...
 
- Public Member Functions inherited from Box< dim, long int >
__device__ __host__ bool Intersect (const Box< dim, long int > &b, Box< dim, long int > &b_out) const
 Intersect. More...
 
__device__ __host__ bool Intersect (const encapc< 1, Box< dim, long int >, Mem > &e_b, Box< dim, long int > &b_out) const
 Intersect. More...
 
bool Intersect (Sphere< dim, long int > &sphere)
 Check if the sphere intersect the box. More...
 
long int min_distance (Box< dim, long int > &b) const
 
long int getBase (const unsigned int i) const
 Get the coordinate of the bounding point. More...
 
Box< dim-1, long int > getSubBox ()
 Get the the box of dimensionality dim-1 (it eliminate the last dimension) More...
 
__device__ __host__ Box< dim, long int > & operator= (const Box< dim, long int > &box)
 Operator= between boxes. More...
 
__device__ __host__ Box ()
 default constructor
 
 Box (const Point< dim, long int > &p1, const Point< dim, long int > &p2)
 Constructor from two points. More...
 
 Box (std::initializer_list< long int > p1, std::initializer_list< long int > p2)
 Constructor from initializer list. More...
 
 Box (long int *low, long int *high)
 Box constructor from a box. More...
 
__device__ __host__ Box (const Box< dim, long int > &box)
 Box constructor from a box. More...
 
 Box (type box_data)
 Box constructor from vector::fusion. More...
 
 Box (long int(&box_data)[dim])
 Box constructor from an array reference. More...
 
 Box (const grid_key_dx< dim > &key1, const grid_key_dx< dim > &key2)
 constructor from 2 grid_key_dx More...
 
__device__ __host__ Box (boost::fusion::vector< long int [dimS], long int [dimS]> &box_data)
 Box constructor from vector::fusion of higher dimension. More...
 
__device__ __host__ Box (const encapc< 1, Box< dim, long int >, Mem > &b)
 Box constructor from encapsulated box. More...
 
__device__ __host__ Box (const Box< dim, S > &b)
 constructor from a Box of different type More...
 
Box< dim, long int > & operator/= (const Point< dim, long int > &p)
 Divide component wise each box points with a point. More...
 
Box< dim, long int > operator * (const Point< dim, long int > &p)
 Multiply component wise each box points with a point. More...
 
void set (std::initializer_list< long int > p1, std::initializer_list< long int > p2)
 Constructor from initializer list. More...
 
__device__ __host__ void setLow (int i, long int val)
 set the low interval of the box More...
 
__device__ __host__ void setHigh (int i, long int val)
 set the high interval of the box More...
 
__device__ __host__ long int getLow (int i) const
 get the i-coordinate of the low bound interval of the box More...
 
__device__ __host__ long int getHigh (int i) const
 get the high interval of the box More...
 
void setP1 (const grid_key_dx< dim > &p1)
 Set the point P1 of the box. More...
 
void setP1 (const Point< dim, long int > &p1)
 Set the point P1 of the box. More...
 
void setP2 (const grid_key_dx< dim > &p2)
 Set the point P2 of the box. More...
 
void setP2 (const Point< dim, long int > &p2)
 Set the point P2 of the box. More...
 
Box< dim, long int > & getBox ()
 Get the box enclosing this Box. More...
 
const Box< dim, long int > & getBox () const
 Get the box enclosing this Box. More...
 
typegetVector ()
 Get the internal boost::fusion::vector that store the data. More...
 
grid_key_dx< dim > getKP1 () const
 Get the point p1 as grid_key_dx. More...
 
grid_key_dx< dim > getKP2 () const
 Get the point p12 as grid_key_dx. More...
 
grid_key_dx< dim, int > getKP1int () const
 Get the point p1 as grid_key_dx. More...
 
grid_key_dx< dim, int > getKP2int () const
 Get the point p12 as grid_key_dx. More...
 
Point< dim, long int > getP1 () const
 Get the point p1. More...
 
Point< dim, long int > getP2 () const
 Get the point p2. More...
 
Box< dim, long int > & operator-= (const Point< dim, long int > &p)
 Translate the box. More...
 
Box< dim, long int > & operator+= (const Point< dim, long int > &p)
 Translate the box. More...
 
Box< dim, long int > operator+ (const Point< dim, long int > &p)
 Translate the box. More...
 
void expand (long int(&exp)[dim])
 expand the box by a vector More...
 
void enlarge (const Box< dim, long int > &gh)
 Enlarge the box with ghost margin. More...
 
void enlarge_fix_P1 (Box< dim, S > &gh)
 Enlarge the box with ghost margin keeping fix the point P1. More...
 
void invalidate ()
 Invalidate the box. More...
 
void magnify (long int mg)
 Magnify the box. More...
 
void magnify_fix_P1 (long int mg)
 Magnify the box by a factor keeping fix the point P1. More...
 
void shrinkP2 (long int sh)
 Shrink moving p2 of sh quantity (on each direction) More...
 
void shrinkP2 (const Point< dim, long int > &p)
 Shrink the point P2 by one vector. More...
 
void enclose (const Box< dim, long int > &en)
 Refine the box to enclose the given box and itself. More...
 
void contained (const Box< dim, long int > &en, const bool reset_p1=true)
 Refine the box to be contained in the given box and itself. More...
 
void zero ()
 Set p1 and p2 to 0. More...
 
bool isContained (const Box< dim, long int > &b) const
 Check if the box is contained. More...
 
__host__ __device__ bool isInside (const Point< dim, long int > &p) const
 Check if the point is inside the box. More...
 
bool isInside (const long int(&p)[dim]) const
 Check if the point is inside the region (Border included) More...
 
bool isInside (const encapc< 1, Point< dim, long int >, Mem > &p)
 Check if the point is inside the region. More...
 
__device__ __host__ bool isInsideNP (const Point< dim, long int > &p) const
 Check if the point is inside the region excluding the positive part. More...
 
__device__ __host__ bool isInsideNP_with_border (const Point< dim, long int > &p, const Box< dim, long int > &border, const bc_type(&bc)[dim]) const
 Check if the point is inside the region excluding the positive part. More...
 
bool isInsideNB (const Point< dim, long int > &p) const
 Check if the point is inside the region excluding the borders. More...
 
__device__ __host__ bool isInsideKey (const KeyType &k) const
 Check if the point is inside the region (Border included) More...
 
bool isValid () const
 Check if the Box is a valid box P2 >= P1. More...
 
bool isValidN () const
 Check if the Box is a valid box P2 > P1. More...
 
void floorP1 ()
 Apply the ceil operation to the point P1. More...
 
void floorP2 ()
 Apply the ceil operation to the point P2. More...
 
void ceilP1 ()
 Apply the ceil operation to the point P1. More...
 
void ceilP2 ()
 Apply the ceil operation to the point P2. More...
 
void swap (Box< dim, long int > &b)
 exchange the data of two boxes More...
 
long int getRcut () const
 Get the worst extension. More...
 
long int getVolume () const
 Get the volume of the box. More...
 
long int getVolumeKey () const
 Get the volume spanned by the Box P1 and P2 interpreted as grid key. More...
 
Point< dim, long int > middle () const
 Return the middle point of the box. More...
 
std::string toString () const
 Produce a string from the object. More...
 
bool operator== (const Box< dim, long int > &b) const
 Compare two boxes. More...
 
bool operator!= (const Box< dim, long int > &b) const
 Compare two boxes. More...
 

Additional Inherited Members

- Public Types inherited from Box< dim, long int >
typedef boost::fusion::vector< long int [dim], long int [dim]> type
 boost fusion that store the point
 
typedef long int btype
 type of the box
 
typedef int yes_is_box
 Indicate that this is a box.
 
- Static Public Member Functions inherited from Box< dim, long int >
static long int getVolumeKey (const long int(&p1)[dim], const long int(&p2)[dim])
 Get the volume spanned by the Box as grid_key_dx_iterator_sub. More...
 
static bool noPointers ()
 This structure has no internal pointers.
 
- Data Fields inherited from Box< dim, long int >
type data
 It store the two point bounding the box.
 
- Static Public Attributes inherited from Box< dim, long int >
static const unsigned int p1
 Low point.
 
static const unsigned int p2
 High point.
 
static const unsigned int max_prop
 Maximum number of properties.
 
static const unsigned int dims
 dimensionality of the box
 

Constructor & Destructor Documentation

◆ Padding()

template<unsigned int dim>
Padding< dim >::Padding ( std::initializer_list< long int >  p1,
std::initializer_list< long int >  p2 
)
inline

Constructor from initializer list.

Parameters
p1Padding left, initialize as a list example {0.0,0.0,0.0}
p2Padding right, initialized as a list example {1.0,1.0,1.0}

Definition at line 135 of file Ghost.hpp.


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