24#ifndef _GEMA_PLUGIN_MESH_LOADER_H_
25#define _GEMA_PLUGIN_MESH_LOADER_H_
56template <
template <
class>
class Vector>
76 bool loadMeshDataAux(
LuaTable& table,
GmMesh* mesh, LoadMode loadFrom,
87 bool initPcrObject (
LuaTable& table,
GmMesh* mesh,
bool partition);
92 bool addNodeValueSetsToMesh (
GmMesh* mesh);
93 bool addCellValueSetsToMesh (
GmCellMesh* mesh);
96 void loadNumNodesFromLua (
LuaTable& table,
int* nnodes,
int* nghost);
97 bool loadNodeCoordinatesFromLua (
LuaTable& table,
GmMesh* mesh,
int nnodes,
int nghost);
100 bool loadCellNodeIncidencesFromLua(
LuaTable& table,
GmCellMesh* mesh,
int* numCellsByType);
107 void getCellAndNodeCountFromPCR (
int* nnodes,
int* nghost,
int* cellsByType);
127 bool reorderNodes(
GmMesh* mesh);
128 bool reorderCells(
GmMesh* mesh);
130 int parseIntegrationRuleInfo(
QVariant v,
int* irType,
int* r1,
int* r2,
int* r3);
144 : _v(v), _field(f), _size(s), _type(t), _next(1), _nextt(1) { assert(s >= 0 && t >= 0 && t <= 3); }
146 void reset() { _next = 1; _nextt = 1; }
149 DataIt tableSize(
LuaEnv* env,
const QVariant& v,
const char* field);
151 int itable (
LuaEnv* env, DataIt& it);
152 void tableInc (
LuaEnv* env, DataIt& it);
154 void cleanup(
GmMesh* mesh);
Auxiliar structure used to share data between GmpCellMesh and GmpMeshLoader. All fields are public si...
Definition gmpCellMeshData.h:121
Auxiliary class used to load mesh data from a Lua file.
Definition gmpMeshLoader.h:58
GmSimulationData * _simulation
Pointer to simulation data.
Definition gmpMeshLoader.h:156
QVector< GmValueInfo * > _gaussList
Stores Gauss attributes metadata while they where not yet claimed by a ValueSet.
Definition gmpMeshLoader.h:167
QVector< GmValueInfo * > _ghostList
Stores ghost attributes & state vars metadata while they where not yet claimed by a ValueSet.
Definition gmpMeshLoader.h:165
GmpCellMeshData< Vector > * _cd
The cell data to be filled.
Definition gmpMeshLoader.h:159
bool _newPcr
Was this PCR object created by us?
Definition gmpMeshLoader.h:161
GmPCR * _pcr
The PCR object created / referenced from the model by loadPcrObject();.
Definition gmpMeshLoader.h:160
QVector< GmValueInfo * > _nodeList
Stores node attributes & state vars metadata while they where not yet claimed by a ValueSet.
Definition gmpMeshLoader.h:164
GmpNodeMeshData< Vector > * _nd
The node data to be filled.
Definition gmpMeshLoader.h:158
const GmLogCategory & _logger
The logger object used to emmit messages.
Definition gmpMeshLoader.h:157
LoadMode
Enum defining from where the data should be loaded.
Definition gmpMeshLoader.h:70
@ LOAD_FROM_LUA
Data should be loaded from the Lua model file.
Definition gmpMeshLoader.h:71
@ LOAD_FROM_DUMP
Data should be loaded from the dump file.
Definition gmpMeshLoader.h:72
@ LOAD_FROM_HDF5
Data should be loaded from the hdf5 file.
Definition gmpMeshLoader.h:73
QVector< GmValueInfo * > _cellList
Stores cell attributes & state vars metadata while they where not yet claimed by a ValueSet.
Definition gmpMeshLoader.h:166
bool _buildTopo
Should we build the topology after mesh loading?
Definition gmpMeshLoader.h:162
Auxiliar interface used to share node data between the mesh implementation and GmpMeshLoader....
Definition gmpNodeMeshData.h:53
Declaration of the GmpCellAllocator type.
Declaration of useful configuration definitions for the plugin library.
Iterator structure returned by tableSize and consumed by ttable / itable.
Definition gmpMeshLoader.h:135
int _size
The data size.
Definition gmpMeshLoader.h:138
int _next
The next index when calling a function / indexing a table.
Definition gmpMeshLoader.h:140
int _nextt
The next table index when the data is provided by multiple tables.
Definition gmpMeshLoader.h:141
const char * _field
The field name used on error messages.
Definition gmpMeshLoader.h:137
int _type
_v type: 0 = invalid, 1 = function, 2 = table, 3 = multiple tables
Definition gmpMeshLoader.h:139
const QVariant & _v
The data source. Either a LuaTable or a LuaFunction object, held externally.
Definition gmpMeshLoader.h:136