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

#include <MeshETurbo.hpp>

Inheritance diagram for gstlrn::MeshETurbo:
gstlrn::AMesh gstlrn::AStringable gstlrn::ASerializable

Detailed Description

Meshing defined as a Turbo based on a Regular Grid It actually avoids storing all the meshing information and produces faster methods

Public Member Functions

 MeshETurbo (Id mode=1)
 
 MeshETurbo (const 1 &nx, const 1 &dx=1(), const 1 &x0=1(), const 1 &angles=1(), bool flag_polarized=false, bool verbose=false, Id mode=1)
 
 MeshETurbo (const DbGrid *dbgrid, bool flag_polarized=false, bool verbose=false, Id mode=1)
 
 MeshETurbo (const MeshETurbo &r)
 
MeshETurbooperator= (const MeshETurbo &r)
 
virtual ~MeshETurbo ()
 
String toString (const AStringFormat *strfmt=nullptr) const override
 Interface to AStringable.
 
Id getNApices () const override
 Interface to AMesh.
 
Id getNMeshes () const override
 
Id getApex (Id imesh, Id rank) const override
 
double getCoor (Id imesh, Id rank, Id idim) const override
 
void getCoordinatesPerMeshInPlace (Id imesh, Id rank, 1 &coords) const override
 
double getApexCoor (Id i, Id idim) const override
 
void getApexCoordinatesInPlace (Id i, 1 &coords) const override
 
double getMeshSize (Id imesh) const override
 
void resetProjFromDb (ProjMatrix *m, const Db *db, Id rankZ=-1, bool verbose=false) const override
 
void setPolarized (bool flag)
 
Id initFromExtend (const 1 &extendmin, const 1 &extendmax, const 1 &cellsize, const 1 &rotmat=1(), bool flag_polarized=false, bool verbose=false)
 
Id initFromGridByMatrix (const 1 &nx, const 1 &dx=1(), const 1 &x0=1(), const 1 &rotmat=1(), const 1 &sel=1(), bool flag_polarized=false, bool verbose=false)
 
Id initFromGridByAngles (const 1 &nx, const 1 &dx=1(), const 1 &x0=1(), const 1 &angles=1(), const 1 &sel=1(), bool flag_polarized=false, bool verbose=false)
 
Id initFromCova (const CovAniso &cova, const Db *field, double ratio, Id nbExt=0, bool isPolarized=false, bool useSel=true, Id nxmax=300, bool verbose=false)
 
const GridgetGrid () const
 
const IndirectiongetGridIndirect () const
 
const IndirectiongetMeshIndirect () const
 
void getApexIndicesInPlace (Id i, 1 &indg) const
 
Id getMeshFromCoordinates (const 1 &coor, 1 &indices, 1 &lambdas) const
 Given the coordinates of a point, return the corresponding mesh index and updates the apex indices.
 
- 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 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
 
 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 MeshETurbocreate (const 1 &nx, const 1 &dx=1(), const 1 &x0=1(), const 1 &angles=1(), bool flag_polarized=false, bool verbose=false)
 
static MeshETurbocreateFromNF (const String &NFFilename, bool verbose=true)
 
static MeshETurbocreateFromGrid (const DbGrid *dbgrid, bool flag_polarized=false, bool verbose=false, Id mode=1)
 
static MeshETurbocreateFromGridInfo (const Grid *grid, bool flag_polarized=false, bool verbose=false, Id mode=1)
 
static MeshETurbocreateFromCova (const CovAniso &cova, const Db *field, double ratio, Id nbExt=0, bool isPolarized=false, bool useSel=true, Id nxmax=300, bool verbose=false)
 
- 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 ()
 

Friends

class DbMeshTurbo
 

Constructor & Destructor Documentation

◆ MeshETurbo() [1/4]

gstlrn::MeshETurbo::MeshETurbo ( Id  mode = 1)

◆ MeshETurbo() [2/4]

gstlrn::MeshETurbo::MeshETurbo ( const 1 &  nx,
const 1 &  dx = 1(),
const 1 &  x0 = 1(),
const 1 &  angles = 1(),
bool  flag_polarized = false,
bool  verbose = false,
Id  mode = 1 
)

◆ MeshETurbo() [3/4]

gstlrn::MeshETurbo::MeshETurbo ( const DbGrid dbgrid,
bool  flag_polarized = false,
bool  verbose = false,
Id  mode = 1 
)

◆ MeshETurbo() [4/4]

gstlrn::MeshETurbo::MeshETurbo ( const MeshETurbo r)

◆ ~MeshETurbo()

gstlrn::MeshETurbo::~MeshETurbo ( )
virtual

Member Function Documentation

◆ create()

MeshETurbo * gstlrn::MeshETurbo::create ( const 1 &  nx,
const 1 &  dx = 1(),
const 1 &  x0 = 1(),
const 1 &  angles = 1(),
bool  flag_polarized = false,
bool  verbose = false 
)
static

◆ createFromCova()

MeshETurbo * gstlrn::MeshETurbo::createFromCova ( const CovAniso cova,
const Db field,
double  ratio,
Id  nbExt = 0,
bool  isPolarized = false,
bool  useSel = true,
Id  nxmax = 300,
bool  verbose = false 
)
static

◆ createFromGrid()

MeshETurbo * gstlrn::MeshETurbo::createFromGrid ( const DbGrid dbgrid,
bool  flag_polarized = false,
bool  verbose = false,
Id  mode = 1 
)
static

◆ createFromGridInfo()

MeshETurbo * gstlrn::MeshETurbo::createFromGridInfo ( const Grid grid,
bool  flag_polarized = false,
bool  verbose = false,
Id  mode = 1 
)
static

◆ createFromNF()

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

Create a MeshETurbo by loading the contents of a Neutral File

Parameters
NFFilenameName of the Neutral File (MeshEStandard format)
verboseVerbose

◆ getApex()

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

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

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

Implements gstlrn::AMesh.

◆ getApexCoor()

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

Returns coordinate 'idim' of apex 'i'

Implements gstlrn::AMesh.

◆ getApexCoordinatesInPlace()

void gstlrn::MeshETurbo::getApexCoordinatesInPlace ( Id  i,
1 &  coords 
) const
overridevirtual

Returns coordinates of apex 'i'

Reimplemented from gstlrn::AMesh.

◆ getApexIndicesInPlace()

void gstlrn::MeshETurbo::getApexIndicesInPlace ( Id  i,
1 &  indg 
) const

◆ getCoor()

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

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

Implements gstlrn::AMesh.

◆ getCoordinatesPerMeshInPlace()

void gstlrn::MeshETurbo::getCoordinatesPerMeshInPlace ( Id  imesh,
Id  rank,
1 &  coords 
) const
overridevirtual

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

Reimplemented from gstlrn::AMesh.

◆ getGrid()

const Grid & gstlrn::MeshETurbo::getGrid ( ) const
inline

◆ getGridIndirect()

const Indirection & gstlrn::MeshETurbo::getGridIndirect ( ) const
inline

◆ getMeshFromCoordinates()

Id gstlrn::MeshETurbo::getMeshFromCoordinates ( const 1 &  coor,
1 &  indices,
1 &  lambdas 
) const

Given the coordinates of a point, return the corresponding mesh index and updates the apex indices.

Parameters
coorInput coordinates
indicesReturned vector of apex indices
lambdasReturned vector of weights (barycenter coordinates)
Returns
Rank of the mesh (-1 if point does not belong to the meshing)

◆ getMeshIndirect()

const Indirection & gstlrn::MeshETurbo::getMeshIndirect ( ) const
inline

◆ getMeshSize()

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

Returns the mesh size

Implements gstlrn::AMesh.

◆ getNApices()

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

Interface to AMesh.

Returns the total number of apices of the whole grid (not accounting for possible mask on meshes)

Returns

Implements gstlrn::AMesh.

◆ getNMeshes()

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

Actual number of (active) meshes

Returns

Implements gstlrn::AMesh.

◆ initFromCova()

Id gstlrn::MeshETurbo::initFromCova ( const CovAniso cova,
const Db field,
double  ratio,
Id  nbExt = 0,
bool  isPolarized = false,
bool  useSel = true,
Id  nxmax = 300,
bool  verbose = false 
)

◆ initFromExtend()

Id gstlrn::MeshETurbo::initFromExtend ( const 1 &  extendmin,
const 1 &  extendmax,
const 1 &  cellsize,
const 1 &  rotmat = 1(),
bool  flag_polarized = false,
bool  verbose = false 
)

Create the meshing

Parameters
[in]extendminMinimum of the dilated rotated bounding box
[in]extendmaxMinimum of the dilated rotated bounding box
[in]cellsizeArray giving the cell size
[in]rotmatRotation matrix (optional)
[in]flag_polarizedSwitching ON/OFF the polarization
[in]verboseVerbose flag

◆ initFromGridByAngles()

Id gstlrn::MeshETurbo::initFromGridByAngles ( const 1 &  nx,
const 1 &  dx = 1(),
const 1 &  x0 = 1(),
const 1 &  angles = 1(),
const 1 &  sel = 1(),
bool  flag_polarized = false,
bool  verbose = false 
)

◆ initFromGridByMatrix()

Id gstlrn::MeshETurbo::initFromGridByMatrix ( const 1 &  nx,
const 1 &  dx = 1(),
const 1 &  x0 = 1(),
const 1 &  rotmat = 1(),
const 1 &  sel = 1(),
bool  flag_polarized = false,
bool  verbose = false 
)

◆ operator=()

MeshETurbo & gstlrn::MeshETurbo::operator= ( const MeshETurbo r)

◆ resetProjFromDb()

void gstlrn::MeshETurbo::resetProjFromDb ( ProjMatrix m,
const Db db,
Id  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
  • the sample is covered by the grid of the Turbo Meshing

Reimplemented from gstlrn::AMesh.

◆ setPolarized()

void gstlrn::MeshETurbo::setPolarized ( bool  flag)
inline

◆ toString()

String gstlrn::MeshETurbo::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.

Friends And Related Symbol Documentation

◆ DbMeshTurbo

friend class DbMeshTurbo
friend

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