1.8.0
CCC
 
Loading...
Searching...
No Matches
gstlrn::MeshSpherical Class Reference

#include <MeshSpherical.hpp>

Inheritance diagram for gstlrn::MeshSpherical:
gstlrn::AMesh gstlrn::AStringable gstlrn::ASerializable gstlrn::MeshSphericalExt

Detailed Description

Meshing defined in the Spherical Space

Public Member Functions

 MeshSpherical (const MatrixDense &apices=MatrixDense(), const MatrixInt &meshes=MatrixInt())
 
 MeshSpherical (const MeshSpherical &m)
 
MeshSphericaloperator= (const MeshSpherical &m)
 
virtual ~MeshSpherical ()
 
String toString (const AStringFormat *strfmt=nullptr) const override
 Interface to AStringable.
 
Id getNApices () const override
 Interface to AMesh.
 
Id getNMeshes () const override
 
double getMeshSize (Id imesh) const override
 
Id getApex (Id imesh, Id rank) const override
 
double getCoor (Id imesh, Id rank, Id idim) const override
 
double getApexCoor (Id i, Id idim) const override
 
Id getEmbeddedNDim () const override
 
void getEmbeddedCoorPerMesh (Id imesh, Id ic, 1 &coords) const override
 
void getEmbeddedCoorPerApex (Id iapex, 1 &coords) const override
 
void getBarycenterInPlace (Id imesh, vect coord) const override
 
Id reset (Id ndim, Id napexpermesh, const 1 &apices, const 1 &meshes, bool byCol, bool verbose=false)
 
Id getVariety () const override
 
const MatrixDensegetApices () const
 
const MatrixIntgetMeshes () const
 
 getMeshesAsVVI () const
 
- Public Member Functions inherited from gstlrn::AMesh
 AMesh ()
 
 AMesh (const AMesh &m)
 
AMeshoperator= (const AMesh &m)
 
virtual ~AMesh ()
 
virtual Id getNApexPerMesh () const
 Interface for AMesh.
 
virtual void getCoordinatesPerMeshInPlace (Id imesh, Id rank, 1 &coords) const
 
virtual void getApexCoordinatesInPlace (Id i, 1 &coords) const
 
virtual void resetProjFromDb (ProjMatrix *m, const Db *db, Id rankZ=-1, bool verbose=false) 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
 
 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
 
double getCenterCoordinate (Id imesh, Id idim) const
 
 getAllCenterCoordinates () const
 
 getNeighborhoodPerMesh () const
 
 getNeighborhoodPerApex () 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
 
- Public Member Functions inherited from gstlrn::ASerializable
 ASerializable ()
 
 ASerializable (const ASerializable &r)
 
ASerializableoperator= (const ASerializable &r)
 
 ASerializable (ASerializable &&r) noexcept
 
ASerializableoperator= (ASerializable &&r) noexcept
 
virtual ~ASerializable ()
 
bool dumpToNF (const String &NFFilename, const EFormatNF &format=EFormatNF::fromKey("DEFAULT"), bool verbose=false) 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 MeshSphericalcreateFromNF (const String &NFFilename, bool verbose=true)
 
static MeshSphericalcreate (const MatrixDense &apices=MatrixDense(), const MatrixInt &meshes=MatrixInt())
 
- Static Public Member Functions inherited from gstlrn::AMesh
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

◆ MeshSpherical() [1/2]

gstlrn::MeshSpherical::MeshSpherical ( const MatrixDense apices = MatrixDense(),
const MatrixInt meshes = MatrixInt() 
)

◆ MeshSpherical() [2/2]

gstlrn::MeshSpherical::MeshSpherical ( const MeshSpherical m)

◆ ~MeshSpherical()

gstlrn::MeshSpherical::~MeshSpherical ( )
virtual

Member Function Documentation

◆ create()

MeshSpherical * gstlrn::MeshSpherical::create ( const MatrixDense apices = MatrixDense(),
const MatrixInt meshes = MatrixInt() 
)
static

◆ createFromNF()

MeshSpherical * gstlrn::MeshSpherical::createFromNF ( const String NFFilename,
bool  verbose = true 
)
static

Create a MeshSpherical by loading the contents of a Neutral File

Parameters
NFFilenameName of the Neutral File (MeshEStandard format)
verboseVerbose

◆ getApex()

Id gstlrn::MeshSpherical::getApex ( Id  imesh,
Id  rank 
) const
overridevirtual

Returns the rank of the Apex 'rank' of the Mesh 'imesh'

Returns
The rank of the target apex
Parameters
[in]imeshRank of the Mesh (from 0 to _nMeshes-1))
[in]rankRank of the Apex within a Mesh (from 0 to _nApices-1)

Implements gstlrn::AMesh.

◆ getApexCoor()

double gstlrn::MeshSpherical::getApexCoor ( Id  i,
Id  idim 
) const
overridevirtual

Returns coordinate 'idim' of apex 'i'

Implements gstlrn::AMesh.

◆ getApices()

const MatrixDense & gstlrn::MeshSpherical::getApices ( ) const
inline

◆ getBarycenterInPlace()

void gstlrn::MeshSpherical::getBarycenterInPlace ( Id  imesh,
vect  coord 
) const
overridevirtual

Reimplemented from gstlrn::AMesh.

◆ getCoor()

double gstlrn::MeshSpherical::getCoor ( Id  imesh,
Id  rank,
Id  idim 
) const
overridevirtual

Returns the coordinate 'ic' of the Apex 'rank' of the Mesh 'imesh'

Returns
The coordinate of the target apex
Parameters
[in]imeshRank of the Mesh (from 0 to _nMeshes-1))
[in]rankRank of the Apex within a Mesh (from 0 to _nApices-1)
[in]idimRank of the coordinate (from 0 to _ndimh-1)

Implements gstlrn::AMesh.

◆ getEmbeddedCoorPerApex()

void gstlrn::MeshSpherical::getEmbeddedCoorPerApex ( Id  iapex,
1 &  coords 
) const
overridevirtual

Fill the coordinates of an apex in embedded space

Parameters
iapexApex index
coordsArray of coordinates

Reimplemented from gstlrn::AMesh.

◆ getEmbeddedCoorPerMesh()

void gstlrn::MeshSpherical::getEmbeddedCoorPerMesh ( Id  imesh,
Id  ic,
1 &  coords 
) const
overridevirtual

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

Parameters
imeshMesh rank
icCorner index
coordsArray of coordinates

Reimplemented from gstlrn::AMesh.

◆ getEmbeddedNDim()

Id gstlrn::MeshSpherical::getEmbeddedNDim ( ) const
inlineoverridevirtual

Reimplemented from gstlrn::AMesh.

◆ getMeshes()

const MatrixInt & gstlrn::MeshSpherical::getMeshes ( ) const
inline

◆ getMeshesAsVVI()

gstlrn::MeshSpherical::getMeshesAsVVI ( ) const
inline

◆ getMeshSize()

double gstlrn::MeshSpherical::getMeshSize ( Id  imesh) const
overridevirtual

Returns the size of the Mesh 'imesh'

Returns
mesh dimension
Parameters
[in]imeshRank of the Mesh (from 0 to _nMeshes-1))

Implements gstlrn::AMesh.

◆ getNApices()

Id gstlrn::MeshSpherical::getNApices ( ) const
overridevirtual

Interface to AMesh.

Returns the number of Apices

Returns
Number of apices

Implements gstlrn::AMesh.

◆ getNMeshes()

Id gstlrn::MeshSpherical::getNMeshes ( ) const
overridevirtual

Returns the number of Meshes

Returns
Number of meshes

Implements gstlrn::AMesh.

◆ getVariety()

Id gstlrn::MeshSpherical::getVariety ( ) const
inlineoverridevirtual

Returns the space variety

Reimplemented from gstlrn::AMesh.

◆ operator=()

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

◆ reset()

Id gstlrn::MeshSpherical::reset ( Id  ndim,
Id  napexpermesh,
const 1 &  apices,
const 1 &  meshes,
bool  byCol,
bool  verbose = false 
)

Create the meshing (from mesh information)

Parameters
[in]ndimSpace Dimension
[in]napexpermeshNumber of apices per mesh
[in]apicesVector of Apex information
[in]meshesVector of mesh indices
[in]byColtrue for Column major; false for Row Major
[in]verboseVerbose flag
Remarks
The argument 'byCol' concerns 'apices' and 'meshes'

◆ toString()

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

Interface to AStringable.

Print the contents of the meshing

Parameters
[in]strfmtFormat for printout

Reimplemented from gstlrn::AMesh.


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