C++ mpi module for stochmagnet_main Package
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
SM_NetworkGridBuilder Class Reference

This class build a network from unit cells defined on grid. More...

#include <SM_NetworkGridBuilder.h>

Inheritance diagram for SM_NetworkGridBuilder:
Inheritance graph
[legend]
Collaboration diagram for SM_NetworkGridBuilder:
Collaboration graph
[legend]

Public Member Functions

virtual tMemSize getMemorySize () const
 return the memory size of the class and the memory size of all its attributes/associations More...
 
virtual tMemSize getContentsMemorySize () const
 return the memory size of the included associations More...
 
- Public Member Functions inherited from SM_NetworkBuilder
virtual void buildNetwork (const SM_CrystalStructure &cStructure, const std::array< tBoolean, SM_Constants::DIM > &isPeriodic, const std::array< tReal, SM_Constants::DIM > &X0, const std::array< tInteger, SM_Constants::DIM > &Ns, const std::valarray< tMask > &mask, SM_Network &network)=0
 build the network from a grid paver and a mask on crystal structure on grid More...
 
virtual tBoolean buildDomainNetwork (const SM_CrystalStructure &cStructure, const std::array< tBoolean, SM_Constants::DIM > &isPeriodic, const tString &domainExpression, SM_Network &network)=0
 build the network from domain expression More...
 
void buildPaverNetwork (const SM_CrystalStructure &cStructure, const std::array< tBoolean, SM_Constants::DIM > &isPeriodic, const std::array< tInteger, SM_Constants::DIM > &Ns, SM_Network &network)
 build the network from a grid paver More...
 
void buildPaverNetwork (const SM_CrystalStructure &cStructure, const std::array< tReal, SM_Constants::DIM > &X0, const std::array< tInteger, SM_Constants::DIM > &Ns, SM_Network &network)
 build the network from a grid paver More...
 
void buildPaverNetwork (const SM_CrystalStructure &cStructure, const std::array< tInteger, SM_Constants::DIM > &Ns, SM_Network &network)
 build the network from a grid paver More...
 
void buildPaverNetwork (const SM_CrystalStructure &cStructure, const std::array< tBoolean, SM_Constants::DIM > &isPeriodic, const std::array< tReal, SM_Constants::DIM > &X0, const std::array< tInteger, SM_Constants::DIM > &Ns, SM_Network &network)
 build the network from a grid paver More...
 
- Public Member Functions inherited from SM_Object
 SM_Object (void)
 create
 
virtual ~SM_Object (void)
 destroy
 
- Public Member Functions inherited from CORE_Object
template<class T >
std::shared_ptr< T > getSharedPointer ()
 return the shared pointer for this More...
 
template<class T >
std::shared_ptr< const T > getConstSharedPointer () const
 return a const shared pointer for this More...
 
template<class T >
tBoolean isInstanceOf () const
 test if the clas T is an instance of this class More...
 
tString getClassName () const
 return the name of the class More...
 
tString getPointerString () const
 retrun the pointer of the class as a string More...
 
tString getIdentityString () const
 retrun the string identification of the class More...
 
virtual tString toString () const
 return the string representation of the object node More...
 

Static Public Member Functions

static tIndex BuildBlock (const std::array< tInteger, SM_Constants::DIM > &nCs, const tInteger *iBlocksNumber, const tInteger *iBlockIndex, const tReal &margin, const tReal *iX0, const tReal *iHs, tInteger *iI0, tInteger *iI1, tReal *iBlockMinPoint, tReal *iBlockMaxPoint)
 buid a block within a grid domain More...
 
static tIndex GetCellsNumberInBlock (const std::array< tInteger, SM_Constants::DIM > &nCs, const tInteger *iBlocksNumber, const tInteger *iBlockIndex)
 buid a block within a grid domain More...
 
template<tUCInt R>
static tBoolean IsPointInBlock (std::array< tInteger, SM_Constants::DIM > &I, const tReal *iBlockMinPoint, const tReal *iBlockMaxPoint, const tReal *iX0, const tReal *iHs, tReal *iP)
 return true if the point P=X0+(I+0.5R).Hs is in [blockMinPoint,blockMaxPoint[ More...
 
static tBoolean GetCenterFacePointInBlock (const tDimension &d, const std::array< tDimension, SM_Constants::HDIM > &hyperplanBase, const std::array< tInteger, SM_Constants::DIM > &faceElementIndices, const std::array< tReal, SM_Constants::DIM > &blockMinPoint, const std::array< tReal, SM_Constants::DIM > &blockMaxPoint, std::array< tUCInt, SM_Constants::HDIM > &moveIndices, const std::array< tReal, SM_Constants::DIM > &X0, const std::array< tReal, SM_Constants::DIM > &H, std::array< tReal, SM_Constants::DIM > &P)
 return true if the point at center of face of the d-surface is in [blockMinPoint,blockMaxPoint[ More...
 
template<tBoolean R>
static void GetPointWithIndices (std::array< tInteger, SM_Constants::DIM > &I, const tReal *iX0, const tReal *iHs, tReal *iP)
 get the point with indices within the cell of indices I with relative position R in {0,1} More...
 
static void GetCenterFacePoint (const tDimension &d, const std::array< tDimension, SM_Constants::HDIM > &hyperplanBase, const std::array< tInteger, SM_Constants::DIM > &faceElementIndices, std::array< tUCInt, SM_Constants::HDIM > &movesIndices, const std::array< tReal, SM_Constants::DIM > &X0, const std::array< tReal, SM_Constants::DIM > &H, std::array< tReal, SM_Constants::DIM > &P)
 get the point located at center of element of d-surface whith faceElementIndices More...
 
static void GetCellVertices (const std::array< tInteger, SM_Constants::DIM > &cellIndices, const std::array< tInteger, SM_Constants::DIM > &nPs, const std::array< tBoolean, SM_Constants::DIM > &isPeriodic, std::array< tUCInt, SM_Constants::DIM > &moveIndices, std::array< tInteger, SM_Constants::DIM > &vertexIndices, std::map< tIndex, tIndex > &vertices)
 get the vertices at summit of cells More...
 
static void GetFaceVertices (const tDimension &d, const std::array< tDimension, SM_Constants::HDIM > &hyperplanBase, const std::array< tInteger, SM_Constants::DIM > faceElementIndices, const std::array< tInteger, SM_Constants::DIM > &nPs, const std::array< tBoolean, SM_Constants::DIM > &isPeriodic, std::array< tUCInt, SM_Constants::HDIM > &moveIndices, std::array< tInteger, SM_Constants::DIM > &vertexIndices, tIndex &vertexIndex, std::map< tIndex, tIndex > &vertices)
 get the vertices at summit of face More...
 
static tBoolean IsFaceInDomain (const tDimension &d, const std::array< tDimension, SM_Constants::HDIM > &hyperplanBase, const tInteger *iFaceElementIndices, const std::array< tInteger, SM_Constants::DIM > &nCs, const std::array< tBoolean, SM_Constants::DIM > &isPeriodic, const tBoolean &incMask, const tMask *vMask, std::array< tInteger, SM_Constants::DIM > &connectedCellIndices)
 return true if the face is in domain More...
 
static void GetConnectedDomainCellsToVertex (const std::array< tInteger, SM_Constants::DIM > &vertexIndices, const std::array< tInteger, SM_Constants::DIM > &Ns, const std::array< tBoolean, SM_Constants::DIM > &isPeriodic, const tBoolean &incMask, const tMask *vMask, std::array< tUCInt, SM_Constants::DIM > &moveIndices, std::array< tInteger, SM_Constants::DIM > &connectedCellIndices, std::map< tIndex, tIndex > &connectedCells)
 get the cells in domain and connected to vertex More...
 
static void GetConnectedDomainCellsToFace (const tDimension &d, const std::array< tDimension, SM_Constants::HDIM > &hyperplanBase, const tInteger *iFaceElementIndices, const std::array< tInteger, SM_Constants::DIM > &nCs, const std::array< tBoolean, SM_Constants::DIM > &isPeriodic, const tBoolean &incMask, const tMask *vMask, std::array< tInteger, SM_Constants::DIM > &connectedCellIndices, std::map< tIndex, tIndex > &connectedCells)
 get the cells in domain and connected to face More...
 
static void GetConnectedDomainFacesToVertex (const std::array< tInteger, SM_Constants::DIM > &vertexIndices, const tDimension &d, const std::array< tDimension, SM_Constants::HDIM > &hyperplanBase, const std::array< tInteger, SM_Constants::DIM > &facesElementsNumber, const std::array< tInteger, SM_Constants::DIM > &nCs, const std::array< tBoolean, SM_Constants::DIM > &isPeriodic, const tBoolean &incMask, const tMask *vMask, std::array< tUCInt, SM_Constants::HDIM > &moveIndices, std::array< tInteger, SM_Constants::DIM > &cellIndices, tIndex &index, std::array< tInteger, SM_Constants::DIM > &faceElementIndices, std::map< tIndex, tIndex > &connectedFaces)
 get the faces in domain and connected to vertex More...
 
static void GetConnectedDomainFacesToFace (const tDimension &p, const std::array< tDimension, SM_Constants::HDIM > &pHyperplanBase, const tInteger *iFaceElementIndices, const tDimension &q, const std::array< tDimension, SM_Constants::HDIM > &qHyperplanBase, const std::array< tInteger, SM_Constants::DIM > &qFacesElementsNumber, const std::array< tInteger, SM_Constants::DIM > &nCs, const std::array< tBoolean, SM_Constants::DIM > &isPeriodic, const tBoolean &incMask, const tMask *vMask, std::array< tInteger, SM_Constants::DIM > &connectedCellIndices, tIndex &cellIndex, std::array< tInteger, SM_Constants::DIM > &connectedFaceIndices, std::map< tIndex, tIndex > &connectedFaces)
 get the faces in q-surfaces domain and connected to face in p-surface More...
 
static void BuildVerticesWeight (const std::array< tInteger, SM_Constants::DIM > &nCs, const std::array< tInteger, SM_Constants::DIM > &nPs, const std::array< tBoolean, SM_Constants::DIM > &isPeriodic, const std::valarray< tMask > &mask, tReal *iVerticesWeight, tUCInt *iConnectedCellsNumber, tIndex *iConnectedCells)
 build the weight of vertex More...
 
static void BuildFacesWeight (const tDimension &d, const std::array< tDimension, SM_Constants::HDIM > &hyperplanBase, const std::array< tInteger, SM_Constants::DIM > &nCs, const std::array< tInteger, SM_Constants::DIM > &nPs, const std::array< tBoolean, SM_Constants::DIM > &isPeriodic, const std::valarray< tMask > &mask, tReal *iFacesWeight, tUCInt *iConnectedCellsNumber, tIndex *iConnectedCells)
 build the weight of vertex at center of faces More...
 
static void BuildCellsWeight (const std::array< tInteger, SM_Constants::DIM > &nCs, const std::valarray< tMask > &mask, tReal *iCellsWeight, tUCInt *iConnectedCellsNumber, tIndex *iConnectedCells)
 build the weight of vertex at center of cells More...
 
static void BuildCellsParticlesNumber (const std::array< tInteger, SM_Constants::DIM > Ns, const std::valarray< tReal > &elementsWeight, const std::valarray< tUCInt > &elementsConnectedCellsNumber, const std::valarray< tIndex > &elementsConnectedCells, std::valarray< tReal > &cellsParticlesNumber)
 build the number of particles within each cell More...
 
static void BuildElementsVolume (const std::valarray< tReal > &elementsWeight, const std::valarray< tUCInt > &elementsConnectedCellsNumber, const std::valarray< tIndex > &elementsConnectedCells, const std::valarray< tReal > &cellsParticlesNumber, std::valarray< tReal > &elementsVolume)
 build the volume of each element More...
 
- Static Public Member Functions inherited from CORE_Object
static tBoolean EnableMemoryStack (const tBoolean &isMemoryChecked)
 enable the memory stack More...
 
static void EnableMemoryStack ()
 enable the memory stack
 
static void DisableMemoryStack ()
 disable the memory stack
 
static tBoolean IsMemoryStackEnabled ()
 return trur if the memory stack is enabled
 
static tString MemoryStackToString ()
 get the memory stack in string More...
 
static tIndex GetRegisteredClassesNumber ()
 get the memory stack in string More...
 

Static Public Attributes

static tUCInt N_HYPERPLAN_MOVES
 number of moves per hyperplan
 
static tUCInt N_SPACE_MOVES
 number of moves in space
 

Protected Member Functions

 SM_NetworkGridBuilder (void)
 create a network class
 
virtual ~SM_NetworkGridBuilder (void)
 destroy
 
- Protected Member Functions inherited from SM_NetworkBuilder
 SM_NetworkBuilder (void)
 create a network class
 
virtual ~SM_NetworkBuilder (void)
 destroy
 
- Protected Member Functions inherited from CORE_Object
 CORE_Object ()
 build an instance of the object
 
virtual ~CORE_Object ()
 destroy the instance of object std

 

Detailed Description

This class build a network from unit cells defined on grid.

Author
Stephane Despreaux
Version
3.0

Member Function Documentation

◆ BuildBlock()

tIndex SM_NetworkGridBuilder::BuildBlock ( const std::array< tInteger, SM_Constants::DIM > &  nCs,
const tInteger *  iBlocksNumber,
const tInteger *  iBlockIndex,
const tReal &  margin,
const tReal *  iX0,
const tReal *  iHs,
tInteger *  iI0,
tInteger *  iI1,
tReal *  iBlockMinPoint,
tReal *  iBlockMaxPoint 
)
static

buid a block within a grid domain

Parameters
[in]nCsnumber of cells of the grid per direction
[in]iBlocksNumber: iterator on the blocks number per direction
[in]iBlockIndex: iterator on index of the block to build
[in]margin: margin of the block
[in]iX0: iterator on min point of the grid
[in]iHsiterator on the size of each cell of the grid
[out]iI0iterator on indices of the start block in the grid
[out]iI1iterator on indices of the end block in the grid
[out]iBlockMinPoint: iterator on coordinate of the min point of the block
[out]iBlockMaxPoint: iterator on coordinate of the max point of the block
Returns
the maximum number of cells of the block
  • X1=X0+nCs.Hs : max point of the grid
  • blockMinPoint=X0+blockIndex .(X1-X0)/blocksNumber = X0+blockIndex .(nCs.Hs)/blocksNumber
  • blockMaxPoint=X0+blockIndex+1).(X1-X0)/blocksNumber = X0+(blockIndex+1).(nCs.Hs)/blocksNumber
  • I0=blockIndex * nCs / blocksNumber
  • I1=(blockIndex+1)* nCs / blocksNumber

◆ BuildCellsParticlesNumber()

void SM_NetworkGridBuilder::BuildCellsParticlesNumber ( const std::array< tInteger, SM_Constants::DIM Ns,
const std::valarray< tReal > &  elementsWeight,
const std::valarray< tUCInt > &  elementsConnectedCellsNumber,
const std::valarray< tIndex > &  elementsConnectedCells,
std::valarray< tReal > &  cellsParticlesNumber 
)
static

build the number of particles within each cell

Parameters
[in]Nsnumber of cells of the grid
[in]elementsWeight: weight of element (vertex,face,cell)
[in]elementsConnectedCellsNumbernumber of cells connected to elements
[in]elementsConnectedCellscells connected to elements
[out]cellsParticlesNumber: number of particles per cell

◆ BuildCellsWeight()

void SM_NetworkGridBuilder::BuildCellsWeight ( const std::array< tInteger, SM_Constants::DIM > &  nCs,
const std::valarray< tMask > &  mask,
tReal *  iCellsWeight,
tUCInt *  iConnectedCellsNumber,
tIndex *  iConnectedCells 
)
static

build the weight of vertex at center of cells

Parameters
[in]nCsnumber of cells of the grid
[in]mask: mask array for each cell to indicate if it is in domain or not
[out]iCellsWeightiterator on array of weight of cells
[out]iConnectedCellsNumberiterator on array of number of connected cells
[out]iConnectedCellsiterator on array of connected cells

◆ BuildElementsVolume()

void SM_NetworkGridBuilder::BuildElementsVolume ( const std::valarray< tReal > &  elementsWeight,
const std::valarray< tUCInt > &  elementsConnectedCellsNumber,
const std::valarray< tIndex > &  elementsConnectedCells,
const std::valarray< tReal > &  cellsParticlesNumber,
std::valarray< tReal > &  elementsVolume 
)
static

build the volume of each element

Parameters
[in]elementsWeight: weight of element (vertex,face,cell)
[in]elementsConnectedCellsNumbernumber of cells connected to elements
[in]elementsConnectedCellscells connected to elements
[in]cellsParticlesNumber: number of particles per cell
[out]elementsVolume: volume of each element

◆ BuildFacesWeight()

void SM_NetworkGridBuilder::BuildFacesWeight ( const tDimension &  d,
const std::array< tDimension, SM_Constants::HDIM > &  hyperplanBase,
const std::array< tInteger, SM_Constants::DIM > &  nCs,
const std::array< tInteger, SM_Constants::DIM > &  nPs,
const std::array< tBoolean, SM_Constants::DIM > &  isPeriodic,
const std::valarray< tMask > &  mask,
tReal *  iFacesWeight,
tUCInt *  iConnectedCellsNumber,
tIndex *  iConnectedCells 
)
static

build the weight of vertex at center of faces

Parameters
[in]d: direction of the normal of the surface
[in]hyperplanBaseidices of the base of the surface
[in]nCsnumber of cells of the grid
[in]nPsnumber of points of the grid
[in]isPeriodic: periodicity of the grid
[in]mask: mask array for each cell to indicate if it is in domain or not
[out]iFacesWeightiterator on array of weight of faces
[out]iConnectedCellsNumberiterator on array of number of connected cells
[out]iConnectedCellsiterator on array of connected cells

◆ BuildVerticesWeight()

void SM_NetworkGridBuilder::BuildVerticesWeight ( const std::array< tInteger, SM_Constants::DIM > &  nCs,
const std::array< tInteger, SM_Constants::DIM > &  nPs,
const std::array< tBoolean, SM_Constants::DIM > &  isPeriodic,
const std::valarray< tMask > &  mask,
tReal *  iVerticesWeight,
tUCInt *  iConnectedCellsNumber,
tIndex *  iConnectedCells 
)
static

build the weight of vertex

Parameters
[in]nCsnumber of cells of the grid
[in]nPsnumber of points of the grid
[in]isPeriodic: periodicity of the grid
[in]mask: mask array for each cell to indicate if it is in domain or not
[out]iVerticesWeightiterator on array of weight of vertices
[out]iConnectedCellsNumberiterator on array of number of connected cells to vertex
[out]iConnectedCellsiterator on array of connected cells to vertex

◆ GetCellsNumberInBlock()

static tIndex SM_NetworkGridBuilder::GetCellsNumberInBlock ( const std::array< tInteger, SM_Constants::DIM > &  nCs,
const tInteger *  iBlocksNumber,
const tInteger *  iBlockIndex 
)
inlinestatic

buid a block within a grid domain

Parameters
[in]nCsnumber of cells of the grid per direction
[in]iBlocksNumber: iterator on the blocks number per direction
[in]iBlockIndex: iterator on index of the block to build
Returns
the number of cells within blick in [I0,I1[:
  • I0=blockIndex * nCs / blocksNumber
  • I1=(blockIndex+1)* nCs / blocksNumber

◆ GetCellVertices()

void SM_NetworkGridBuilder::GetCellVertices ( const std::array< tInteger, SM_Constants::DIM > &  cellIndices,
const std::array< tInteger, SM_Constants::DIM > &  nPs,
const std::array< tBoolean, SM_Constants::DIM > &  isPeriodic,
std::array< tUCInt, SM_Constants::DIM > &  moveIndices,
std::array< tInteger, SM_Constants::DIM > &  vertexIndices,
std::map< tIndex, tIndex > &  vertices 
)
static

get the vertices at summit of cells

Parameters
[in]cellIndicesindices of cell
[in]nPsnumber of points of the grid
[in]isPeriodic: periodicity of the grid
[out]moveIndicesindices of moving directions
[out]vertexIndicesindices of vertices
[out]verticesordered list of vertices of the cell

◆ GetCenterFacePoint()

void SM_NetworkGridBuilder::GetCenterFacePoint ( const tDimension &  d,
const std::array< tDimension, SM_Constants::HDIM > &  hyperplanBase,
const std::array< tInteger, SM_Constants::DIM > &  faceElementIndices,
std::array< tUCInt, SM_Constants::HDIM > &  movesIndices,
const std::array< tReal, SM_Constants::DIM > &  X0,
const std::array< tReal, SM_Constants::DIM > &  H,
std::array< tReal, SM_Constants::DIM > &  P 
)
static

get the point located at center of element of d-surface whith faceElementIndices

Parameters
[in]d: direction of the normal of the surface
[in]hyperplanBaseidices of the base of the surface
[in]faceElementIndicesindices of the element of the d-surface oriented by hyperplanBase
[out]movesIndicesindices of moving directions
[in]X0: coordinate of the min point of the boning box of the domai
[in]Hsize of the cells
[out]Pcoordinate of the point

◆ GetCenterFacePointInBlock()

tBoolean SM_NetworkGridBuilder::GetCenterFacePointInBlock ( const tDimension &  d,
const std::array< tDimension, SM_Constants::HDIM > &  hyperplanBase,
const std::array< tInteger, SM_Constants::DIM > &  faceElementIndices,
const std::array< tReal, SM_Constants::DIM > &  blockMinPoint,
const std::array< tReal, SM_Constants::DIM > &  blockMaxPoint,
std::array< tUCInt, SM_Constants::HDIM > &  moveIndices,
const std::array< tReal, SM_Constants::DIM > &  X0,
const std::array< tReal, SM_Constants::DIM > &  H,
std::array< tReal, SM_Constants::DIM > &  P 
)
static

return true if the point at center of face of the d-surface is in [blockMinPoint,blockMaxPoint[

Parameters
[in]d: direction of the normal of the surface
[in]hyperplanBaseidices of the base of the surface
[in]faceElementIndicesindices of the element of the d-surface oriented by hyperplanBase
[in]blockMinPointthe min point coordinates of the block
[in]blockMaxPointthe max point coordinates of the block
[in]moveIndicesindices of moving directions
[in]X0: coordinate of the min point of the boning box of the domai
[in]Hsize of the cells
[out]Pcoordinate of the point
Returns
true if the point P is in [BlockMinPoint,blockMaxPoint[, false otherwise

◆ GetConnectedDomainCellsToFace()

void SM_NetworkGridBuilder::GetConnectedDomainCellsToFace ( const tDimension &  d,
const std::array< tDimension, SM_Constants::HDIM > &  hyperplanBase,
const tInteger *  iFaceElementIndices,
const std::array< tInteger, SM_Constants::DIM > &  nCs,
const std::array< tBoolean, SM_Constants::DIM > &  isPeriodic,
const tBoolean &  incMask,
const tMask *  vMask,
std::array< tInteger, SM_Constants::DIM > &  connectedCellIndices,
std::map< tIndex, tIndex > &  connectedCells 
)
static

get the cells in domain and connected to face

Parameters
[in]d: direction of the normal of the surface
[in]hyperplanBaseidices of the base of the surface
[in]iFaceElementIndicesiterator on indices of the element of the d-surface oriented by hyperplanBase
[in]nCsnumber of cells of the grid
[in]isPeriodic: periodicity of the grid
[in]incMask: mask uniform indicator
[in]vMask: mask value for each cell to indicate if it is in domain or not
[out]connectedCellIndices: work array indices of connected cells
[out]connectedCellsordered list of cells of the domain connected to face

◆ GetConnectedDomainCellsToVertex()

void SM_NetworkGridBuilder::GetConnectedDomainCellsToVertex ( const std::array< tInteger, SM_Constants::DIM > &  vertexIndices,
const std::array< tInteger, SM_Constants::DIM > &  Ns,
const std::array< tBoolean, SM_Constants::DIM > &  isPeriodic,
const tBoolean &  incMask,
const tMask *  vMask,
std::array< tUCInt, SM_Constants::DIM > &  moveIndices,
std::array< tInteger, SM_Constants::DIM > &  connectedCellIndices,
std::map< tIndex, tIndex > &  connectedCells 
)
static

get the cells in domain and connected to vertex

Parameters
[in]vertexIndicesindices of vertices
[in]Nsnumber of cells of the grid
[in]isPeriodic: periodicity of the grid
[in]incMask: mask uniform indicator
[in]vMask: mask value for each cell to indicate if it is in domain or not
[out]moveIndiceswork array indices of moving directions
[out]connectedCellIndices: work array indices of connected cells
[out]connectedCellsordered list of cells of the domain connected to vertex

◆ GetConnectedDomainFacesToFace()

void SM_NetworkGridBuilder::GetConnectedDomainFacesToFace ( const tDimension &  p,
const std::array< tDimension, SM_Constants::HDIM > &  pHyperplanBase,
const tInteger *  iFaceElementIndices,
const tDimension &  q,
const std::array< tDimension, SM_Constants::HDIM > &  qHyperplanBase,
const std::array< tInteger, SM_Constants::DIM > &  qFacesElementsNumber,
const std::array< tInteger, SM_Constants::DIM > &  nCs,
const std::array< tBoolean, SM_Constants::DIM > &  isPeriodic,
const tBoolean &  incMask,
const tMask *  vMask,
std::array< tInteger, SM_Constants::DIM > &  connectedCellIndices,
tIndex &  cellIndex,
std::array< tInteger, SM_Constants::DIM > &  connectedFaceIndices,
std::map< tIndex, tIndex > &  connectedFaces 
)
static

get the faces in q-surfaces domain and connected to face in p-surface

Parameters
[in]p: direction of the normal of the surface
[in]pHyperplanBaseidices of the base of the surface
[in]iFaceElementIndicesiterator on indices of the element of the p-surface oriented by hyperplanBase p-HyperplanBase
[in]q: direction of the normal of the surface
[in]qHyperplanBaseidices of the base of the q-surface
[in]qFacesElementsNumbernumber of elements of the q-surfaces
[in]nCsnumber of cells of the grid
[in]isPeriodic: periodicity of the grid
[in]incMask: mask uniform indicator
[in]vMask: mask value for each cell to indicate if it is in domain or not
[out]connectedCellIndices: work array indices of connected cells
[out]cellIndex: work index of cell
[out]connectedFaceIndices: work array indices of connected faces
[out]connectedFacesordered list of faces in q-surafces of the domain connected to face in p-surface

◆ GetConnectedDomainFacesToVertex()

void SM_NetworkGridBuilder::GetConnectedDomainFacesToVertex ( const std::array< tInteger, SM_Constants::DIM > &  vertexIndices,
const tDimension &  d,
const std::array< tDimension, SM_Constants::HDIM > &  hyperplanBase,
const std::array< tInteger, SM_Constants::DIM > &  facesElementsNumber,
const std::array< tInteger, SM_Constants::DIM > &  nCs,
const std::array< tBoolean, SM_Constants::DIM > &  isPeriodic,
const tBoolean &  incMask,
const tMask *  vMask,
std::array< tUCInt, SM_Constants::HDIM > &  moveIndices,
std::array< tInteger, SM_Constants::DIM > &  cellIndices,
tIndex &  index,
std::array< tInteger, SM_Constants::DIM > &  faceElementIndices,
std::map< tIndex, tIndex > &  connectedFaces 
)
static

get the faces in domain and connected to vertex

Parameters
[in]vertexIndicesindices of vertices
[in]d: direction of the normal of the surface
[in]hyperplanBaseidices of the base of the surface
[in]facesElementsNumbernumber of the elements of the d-surfaces oriented by hyperplanBase
[in]nCsnumber of cells of the grid
[in]isPeriodic: periodicity of the grid
[in]incMask: mask uniform indicator
[in]vMask: mask value for each cell to indicate if it is in domain or not
[out]moveIndiceswork array indices of moving directions
[out]cellIndiceswork array indices of connected cells
[out]indexwork index of element
[out]faceElementIndiceswork array indices of connected face
[out]connectedFacesordered list of faces of the domain connected to vertex

◆ getContentsMemorySize()

virtual tMemSize SM_NetworkGridBuilder::getContentsMemorySize ( ) const
inlinevirtual

return the memory size of the included associations

Returns
the memory size of the storage in bytes 1 Kb = 1024 bytes 1 Mb = 1024 Kb 1 Gb = 1024 Mb 1 Tb = 1024 Gb 1 Hb = 1024 Tb

Reimplemented from SM_NetworkBuilder.

Reimplemented in SM_CrystalStructuresGridBuilder, and SMOMPI_CrystalStructuresGridBuilder.

◆ GetFaceVertices()

void SM_NetworkGridBuilder::GetFaceVertices ( const tDimension &  d,
const std::array< tDimension, SM_Constants::HDIM > &  hyperplanBase,
const std::array< tInteger, SM_Constants::DIM faceElementIndices,
const std::array< tInteger, SM_Constants::DIM > &  nPs,
const std::array< tBoolean, SM_Constants::DIM > &  isPeriodic,
std::array< tUCInt, SM_Constants::HDIM > &  moveIndices,
std::array< tInteger, SM_Constants::DIM > &  vertexIndices,
tIndex &  vertexIndex,
std::map< tIndex, tIndex > &  vertices 
)
static

get the vertices at summit of face

Parameters
[in]d: direction of the normal of the surface
[in]hyperplanBaseidices of the base of the surface
[in]faceElementIndicesindices of the element of the d-surface oriented by hyperplanBase
[in]nPsnumber of points of the grid
[in]isPeriodic: periodicity of the grid
[out]moveIndicesindices of moving directions
[out]vertexIndicesindices of vertices
[out]vertexIndexindex of vertices
[out]verticesordered list of vertices of the face

◆ getMemorySize()

virtual tMemSize SM_NetworkGridBuilder::getMemorySize ( ) const
inlinevirtual

return the memory size of the class and the memory size of all its attributes/associations

Returns
the memory size of the class and the memory size of its attributes/associations in bytes The mamory size is :
  • the added size of the base classes which contains:
    • the primary attributes size depends on the order: (first delare the smallest attributes size
    • all virtual functions costs <pointer-size> (4 32xor 8 64x) bytes by virtual function
    • virtual inherihtance will increase of (4 or 8) bytes
  • we add the size of the contains values of the attributes : for example the size of a string is the length of the string 1 octet = 1 byte 1 Ko = 1024 bytes 1 Mo = 1024 Ko 1 Go = 1024 Mo

Reimplemented from SM_NetworkBuilder.

Reimplemented in SM_CrystalStructuresGridBuilder, and SMOMPI_CrystalStructuresGridBuilder.

◆ GetPointWithIndices()

template<tBoolean R>
static void SM_NetworkGridBuilder::GetPointWithIndices ( std::array< tInteger, SM_Constants::DIM > &  I,
const tReal *  iX0,
const tReal *  iHs,
tReal *  iP 
)
inlinestatic

get the point with indices within the cell of indices I with relative position R in {0,1}

Template Parameters
R: relative poistion of the point in the cell at index I
  • 1: for center
  • 0: for min point of the cell
Parameters
[in]Iindices of the points
[in]iX0: iterator on on min point of the boning box of the domai
[in]iHsiterator on size of the cell
[out]iPiterator on coordinate f points : \( P=X_0+(I+\frac{R}{2}).H \)

◆ IsFaceInDomain()

tBoolean SM_NetworkGridBuilder::IsFaceInDomain ( const tDimension &  d,
const std::array< tDimension, SM_Constants::HDIM > &  hyperplanBase,
const tInteger *  iFaceElementIndices,
const std::array< tInteger, SM_Constants::DIM > &  nCs,
const std::array< tBoolean, SM_Constants::DIM > &  isPeriodic,
const tBoolean &  incMask,
const tMask *  vMask,
std::array< tInteger, SM_Constants::DIM > &  connectedCellIndices 
)
static

return true if the face is in domain

Parameters
[in]d: direction of the normal of the surface
[in]hyperplanBaseidices of the base of the surface
[in]iFaceElementIndicesiterator on indices of the element of the d-surface oriented by hyperplanBase
[in]nCsnumber of cells of the grid
[in]isPeriodic: periodicity of the grid
[in]incMask: mask uniform indicator
[in]vMask: mask value for each cell to indicate if it is in domain or not
[out]connectedCellIndiceslist of indices of the 2 connected cell with the face
Returns
true if the face is in domain

◆ IsPointInBlock()

template<tUCInt R>
static tBoolean SM_NetworkGridBuilder::IsPointInBlock ( std::array< tInteger, SM_Constants::DIM > &  I,
const tReal *  iBlockMinPoint,
const tReal *  iBlockMaxPoint,
const tReal *  iX0,
const tReal *  iHs,
tReal *  iP 
)
inlinestatic

return true if the point P=X0+(I+0.5R).Hs is in [blockMinPoint,blockMaxPoint[

Template Parameters
R: relative poistion of the point in the cell at index I
  • 1: for center
  • 0: for min point of the cell
Parameters
[in]I: indices of the point
[in]iBlockMinPointiterator on the min point coordinates of the block
[in]iBlockMaxPointiterator on the max point coordinates of the block
[in]iX0: iterator on min point of the grid
[in]iHsiterator on the size of each cell of the grid
[out]iP: coordinate of point
Returns
true if the point P is in [BlockMinPoint,blockMaxPoint[, false otherwise \( P=X_0+(I+\frac{R}{2}).H \)

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