GemaMesh
The GeMA Mesh Plugin
Loading...
Searching...
No Matches
GmpNodeMeshData< Vector > Class Template Reference

Auxiliar interface used to share node data between the mesh implementation and GmpMeshLoader. All fields are public since this is meant to be a sharing mechanism. More...

#include <gmpNodeMeshData.h>

Collaboration diagram for GmpNodeMeshData< Vector >:

Public Types

template<typename U >
using VectorType = Vector<U>
 A type identifying which vector type we are using.
 

Public Member Functions

 GmpNodeMeshData ()
 Constructor. The unused mesh parameter is a helper to the Surface Mesh code.
 
 ~GmpNodeMeshData ()
 Virtual destructor.
 
double * coordBuffer () const
 
double * ghostBuffer () const
 
GmValueAccessorcoordAc (const GmLogCategory &logger, UnitConverter *conv, QString desiredUnit)
 Returns an accessor object for coordinate data. As all accessors, takes ownership of the given converter.
 
GmValueAccessorghostAc (const GmLogCategory &logger, UnitConverter *conv, QString desiredUnit)
 Returns an accessor object for ghost data. As all accessors, takes ownership of the given converter.
 
int addNodes (GmMesh *mesh, bool ghost, int numAddedNodes, bool updateValueSets, GmPCR *pcr)
 
bool reorderCoordinates (GmPCR *pcr, bool ghost, const QMap< int, int > &partOrigToLocOrder)
 Reorders geometry or ghost node coordinates according to the renumbering given by the pcr object. If partOrigToLocOrder is not empty (the mesh was partitioned), it gives the mapping from the original model to the partitioned index in the local nodes vectors. See further comments on the GmPCR::initNodeMapping() documentation.
 
void clear (GmMesh *mesh)
 Removes all mesh nodes + removes all values from node based value sets, preserving object state so that future node addition can be made.
 
void releaseMemory ()
 Releases all the memory DIRECTLY owned by the object.
 
size_t nodeMemory () const
 
size_t nodeSetsMemory () const
 Returns the approximate memory used for storing mesh node sets.
 
void releaseMeshNodes ()
 Releases the memory associated with node coordinates.
 
void releaseGhostNodes ()
 Releases the memory associated with ghost nodes.
 

Public Attributes

GmValueInfo_coordInfo
 Information about node coordinates.
 
int _numNodes
 Number of nodes in the mesh.
 
Vector< double > _coordinates
 Coordinate vector. Size = _coordInfo->size() * _numNodes. Values stored by node.
 
bool _ghostEnabled
 Are ghost nodes enabled for this mesh?
 
int _numGhostNodes
 The number of mesh ghost nodes.
 
Vector< double > _ghostCoordinates
 
QMap< QString, GmNodeSet * > _nodeSets
 Ghost coordinate vector. Size = _coordInfo->size() * _numGhostNodes. Values stored by node.
 
GmpNodeDataDump< Vector > * _dumper
 The object responsible for state dump operations.
 

Detailed Description

template<template< class > class Vector>
class GmpNodeMeshData< Vector >

Auxiliar interface used to share node data between the mesh implementation and GmpMeshLoader. All fields are public since this is meant to be a sharing mechanism.

The template parameter defines the kind of vector object used to store per node data. It can be either GmSingleVector or GmDualVector. Since only those two types are expected, we can do an explicit instanciation of the template and have part of the class implementation on a cpp file.

By bringing the mesh data from GmNodeMesh into this class, we allow for the loading code in GmpMeshLoader to be independent on the other mesh template parameters.

Member Data Documentation

◆ _nodeSets

template<template< class > class Vector>
QMap<QString, GmNodeSet*> GmpNodeMeshData< Vector >::_nodeSets

Ghost coordinate vector. Size = _coordInfo->size() * _numGhostNodes. Values stored by node.

A map with the definition of each node set associated with the mesh. Map entries are instances of the GmpNodeSet class.


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