![]() |
LuaProxyFemPhysics
The GeMA Lua Proxy FEM Physics Plugin
|
Basic class for the Lua Proxy physics plugin object. More...
#include <gmpLuaProxyFemPhysics.h>


Public Member Functions | |
| GmpLuaProxyFemPhysics (GmSimulationData *simulation, QString id, QString description, const GmLogCategory &logger) | |
| Constructor. Will be called by the plugin loading code. | |
| virtual | ~GmpLuaProxyFemPhysics () |
| Destructor. | |
| virtual const char * | pluginName () const |
| virtual const char * | pluginType () const |
| virtual const GmElementDof * | dofMapping (GmCellType type) const |
| See comments on the base class. | |
| virtual Unit | dofUnit (int dof) const |
| See comments on the base class. | |
| virtual Unit | timeUnit () const |
| virtual bool | supportsCellType (GmCellType type) const |
| See comments on the base class. | |
| virtual bool | beforeElementStiffnessLoop (const GmpFemMatrixSet &elemMatrices, const GmpFemVectorSet &elemVectors) |
| See comments on base class. | |
| virtual void | afterElementStiffnessLoop () |
| See comments on base class. | |
| virtual FemResultType | fillElementData (const GmElement *e, GmpFemMatrixSet &elemMatrices, GmpFemVectorSet &elemVectors) |
| See comments on base class. | |
| virtual const QStringList & | supportedBcTypes () const |
| See comments on the base class. | |
| virtual bool | bcAffectsCalc (const GmBoundaryCondition *bc) const |
| See comments on the base class. | |
| virtual FemResultType | fillElementDataForBc (const GmElement *e, const GmBoundaryCondition *bc, int bcIndex, int bcListIndex, int border, GmpFemMatrixSet &elemMatrices, GmpFemVectorSet &elemVectors) |
| See comments on base class. | |
| virtual bool | fixedNodalForcesBc (QVector< int > &nodes, QVector< int > &dof, QVector< double > &values) const |
| See comments on base class. | |
| virtual bool | fixedNodalDofsBc (QVector< int > &nodes, QVector< int > &dof, QVector< double > &values, bool *constantValues) const |
| See comments on base class. | |
| virtual bool | calcDerivedResults (bool nonLinearSolver) |
| See comments on base class. | |
Protected Member Functions | |
| virtual bool | checkMeshDimension (int ndim) |
| See comments on the base class. | |
| virtual bool | checkAndLoadPrivateData (LuaTable &table) |
| This is the first function called by the Fem physics infrastructure, so it is its responsability to get a reference for the appropriate user table containing the needed Lua functions. | |
| virtual bool | checkAndLoadDofMapping (LuaTable &table) |
| See comments on the base class. | |
| virtual bool | checkAndLoadPropertyAccessors (LuaTable &table) |
| See comments on the base class. | |
| virtual bool | checkAndLoadAttributeAccessors (LuaTable &nodeTable, LuaTable &cellTable, LuaTable &gaussTable) |
| virtual bool | checkAndLoadExternalLoadAccessors (LuaTable &loadsTable) |
| virtual bool | checkAndLoadBcAccessors () |
| See comments on the base class. | |
| virtual bool | checkAndLoadContactBcAccessors () |
| virtual bool | checkAndLoadDiscontinuitySetAccessors (LuaTable &table) |
Private Member Functions | |
| bool | prepareCallMethod (const char *name, bool optional) const |
| Prepares the call for a table method, puting the function and self on the stack top. | |
| bool | callStdMethod (int npar, int nresults=1) const |
| Call a standard method (which either doesn't return anything or returns a boolean + extra results) | |
| bool | parseAccessors (LuaTable &table, LuaTable &transTable, GmValueSetKind acType, const GmBoundaryCondition *bc=NULL) |
| Parses entries from the given table creating accessors for them, subject to the given restrictions. | |
| bool | fillBcLists (const char *fname, QVector< int > &nodes, QVector< int > &dof, QVector< double > &values, bool *constantValues) const |
| Calls the function fname and fills the given lists with the returned tables (constantValues should be NULL if the called function does not returns this parameter) | |
Private Attributes | |
| LuaTable * | _methodTable |
| The Lua method table. | |
| GmElementDof * | _dofMap [GM_NUM_CELL_TYPES] |
| The list with maps of dof per element type. | |
| QVector< int > | _dofList |
| Dof list for the physics. | |
| QMap< int, QString > | _dofUnitMap |
| List with dof units. | |
| QList< const GmBoundaryCondition * > | _bcList |
| A list of the supported Bcs. | |
| QStringList | _bcTypes |
| A list with the supported bc types. | |
Basic class for the Lua Proxy physics plugin object.
|
virtual |
See comments on base class.
Proxy function: afterElementStiffnessLoop(), optional
|
virtual |
See comments on the base class.
Returns info based on the _bcList created on checkAndLoadBcAccessors
|
virtual |
See comments on base class.
Proxy function: beforeElementStiffnessLoop(), optional
TODO: Add support for multiple matrices and vectors
|
virtual |
See comments on base class.
Proxy function: calcDerivedResults(), optional
|
private |
Call a standard method (which either doesn't return anything or returns a boolean + extra results)
Receives as parameter the number of parameters pushed on the stack. This number should NOT include the self parameter pushed by prepareCallMethod().
IMPORTANT: Results are left on the stack
On call error, logs the message and returns false.
|
protectedvirtual |
See comments on the base class.
Proxy attribute: bc. Check boundary condition availability and type and get accessors for all the properties in the list. After that, calls the optional function checkBc()
|
protectedvirtual |
See comments on the base class.
Proxy attribute: stateVars. Check dof availability and get an accessor for all the stateVars in the list. After that, calls the optional function checkStateVars()
|
protectedvirtual |
This is the first function called by the Fem physics infrastructure, so it is its responsability to get a reference for the appropriate user table containing the needed Lua functions.
Proxy function: checkPrivateData(physicsTable), optional
|
protectedvirtual |
See comments on the base class.
Proxy attribute: properties. Check property availability and get an accessor for all the properties in the list. After that, calls the optional function checkProperties()
|
protectedvirtual |
See comments on the base class.
Proxy attribute: dimension. Should be a value or a table with a dimension range. If missing, accepts any dimension.
|
virtual |
See comments on the base class.
Returns mapping based on the dofList cretaed on checkAndLoadDofMapping
|
virtual |
See comments on the base class.
Returns mapping based on the unit map cretaed on checkAndLoadDofMapping
|
virtual |
See comments on base class.
Proxy function: fillElementData(e, matrix, vector), required. Returns a boolean for success followed by a second boolean defining if the matrix is symmetric.
TODO: Add support for multiple matrices and vectors
|
virtual |
See comments on base class.
Proxy function: fillElementDataForBc(e, bc, bcIndex, bcListIndex, border, matrix, vector), optional. Returns a boolean for success followed by a second boolean defining if the matrix is symmetric.
TODO: Add support for multiple matrices and vectors
|
virtual |
See comments on base class.
Proxy function: fixedNodalDofsBc(), optional. Should return tables with nodes, dof and values
|
virtual |
See comments on base class.
Proxy function: fixedNodalForcesBc(), optional. Should return tables with nodes, dof and values
|
private |
Parses entries from the given table creating accessors for them, subject to the given restrictions.
Accessors are added to the accessors table.
| table | The table with accessor definitions |
| transTable | A table used to translate accessor names |
| acType | The type of accessor |
| bc | The boundary condition, used only if acType == GM_BC_BOUNDARY_PROPERTY |
|
private |
Prepares the call for a table method, puting the function and self on the stack top.
If the function doesn't exists, returns false. In that case, if optional == false, emmits an error message.
|
virtual |
See comments on the base class.
Returns ithe type list created on checkAndLoadBcAccessors
|
virtual |
See comments on the base class.
Proxy attribute: elementType. Should be a table with supported element name. If missing, accepts any type.