gstlearn
1.0.0
CCC
|
TODO : Dependency to csparse to be removed. More...
#include <AMesh.hpp>
Public Member Functions | |
AMesh () | |
AMesh (const AMesh &m) | |
AMesh & | operator= (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 cs * | getMeshToDb (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 |
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) | |
AStringable & | operator= (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) | |
ASerializable & | operator= (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 |
Protected Member Functions | |
void | _setNDim (int ndim) |
int | _setExtend (const VectorDouble extendmin, const VectorDouble extendmax) |
bool | _weightsInMesh (const VectorDouble &coor, const VectorVectorDouble &corners, double meshsize, VectorDouble &weights, double eps=EPSILON5) const |
double | _getMeshUnit (const VectorVectorDouble &corners) const |
void | _recopy (const AMesh &m) |
virtual bool | _deserialize (std::istream &is, bool verbose=false) override |
Interface for ASerializable. More... | |
virtual bool | _serialize (std::ostream &os, bool verbose=false) const override |
String | _getNFName () const override |
Protected Member Functions inherited from ASerializable | |
bool | _fileOpenWrite (const String &filename, std::ofstream &os, bool verbose=false) const |
bool | _fileOpenRead (const String &filename, std::ifstream &is, bool verbose=false) const |
Private Member Functions | |
bool | _isSpaceDimensionValid (int idim) const |
void | _printMeshListByIndices (int nline_max=-1) const |
void | _printMeshListByCoordinates (int nline_max=-1) const |
Private Attributes | |
int | _nDim |
VectorDouble | _extendMin |
VectorDouble | _extendMax |
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 String & | getContainerName () |
static const String & | getPrefixName () |
static bool | createDirectory (const String &dir) |
static String | getExecDirectory () |
static String | getDirectory (const String &path) |
Static Protected Member Functions inherited from ASerializable | |
static bool | _commentWrite (std::ostream &os, const String &comment) |
template<typename T > | |
static bool | _recordWrite (std::ostream &os, const String &title, const T &val) |
template<typename T > | |
static bool | _recordWriteVec (std::ostream &os, const String &title, const VectorT< T > &vec) |
template<typename T > | |
static bool | _recordRead (std::istream &is, const String &title, T &val) |
template<typename T > | |
static bool | _recordReadVec (std::istream &is, const String &title, VectorT< T > &vec, int nvalues) |
static bool | _onlyBlanks (char *string) |
static bool | _tableRead (std::istream &is, const String &string, int ntab, double *tab) |
static bool | _tableWrite (std::ostream &os, const String &string, int ntab, const VectorDouble &tab) |
TODO : Dependency to csparse to be removed.
AMesh::AMesh | ( | ) |
AMesh::AMesh | ( | const AMesh & | m | ) |
|
virtual |
|
overrideprotectedvirtual |
Interface for ASerializable.
Implements ASerializable.
Reimplemented in MeshSpherical, MeshManifold, MeshManifold, MeshETurbo, and MeshEStandard.
|
protected |
Returns the size of the Mesh 'imesh'
[in] | corners | Vector of coordinates of mesh apices |
|
inlineoverrideprotectedvirtual |
Implements ASerializable.
Reimplemented in MeshSpherical, MeshManifold, MeshETurbo, and MeshEStandard.
|
private |
|
private |
|
private |
|
protected |
|
overrideprotectedvirtual |
Implements ASerializable.
Reimplemented in MeshSpherical, MeshManifold, MeshManifold, MeshETurbo, and MeshEStandard.
|
protected |
|
inlineprotected |
|
protected |
Check if a point, defined by its coordinates, belongs to a Mesh
[in] | coor | Vector of target coordinates |
[in] | corners | Vector of coordinates of mesh apices |
[in] | meshsize | Dimension of the mesh |
[in] | eps | Tolerance |
[out] | weights | Array of barycentric weights (Dim: NApexPerMesh) |
void AMesh::dumpNeighborhood | ( | std::vector< VectorInt > & | Vmesh, |
int | nline_max = 1 |
||
) |
MatrixRectangular AMesh::getAllApices | ( | ) | const |
Returns the information about all apices:
VectorVectorDouble AMesh::getAllCenterCoordinates | ( | ) | const |
VectorVectorDouble AMesh::getAllCoordinates | ( | ) | const |
Returns the coordinates of all meshes:
MatrixInt AMesh::getAllMeshes | ( | ) | const |
Returns the information of all meshes:
|
pure virtual |
Returns the rank of apex 'rank' for mesh 'imesh'
Implemented in MeshSpherical, MeshManifold, MeshETurbo, and MeshEStandard.
|
pure virtual |
Returns coordinate 'idim' of apex 'i'
Implemented in MeshSpherical, MeshManifold, MeshETurbo, and MeshEStandard.
VectorDouble AMesh::getApexCoordinates | ( | int | iapex | ) | const |
Returns the coordinates of an Apex
|
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
imesh | Rank of the Mesh |
idim | Index of the space dimension |
|
pure virtual |
Returns coordinate 'idim' of apex 'rank' of mesh 'imesh'
Implemented in MeshSpherical, MeshManifold, MeshETurbo, and MeshEStandard.
VectorDouble AMesh::getCoordinates | ( | int | idim | ) | const |
Returns Vector of Apex coordinates for space index
|
virtual |
Returns coordinate 'idim' of apex 'rank' of mesh 'imesh'
Reimplemented in MeshETurbo.
VectorVectorDouble AMesh::getCoordinatesPerMesh | ( | int | imesh | ) | const |
VectorDouble AMesh::getCoordinatesPerMesh | ( | int | imesh, |
int | idim, | ||
bool | flagClose = false |
||
) | const |
Returns the vector of coordinates for a mesh
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
[out] | apices | Pointer on the array of Apices |
[out] | meshes | Pointer 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
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
imesh | Mesh rank |
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]
imesh | Mesh rank |
vec | Returned array |
|
virtual |
Fill the coordinates of an apex in embedded space
iapex | Apex index |
coords | Array of coordinates |
Reimplemented in MeshSpherical, and MeshManifold.
|
virtual |
Fill the coordinates of a corner of a mesh in embedded space
imesh | Mesh rank |
ic | Corner index |
coords | Array of coordinates |
Reimplemented in MeshSpherical, and MeshManifold.
|
inlinevirtual |
Reimplemented in MeshSpherical, and MeshManifold.
|
inline |
Returns the maximum of the Bounding box for a given space dimension
|
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
|
pure virtual |
Returns the mesh size
Implemented in MeshSpherical, MeshETurbo, MeshEStandard, and MeshManifold.
VectorDouble AMesh::getMeshSizes | ( | ) | const |
|
pure virtual |
Returns the Sparse Matrix for projecting a Mesh to a Db
Implemented in MeshSpherical, MeshManifold, MeshETurbo, and MeshEStandard.
|
inlinevirtual |
Interface for AMesh.
Returns the number of apex per mesh
|
pure virtual |
Returns the number of apices
Implemented in MeshSpherical, MeshManifold, MeshETurbo, and MeshEStandard.
|
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
VectorVectorInt AMesh::getNeighborhoodPerMesh | ( | ) | const |
Returns the list of neighboring meshes This is a complex structure which stands as a vector of vectors of integers
|
pure virtual |
Returns the number of meshes
Implemented in MeshSpherical, MeshManifold, MeshETurbo, and MeshEStandard.
|
inlinevirtual |
Returns the space variety
Reimplemented in MeshSpherical, and MeshManifold.
int AMesh::isCompatibleDb | ( | const Db * | db | ) | const |
void AMesh::printMesh | ( | int | imesh0 | ) | const |
Print the list of meshes and apices
void AMesh::printMeshes | ( | int | level = 0 , |
int | nline_max = -1 |
||
) | const |
|
overridevirtual |
Interface to AStringable.
Reimplemented from AStringable.
Reimplemented in MeshSpherical, MeshManifold, MeshETurbo, and MeshEStandard.
|
private |
|
private |
|
private |