|
gstlearn
1.0.0
CCC
|
#include <MeshSpherical.hpp>
Public Member Functions | |
| MeshSpherical (const MatrixRectangular &apices=MatrixRectangular(), const MatrixInt &meshes=MatrixInt()) | |
| MeshSpherical (const MeshSpherical &m) | |
| MeshSpherical & | operator= (const MeshSpherical &m) |
| virtual | ~MeshSpherical () |
| virtual String | toString (const AStringFormat *strfmt=nullptr) const override |
| Interface to AStringable. More... | |
| int | getNApices () const override |
| Interface to AMesh. More... | |
| int | getNMeshes () const override |
| double | getMeshSize (int imesh) const override |
| int | getApex (int imesh, int rank) const override |
| double | getCoor (int imesh, int rank, int idim) const override |
| double | getApexCoor (int i, int idim) const override |
| int | getEmbeddedNDim () const override |
| void | getEmbeddedCoorPerMesh (int imesh, int ic, VectorDouble &coords) const override |
| void | getEmbeddedCoorPerApex (int iapex, VectorDouble &coords) const override |
| int | reset (int ndim, int napexpermesh, const VectorDouble &apices, const VectorInt &meshes, bool byCol, bool verbose=false) |
| cs * | getMeshToDb (const Db *db, int rankZ=-1, bool verbose=false) const override |
| int | getVariety () const |
| const MatrixRectangular & | getApices () const |
| const MatrixInt & | getMeshes () const |
| VectorVectorInt | getMeshesAsVVI () const |
Public Member Functions inherited from AMesh | |
| AMesh () | |
| AMesh (const AMesh &m) | |
| AMesh & | operator= (const AMesh &m) |
| virtual | ~AMesh () |
| virtual int | getNApexPerMesh () const |
| Interface for AMesh. More... | |
| virtual void | getCoordinatesInPlace (int imesh, int rank, VectorDouble &coords) const |
| virtual void | getApexCoordinatesInPlace (int i, 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 |
Static Public Member Functions | |
| static MeshSpherical * | createFromNF (const String &neutralFilename, bool verbose=true) |
| static MeshSpherical * | create (const MatrixRectangular &apices=MatrixRectangular(), const MatrixInt &meshes=MatrixInt()) |
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) |
Protected Member Functions | |
| 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 AMesh | |
| 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) |
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 | |
| void | _defineBoundingBox () |
| VectorDouble | _defineUnits () const |
| bool | _coorInMesh (const VectorDouble &coor, int imesh, double meshsize, VectorDouble &weights, bool flag_approx=true) const |
| int | _recopy (const MeshSpherical &m) |
| double | _closestValue (double ref, double coor, double period) const |
| void | _checkConsistency () const |
Private Attributes | |
| MatrixRectangular | _apices |
| MatrixInt | _meshes |
Additional Inherited Members | |
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) |
Meshing defined in the Spherical Space
| MeshSpherical::MeshSpherical | ( | const MatrixRectangular & | apices = MatrixRectangular(), |
| const MatrixInt & | meshes = MatrixInt() |
||
| ) |
| MeshSpherical::MeshSpherical | ( | const MeshSpherical & | m | ) |
|
virtual |
|
private |
This function checks the consistency between the number of points and the vertices indication
|
private |
|
private |
Check if a point, defined by its coordinates, belong to a Mesh
| [in] | coor | Array of target coordinates |
| [in] | imesh | Mesh Index |
| [in] | meshsize | Dimension of the mesh (approx) |
| [in] | flag_approx | Approcimation flag |
| [out] | weights | Array of barycentric weights (Dim: NApexPerMesh) |
|
private |
|
private |
Calculate the Mesh of each Mesh (using approximated calculations)
|
overrideprotectedvirtual |
Interface for ASerializable.
Reimplemented from AMesh.
|
private |
|
overrideprotectedvirtual |
Reimplemented from AMesh.
|
static |
|
static |
Create a MeshSpherical by loading the contents of a Neutral File
| neutralFilename | Name of the Neutral File (MeshEStandard format) |
| verbose | Verbose |
|
overridevirtual |
Returns the rank of the Apex 'rank' of the Mesh 'imesh'
| [in] | imesh | Rank of the Mesh (from 0 to _nMeshes-1)) |
| [in] | rank | Rank of the Apex within a Mesh (from 0 to _nApices-1) |
Implements AMesh.
|
overridevirtual |
Returns coordinate 'idim' of apex 'i'
Implements AMesh.
|
inline |
|
overridevirtual |
Returns the coordinate 'ic' of the Apex 'rank' of the Mesh 'imesh'
| [in] | imesh | Rank of the Mesh (from 0 to _nMeshes-1)) |
| [in] | rank | Rank of the Apex within a Mesh (from 0 to _nApices-1) |
| [in] | idim | Rank of the coordinate (from 0 to _ndimh-1) |
Implements AMesh.
|
overridevirtual |
|
overridevirtual |
|
inlineoverridevirtual |
Reimplemented from AMesh.
|
inline |
|
inline |
|
overridevirtual |
Returns the size of the Mesh 'imesh'
| [in] | imesh | Rank of the Mesh (from 0 to _nMeshes-1)) |
Implements AMesh.
|
overridevirtual |
Returns the Sparse Matrix used to project a Db onto the Meshing
| [in] | db | Db structure |
| [in] | rankZ | Rank of the Z-locator to be tested (see remarks) |
| [in] | verbose | Verbose flag |
Implements AMesh.
|
overridevirtual |
|
overridevirtual |
|
inlinevirtual |
Returns the space variety
Reimplemented from AMesh.
| MeshSpherical & MeshSpherical::operator= | ( | const MeshSpherical & | m | ) |
| int MeshSpherical::reset | ( | int | ndim, |
| int | napexpermesh, | ||
| const VectorDouble & | apices, | ||
| const VectorInt & | meshes, | ||
| bool | byCol, | ||
| bool | verbose = false |
||
| ) |
Create the meshing (from mesh information)
| [in] | ndim | Space Dimension |
| [in] | napexpermesh | Number of apices per mesh |
| [in] | apices | Vector of Apex information |
| [in] | meshes | Vector of mesh indices |
| [in] | byCol | true for Column major; false for Row Major |
| [in] | verbose | Verbose flag |
|
overridevirtual |
Interface to AStringable.
Print the contents of the meshing
| [in] | strfmt | Format for printout |
Reimplemented from AMesh.
|
private |
|
private |