gstlearn  1.0.0
CCC
MeshSphericalExt Class Reference

#include <MeshSphericalExt.hpp>

Inheritance diagram for MeshSphericalExt:
MeshSpherical AMesh AStringable ASerializable

Public Member Functions

 MeshSphericalExt ()
 
 MeshSphericalExt (const MeshSphericalExt &m)
 
MeshSphericalExtoperator= (const MeshSphericalExt &m)
 
virtual ~MeshSphericalExt ()
 
int resetFromDb (Db *dbin, Db *dbout, const String &triswitch="nqQ", bool verbose=false)
 
AMeshspde_mesh_load (Db *dbin, Db *dbout=nullptr, const VectorDouble &gext=VectorDouble(), const String &triswitch="-r2", bool verbose=false)
 
- Public Member Functions inherited from MeshSpherical
 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)
 
cs * getMeshToDb (const Db *db, int rankZ=-1, bool verbose=false) const override
 
int getVariety () const
 
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
 
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)
 
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
 

Private Member Functions

AMesh_load2DSph (bool verbose, Db *dbin, Db *dbout, const String &triswitch)
 
void _meshesSphLoadVertices (SphTriangle *t)
 

Additional Inherited Members

- Static Public Member Functions inherited from MeshSpherical
static MeshSphericalcreateFromNF (const String &neutralFilename, bool verbose=true)
 
static MeshSphericalcreate (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 StringgetContainerName ()
 
static const StringgetPrefixName ()
 
static bool createDirectory (const String &dir)
 
static String getExecDirectory ()
 
static String getDirectory (const String &path)
 
- Protected Member Functions inherited from MeshSpherical
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
 
- 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)
 

Detailed Description

Meshing defined in the Euclidean space

Constructor & Destructor Documentation

◆ MeshSphericalExt() [1/2]

MeshSphericalExt::MeshSphericalExt ( )

◆ MeshSphericalExt() [2/2]

MeshSphericalExt::MeshSphericalExt ( const MeshSphericalExt m)

◆ ~MeshSphericalExt()

MeshSphericalExt::~MeshSphericalExt ( )
virtual

Member Function Documentation

◆ _load2DSph()

AMesh * MeshSphericalExt::_load2DSph ( bool  verbose,
Db dbin,
Db dbout,
const String triswitch 
)
private

Load the spherical triangles and vertex coordinates

Returns
The newly created AMesh structure
Parameters
[in]verboseVerbose option
[in]dbinDb structure for the conditioning data
[in]dboutDb structure of the grid
[in]triswitchTriangulation option

◆ _meshesSphLoadVertices()

void MeshSphericalExt::_meshesSphLoadVertices ( SphTriangle *  t)
private

Load the contents of the SphTriangle structure into arrays

Parameters
[in]tPointer to the SphTriangle structure to be downloaded

◆ operator=()

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

◆ resetFromDb()

int MeshSphericalExt::resetFromDb ( Db dbin,
Db dbout,
const String triswitch = "nqQ",
bool  verbose = false 
)

Create the meshing

Parameters
[in]dbinPointer to the input Db (optional)
[in]dboutPointer to the output Db (optional)
[in]triswitchConstruction switch
[in]verboseVerbose flag

◆ spde_mesh_load()

AMesh * MeshSphericalExt::spde_mesh_load ( Db dbin,
Db dbout = nullptr,
const VectorDouble gext = VectorDouble(),
const String triswitch = "-r2",
bool  verbose = false 
)

Load the AMesh structure

Returns
Pointer on the newly allocated AMesh
Parameters
[in]dbinDb structure for the conditioning data
[in]dboutDb structure of the grid
[in]gextArray of domain dilation
[in]triswitchTriswitch option
[in]verboseVerbose option

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