MeshLink
Computational geometry access
MeshAssociativity Class Reference

Storage for mesh topology and geometry associativity data. More...

#include <MeshAssociativity.h>

Public Member Functions

 MeshAssociativity ()
 Default constructor. More...
 
 ~MeshAssociativity ()
 Destructor. More...
 
bool addGeometryGroup (GeometryGroup &geometry_group)
 Add a GeometryGroup to the database. More...
 
MLINT getGeometryGroupCount () const
 Get count of GeometryGroups in the database. More...
 
void getGeometryGroupIDs (std::vector< MLINT > &gids) const
 Get list of GeometryGroup IDs in the database. More...
 
GeometryGroupgetGeometryGroupByName (const char *name)
 Get GeometryGroup by name. More...
 
GeometryGroupgetGeometryGroupByID (MLINT id)
 Get GeometryGroup by ID. More...
 
bool addMeshModel (MeshModel *model, bool mapID)
 Add a MeshModel to the database. More...
 
MeshModelgetMeshModelByID (MLINT id) const
 Get MeshModel by ID. More...
 
MeshModelgetMeshModelByName (const std::string &name) const
 Get MeshModel by name. More...
 
MeshModelgetMeshModelByRef (const char *ref) const
 Get MeshModel by reference. More...
 
bool getMeshSheetByName (const std::string &name, MeshModel **model, MeshSheet **sheet) const
 Get MeshSheet by name. More...
 
bool getMeshStringByName (const std::string &name, MeshModel **model, MeshString **string) const
 Get MeshString by name. More...
 
void addGeometryKernel (GeometryKernel *kernel)
 Add a GeometryKernel to the database. More...
 
void removeGeometryKernel (GeometryKernel *kernel)
 Remove a GeometryKernel from the database. More...
 
GeometryKernelgetGeometryKernelByName (const char *name)
 Get GeometryKernel by name. More...
 
GeometryKernelgetActiveGeometryKernel ()
 Get the active GeometryKernel. More...
 
bool setActiveGeometryKernelByName (const char *name)
 Set the active GeometryKernel by name. More...
 
const MeshLinkAttributegetAttributeByID (const MLINT id) const
 Get MeshLinkAttribute by ID. More...
 
void clearAttributes ()
 Remove all MeshLinkAttribute objects from the database. More...
 
bool addAttribute (MeshLinkAttribute &att)
 Add a MeshLinkAttribute to the database. More...
 
std::vector< const MeshLinkAttribute * > getAttributes () const
 Return list of MeshLinkAttributes in the MeshAssociativity database. More...
 
const MeshLinkTransformgetTransformByID (const MLINT id) const
 Get MeshLinkTransform by ID. More...
 
void clearTransforms ()
 Remove all MeshLinkTransform objects from the database. More...
 
bool addTransform (MeshLinkTransform &att)
 Add a MeshLinkTransform to the database. More...
 
void getTransforms (std::vector< const MeshLinkTransform * > &xforms) const
 Return list of MeshLinkTransforms in the MeshAssociativity database. More...
 
size_t getTransformCount () const
 Return count of MeshLinkTransforms in the MeshAssociativity database. More...
 
void clearMeshElementLinkages ()
 Remove all MeshElementLinkage objects from the database. More...
 
bool addMeshElementLinkage (MeshElementLinkage *linkage)
 Add a MeshElementLinkage to the database. More...
 
MeshElementLinkagegetMeshElementLinkageByName (const std::string &name) const
 Get MeshElementLinkage by name. More...
 
void getMeshElementLinkages (std::vector< MeshElementLinkage * > &linkages) const
 Return list of MeshElementLinkages in the MeshAssociativity database. More...
 
size_t getMeshElementLinkageCount () const
 Return count of MeshElementLinkages in the MeshAssociativity database. More...
 
MLINT getNumGeometryFiles () const
 Return the number of GeometryFile objects in the database. More...
 
void addGeometryFile (GeometryFile &file)
 Add a GeometryFile to the database. More...
 
MLINT getNumMeshFiles () const
 Return the number of MeshFile objects in the database. More...
 
void addMeshFile (MeshFile &file)
 Add a MeshFile to the database. More...
 
bool getAttribute (MLINT attID, const char **name, const char **value) const
 Get the name and value of a MeshLinkAttribute by ID. More...
 
const std::vector< GeometryFile > & getGeometryFiles () const
 Get a list of all GeometryFile objects in the database. More...
 
const std::vector< MeshFile > & getMeshFiles () const
 Get a list of all MeshFile objects in the database. More...
 
void getMeshModels (std::vector< MeshModel * > &models) const
 Return list of MeshModels in the MeshAssociativity database. More...
 
size_t getMeshModelCount () const
 Return count of MeshModels in the MeshModel. More...
 

Private Attributes

std::vector< GeometryFilegeometryFiles_
 Geometry files. More...
 
std::vector< MeshFilemeshFiles_
 Mesh files. More...
 
GeometryGroupManager geometry_group_manager_
 The associativity geometry group manager. More...
 
MeshAttributeIDMap meshAttributeIDMap_
 Map of MeshAttribute to associated ID (aref) More...
 
MeshAttributeNameToIDMap meshAttributeNameToIDMap_
 Map of MeshAttribute name to associated ID (aref) More...
 
MeshTransformIDMap meshTransformIDMap_
 Map of MeshTransform to associated XID (xref) More...
 
MeshTransformNameToIDMap meshTransformNameToIDMap_
 Map of MeshTransform name to associated XID (xref) More...
 
MeshElementLinkageNameMap meshElementLinkageNameMap_
 Map of element linkage name to MeshElementLinkage. More...
 
MeshModelNameMap meshModelNameMap_
 Map of mesh model name to MeshModel. More...
 
MeshTopoIDToNameMap meshModelIDToNameMap_
 Map of mesh model ID to MeshModel name. More...
 
MeshTopoRefToNameMap meshModelRefToNameMap_
 Map of mesh model reference string to MeshModel name. More...
 

Static Private Attributes

static GeometryKernelManager geometry_kernel_manager_
 The Singleton geometry kernel manager. More...
 

Detailed Description

Storage for mesh topology and geometry associativity data.

This is the main interface for defining, querying and updating mesh-geometry associativity.

Definition at line 523 of file MeshAssociativity.h.

Constructor & Destructor Documentation

◆ MeshAssociativity()

MeshAssociativity::MeshAssociativity ( )
inline

Default constructor.

Definition at line 526 of file MeshAssociativity.h.

◆ ~MeshAssociativity()

MeshAssociativity::~MeshAssociativity ( )

Destructor.

Member Function Documentation

◆ addAttribute()

bool MeshAssociativity::addAttribute ( MeshLinkAttribute att)

Add a MeshLinkAttribute to the database.

Parameters
[in]attthe attribute to add
Returns
true if the attribute was added

◆ addGeometryFile()

void MeshAssociativity::addGeometryFile ( GeometryFile file)

Add a GeometryFile to the database.

Parameters
[in]filethe geometry file to add

◆ addGeometryGroup()

bool MeshAssociativity::addGeometryGroup ( GeometryGroup geometry_group)

Add a GeometryGroup to the database.

Parameters
[in]geometry_groupthe group to add
Returns
true if group was added

◆ addGeometryKernel()

void MeshAssociativity::addGeometryKernel ( GeometryKernel kernel)

Add a GeometryKernel to the database.

Geometry kernels are application-defined. An application will typically add a kernel to its MeshAssociativity and set it active after loading MeshLink data and before loading geometry.

Parameters
[in]kernelthe geometry kernel to add

◆ addMeshElementLinkage()

bool MeshAssociativity::addMeshElementLinkage ( MeshElementLinkage linkage)

Add a MeshElementLinkage to the database.

Parameters
[in]transthe transform to add
Returns
true if the transform was added

◆ addMeshFile()

void MeshAssociativity::addMeshFile ( MeshFile file)

Add a MeshFile to the database.

Parameters
[in]filethe mesh file to add

◆ addMeshModel()

bool MeshAssociativity::addMeshModel ( MeshModel model,
bool  mapID 
)

Add a MeshModel to the database.

Parameters
[in]modelthe model to add
[in]mapIDwhether to map the unique ID to the model name

◆ addTransform()

bool MeshAssociativity::addTransform ( MeshLinkTransform att)

Add a MeshLinkTransform to the database.

Parameters
[in]transthe transform to add
Returns
true if the transform was added

◆ clearAttributes()

void MeshAssociativity::clearAttributes ( )

Remove all MeshLinkAttribute objects from the database.

◆ clearMeshElementLinkages()

void MeshAssociativity::clearMeshElementLinkages ( )

Remove all MeshElementLinkage objects from the database.

◆ clearTransforms()

void MeshAssociativity::clearTransforms ( )

Remove all MeshLinkTransform objects from the database.

◆ getActiveGeometryKernel()

GeometryKernel* MeshAssociativity::getActiveGeometryKernel ( )

Get the active GeometryKernel.

Returns
geometry kernel or NULL if none active

◆ getAttribute()

bool MeshAssociativity::getAttribute ( MLINT  attID,
const char **  name,
const char **  value 
) const

Get the name and value of a MeshLinkAttribute by ID.

Parameters
[in]attIDthe unique ID of the desired attribute
[out]namethe name of the attribute, if found
[out]valuethe value (content) of the attribute, if found
Returns
true if attribute was found

◆ getAttributeByID()

const MeshLinkAttribute* MeshAssociativity::getAttributeByID ( const MLINT  id) const

Get MeshLinkAttribute by ID.

Parameters
[in]idthe unique ID of the desired attribute
Returns
attribute or NULL if not found

◆ getAttributes()

std::vector<const MeshLinkAttribute *> MeshAssociativity::getAttributes ( ) const

Return list of MeshLinkAttributes in the MeshAssociativity database.

◆ getGeometryFiles()

const std::vector<GeometryFile>& MeshAssociativity::getGeometryFiles ( ) const

Get a list of all GeometryFile objects in the database.

◆ getGeometryGroupByID()

GeometryGroup* MeshAssociativity::getGeometryGroupByID ( MLINT  id)

Get GeometryGroup by ID.

Parameters
[in]idthe ID of the desired geometry group
Returns
group or NULL if not found

◆ getGeometryGroupByName()

GeometryGroup* MeshAssociativity::getGeometryGroupByName ( const char *  name)

Get GeometryGroup by name.

Parameters
[in]namethe name of the desired geometry group
Returns
group or NULL if not found

◆ getGeometryGroupCount()

MLINT MeshAssociativity::getGeometryGroupCount ( ) const

Get count of GeometryGroups in the database.

Returns
GeometryGroup count

◆ getGeometryGroupIDs()

void MeshAssociativity::getGeometryGroupIDs ( std::vector< MLINT > &  gids) const

Get list of GeometryGroup IDs in the database.

Parameters
[in,out]gidsarray of GIDs

◆ getGeometryKernelByName()

GeometryKernel* MeshAssociativity::getGeometryKernelByName ( const char *  name)

Get GeometryKernel by name.

Parameters
[in]namethe name of the desired geometry kernel
Returns
geometry kernel or NULL if not found

◆ getMeshElementLinkageByName()

MeshElementLinkage* MeshAssociativity::getMeshElementLinkageByName ( const std::string &  name) const

Get MeshElementLinkage by name.

Parameters
[in]namethe name of the desired linkage
Returns
linkage or NULL if not found

◆ getMeshElementLinkageCount()

size_t MeshAssociativity::getMeshElementLinkageCount ( ) const

Return count of MeshElementLinkages in the MeshAssociativity database.

◆ getMeshElementLinkages()

void MeshAssociativity::getMeshElementLinkages ( std::vector< MeshElementLinkage * > &  linkages) const

Return list of MeshElementLinkages in the MeshAssociativity database.

◆ getMeshFiles()

const std::vector<MeshFile>& MeshAssociativity::getMeshFiles ( ) const

Get a list of all MeshFile objects in the database.

◆ getMeshModelByID()

MeshModel* MeshAssociativity::getMeshModelByID ( MLINT  id) const

Get MeshModel by ID.

Parameters
[in]idthe ID of the desired model
Returns
model or NULL if not found

◆ getMeshModelByName()

MeshModel* MeshAssociativity::getMeshModelByName ( const std::string &  name) const

Get MeshModel by name.

Parameters
[in]namethe name of the desired model
Returns
model or NULL if not found

◆ getMeshModelByRef()

MeshModel* MeshAssociativity::getMeshModelByRef ( const char *  ref) const

Get MeshModel by reference.

Parameters
[in]refthe application-defined reference string of the desired model
Returns
model or NULL if not found

◆ getMeshModelCount()

size_t MeshAssociativity::getMeshModelCount ( ) const

Return count of MeshModels in the MeshModel.

◆ getMeshModels()

void MeshAssociativity::getMeshModels ( std::vector< MeshModel * > &  models) const

Return list of MeshModels in the MeshAssociativity database.

◆ getMeshSheetByName()

bool MeshAssociativity::getMeshSheetByName ( const std::string &  name,
MeshModel **  model,
MeshSheet **  sheet 
) const

Get MeshSheet by name.

Search all MeshModels for a MeshSheet with the given name.

Parameters
[in]namethe name of the desired sheet
[out]modelcontaining the desired sheet
[out]thedesired sheet
Returns
true if found

◆ getMeshStringByName()

bool MeshAssociativity::getMeshStringByName ( const std::string &  name,
MeshModel **  model,
MeshString **  string 
) const

Get MeshString by name.

Search all MeshModels for a MeshString with the given name.

Parameters
[in]namethe name of the desired string
[out]modelcontaining the desired string
[out]thedesired string
Returns
true if found

◆ getNumGeometryFiles()

MLINT MeshAssociativity::getNumGeometryFiles ( ) const

Return the number of GeometryFile objects in the database.

◆ getNumMeshFiles()

MLINT MeshAssociativity::getNumMeshFiles ( ) const

Return the number of MeshFile objects in the database.

◆ getTransformByID()

const MeshLinkTransform* MeshAssociativity::getTransformByID ( const MLINT  id) const

Get MeshLinkTransform by ID.

Parameters
[in]idthe unique ID of the desired transform
Returns
transform or NULL if not found

◆ getTransformCount()

size_t MeshAssociativity::getTransformCount ( ) const

Return count of MeshLinkTransforms in the MeshAssociativity database.

◆ getTransforms()

void MeshAssociativity::getTransforms ( std::vector< const MeshLinkTransform * > &  xforms) const

Return list of MeshLinkTransforms in the MeshAssociativity database.

◆ removeGeometryKernel()

void MeshAssociativity::removeGeometryKernel ( GeometryKernel kernel)

Remove a GeometryKernel from the database.

Parameters
[in]kernelthe geometry kernel to remove

◆ setActiveGeometryKernelByName()

bool MeshAssociativity::setActiveGeometryKernelByName ( const char *  name)

Set the active GeometryKernel by name.

The active geometry kernel is set by the application before performing geometric evaluations and projections.

Parameters
[in]namethe name of the desired geometry kernel
Returns
true if geometry kernel found and set active

Member Data Documentation

◆ geometry_group_manager_

GeometryGroupManager MeshAssociativity::geometry_group_manager_
private

The associativity geometry group manager.

Definition at line 750 of file MeshAssociativity.h.

◆ geometry_kernel_manager_

GeometryKernelManager MeshAssociativity::geometry_kernel_manager_
staticprivate

The Singleton geometry kernel manager.

Definition at line 747 of file MeshAssociativity.h.

◆ geometryFiles_

std::vector<GeometryFile> MeshAssociativity::geometryFiles_
private

Geometry files.

Definition at line 742 of file MeshAssociativity.h.

◆ meshAttributeIDMap_

MeshAttributeIDMap MeshAssociativity::meshAttributeIDMap_
private

Map of MeshAttribute to associated ID (aref)

Definition at line 753 of file MeshAssociativity.h.

◆ meshAttributeNameToIDMap_

MeshAttributeNameToIDMap MeshAssociativity::meshAttributeNameToIDMap_
private

Map of MeshAttribute name to associated ID (aref)

Definition at line 755 of file MeshAssociativity.h.

◆ meshElementLinkageNameMap_

MeshElementLinkageNameMap MeshAssociativity::meshElementLinkageNameMap_
private

Map of element linkage name to MeshElementLinkage.

Definition at line 763 of file MeshAssociativity.h.

◆ meshFiles_

std::vector<MeshFile> MeshAssociativity::meshFiles_
private

Mesh files.

Definition at line 744 of file MeshAssociativity.h.

◆ meshModelIDToNameMap_

MeshTopoIDToNameMap MeshAssociativity::meshModelIDToNameMap_
private

Map of mesh model ID to MeshModel name.

Definition at line 769 of file MeshAssociativity.h.

◆ meshModelNameMap_

MeshModelNameMap MeshAssociativity::meshModelNameMap_
private

Map of mesh model name to MeshModel.

Definition at line 767 of file MeshAssociativity.h.

◆ meshModelRefToNameMap_

MeshTopoRefToNameMap MeshAssociativity::meshModelRefToNameMap_
private

Map of mesh model reference string to MeshModel name.

Definition at line 771 of file MeshAssociativity.h.

◆ meshTransformIDMap_

MeshTransformIDMap MeshAssociativity::meshTransformIDMap_
private

Map of MeshTransform to associated XID (xref)

Definition at line 758 of file MeshAssociativity.h.

◆ meshTransformNameToIDMap_

MeshTransformNameToIDMap MeshAssociativity::meshTransformNameToIDMap_
private

Map of MeshTransform name to associated XID (xref)

Definition at line 760 of file MeshAssociativity.h.


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