OpenFPM_pdata  1.1.0
Project that contain the implementation of distributed structures
 All Data Structures Namespaces Functions Variables Typedefs Enumerations Friends Pages
SubHyperCube< dim, subdim > Class Template Reference

This represent a sub-hyper-cube of an hyper-cube like a face or an edge of a cube. More...

Detailed Description

template<unsigned int dim, unsigned int subdim>
class SubHyperCube< dim, subdim >

This represent a sub-hyper-cube of an hyper-cube like a face or an edge of a cube.

It give a set of utility function to work with sub-hyper-cubes like the hyper-cube

Template Parameters
dimensionalityof the hyper-cube
dimensionalityof the sub-hyper-cube

First we get the surfaces of an hyper-cube

std::vector<comb<3>> sc3_2 = HyperCube<3>::getCombinations_R(2);

Getting the vertices of one particular surface of the cube

std::vector<comb<3>> combs = SubHyperCube<3,2>::getCombinations_R(sc3_2[i],0);

Getting the edges of one particular surface of the cube

Definition at line 8 of file HyperCube.hpp.

#include <HyperCube.hpp>

+ Inheritance diagram for SubHyperCube< dim, subdim >:

Static Public Member Functions

static std::vector< comb< dim > > getCombinations_R (comb< dim > c, int d)
 
- Static Public Member Functions inherited from HyperCube< subdim >
static size_t getNumberOfElements_R (size_t d)
 Get the number of Elements of dimension d. More...
 
static size_t getNumberOfElementsTo_R (size_t d_t)
 Get the sum of the number of elements from d to d_t (included) More...
 
static std::vector< comb< dim > > getCombinations_R (size_t d)
 
static std::vector< comb< dim > > getCombinations_R_bc (size_t d, const size_t(&bc)[dim])
 
static void BinPermutations (grid_key_dx_r &pos, std::vector< comb< dim >> &v)
 Binary permutations. More...
 
static void BinPermutationsSt (std::vector< comb< dim >> &v)
 Binary permutations. More...
 
static size_t LinPerm (comb< dim > &c)
 Linearize the permutation given by BinPermutationSt. More...
 
static size_t LinId (comb< dim > &c)
 Linearize the combination. More...
 
static bool isPositive (size_t d)
 isPositive return if the combination d is a positive or a negative More...
 
static int positiveFace (int d)
 return the combination of the positive face on direction d More...
 
static int negativeFace (int d)
 Return the combination of the negative face on direction d. More...
 

Member Function Documentation

template<unsigned int dim, unsigned int subdim>
static std::vector<comb<dim> > SubHyperCube< dim, subdim >::getCombinations_R ( comb< dim >  c,
int  d 
)
inlinestatic

brief Calculate the position (combinations) of all the elements of size d in the sub-hyper-cube

Parameters
cidentify the position of the sub-hyper-cube in the hypercube
ddimensionality of the objects
Returns
all the combinations

Definition at line 506 of file HyperCube.hpp.


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