1.5.0
CCC
 
MeshSpherical Class Reference

#include <MeshSpherical.hpp>

Inheritance diagram for MeshSpherical:
AMesh AStringable ASerializable MeshSphericalExt

Detailed Description

Meshing defined in the Spherical Space

Public Member Functions

 MeshSpherical (const MatrixRectangular &apices=MatrixRectangular(), const MatrixInt &meshes=MatrixInt())
 
 MeshSpherical (const MeshSpherical &m)
 
MeshSphericaloperator= (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)
 
void resetProjMatrix (ProjMatrix *m, const Db *db, int rankZ=-1, bool verbose=false) const override
 
int getVariety () const override
 
const MatrixRectangulargetApices () const
 
const MatrixIntgetMeshes () const
 
VectorVectorInt getMeshesAsVVI () const
 
- Public Member Functions inherited from AMesh
 AMesh ()
 
 AMesh (const AMesh &m)
 
AMeshoperator= (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
 
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 &vec) const
 
VectorVectorDouble getEmbeddedCoordinatesPerApex () const
 
VectorDouble getDistances (int iapex0, const VectorInt &japices=VectorInt()) const
 
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
 
- 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
 

Static Public Member Functions

static MeshSphericalcreateFromNF (const String &neutralFilename, bool verbose=true)
 
static MeshSphericalcreate (const MatrixRectangular &apices=MatrixRectangular(), const MatrixInt &meshes=MatrixInt())
 
- Static Public Member Functions inherited from AMesh
static void dumpNeighborhood (std::vector< VectorInt > &Vmesh, int nline_max=1)
 
- 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

◆ MeshSpherical() [1/2]

MeshSpherical::MeshSpherical ( const MatrixRectangular apices = MatrixRectangular(),
const MatrixInt meshes = MatrixInt() 
)

◆ MeshSpherical() [2/2]

MeshSpherical::MeshSpherical ( const MeshSpherical m)

◆ ~MeshSpherical()

MeshSpherical::~MeshSpherical ( )
virtual

Member Function Documentation

◆ create()

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

◆ createFromNF()

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

Create a MeshSpherical by loading the contents of a Neutral File

Parameters
neutralFilenameName of the Neutral File (MeshEStandard format)
verboseVerbose

◆ getApex()

int MeshSpherical::getApex ( int  imesh,
int  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 AMesh.

◆ getApexCoor()

double MeshSpherical::getApexCoor ( int  i,
int  idim 
) const
overridevirtual

Returns coordinate 'idim' of apex 'i'

Implements AMesh.

◆ getApices()

const MatrixRectangular& MeshSpherical::getApices ( ) const
inline

◆ getCoor()

double MeshSpherical::getCoor ( int  imesh,
int  rank,
int  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 AMesh.

◆ getEmbeddedCoorPerApex()

void MeshSpherical::getEmbeddedCoorPerApex ( int  iapex,
VectorDouble coords 
) const
overridevirtual

Fill the coordinates of an apex in embedded space

Parameters
iapexApex index
coordsArray of coordinates

Reimplemented from AMesh.

◆ getEmbeddedCoorPerMesh()

void MeshSpherical::getEmbeddedCoorPerMesh ( int  imesh,
int  ic,
VectorDouble 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 AMesh.

◆ getEmbeddedNDim()

int MeshSpherical::getEmbeddedNDim ( ) const
inlineoverridevirtual

Reimplemented from AMesh.

◆ getMeshes()

const MatrixInt& MeshSpherical::getMeshes ( ) const
inline

◆ getMeshesAsVVI()

VectorVectorInt MeshSpherical::getMeshesAsVVI ( ) const
inline

◆ getMeshSize()

double MeshSpherical::getMeshSize ( int  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 AMesh.

◆ getNApices()

int MeshSpherical::getNApices ( ) const
overridevirtual

Interface to AMesh.

Returns the number of Apices

Returns
Number of apices

Implements AMesh.

◆ getNMeshes()

int MeshSpherical::getNMeshes ( ) const
overridevirtual

Returns the number of Meshes

Returns
Number of meshes

Implements AMesh.

◆ getVariety()

int MeshSpherical::getVariety ( ) const
inlineoverridevirtual

Returns the space variety

Reimplemented from AMesh.

◆ operator=()

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

◆ reset()

int MeshSpherical::reset ( int  ndim,
int  napexpermesh,
const VectorDouble apices,
const VectorInt 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'

◆ resetProjMatrix()

void MeshSpherical::resetProjMatrix ( ProjMatrix m,
const Db db,
int  rankZ = -1,
bool  verbose = false 
) const
overridevirtual

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

Implements AMesh.

◆ toString()

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

Interface to AStringable.

Print the contents of the meshing

Parameters
[in]strfmtFormat for printout

Reimplemented from AMesh.


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