![]() |
GeomProcess
The GeMA Geometry Process Plugin
|
Basic class for the Geometry Utils process plugin object. More...
#include <gmpGeomProcess.h>


Public Member Functions | |
| GmpGeomProcess (GmSimulationData *simulation, QString id, QString description, const GmLogCategory &logger) | |
| Constructor. Will be called by the plugin loading code. | |
| virtual | ~GmpGeomProcess () |
| Destructor. | |
| virtual const char * | pluginName () const |
| virtual const char * | pluginType () const |
| virtual void | loadFunctions (LuaTable &table) |
| virtual QStringList | functionList () const |
Public Member Functions inherited from GmProcess | |
| GmProcess (GmSimulationData *simulation, QString id, QString description, const GmLogCategory &logger) | |
| virtual const char * | pluginCategory () const |
| virtual bool | loadPrivateData (LuaTable &table) |
| virtual void | printParameters (const GmLogCategory &logger) |
| int | createProgressStatsItem (GmRunProgressStats *ps, const char *name) |
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 | |
| GmProcessMethodRedirector< GmpGeomProcess >::MethodRegistry * | processMethodTable () const |
| Returns the table storing the process exported function names / methods. | |
| int | getConvexHull (lua_State *L) |
| The geom.getConvexHull() process implementation. | |
| int | pointInConvexPolygon (lua_State *L) |
| The geom.pointInConvexPolygon() process implementation. | |
| int | delaunayTriangulation (lua_State *L) |
| The geom.delaunayTriangulation() process implementation. | |
| int | isMeshValid (lua_State *L) |
| The geom.isMeshValid process implementation. | |
| int | isMeshQualityGT (lua_State *L) |
| The geom.isMeshQualityGT process implementation. | |
| int | meshQualityHistogram (lua_State *L) |
| The geom.MeshQualityHistogram process implementation. | |
| int | extractMeshFromMeshBorders (lua_State *L) |
| Creates a new mesh with cells extracted from a src mesh border and filtered by an optional user filter. If the mesh is a solid mesh, the new mesh will be a surface composed of a set of 3d quads and/or triangles. If it is a surface mesh, the new mesh will be a set of bar elements. | |
| int | extractMeshFromMeshBoundary (lua_State *L) |
| Creates a new mesh with cells extracted from the given boundary group. If the group is an edge group, the new mesh will be a set of bar elements. If it is a face group, the new mesh will be a set of 3d quads and/or triangles. | |
| int | extractProjectedMeshFromMesh (lua_State *L) |
| Creates a new mesh that projects the given src mesh cells on the XY plane. The src mesh should be composed of Quad3D and Tri3D elements. There is a one to one correspondence between the src mesh and the destination mesh elements. The element with id 'i' in the serc mesh is equivalent to the element 'i' on the new mesh. | |
| int | releaseExtractedMesh (lua_State *L) |
| Releases the extracted mesh object received as parameter. The given mesh should be a mesh returned by one of the extract calls, it mustn't have been registered in any other object (another process object, for example) and any remaining Lua references to it MUST not be used again. As seen by the restrictions this is an inherently UNSAFE function, provided so that test code can create and destroy meshes as a way to handle the 8 mesh limit. Use with CARE. | |
| int | burialDepth (lua_State *L) |
| Given a 3d point coordinate, returns its burial depth by finding the point projection on the sea floor surface mesh and returning the depth difference. If the xy coordinate is outside the sea floor mesh domain, returns nil. Once the cell of the sea floor mesh that contains the query point is located (by using the spatial index), the depth is calculated from the average of the cell's node depths (it could also be calculated from the shape function, but that would imply doing a cartesian to natural conversion, a costly function that seems unnecessary for this simple burial calculation). Parameters are: the sea floor 3d surface mesh object, an accessor for the mesh coordinates, the spatial index object for the projected 2d sea floor surface mesh and the query point (either a vector or a Lua table) using the same unit as the given accessor. | |
| int | createSimpleMesh (lua_State *L) |
| Creates a new mesh with nodes and cells provided by the given Lua tables. | |
| int | fillEmptyMesh (lua_State *L) |
| Fills an EMPTY mesh with nodes and cells provided by the given Lua tables. | |
| int | createEmptyDiscSet (lua_State *L) |
| Creates a new empty discontinuitySet. | |
| void | parseExtractParameters (int start, LuaEnv *env, const char *fname, QString &newMeshName, QVariantMap &attributes, QString &plugin, bool &addToModel, bool *projected, bool *saveSrc, LuaFunction *filter, int *borderCellOrIndex, int *borderSide) const |
| Parses and validates the mesh name and option parameters from the calls to the extract functions. It will always parse the mesh name, the attributes, pluginType and addToModel options, filling them with the default if not given by the user. The other options, projected, saveSrc, etc, will be parsed and validated when the parameter is not a NULL pointer. Notice that borderCellOrIndex and borderSide are not checked to see if the ids are valid since the src mesh is unknown on this function. They are also kept as "1-based" values. On errors, raises a LuaError and does not returns. | |
| bool | parseExtractIndexParameters (LuaEnv *env, const char *fname, QString newMeshName, QString &newIndexName, QVariantMap &attributes, QString &plugin) const |
| Parses and validates option parameters related to spatial index creation from the calls to the extract functions. On errors, raises a LuaError and does not returns. Returns true if the user asked for spatial index creation, false otherwise. | |
Additional Inherited Members | |
Protected Member Functions inherited from GmProcess | |
| void | registerFunctions (LuaTable &table, typename GmProcessMethodRedirector< T >::MethodRegistry *methods, bool noProgressStats=false) |
| QStringList | buildFunctionList (typename GmProcessMethodRedirector< T >::MethodRegistry *methods) const |
Protected Member Functions inherited from GmPluginObject | |
| virtual const GmLogCategory & | logger () const |
| GmSimulationData * | simulationData () const |
Basic class for the Geometry Utils process plugin object.
|
private |
Creates a new mesh with nodes and cells provided by the given Lua tables.
Parameters: 1) The node list (a table with sub tables storing node coordinates); 2) A string with cell types. Can be nil or empty if the mesh is either heterogeneous or a node mesh - in the later case, the pluginType must be set on the options parameter below; 3) A table with cell incidence lists or nil for node meshes. Each table entry should be a subtable with node incidences (1-based). If the mesh is heterogeneous, the first entry of the incidence list should be a string with the cell type; 4) The new mesh name; 5) An options table with the following optional fields:
|
private |
Creates a new mesh with cells extracted from a src mesh border and filtered by an optional user filter. If the mesh is a solid mesh, the new mesh will be a surface composed of a set of 3d quads and/or triangles. If it is a surface mesh, the new mesh will be a set of bar elements.
Parameters: The src cell mesh (either id or object), the new mesh name and an options table with the following optional fields:
|
private |
Creates a new mesh with cells extracted from the given boundary group. If the group is an edge group, the new mesh will be a set of bar elements. If it is a face group, the new mesh will be a set of 3d quads and/or triangles.
Parameters: The cell boundary group object, the new mesh name and an options table with the following optional fields:
|
private |
Creates a new mesh that projects the given src mesh cells on the XY plane. The src mesh should be composed of Quad3D and Tri3D elements. There is a one to one correspondence between the src mesh and the destination mesh elements. The element with id 'i' in the serc mesh is equivalent to the element 'i' on the new mesh.
Parameters: The src cell mesh (either id or object), the new mesh name and an options table with the following optional fields:
|
private |
Fills an EMPTY mesh with nodes and cells provided by the given Lua tables.
Parameters: 1) Either the mesh name or object 2) The node list (a table with sub tables storing node coordinates); 3) A string with cell types. Can be nil or empty if the mesh is either heterogeneous or a node mesh; 4) A table with cell incidence lists or nil for node meshes. Each table entry should be a subtable with node incidences (1-based). If the mesh is heterogeneous, the first entry of the incidence list should be a string with the cell type; If the mesh is tied to property sets, the incidence indices should be followed by the property set indices, in the correct property sets mesh order.
|
inlinevirtual |
Implements GmProcess.
|
private |
Parses and validates the mesh name and option parameters from the calls to the extract functions. It will always parse the mesh name, the attributes, pluginType and addToModel options, filling them with the default if not given by the user. The other options, projected, saveSrc, etc, will be parsed and validated when the parameter is not a NULL pointer. Notice that borderCellOrIndex and borderSide are not checked to see if the ids
are valid since the src mesh is unknown on this function. They are also kept as "1-based" values. On errors, raises a LuaError and does not returns.
Obs: We get a LuaEnv and not a lua_State as parameter since the loaded filter object must point to an environment that exists through all the filter object's life cycle.
|
inlinevirtual |
Implements GmPluginObject.
|
inlinevirtual |
Implements GmPluginObject.