1.11.1
CCC
 
Loading...
Searching...
No Matches
gstlrn::AMesh Class Referenceabstract

#include <AMesh.hpp>

Inheritance diagram for gstlrn::AMesh:
gstlrn::AStringable gstlrn::ASerializable gstlrn::MeshEStandard gstlrn::MeshETurbo gstlrn::MeshSpherical gstlrn::MeshEFaulted gstlrn::MeshSphericalExt

Public Member Functions

 AMesh ()
 
 AMesh (const AMesh &m)
 
AMeshoperator= (const AMesh &m)
 
virtual ~AMesh ()
 
String toString (const AStringFormat *strfmt=nullptr) const override
 Interface to AStringable.
 
String getNFName () const override
 ASerializable Interface.
 
virtual Id getNApexPerMesh () const
 Interface for AMesh.
 
virtual Id getNApices () const =0
 
virtual Id getNMeshes () const =0
 
virtual Id getApex (Id imesh, Id rank) const =0
 
virtual double getCoor (Id imesh, Id rank, Id idim) const =0
 
virtual void getCoordinatesPerMeshInPlace (Id imesh, Id rank, 1 &coords) const
 
virtual double getApexCoor (Id i, Id idim) const =0
 
virtual void getApexCoordinatesInPlace (Id i, 1 &coords) const
 
virtual double getMeshSize (Id imesh) const =0
 
virtual void resetProjFromDb (ProjMatrix *m, const Db *db, Id rankZ=-1, bool verbose=false) const
 
virtual Id getVariety () const
 
virtual Id getEmbeddedNDim () const
 
virtual void getEmbeddedCoorPerMesh (Id imesh, Id ic, 1 &coords) const
 
virtual void getEmbeddedCoorPerApex (Id iapex, 1 &coords) const
 
virtual void getBarycenterInPlace (Id imesh, vect coord) const
 
ProjMatrixcreateProjMatrix (const Db *db, Id rankZ=-1, bool verbose=false) const
 
Id getNDim () const
 
double getExtendMin (Id idim) const
 
double getExtendMax (Id idim) const
 
 getExtrema (Id idim) const
 
void getElements (MatrixDense &apices, MatrixInt &meshes) const
 
Id isCompatibleDb (const Db *db) const
 
 getMeshSizes () const
 
void printMesh (Id imesh0=-1) const
 
void printMeshes (Id level=0, Id nline_max=-1) const
 
 getCoordinatesPerApex (Id idim) const
 
 getMeshByApexPair (Id apex1, Id apex2) const
 
 getCoordinatesPerMesh (Id imesh, Id idim, bool flagClose=false) const
 
 getApexCoordinates (Id iapex) const
 
virtual getMeshApicesFromCoordinates (const 1 &coords) const
 
virtual Id getMeshFromCoordinates (const 1 &coords) const
 
virtual Id getMeshAndInPlaceWeightsFromCoordinates (const 1 &coords, 1 &weights) const
 
 getCoordinatesPerMesh (Id imesh) const
 
 getEmbeddedCoordinatesPerMesh (Id imesh=0) const
 
void getEmbeddedCoordinatesPerMeshInPlace (Id imesh, 1 &vec) const
 
 getEmbeddedCoordinatesPerApex () const
 
 getDistances (Id iapex0, const 1 &japices=1()) const
 
 getAllCoordinates () const
 
MatrixDense getAllApices () const
 
MatrixInt getAllMeshes () const
 
const MatrixSparsegetAdjacentApicesMatrix () const
 
double getCenterCoordinate (Id imesh, Id idim) const
 
 getAllCenterCoordinates () const
 
 getNeighborhoodPerMesh () const
 
 getNeighborhoodPerApex () const
 
virtual getAdjacentApices (Id iapex) const
 
 getNRingsAdjacentApices (Id start_apex, Id n_rings) const
 
virtual void buildAdjacencyMatrix () const
 
- Public Member Functions inherited from gstlrn::AStringable
 AStringable ()
 
 AStringable (const AStringable &r)
 
AStringableoperator= (const AStringable &r)
 
virtual ~AStringable ()
 
virtual void display (const AStringFormat *strfmt=nullptr) const final
 
virtual void display (Id level) const final
 
void printConcreteClassName () const
 
- Public Member Functions inherited from gstlrn::ASerializable
 ASerializable ()
 
 ASerializable (const ASerializable &r)=default
 
ASerializableoperator= (const ASerializable &r)=default
 
 ASerializable (ASerializable &&r) noexcept=default
 
ASerializableoperator= (ASerializable &&r) noexcept=default
 
virtual ~ASerializable ()=default
 
bool dumpToNF (const String &NFFilename, const EFormatNF &format=EFormatNF::fromKey("DEFAULT")) const
 Dump the contents of an object into an Output File using a given Output NF Format.
 
void setDefaultFormatNF (const EFormatNF &format)
 

Static Public Member Functions

static void dumpNeighborhood (std::vector< 1 > &Vmesh, Id nline_max=1)
 
- Static Public Member Functions inherited from gstlrn::ASerializable
static String buildFileName (Id status, const String &filename, bool ensureDirExist=false)
 
static String getFileIdentity (const String &filename, bool verbose=false)
 
static void setPrefixName (const String &prefixName)
 
static void unsetPrefixName ()
 
static const StringgetPrefixName ()
 

Constructor & Destructor Documentation

◆ AMesh() [1/2]

gstlrn::AMesh::AMesh ( )

◆ AMesh() [2/2]

gstlrn::AMesh::AMesh ( const AMesh m)

◆ ~AMesh()

gstlrn::AMesh::~AMesh ( )
virtual

Member Function Documentation

◆ buildAdjacencyMatrix()

void gstlrn::AMesh::buildAdjacencyMatrix ( ) const
virtual

◆ createProjMatrix()

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

Returns the Sparse Matrix for projecting the Mesh to a Db

◆ dumpNeighborhood()

void gstlrn::AMesh::dumpNeighborhood ( std::vector< 1 > &  Vmesh,
Id  nline_max = 1 
)
static

◆ getAdjacentApices()

gstlrn::AMesh::getAdjacentApices ( Id  iapex) const
virtual

◆ getAdjacentApicesMatrix()

const MatrixSparse * gstlrn::AMesh::getAdjacentApicesMatrix ( ) const

◆ getAllApices()

MatrixDense gstlrn::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

◆ getAllCenterCoordinates()

gstlrn::AMesh::getAllCenterCoordinates ( ) const

◆ getAllCoordinates()

gstlrn::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

◆ getAllMeshes()

MatrixInt gstlrn::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

◆ getApex()

virtual Id gstlrn::AMesh::getApex ( Id  imesh,
Id  rank 
) const
pure virtual

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

Implemented in gstlrn::MeshEStandard, gstlrn::MeshETurbo, and gstlrn::MeshSpherical.

◆ getApexCoor()

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

Returns coordinate 'idim' of apex 'i'

Implemented in gstlrn::MeshEStandard, gstlrn::MeshETurbo, and gstlrn::MeshSpherical.

◆ getApexCoordinates()

gstlrn::AMesh::getApexCoordinates ( Id  iapex) const

Returns the coordinates of an Apex

◆ getApexCoordinatesInPlace()

void gstlrn::AMesh::getApexCoordinatesInPlace ( Id  i,
1 &  coords 
) const
virtual

Returns coordinates of apex 'i'

Reimplemented in gstlrn::MeshETurbo.

◆ getBarycenterInPlace()

void gstlrn::AMesh::getBarycenterInPlace ( Id  imesh,
vect  coord 
) const
virtual

Reimplemented in gstlrn::MeshSpherical.

◆ getCenterCoordinate()

double gstlrn::AMesh::getCenterCoordinate ( Id  imesh,
Id  idim 
) const

Returns the coordinates of the Center of Gravity of a Mesh

Parameters
imeshRank of the Mesh
idimIndex of the space dimension
Returns

◆ getCoor()

virtual double gstlrn::AMesh::getCoor ( Id  imesh,
Id  rank,
Id  idim 
) const
pure virtual

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

Implemented in gstlrn::MeshEStandard, gstlrn::MeshETurbo, and gstlrn::MeshSpherical.

◆ getCoordinatesPerApex()

gstlrn::AMesh::getCoordinatesPerApex ( Id  idim) const

Returns Vector of Apex coordinates for space index

◆ getCoordinatesPerMesh() [1/2]

gstlrn::AMesh::getCoordinatesPerMesh ( Id  imesh) const

◆ getCoordinatesPerMesh() [2/2]

gstlrn::AMesh::getCoordinatesPerMesh ( Id  imesh,
Id  idim,
bool  flagClose = false 
) const

Returns the vector of coordinates for a mesh

◆ getCoordinatesPerMeshInPlace()

void gstlrn::AMesh::getCoordinatesPerMeshInPlace ( Id  imesh,
Id  rank,
1 &  coords 
) const
virtual

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

Reimplemented in gstlrn::MeshETurbo.

◆ getDistances()

gstlrn::AMesh::getDistances ( Id  iapex0,
const 1 &  japices = 1() 
) const

◆ getElements()

void gstlrn::AMesh::getElements ( MatrixDense 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

◆ getEmbeddedCoordinatesPerApex()

gstlrn::AMesh::getEmbeddedCoordinatesPerApex ( ) const

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

Returns

◆ getEmbeddedCoordinatesPerMesh()

gstlrn::AMesh::getEmbeddedCoordinatesPerMesh ( Id  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

◆ getEmbeddedCoordinatesPerMeshInPlace()

void gstlrn::AMesh::getEmbeddedCoordinatesPerMeshInPlace ( Id  imesh,
1 &  vec 
) const

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

Parameters
imeshMesh rank
vecReturned array

◆ getEmbeddedCoorPerApex()

void gstlrn::AMesh::getEmbeddedCoorPerApex ( Id  iapex,
1 &  coords 
) const
virtual

Fill the coordinates of an apex in embedded space

Parameters
iapexApex index
coordsArray of coordinates

Reimplemented in gstlrn::MeshSpherical.

◆ getEmbeddedCoorPerMesh()

void gstlrn::AMesh::getEmbeddedCoorPerMesh ( Id  imesh,
Id  ic,
1 &  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 gstlrn::MeshSpherical.

◆ getEmbeddedNDim()

virtual Id gstlrn::AMesh::getEmbeddedNDim ( ) const
inlinevirtual

Reimplemented in gstlrn::MeshSpherical.

◆ getExtendMax()

double gstlrn::AMesh::getExtendMax ( Id  idim) const
inline

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

◆ getExtendMin()

double gstlrn::AMesh::getExtendMin ( Id  idim) const
inline

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

◆ getExtrema()

gstlrn::AMesh::getExtrema ( Id  idim) const

Returns the Vector of Extrema of the Bounding Box

◆ getMeshAndInPlaceWeightsFromCoordinates()

Id gstlrn::AMesh::getMeshAndInPlaceWeightsFromCoordinates ( const 1 &  coords,
1 &  weights 
) const
virtual

Reimplemented in gstlrn::MeshETurbo.

◆ getMeshApicesFromCoordinates()

gstlrn::AMesh::getMeshApicesFromCoordinates ( const 1 &  coords) const
virtual

Returns the Mesh Apices from coordinates

Reimplemented in gstlrn::MeshETurbo.

◆ getMeshByApexPair()

gstlrn::AMesh::getMeshByApexPair ( Id  apex1,
Id  apex2 
) const

Returns the list of indices of Meshes sharing the same Apex

◆ getMeshFromCoordinates()

Id gstlrn::AMesh::getMeshFromCoordinates ( const 1 &  coords) const
virtual

Returns the Mesh from coordinates

Reimplemented in gstlrn::MeshETurbo.

◆ getMeshSize()

virtual double gstlrn::AMesh::getMeshSize ( Id  imesh) const
pure virtual

Returns the mesh size

Implemented in gstlrn::MeshEStandard, gstlrn::MeshETurbo, and gstlrn::MeshSpherical.

◆ getMeshSizes()

gstlrn::AMesh::getMeshSizes ( ) const

◆ getNApexPerMesh()

virtual Id gstlrn::AMesh::getNApexPerMesh ( ) const
inlinevirtual

Interface for AMesh.

Returns the number of apex per mesh

◆ getNApices()

virtual Id gstlrn::AMesh::getNApices ( ) const
pure virtual

Returns the number of apices

Implemented in gstlrn::MeshEStandard, gstlrn::MeshETurbo, and gstlrn::MeshSpherical.

◆ getNDim()

Id gstlrn::AMesh::getNDim ( ) const
inline

Returns the space dimension

◆ getNeighborhoodPerApex()

gstlrn::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

◆ getNeighborhoodPerMesh()

gstlrn::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

◆ getNFName()

String gstlrn::AMesh::getNFName ( ) const
inlineoverridevirtual

◆ getNMeshes()

virtual Id gstlrn::AMesh::getNMeshes ( ) const
pure virtual

Returns the number of meshes

Implemented in gstlrn::MeshEStandard, gstlrn::MeshETurbo, and gstlrn::MeshSpherical.

◆ getNRingsAdjacentApices()

gstlrn::AMesh::getNRingsAdjacentApices ( Id  start_apex,
Id  n_rings 
) const

◆ getVariety()

virtual Id gstlrn::AMesh::getVariety ( ) const
inlinevirtual

Returns the space variety

Reimplemented in gstlrn::MeshSpherical.

◆ isCompatibleDb()

Id gstlrn::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

◆ operator=()

AMesh & gstlrn::AMesh::operator= ( const AMesh m)

◆ printMesh()

void gstlrn::AMesh::printMesh ( Id  imesh0 = -1) const

Print the list of meshes and apices

◆ printMeshes()

void gstlrn::AMesh::printMeshes ( Id  level = 0,
Id  nline_max = -1 
) const

◆ resetProjFromDb()

void gstlrn::AMesh::resetProjFromDb ( ProjMatrix m,
const Db db,
Id  rankZ = -1,
bool  verbose = false 
) const
virtual

Initialize the Sparse Matrix for projecting the Db on a Mesh

Returns the Sparse Matrix used to project a Db onto the Meshing

Parameters
[out]mProjection matrix to be initialized
[in]dbDb structure
[in]rankZRank of the Z-locator to be tested (see remarks)
[in]verboseVerbose flag
Remarks
If rankZ>=0, a sample is only considered if the value
of the corresponding variable is defined

Reimplemented in gstlrn::MeshETurbo.

◆ toString()

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

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