This class represent an N-dimensional box. More...
This class represent an N-dimensional box.
| T | type of space ... double float int size_t | 
| N | dimensionality of the Box | 
Definition at line 26 of file SpaceBox.hpp.
#include <SpaceBox.hpp>
 Inheritance diagram for SpaceBox< dim, T >:Public Member Functions | |
| SpaceBox< dim, T > & | operator= (const Box< dim, T > &b) | 
| Define the box from a box shape.   | |
| template<typename S > | |
| SpaceBox (const Box< dim, S > &b) | |
| constructor from a Box of different type   | |
| SpaceBox (const SpaceBox< dim, T > &b) | |
| constructor from a SpaceBox   | |
| SpaceBox (const Box< dim, T > &b) | |
| constructor from a box   | |
| template<unsigned int dim_s, typename Mem > | |
| SpaceBox (const encapc< dim_s, Box< dim, T >, Mem > &box) | |
| Constructor from a Box.   | |
| template<unsigned int dim_s, typename Mem > | |
| SpaceBox (const encapc< dim_s, SpaceBox< dim, T >, Mem > &box) | |
| Constructor from a Box.   | |
| SpaceBox (std::initializer_list< T > p1, std::initializer_list< T > p2) | |
| Constructor from initializer list.   | |
| void | rescale (T(&sp)[dim]) | 
| Re-scale the space box with the coefficient defined in sp.   | |
| template<typename S > | |
| void | rescale (S(&sp)[dim]) | 
| Re-scale the space box with the coefficient defined in sp.   | |
| void | mul (T(&sp)[dim]) | 
| multiply the space box with the coefficient defined in sp   | |
| template<typename S > | |
| void | mul (S(&sp)[dim]) | 
| multiply the space box with the coefficient defined in sp   | |
| Point< dim, T > | rnd () | 
| Generate a random point inside the box.   | |
| SpaceBox () | |
| Default constructor.   | |
  Public Member Functions inherited from Box< dim, T > | |
| __device__ __host__ bool | Intersect (const Box< dim, T > &b, Box< dim, T > &b_out) const | 
| Intersect.   | |
| template<typename Mem > | |
| __device__ __host__ bool | Intersect (const encapc< 1, Box< dim, T >, Mem > &e_b, Box< dim, T > &b_out) const | 
| Intersect.   | |
| template<typename distance > | |
| bool | Intersect (Sphere< dim, T > &sphere) | 
| Check if the sphere intersect the box.   | |
| T | min_distance (Box< dim, T > &b) const | 
| template<unsigned int b> | |
| T | getBase (const unsigned int i) const | 
| Get the coordinate of the bounding point.   | |
| Box< dim-1, T > | getSubBox () | 
| Get the the box of dimensionality dim-1 (it eliminate the last dimension)   | |
| __device__ __host__ Box< dim, T > & | operator= (const Box< dim, T > &box) | 
| Operator= between boxes.   | |
| __device__ __host__ | Box () | 
| default constructor   | |
| Box (const Point< dim, T > &p1, const Point< dim, T > &p2) | |
| Constructor from two points.   | |
| Box (std::initializer_list< T > p1, std::initializer_list< T > p2) | |
| Constructor from initializer list.   | |
| Box (T *low, T *high) | |
| Box constructor from a box.   | |
| __device__ __host__ | Box (const Box< dim, T > &box) | 
| Box constructor from a box.   | |
| Box (type box_data) | |
| Box constructor from vector::fusion.   | |
| Box (T(&box_data)[dim]) | |
| Box constructor from an array reference.   | |
| Box (const grid_key_dx< dim > &key1, const grid_key_dx< dim > &key2) | |
| constructor from 2 grid_key_dx   | |
| template<unsigned int dimS> | |
| __device__ __host__ | Box (boost::fusion::vector< T[dimS], T[dimS]> &box_data) | 
| Box constructor from vector::fusion of higher dimension.   | |
| template<typename Mem > | |
| __device__ __host__ | Box (const encapc< 1, Box< dim, T >, Mem > &b) | 
| Box constructor from encapsulated box.   | |
| template<typename S > | |
| __device__ __host__ | Box (const Box< dim, S > &b) | 
| constructor from a Box of different type   | |
| Box< dim, T > & | operator/= (const Point< dim, T > &p) | 
| Divide component wise each box points with a point.   | |
| Box< dim, T > | operator* (const Point< dim, T > &p) | 
| Multiply component wise each box points with a point.   | |
| void | set (std::initializer_list< T > p1, std::initializer_list< T > p2) | 
| Constructor from initializer list.   | |
| __device__ __host__ void | setLow (int i, T val) | 
| set the low interval of the box   | |
| __device__ __host__ void | setHigh (int i, T val) | 
| set the high interval of the box   | |
| __device__ __host__ T | getLow (int i) const | 
| get the i-coordinate of the low bound interval of the box   | |
| __device__ __host__ T | getHigh (int i) const | 
| get the high interval of the box   | |
| void | setP1 (const grid_key_dx< dim > &p1) | 
| Set the point P1 of the box.   | |
| void | setP2 (const grid_key_dx< dim > &p2) | 
| Set the point P2 of the box.   | |
| void | setP1 (const Point< dim, T > &p1) | 
| Set the point P1 of the box.   | |
| void | setP2 (const Point< dim, T > &p2) | 
| Set the point P2 of the box.   | |
| Box< dim, T > & | getBox () | 
| Get the box enclosing this Box.   | |
| const Box< dim, T > & | getBox () const | 
| Get the box enclosing this Box.   | |
| type & | getVector () | 
| Get the internal boost::fusion::vector that store the data.   | |
| grid_key_dx< dim > | getKP1 () const | 
| Get the point p1 as grid_key_dx.   | |
| grid_key_dx< dim > | getKP2 () const | 
| Get the point p12 as grid_key_dx.   | |
| grid_key_dx< dim, int > | getKP1int () const | 
| Get the point p1 as grid_key_dx.   | |
| grid_key_dx< dim, int > | getKP2int () const | 
| Get the point p12 as grid_key_dx.   | |
| Point< dim, T > | getP1 () const | 
| Get the point p1.   | |
| Point< dim, T > | getP2 () const | 
| Get the point p2.   | |
| Box< dim, T > & | operator-= (const Point< dim, T > &p) | 
| Translate the box.   | |
| Box< dim, T > & | operator+= (const Point< dim, T > &p) | 
| Translate the box.   | |
| Box< dim, T > | operator+ (const Point< dim, T > &p) | 
| Translate the box.   | |
| void | expand (T(&exp)[dim]) | 
| expand the box by a vector   | |
| void | enlarge (const Box< dim, T > &gh) | 
| Enlarge the box with ghost margin.   | |
| template<typename S > | |
| void | enlarge_fix_P1 (Box< dim, S > &gh) | 
| Enlarge the box with ghost margin keeping fix the point P1.   | |
| void | invalidate () | 
| Invalidate the box.   | |
| void | magnify (T mg) | 
| Magnify the box.   | |
| void | magnify_fix_P1 (T mg) | 
| Magnify the box by a factor keeping fix the point P1.   | |
| void | shrinkP2 (T sh) | 
| Shrink moving p2 of sh quantity (on each direction)   | |
| void | enclose (const Box< dim, T > &en) | 
| Refine the box to enclose the given box and itself.   | |
| void | contained (const Box< dim, T > &en, const bool reset_p1=true) | 
| Refine the box to be contained in the given box and itself.   | |
| void | zero () | 
| Set p1 and p2 to 0.   | |
| bool | isContained (const Box< dim, T > &b) const | 
| Check if the box is contained.   | |
| __host__ __device__ bool | isInside (const Point< dim, T > &p) const | 
| Check if the point is inside the box.   | |
| __device__ __host__ bool | isInsideNP (const Point< dim, T > &p) const | 
| Check if the point is inside the region excluding the positive part.   | |
| template<typename bc_type > | |
| __device__ __host__ bool | isInsideNP_with_border (const Point< dim, T > &p, const Box< dim, T > &border, const bc_type(&bc)[dim]) const | 
| Check if the point is inside the region excluding the positive part.   | |
| bool | isInsideNB (const Point< dim, T > &p) const | 
| Check if the point is inside the region excluding the borders.   | |
| bool | isInside (const T(&p)[dim]) const | 
| Check if the point is inside the region (Border included)   | |
| template<typename KeyType > | |
| __device__ __host__ bool | isInsideKey (const KeyType &k) const | 
| Check if the point is inside the region (Border included)   | |
| bool | isValid () const | 
| Check if the Box is a valid box P2 >= P1.   | |
| bool | isValidN () const | 
| Check if the Box is a valid box P2 > P1.   | |
| void | floorP1 () | 
| Apply the ceil operation to the point P1.   | |
| void | floorP2 () | 
| Apply the ceil operation to the point P2.   | |
| void | ceilP1 () | 
| Apply the ceil operation to the point P1.   | |
| void | ceilP2 () | 
| Apply the ceil operation to the point P2.   | |
| void | shrinkP2 (const Point< dim, T > &p) | 
| Shrink the point P2 by one vector.   | |
| void | swap (Box< dim, T > &b) | 
| exchange the data of two boxes   | |
| template<typename Mem > | |
| bool | isInside (const encapc< 1, Point< dim, T >, Mem > &p) | 
| Check if the point is inside the region.   | |
| T | getRcut () const | 
| Get the worst extension.   | |
| T | getVolume () const | 
| Get the volume of the box.   | |
| T | getVolumeKey () const | 
| Get the volume spanned by the Box P1 and P2 interpreted as grid key.   | |
| Point< dim, T > | middle () const | 
| Return the middle point of the box.   | |
| std::string | toString () const | 
| Produce a string from the object.   | |
| bool | operator== (const Box< dim, T > &b) const | 
| Compare two boxes.   | |
| bool | operator!= (const Box< dim, T > &b) const | 
| Compare two boxes.   | |
Additional Inherited Members | |
  Public Types inherited from Box< dim, T > | |
| typedef boost::fusion::vector< T[dim], T[dim]> | type | 
| boost fusion that store the point   | |
| typedef T | btype | 
| type of the box   | |
| typedef int | yes_is_box | 
| Indicate that this is a box.   | |
  Static Public Member Functions inherited from Box< dim, T > | |
| static T | getVolumeKey (const T(&p1)[dim], const T(&p2)[dim]) | 
| Get the volume spanned by the Box as grid_key_dx_iterator_sub.   | |
| static bool | noPointers () | 
| This structure has no internal pointers.   | |
  Data Fields inherited from Box< dim, T > | |
| type | data | 
| It store the two point bounding the box.   | |
  Static Public Attributes inherited from Box< dim, T > | |
| static const unsigned int | p1 = 0 | 
| Low point.   | |
| static const unsigned int | p2 = 1 | 
| High point.   | |
| static const unsigned int | max_prop = 2 | 
| Maximum number of properties.   | |
| static const unsigned int | dims = dim | 
| dimensionality of the box   | |
      
  | 
  inline | 
constructor from a Box of different type
| b | box | 
Definition at line 57 of file SpaceBox.hpp.
      
  | 
  inline | 
constructor from a SpaceBox
constructor from a SpaceBox
| b | is the SpaceBox | 
Definition at line 73 of file SpaceBox.hpp.
      
  | 
  inlineexplicit | 
constructor from a box
constructor from a box
| b | is the box | 
Definition at line 86 of file SpaceBox.hpp.
      
  | 
  inline | 
Constructor from a Box.
| box | Box (Encapsulated) | 
Definition at line 97 of file SpaceBox.hpp.
      
  | 
  inline | 
Constructor from a Box.
| box | box (Encapsulated) | 
Definition at line 113 of file SpaceBox.hpp.
      
  | 
  inline | 
Constructor from initializer list.
Constructor from initializer list
| p1 | Low point, initialize as a list example {0.0,0.0,0.0} | 
| p2 | High point, initialized as a list example {1.0,1.0,1.0} | 
Definition at line 133 of file SpaceBox.hpp.
      
  | 
  inline | 
Default constructor.
Definition at line 209 of file SpaceBox.hpp.
      
  | 
  inline | 
multiply the space box with the coefficient defined in sp
It rescale the domain where the space box live
| sp | coefficents | 
Definition at line 195 of file SpaceBox.hpp.
multiply the space box with the coefficient defined in sp
It rescale the domain where the space box live
| sp | coefficents | 
Definition at line 178 of file SpaceBox.hpp.
      
  | 
  inline | 
Define the box from a box shape.
Define the box from a box shape
| b | is the box | 
Definition at line 39 of file SpaceBox.hpp.
      
  | 
  inline | 
Re-scale the space box with the coefficient defined in sp.
| sp | 
Definition at line 164 of file SpaceBox.hpp.
      
  | 
  inline | 
Re-scale the space box with the coefficient defined in sp.
| sp | 
Definition at line 152 of file SpaceBox.hpp.
Generate a random point inside the box.
Definition at line 209 of file SpaceBox.hpp.