44#define GM_GHOSTNODE_MASK (~(~0u >> 1))
142 static int clearGhostFlag(
int nodeIndex) {
return nodeIndex & (~GM_GHOSTNODE_MASK); }
147 int toLinearGhostIndex(
int nodeIndex)
const {
return isGhostNode(nodeIndex) ? clearGhostFlag(nodeIndex) + numNodes() : nodeIndex; }
169 virtual void removeNodeValueSet(
QString id);
170 virtual bool initNodeValueSets();
171 virtual void beginAddingNodeAttributeSets();
172 virtual bool endAddingNodeAttributeSets();
173 virtual void clearNodeValueSets();
174 virtual void clearNodeValueSetsData();
178 virtual int numNodeValueStates (
QString id)
const;
180 virtual double nodeValueStateTime (
QString id,
int snum)
const;
181 virtual void setNodeValueStateTag (
QString id,
int snum,
QString tag);
182 virtual void setNodeValueStateTime(
QString id,
int snum,
double time);
206 virtual int addNodes(
int numNodes) { Q_UNUSED(numNodes);
return -1; }
220 virtual int addGhostNodes(
int numNodes) { Q_UNUSED(numNodes);
return numNodes == 0 ? -2 : -1; }
314 vs = ghostNodeValueSet(
id);
337 virtual bool addStateAccessorData(
GmStateDump* state,
int groupId);
339 virtual bool fillDumpControlMapData (QVariantMap* map,
const GmLogCategory& logger);
340 virtual bool dumpControlMapDataLoaded(QVariantMap* map,
const GmLogCategory& logger);
364 QVariantMap _stateDumpControlMap;
A basic interface used for creating dump items for objects that can be dumped by a composition of mul...
Definition gmStateDumpItem.h:53
virtual bool addStateItemsToGroup(GmStateDump *state, int groupId)=0
Initialization method, called once, allowing the object to add its state items to the given group of ...
Class representing a category with multiple logging levels.
Definition gmLog.h:58
Base interface class for Mesh type plugins.
Definition gmMesh.h:48
virtual int numNodes() const =0
Returns the number of nodes in the mesh.
GmValueSetGroup * ghostNodeValueSetGroup() const
Returns the ValueSetGroup object used to store the set of mesh ghost node value sets....
Definition gmMesh.h:290
static bool isGhostNode(int nodeIndex)
Returns true if the given index is a ghost node index, false if not.
Definition gmMesh.h:136
virtual GmPCR * pcrObject() const =0
Returns the PCR(Partition - Color - Renumber) object associated with this mesh. Should NEVER return N...
QMap< QString, GmPhysicsUserFunctions * > & userFunctionsObjMap() const
Returns the mesh map storing physics user function objects.
Definition gmMesh.h:232
static int clearGhostFlag(int nodeIndex)
Returns the given index with the ghost node bit cleared.
Definition gmMesh.h:142
static int setGhostFlag(int nodeIndex)
Returns the given index with the ghost node bit set.
Definition gmMesh.h:139
virtual void emitMeshChanged()
Emmits the signal meshChanged to signal other objects that the mesh has changed. Should be called by ...
Definition gmMesh.h:299
virtual GmValueInfo * nodeCoordInfo() const =0
Returns metadata with information about node coordinates.
virtual size_t nodeMemory() const =0
Returns the approximate memory used for storing mesh nodes (does not include memory for s....
virtual void pushProxy(lua_State *L, const GmLogCategory &logger)=0
Pushes a proxy object for the current mesh onto the Lua stack.
virtual int numGhostNodes() const
Returns the number of ghost nodes in the mesh.
Definition gmMesh.h:110
int totalNumNodes() const
Returns the total number of nodes in the mesh, including normal nodes & ghost nodes.
Definition gmMesh.h:113
virtual int controlMapStateItemType()
Virtual function that needs to be implemented by concrete implementation classes supporting the state...
Definition gmMesh.h:326
virtual bool useDualVectors() const =0
Returns true if the mesh data is stored in a "dual" vector, instead of a single one.
virtual int addNodes(int numNodes)
Adds numNodes to the mesh, WHITHOUT initializing their coordinates or attributes.
Definition gmMesh.h:206
virtual int addGhostNodes(int numNodes)
Similar to addNodes, this function adds ghost nodes to the mesh, WHITHOUT initializing their coordina...
Definition gmMesh.h:220
GmValueSet * ghostNodeValueSet(QString id) const
Returns the ghost node value set associated with the given cell attribute. Might be NULL....
Definition gmMesh.h:293
virtual bool hasCapability(QString capabilityName) const =0
This function should return true or false to indicate whether the mesh implementation supports the re...
virtual size_t nodeSetsMemory() const =0
Returns the approximate memory used for storing node sets.
void meshChanged()
Signal emmited by emitMeshChanged(). See comments on that function.
virtual bool addStateGeometryData(GmStateDump *state, int groupId)
Virtual function that needs to be implemented by concrete implementation classes supporting the state...
Definition gmMesh.h:335
int totalNumGlobalNodes() const
Returns the total number of nodes in the mesh, including normal nodes & ghost nodes.
Definition gmMesh.h:122
GmValueSet * nodeValueSet(QString id) const
Returns the node value set associated with the given cell attribute. Might be NULL....
Definition gmMesh.h:271
int toLinearGhostIndex(int nodeIndex) const
If nodeIndex is a value with its high bit set, returns the index (high bit cleared)
Definition gmMesh.h:147
virtual int numGlobalGhostNodes() const
When working with partitioned meshes, returns the number of ghost nodes in the global mesh,...
Definition gmMesh.h:119
virtual void clear()
Clears mesh nodes (and cells + other mesh related information depending on the concrete mesh type) if...
Definition gmMesh.h:229
virtual GmValueAccessor * nodeCoordAccessor(Unit desiredUnit, const GmLogCategory &logger) const =0
Returns an accessor object used to access node coordinates.
virtual const char * pluginCategory() const
Returns the plugin category.
Definition gmMesh.h:56
GmValueSet * anyVsFromId(QString id) const
Helper function that, given an id, returns the node value set for that id if it exists....
Definition gmMesh.h:310
virtual int numGlobalNodes() const
When working with partitioned meshes, returns the number of nodes in the global mesh,...
Definition gmMesh.h:116
GmValueSetGroup * nodeValueSetGroup() const
Returns the ValueSetGroup object used to store the set of mesh node value sets. This is a very specia...
Definition gmMesh.h:268
int toLocalGhostIndex(int nodeIndex) const
Given a global ghost index (a value >= numNodes() and < totalNumNodes()), returns a zero based versio...
Definition gmMesh.h:153
int _stateDumpControlMapItem
The dump item index for the control map. Used to make sure that there are no mesh data accessors prio...
Definition gmMesh.h:342
virtual const QMap< QString, GmNodeSet * > & nodeSets() const =0
Returns a map of node sets registered within the mesh. Each entry in the returned map contains a grou...
This class stores a set of nodes belonging to a mesh. The nodes can belong to the mesh boundary but t...
Definition gmNodeSet.h:34
Base interface class for Partition-Color-Renumber object plugins.
Definition gmPCR.h:54
Base interface class for Physics type plugins to export user functions that can be used to provide at...
Definition gmPhysics.h:177
Base interface class for all object plugins.
Definition gmPluginObject.h:37
virtual void printParameters(const GmLogCategory &logger)=0
Asks the object to print all of its parameters using the provided logger.
Definition gmPluginObject.cpp:62
Auxiliar class used to store the complete set of simulation data.
Definition gmSimulationData.h:55
The GmStateDump class presents a higher level of abstraction over GmMemoryDump, storing accessor data...
Definition gmStateDump.h:54
Auxiliar class used to store the definition of a state variable.
Definition gmStateVar.h:41
Interface class for accessing and setting values from an "indexable" collection of values.
Definition gmValueAccessor.h:60
Auxiliar class used to store the definition of a value. It can be used to store informations about st...
Definition gmValueInfo.h:132
This class manages a group of ValueSets that have all the same size and must grow (or shrink) togethe...
Definition gmValueSetGroup.h:38
Basic class used to store sets of values, bound to a common definition, on behalf of another object (...
Definition gmValueSet.h:54
SaveStateMode
Initialization mode for calls to saveState()
Definition gmValueSet.h:60
#define GMC_API_EXPORT
Macro for controlling if the class is being exported (GEMA_CORE_LIB defined) or imported (GEMA_CORE_L...
Definition gmCoreConfig.h:35
#define GM_GHOSTNODE_MASK
Mask with 1 on The MSB to tell if an index is a ghost node index or not.
Definition gmMesh.h:44
Implementation of the GmPCR class.
Declaration of macros for standard plugin categories.
#define GM_PLUGIN_MESH
Plugin implements mesh objects.
Definition gmPluginCategory.h:27
Declaration of the GmPluginObject base class.
Utilitary functions for printing data.
@ GM_PRINT_DEFAULT
A tag to request that the options should be filled with the default.
Definition gmPrintUtils.h:72
Declaration of the GmStateDumpBaseDataItem and basic derived classes.
@ GM_MESH_DUMP_ITEM
Dump item for mesh objects.
Definition gmStateDumpItem.h:108
Declaration of the GmValueSetGroup class.