MmProcess
The GeMA Mesh Mapping Process Plugin
Loading...
Searching...
No Matches
GmpMmNodeBucketIndex Class Reference

Class GmpMmNodeBucketIndex. More...

#include <gmpMmBucketIndex.h>

Inheritance diagram for GmpMmNodeBucketIndex:
Collaboration diagram for GmpMmNodeBucketIndex:

Public Member Functions

 GmpMmNodeBucketIndex (GmSimulationData *simulation, QString id, QString description, const GmLogCategory &logger)
 Constructor for plugin created objects.
 
 GmpMmNodeBucketIndex (GmSimulationData *simulation, GmMesh *mesh, const GmLogCategory &logger, const QVariantMap &options=QVariantMap())
 Constructor for process created objects.
 
virtual const char * pluginType () const
 
virtual bool hasCapability (QString capabilityName) const
 
virtual bool getClosestNode (const GmVector &crd, double &sqrDist, int &outNodeId, const PointValidator &pv=defaultPointValidator) const
 
virtual void getClosestNodes (const GmVector &crd, int n, QVector< int > &nodeList, bool ordered, const PointValidator &pv=defaultPointValidator) const
 
virtual void getClosestNodes (const GmVector &crd, int n, QVector< GmpRefDist< int > > &nodeList, bool ordered, const PointValidator &pv=defaultPointValidator) const
 
virtual void getClosestNodes (const GmVector &crd, double r, QVector< int > &nodeList, bool ordered, const PointValidator &pv=defaultPointValidator) const
 
virtual void getClosestNodes (const GmVector &crd, double r, QVector< GmpRefDist< int > > &nodeList, bool ordered, const PointValidator &pv=defaultPointValidator) const
 
virtual GmCellgetContainingCell (const GmVector &crd) const
 
virtual bool getClosestGaussPoint (const GmVector &crd, double &sqrDist, GmpMmGaussData &outRef, const PointValidator &pv=defaultPointValidator) const
 
virtual void getClosestGaussPoints (const GmVector &crd, int n, QVector< GmpMmGaussData > &gpList, bool ordered, const PointValidator &pv=defaultPointValidator) const
 
virtual void getClosestGaussPoints (const GmVector &crd, int n, QVector< GmpRefDist< GmpMmGaussData > > &gpList, bool ordered, const PointValidator &pv=defaultPointValidator) const
 
virtual void getClosestGaussPoints (const GmVector &crd, double r, QVector< GmpMmGaussData > &gpList, bool ordered, const PointValidator &pv=defaultPointValidator) const
 
virtual void getClosestGaussPoints (const GmVector &crd, double r, QVector< GmpRefDist< GmpMmGaussData > > &gpList, bool ordered, const PointValidator &pv=defaultPointValidator) const
 
- Public Member Functions inherited from GmpMmBucketIndexBase< int >
 GmpMmBucketIndexBase (GmSimulationData *simulation, QString id, QString description, GSBIType type, const GmLogCategory &logger)
 
 GmpMmBucketIndexBase (GmSimulationData *simulation, GmMesh *mesh, GSBIType type, const GmLogCategory &logger, const QVariantMap &options=QVariantMap())
 Bucket index constructor for an object created by the process.
 
virtual const char * pluginName () const
 
void init (const QVariantMap &options)
 Initializes the object with the given options (or defaults in their absence)
 
virtual bool loadPrivateData (LuaTable &table)
 Loads from the given Lua table the mesh information + additional options, calling init() to effectively int a plugin created object.
 
const QVector< GmpMmBIBucket< int > > & bucketList () const
 
virtual bool activeOnly () const
 
virtual int ruleSet () const
 
virtual bool isOutsideOfDomain (const GmVector &crd) const
 
virtual const GmpMmBIBucket< int > & getBucket (const GmVector &crd, bool &ok) const
 Returns a reference to the bucket in which the given point falls in.
 
bool getClosestReference (const GmVector &crd, GmpRefDist< int > &closestRef, const PointValidator &pv=defaultPointValidator) const
 Returns the id of the closest reference.
 
void getClosestReferences (const GmVector &crd, int n, QVector< GmpRefDist< int > > &refList, bool sort, const PointValidator &pv=defaultPointValidator) const
 Returns the ids of the n closest references.
 
void getClosestReferences (const GmVector &crd, double radius, QVector< GmpRefDist< int > > &refList, bool sort, const PointValidator &pv=defaultPointValidator) const
 Returns the ids of the references which distance to crd is less than radius.
 
void printInfo ()
 
virtual void printParameters (const GmLogCategory &logger)
 
virtual int numReferences () const
 Number of stored references.
 
- Public Member Functions inherited from GmpMmBucketIndex
 GmpMmBucketIndex (GmSimulationData *simulation, QString id, QString description, GSBIType type, const GmLogCategory &logger)
 Constructor for plugin created objects.
 
 GmpMmBucketIndex (GmSimulationData *simulation, GmMesh *mesh, GSBIType type, const GmLogCategory &logger)
 Constructor for process created objects.
 
virtual ~GmpMmBucketIndex ()
 Destructor.
 
virtual GmMeshmesh () const
 
virtual const GmValueAccessorcoordAccessor () const
 
virtual int ndim () const
 
GSBIType type () const
 
- Public Member Functions inherited from GmSpatialIndex
 GmSpatialIndex (GmSimulationData *simulation, QString id, QString description, const GmLogCategory &logger)
 
virtual const char * pluginCategory () const
 
- Public Member Functions inherited from GmPluginObject
 GmPluginObject (GmSimulationData *simulation, QString id, QString description, const GmLogCategory &logger)
 
QString id () const
 
QString description () const
 
QString pluginTypeName () const
 

Private Member Functions

virtual int getCrdFromRef (const GmpMmBIReference< int > &ref, GmCRVector &crd) const
 Get the coordinates of the point associated to the given reference.
 
virtual void insertValues ()
 

Additional Inherited Members

- Public Types inherited from GmpMmBucketIndex
enum  GSBIType { GSBIT_NODE , GSBIT_CELL , GSBIT_GAUSS , GSBIT_NUM_BUCKETYPES }
 
- Static Public Member Functions inherited from GmpMmBucketIndex
static QString bucketTypeToStr (GSBIType type)
 Converts an bucket index type to a string.
 
static int strToBucketType (QString str)
 Converts a string to a GSBIType. Returns -1 if no match is found.
 
- Protected Member Functions inherited from GmpMmBucketIndexBase< int >
bool meshHasChanged () const
 
void insertValue (const int &val, int gridId)
 Add a new reference in the bucket index.
 
bool getGridCrd (const GmVector &crd, int gridCrd[GMP_MAX_INDEX_DIM]) const
 Return the grid coordinates for a point.
 
int getGridId (const GmVector &crd) const
 Return the grid cell id in which the given point falls in.
 
int getBucketId (int gridId) const
 Return the bucket id referenced by a cell.
 
void getBoxBucketIds (const int minGrid[GMP_MAX_INDEX_DIM], const int maxGrid[GMP_MAX_INDEX_DIM], ISet &bucketIds) const
 
void getBoxBucketIds1D (int x0, int x1, ISet &buecketIds) const
 
void getBoxBucketIds2D (int x0, int x1, int y0, int y1, ISet &bucketIds) const
 
void getBoxBucketIds3D (int x0, int x1, int y0, int y1, int z0, int z1, ISet &bucketIds) const
 
void computeStep ()
 
void processRadiusLayerBucketIds (const GmVector &crd, double radius, std::function< void(int[])> &proc, int curMin[GMP_MAX_INDEX_DIM], int curMax[GMP_MAX_INDEX_DIM]) const
 
void processLayerBuckets1D (const int curMin[GMP_MAX_INDEX_DIM], const int curMax[GMP_MAX_INDEX_DIM], const int newMin[GMP_MAX_INDEX_DIM], const int newMax[GMP_MAX_INDEX_DIM], std::function< void(int[])> &proc) const
 
void processLayerBuckets2D (const int curMin[GMP_MAX_INDEX_DIM], const int curMax[GMP_MAX_INDEX_DIM], const int newMin[GMP_MAX_INDEX_DIM], const int newMax[GMP_MAX_INDEX_DIM], std::function< void(int[])> &proc) const
 
void processLayerBuckets3D (const int curMin[GMP_MAX_INDEX_DIM], const int curMax[GMP_MAX_INDEX_DIM], const int newMin[GMP_MAX_INDEX_DIM], const int newMax[GMP_MAX_INDEX_DIM], std::function< void(int[])> &proc) const
 
void getLayerBucketIds (const int gridCrd[GMP_MAX_INDEX_DIM], int layer, ISet &bucketIds, int min[GMP_MAX_INDEX_DIM], int max[GMP_MAX_INDEX_DIM], const int minBound[GMP_MAX_INDEX_DIM], const int maxBound[GMP_MAX_INDEX_DIM]) const
 
- Protected Member Functions inherited from GmPluginObject
virtual const GmLogCategorylogger () const
 
GmSimulationDatasimulationData () const
 
- Protected Attributes inherited from GmpMmBucketIndexBase< int >
bool _activeOnly
 
bool _info
 
bool _maxRefineReached
 
int _ruleSet
 
double _step [GMP_MAX_INDEX_DIM]
 
double _maxStep
 
QVector< GmpMmBIBucket< int > > _bucketList
 
QVector< int > _gridIdList
 
- Protected Attributes inherited from GmpMmBucketIndex
GmMesh_mesh
 The mesh.
 
const GmCellGroupSet_cellGroup
 The cell group filter or NULL if there is none.
 
const GmNodeSet_nodeGroup
 The node group filter or NULL if there is none.
 
const GmValueAccessor_crdAcc
 The mesh accessor used for retrieving point coordinates.
 
int _nDim
 
GSBIType _type
 

Detailed Description

Member Function Documentation

◆ getClosestGaussPoint()

virtual bool GmpMmNodeBucketIndex::getClosestGaussPoint ( const GmVector & crd,
double & sqrDist,
GmpMmGaussData & outRef,
const PointValidator & pv = defaultPointValidator ) const
inlinevirtual

Implements GmSpatialIndex.

◆ getClosestGaussPoints() [1/4]

virtual void GmpMmNodeBucketIndex::getClosestGaussPoints ( const GmVector & crd,
double r,
QVector< GmpMmGaussData > & gpList,
bool ordered,
const PointValidator & pv = defaultPointValidator ) const
inlinevirtual

Implements GmSpatialIndex.

◆ getClosestGaussPoints() [2/4]

virtual void GmpMmNodeBucketIndex::getClosestGaussPoints ( const GmVector & crd,
double r,
QVector< GmpRefDist< GmpMmGaussData > > & gpList,
bool ordered,
const PointValidator & pv = defaultPointValidator ) const
inlinevirtual

Implements GmSpatialIndex.

◆ getClosestGaussPoints() [3/4]

virtual void GmpMmNodeBucketIndex::getClosestGaussPoints ( const GmVector & crd,
int n,
QVector< GmpMmGaussData > & gpList,
bool ordered,
const PointValidator & pv = defaultPointValidator ) const
inlinevirtual

Implements GmSpatialIndex.

◆ getClosestGaussPoints() [4/4]

virtual void GmpMmNodeBucketIndex::getClosestGaussPoints ( const GmVector & crd,
int n,
QVector< GmpRefDist< GmpMmGaussData > > & gpList,
bool ordered,
const PointValidator & pv = defaultPointValidator ) const
inlinevirtual

Implements GmSpatialIndex.

◆ getClosestNode()

bool GmpMmNodeBucketIndex::getClosestNode ( const GmVector & crd,
double & sqrDist,
int & outNodeId,
const PointValidator & pv = defaultPointValidator ) const
virtual

Implements GmSpatialIndex.

◆ getClosestNodes() [1/4]

void GmpMmNodeBucketIndex::getClosestNodes ( const GmVector & crd,
double r,
QVector< GmpRefDist< int > > & nodeList,
bool ordered,
const PointValidator & pv = defaultPointValidator ) const
virtual

Implements GmSpatialIndex.

◆ getClosestNodes() [2/4]

void GmpMmNodeBucketIndex::getClosestNodes ( const GmVector & crd,
double r,
QVector< int > & nodeList,
bool ordered,
const PointValidator & pv = defaultPointValidator ) const
virtual

Implements GmSpatialIndex.

◆ getClosestNodes() [3/4]

void GmpMmNodeBucketIndex::getClosestNodes ( const GmVector & crd,
int n,
QVector< GmpRefDist< int > > & nodeList,
bool ordered,
const PointValidator & pv = defaultPointValidator ) const
virtual

Implements GmSpatialIndex.

◆ getClosestNodes() [4/4]

void GmpMmNodeBucketIndex::getClosestNodes ( const GmVector & crd,
int n,
QVector< int > & nodeList,
bool ordered,
const PointValidator & pv = defaultPointValidator ) const
virtual

Implements GmSpatialIndex.

◆ getContainingCell()

virtual GmCell * GmpMmNodeBucketIndex::getContainingCell ( const GmVector & crd) const
inlinevirtual

Implements GmSpatialIndex.

◆ getCrdFromRef()

int GmpMmNodeBucketIndex::getCrdFromRef ( const GmpMmBIReference< int > & ref,
GmCRVector & crd ) const
privatevirtual

Get the coordinates of the point associated to the given reference.

Implements GmpMmBucketIndexBase< int >.

◆ hasCapability()

virtual bool GmpMmNodeBucketIndex::hasCapability ( QString capabilityName) const
inlinevirtual

Implements GmSpatialIndex.

◆ insertValues()

void GmpMmNodeBucketIndex::insertValues ( )
privatevirtual

◆ pluginType()

virtual const char * GmpMmNodeBucketIndex::pluginType ( ) const
inlinevirtual

Implements GmPluginObject.


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