1.1.0
CCC
 
AMesh Class Referenceabstract

#include <AMesh.hpp>

Inheritance diagram for AMesh:
AStringable ASerializable MeshEStandard MeshETurbo MeshManifold MeshSpherical MeshSphericalExt

Public Member Functions

 AMesh ()
 
 AMesh (const AMesh &m)
 
AMeshoperator= (const AMesh &m)
 
virtual ~AMesh ()
 
virtual String toString (const AStringFormat *strfmt=nullptr) const override
 Interface to AStringable. More...
 
virtual int getNApexPerMesh () const
 Interface for AMesh. More...
 
virtual int getNApices () const =0
 
virtual int getNMeshes () const =0
 
virtual int getApex (int imesh, int rank) const =0
 
virtual double getCoor (int imesh, int rank, int idim) const =0
 
virtual void getCoordinatesInPlace (int imesh, int rank, VectorDouble &coords) const
 
virtual double getApexCoor (int i, int idim) const =0
 
virtual void getApexCoordinatesInPlace (int i, VectorDouble &coords) const
 
virtual double getMeshSize (int imesh) const =0
 
virtual void resetProjMatrix (ProjMatrix *m, const Db *db, int rankZ=-1, bool verbose=false) const =0
 
virtual int getVariety () const
 
virtual int getEmbeddedNDim () const
 
virtual void getEmbeddedCoorPerMesh (int imesh, int ic, VectorDouble &coords) const
 
virtual void getEmbeddedCoorPerApex (int iapex, VectorDouble &coords) const
 
ProjMatrixcreateProjMatrix (const Db *db, int rankZ=-1, bool verbose=false) const
 
int getNDim () const
 
double getExtendMin (int idim) const
 
double getExtendMax (int idim) const
 
VectorDouble getExtrema (int idim) const
 
void getElements (MatrixRectangular &apices, MatrixInt &meshes) const
 
int isCompatibleDb (const Db *db) const
 
VectorDouble getMeshSizes () const
 
void printMesh (int imesh0) const
 
void printMeshes (int level=0, int nline_max=-1) const
 
VectorDouble getCoordinates (int idim) const
 
VectorInt getMeshByApexPair (int apex1, int apex2) const
 
VectorDouble getCoordinatesPerMesh (int imesh, int idim, bool flagClose=false) const
 
VectorDouble getApexCoordinates (int iapex) const
 
VectorVectorDouble getCoordinatesPerMesh (int imesh) const
 
VectorVectorDouble getEmbeddedCoordinatesPerMesh (int imesh=0) const
 
void getEmbeddedCoordinatesPerMeshInPlace (int imesh, VectorVectorDouble &coors) const
 
VectorVectorDouble getEmbeddedCoordinatesPerApex () const
 
VectorDouble getDistances (int iapex0, const VectorInt &japices=VectorInt())
 
VectorVectorDouble getAllCoordinates () const
 
MatrixRectangular getAllApices () const
 
MatrixInt getAllMeshes () const
 
double getCenterCoordinate (int imesh, int idim) const
 
VectorVectorDouble getAllCenterCoordinates () const
 
VectorVectorInt getNeighborhoodPerMesh () const
 
VectorVectorInt getNeighborhoodPerApex () const
 
void dumpNeighborhood (std::vector< VectorInt > &Vmesh, int nline_max=1)
 
- Public Member Functions inherited from AStringable
 AStringable ()
 
 AStringable (const AStringable &r)
 
AStringableoperator= (const AStringable &r)
 
virtual ~AStringable ()
 
virtual void display (const AStringFormat *strfmt=nullptr) const final
 
virtual void display (int level) const final
 
- Public Member Functions inherited from ASerializable
 ASerializable ()
 
 ASerializable (const ASerializable &r)
 
ASerializableoperator= (const ASerializable &r)
 
virtual ~ASerializable ()
 
bool deserialize (std::istream &is, bool verbose=true)
 
bool serialize (std::ostream &os, bool verbose=true) const
 
bool dumpToNF (const String &neutralFilename, bool verbose=false) const
 

Additional Inherited Members

- Static Public Member Functions inherited from ASerializable
static String buildFileName (int status, const String &filename, bool ensureDirExist=false)
 
static String getHomeDirectory (const String &sub="")
 
static String getWorkingDirectory ()
 
static String getTestData (const String &subdir, const String &filename)
 
static String getFileIdentity (const String &filename, bool verbose=false)
 
static void setContainerName (bool useDefault, const String &containerName="", bool verbose=false)
 
static void unsetContainerName ()
 
static void setPrefixName (const String &prefixName)
 
static void unsetPrefixName ()
 
static const StringgetContainerName ()
 
static const StringgetPrefixName ()
 
static bool createDirectory (const String &dir)
 
static String getExecDirectory ()
 
static String getDirectory (const String &path)
 

Constructor & Destructor Documentation

AMesh::AMesh ( )
AMesh::AMesh ( const AMesh m)
AMesh::~AMesh ( )
virtual

Member Function Documentation

ProjMatrix * AMesh::createProjMatrix ( const Db db,
int  rankZ = -1,
bool  verbose = false 
) const

Returns the Sparse Matrix for projecting the Mesh to a Db

void AMesh::dumpNeighborhood ( std::vector< VectorInt > &  Vmesh,
int  nline_max = 1 
)
MatrixRectangular AMesh::getAllApices ( ) const

Returns the information about all apices:

  • the first dimension is the number of meshes (nrow)
  • the second dimension if the space dimension (ncol)
    Returns
VectorVectorDouble AMesh::getAllCenterCoordinates ( ) const
VectorVectorDouble AMesh::getAllCoordinates ( ) const

Returns the coordinates of all meshes:

  • the first dimension if the space dimension
  • the second dimension is the number of apices
    Returns
MatrixInt AMesh::getAllMeshes ( ) const

Returns the information of all meshes:

  • the first dimension is the number of apices (nrow)
  • the second dimension if the space dimension (ncol)
    Returns
virtual int AMesh::getApex ( int  imesh,
int  rank 
) const
pure virtual

Returns the rank of apex 'rank' for mesh 'imesh'

Implemented in MeshETurbo, MeshEStandard, MeshSpherical, and MeshManifold.

virtual double AMesh::getApexCoor ( int  i,
int  idim 
) const
pure virtual

Returns coordinate 'idim' of apex 'i'

Implemented in MeshETurbo, MeshEStandard, MeshSpherical, and MeshManifold.

VectorDouble AMesh::getApexCoordinates ( int  iapex) const

Returns the coordinates of an Apex

void AMesh::getApexCoordinatesInPlace ( int  i,
VectorDouble coords 
) const
virtual

Returns coordinates of apex 'i'

Reimplemented in MeshETurbo.

double AMesh::getCenterCoordinate ( int  imesh,
int  idim 
) const

Returns the coordinates of the Center of Gravity of a Mesh

Parameters
imeshRank of the Mesh
idimIndex of the space dimension
Returns
virtual double AMesh::getCoor ( int  imesh,
int  rank,
int  idim 
) const
pure virtual

Returns coordinate 'idim' of apex 'rank' of mesh 'imesh'

Implemented in MeshETurbo, MeshEStandard, MeshSpherical, and MeshManifold.

VectorDouble AMesh::getCoordinates ( int  idim) const

Returns Vector of Apex coordinates for space index

void AMesh::getCoordinatesInPlace ( int  imesh,
int  rank,
VectorDouble coords 
) const
virtual

Returns coordinate 'idim' of apex 'rank' of mesh 'imesh'

Reimplemented in MeshETurbo.

VectorDouble AMesh::getCoordinatesPerMesh ( int  imesh,
int  idim,
bool  flagClose = false 
) const

Returns the vector of coordinates for a mesh

VectorVectorDouble AMesh::getCoordinatesPerMesh ( int  imesh) const
VectorDouble AMesh::getDistances ( int  iapex0,
const VectorInt japices = VectorInt() 
)
void AMesh::getElements ( MatrixRectangular apices,
MatrixInt meshes 
) const

Returns the list of apexes and meshes

Extract the elements of the meshing

Parameters
[out]apicesPointer on the array of Apices
[out]meshesPointer on the array of Meshes
VectorVectorDouble AMesh::getEmbeddedCoordinatesPerApex ( ) const

Returns the coordinates of the Mesh apices expressed in the embedded space The returned vector is organized by coordinate

Returns
VectorVectorDouble AMesh::getEmbeddedCoordinatesPerMesh ( int  imesh = 0) const

Returns the array of coordinates of all apices of any mesh in embedded space Its dimensions are: ncorner * ndim

Parameters
imeshMesh rank
Returns
void AMesh::getEmbeddedCoordinatesPerMeshInPlace ( int  imesh,
VectorVectorDouble vec 
) const

Fill the array of coordinates of all apices of a mesh in embedded space Storage [ndim, ncorner]

Parameters
imeshMesh rank
vecReturned array
void AMesh::getEmbeddedCoorPerApex ( int  iapex,
VectorDouble coords 
) const
virtual

Fill the coordinates of an apex in embedded space

Parameters
iapexApex index
coordsArray of coordinates

Reimplemented in MeshSpherical, and MeshManifold.

void AMesh::getEmbeddedCoorPerMesh ( int  imesh,
int  ic,
VectorDouble coords 
) const
virtual

Fill the coordinates of a corner of a mesh in embedded space

Parameters
imeshMesh rank
icCorner index
coordsArray of coordinates

Reimplemented in MeshSpherical, and MeshManifold.

virtual int AMesh::getEmbeddedNDim ( ) const
inlinevirtual

Reimplemented in MeshSpherical, and MeshManifold.

double AMesh::getExtendMax ( int  idim) const
inline

Returns the maximum of the Bounding box for a given space dimension

double AMesh::getExtendMin ( int  idim) const
inline

Returns the minimum of the Bounding box for a given space dimension

VectorDouble AMesh::getExtrema ( int  idim) const

Returns the Vector of Extrema of the Bounding Box

VectorInt AMesh::getMeshByApexPair ( int  apex1,
int  apex2 
) const

Returns the list of indices of Meshes sharing the same Apex

virtual double AMesh::getMeshSize ( int  imesh) const
pure virtual

Returns the mesh size

Implemented in MeshETurbo, MeshManifold, MeshEStandard, and MeshSpherical.

VectorDouble AMesh::getMeshSizes ( ) const
virtual int AMesh::getNApexPerMesh ( ) const
inlinevirtual

Interface for AMesh.

Returns the number of apex per mesh

virtual int AMesh::getNApices ( ) const
pure virtual

Returns the number of apices

Implemented in MeshETurbo, MeshEStandard, MeshManifold, and MeshSpherical.

int AMesh::getNDim ( ) const
inline

Returns the space dimension

VectorVectorInt AMesh::getNeighborhoodPerApex ( ) const

Returns the list of neighboring apices This is a complex structure which stands as a vector of vectors of integers

  • the first dimension is the number of apices
  • for each apex, the second vector gives the indices of the neighboring apices
    Returns
VectorVectorInt AMesh::getNeighborhoodPerMesh ( ) const

Returns the list of neighboring meshes This is a complex structure which stands as a vector of vectors of integers

  • the first dimension is the number of apices
  • for each apex, the second vector gives the indices of the neighboring meshes
    Returns
virtual int AMesh::getNMeshes ( ) const
pure virtual

Returns the number of meshes

Implemented in MeshETurbo, MeshEStandard, MeshManifold, and MeshSpherical.

virtual int AMesh::getVariety ( ) const
inlinevirtual

Returns the space variety

Reimplemented in MeshSpherical, and MeshManifold.

int AMesh::isCompatibleDb ( const Db db) const

Checks that the Db is compatible with the Meshing

Returns
1 if Db and Meshing are incompatible; 0 otherwise
Parameters
[in]dbDb structure
AMesh & AMesh::operator= ( const AMesh m)
void AMesh::printMesh ( int  imesh0) const

Print the list of meshes and apices

void AMesh::printMeshes ( int  level = 0,
int  nline_max = -1 
) const
virtual void AMesh::resetProjMatrix ( ProjMatrix m,
const Db db,
int  rankZ = -1,
bool  verbose = false 
) const
pure virtual

Initialize the Sparse Matrix for projecting the Mesh to a Db

Implemented in MeshETurbo, MeshSpherical, MeshManifold, and MeshEStandard.

String AMesh::toString ( const AStringFormat strfmt = nullptr) const
overridevirtual

Interface to AStringable.

Reimplemented from AStringable.

Reimplemented in MeshETurbo, MeshEStandard, MeshManifold, and MeshSpherical.


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