24#ifndef _GEMA_PLUGIN_FEM_PHYSICS_H_
25#define _GEMA_PLUGIN_FEM_PHYSICS_H_
59 FEM_PARALLEL_FILL_ELEMENT_DATA = 0x01,
60 FEM_PARALLEL_FILL_ELEMENT_DATA_BC = 0x02,
61 FEM_PARALLEL_FILL_ELEMENT_DATA_EXT_LOADS = 0x04,
62 FEM_PARALLEL_FILL_CONTACT_DATA = 0x08,
113 Q_UNUSED(physicsList);
129 virtual bool dofByElement(
bool* fixed = NULL,
bool* addOnly = NULL,
bool* trackChanges = NULL)
const
131 Q_UNUSED(fixed); Q_UNUSED(addOnly); Q_UNUSED(trackChanges);
241 Q_UNUSED(elemMatrices); Q_UNUSED(elemVectors);
339 Q_UNUSED(e); Q_UNUSED(bc); Q_UNUSED(bcIndex); Q_UNUSED(bcListIndex); Q_UNUSED(border);
340 Q_UNUSED(elemMatrices); Q_UNUSED(elemVectors);
363 Q_UNUSED(nodes); Q_UNUSED(dof); Q_UNUSED(values);
386 Q_UNUSED(nodes); Q_UNUSED(dof); Q_UNUSED(values);
387 *constantValues =
true;
436 Q_UNUSED(cbc); Q_UNUSED(bcIndex1); Q_UNUSED(bcIndex2);
437 Q_UNUSED(dofMap); Q_UNUSED(matrixSet); Q_UNUSED(vecSet);
467 Q_UNUSED(e); Q_UNUSED(loadId); Q_UNUSED(elemVectors);
485 Q_UNUSED(nonLinearSolver);
560 bool setIntegrationRuleSet(
int ruleSet);
695 LuaTable& table,
Unit desiredUnit,
bool required,
int type = -1,
696 int nlin = -1,
int ncol = -1,
int history = -1,
bool canBeFunction =
true,
697 bool create =
false,
QString createFormat =
"",
int createHistory = -1,
698 bool ignoreWarnings =
false);
virtual GmCellType type() const=0
virtual GmGaussAccessor * gaussAttributeAccessor(QString id, Unit desiredUnit, const GmLogCategory &logger) const
virtual void printParameters(const GmLogCategory &logger)
virtual bool loadPrivateData(LuaTable &table)=0
A convenience class that builds a GmMatrixSet with the types given by GmpFemMatrixTypes and also asso...
Definition gmpFemMatrixSet.h:59
Base interface class for FEM Physics type plugins.
Definition gmpFemPhysics.h:45
virtual bool checkAndLoadAttributeAccessors(LuaTable &nodeTable, LuaTable &cellTable, LuaTable &gaussTable)=0
This function is called by loadPrivateData() and should be implemented in derived classes to check if...
virtual const QList< QPair< int, GmValueAccessor * > > & dofForceAttributes() const
Returns a list that associates degrees of freedom handled by this physics with their associated force...
Definition gmpFemPhysics.h:197
virtual bool stateSaved(GmStateDump *state)
Virtual method called just after succesfully completing a save operation on the given state....
Definition gmpFemPhysics.h:525
FemResultType
Result type for local matrix calculation methods.
Definition gmpFemPhysics.h:50
@ FEM_RESULT_OK
The method finished correctly.
Definition gmpFemPhysics.h:51
@ FEM_ERROR_FI
The method finished by unexpected error assembling Fi.
Definition gmpFemPhysics.h:52
@ FEM_ERROR
The method finished due to an unexpected error.
Definition gmpFemPhysics.h:53
const GmCellGroupSet * externalLoadGroupSet(int loadId) const
Returns the element group set used to traverse mesh elements tied to the given external loads id.
Definition gmpFemPhysics.h:93
virtual bool dofByElement(bool *fixed=NULL, bool *addOnly=NULL, bool *trackChanges=NULL) const
Returns false if degrees of freedom are mapped to nodes depending only on the element type,...
Definition gmpFemPhysics.h:129
virtual bool stateControlMapDataLoaded(QVariantMap *map)
Virtual method called just after the solver control map was loaded from the state....
Definition gmpFemPhysics.h:515
virtual bool supportsCellType(GmCellType type) const =0
Returns true if the type is supported by this physics object.
virtual bool fixedNodalForcesBc(QVector< int > &nodes, QVector< int > &dof, QVector< double > &values) const
Method called by the FEM process asking the physics to provide prescribed nodal force values that wil...
Definition gmpFemPhysics.h:361
GmElementMesh * _mesh
The mesh that this physics is bound to.
Definition gmpFemPhysics.h:711
virtual bool calcDerivedResults(bool nonLinearSolver)
Method called after the the system solution asking each physics to calculate derived results based on...
Definition gmpFemPhysics.h:483
virtual bool fillStateControlMapData(QVariantMap *map)
Virtual method called just before the solver control map is saved to the state. Should be used to fil...
Definition gmpFemPhysics.h:507
virtual bool addStateItemsToGroup(GmStateDump *state, bool fixedHint, int groupId)
Initialization method, called once, allowing the object to add its state items to the given group of ...
Definition gmpFemPhysics.h:501
virtual bool checkMeshDimension(int ndim)=0
This function is called by loadPrivateData() to let the phyiscs check if it is compatible with the nu...
virtual bool stateAboutToBeLoaded(GmStateDump *state)
Virtual method called just before starting a load operation on the given state. Returning false abort...
Definition gmpFemPhysics.h:530
virtual Unit timeUnit() const =0
Returns the unit in which the physics handles time. Returns Unit() if not relevant to the physics.
virtual bool supportsParallel(FemSupportedParallelMethods methodType) const
Returns true if this physics object supports multiple calls in parallel (by multiple threads) to the ...
Definition gmpFemPhysics.h:216
virtual bool checkAndLoadExternalLoadAccessors(LuaTable &loadsTable)=0
This function is called by loadPrivateData() and should be implemented in derived classes to check if...
virtual bool stateLoaded(GmStateDump *state)
Virtual method called just after succesfully completing a load operation on the given state....
Definition gmpFemPhysics.h:535
QMap< QString, const GmContactBoundaryCondition * > _cbcMap
A map storing contact boundary conditions associated to this physics, keyed by bc type.
Definition gmpFemPhysics.h:716
virtual bool checkAndLoadBcAccessors()=0
This function is called by loadPrivateData() and should be implemented in derived classes to check if...
virtual bool checkAndLoadPrivateData(LuaTable &table)=0
This function is called by loadPrivateData() to let derived classes check consistency and load values...
virtual bool checkAndLoadPropertyAccessors(LuaTable &table)=0
This function is called by loadPrivateData() and should be implemented in derived classes to check if...
virtual const QStringList & supportedExternalLoads() const
A list with names for the known external load conditions supported by this physics.
Definition gmpFemPhysics.h:447
const GmCellGroupSet * _gs
The element group set used to traverse the mesh elements that form the physics spatial domain.
Definition gmpFemPhysics.h:712
virtual bool checkAndLoadDofMapping(LuaTable &table)=0
This function is called by loadPrivateData() and should be implemented in derived classes to prepare ...
const QMap< QString, const GmBoundaryCondition * > & boundaryConditions() const
Returns a reference to the map storing contact boundary conditions associated to this physics,...
Definition gmpFemPhysics.h:96
virtual const GmElementDof * dofMapping(const GmElement *e) const
Returns the mapping of node degrees of freedom for the given element or NULL if this physics object d...
Definition gmpFemPhysics.h:179
virtual const GmElementDof * dofMapping(GmCellType type) const =0
Returns the mapping of node degrees of freedom for a cell type or NULL if this physics object does no...
virtual bool fixedNodalDofsBc(QVector< int > &nodes, QVector< int > &dof, QVector< double > &values, bool *constantValues) const
Method called by the FEM process asking the physics to provide fixed dof (state variable) values used...
Definition gmpFemPhysics.h:384
FemSupportedParallelMethods
Enum used to specify which physics plugin methods can be called in parallel. Values can be ored toget...
Definition gmpFemPhysics.h:58
virtual void clearChangedElements()
Method called by the assembler to clear the internal list used to track dof changes....
Definition gmpFemPhysics.h:550
virtual GmGaussAccessor * createGaussAttributeAccessor(GmElementMesh *mesh, QString id, int snum, bool locked, Unit desiredUnit, const GmLogCategory &logger) const
A virtual function called by gaussAttributeAccessor() to get the returned Gauss accessor....
Definition gmpFemPhysics.h:704
GmDiscontinuitySet * discontinuitySet() const
Returns the associated discontinuity set, NULL if there is none.
Definition gmpFemPhysics.h:102
QMap< QString, const GmBoundaryCondition * > _bcMap
A map storing boundary conditions associated to this physics, keyed by bc type.
Definition gmpFemPhysics.h:715
QVector< const GmCellGroupSet * > _externalLoadGroupSets
Element group sets for each active external loads or NULL for inactive ones. Indexed in the same orde...
Definition gmpFemPhysics.h:722
virtual bool checkPhysicsDependencies(const QVector< GmpFemPhysics * > &physicsList, int index)
A function called by the Fem solver, at its initialization, to let a physics check that it is compati...
Definition gmpFemPhysics.h:111
virtual FemResultType fillContactData(const GmContactBoundaryCondition *cbc, int bcIndex1, int bcIndex2, GmMatrixDof &dofMap, GmpFemMatrixSet &matrixSet, GmpFemVectorSet &vecSet)
Method called by the FEM process in a similar way as the call to fillElementData() for the physics to...
Definition gmpFemPhysics.h:433
const GmCellGroupSet * meshGroupSet() const
Returns the element group set used to traverse mesh elements belonging to the element groups that tog...
Definition gmpFemPhysics.h:78
virtual FemResultType fillElementDataForLoads(const GmElement *e, int loadId, GmpFemVectorSet &elemVectors)
Method called by the FEM process in a similar way as the call to fillElementData() for the physics to...
Definition gmpFemPhysics.h:465
virtual bool beforeElementStiffnessLoop(const GmpFemMatrixSet &elemMatrices, const GmpFemVectorSet &elemVectors)
Method called by the Fem process to notify the physical object that the assembly process will start.
Definition gmpFemPhysics.h:238
virtual FemResultType fillElementData(const GmElement *e, GmpFemMatrixSet &elemMatrices, GmpFemVectorSet &elemVectors)=0
Method called by the FEM process, during the global matrix / vector assembly procedure to ask a physi...
GmDiscontinuitySet * _discSet
The discontinuity set, NULL if none was associated.
Definition gmpFemPhysics.h:714
virtual bool stateAboutToBeSaved(GmStateDump *state)
Virtual method called just before starting a save operation on the given state. Returning false abort...
Definition gmpFemPhysics.h:520
virtual bool supportsStateDumping()
Method called by the solver to check if this physics supports state dumping and restoring....
Definition gmpFemPhysics.h:494
virtual void afterElementStiffnessLoop()
Method called by the Fem process to notify the physical object that the assembly process has ended.
Definition gmpFemPhysics.h:248
virtual const QStringList & supportedBcTypes() const
A list with names for the known boundary condition types supported by this physics.
Definition gmpFemPhysics.h:303
virtual bool checkAndLoadContactBcAccessors()=0
This function is called by loadPrivateData() and should be implemented in derived classes to check if...
virtual const QStringList & supportedContactBcTypes() const
A list with names for the known contact boundary condition types supported by this physics.
Definition gmpFemPhysics.h:395
virtual Unit dofUnit(int dof) const =0
Returns the unit in which calculated values for the supplied dof are given. Should return Unit() for ...
virtual bool checkAndLoadDiscontinuitySetAccessors(LuaTable &table)=0
This function is called by loadPrivateData() and should be implemented in derived classes to check if...
int numSupportedExternalLoads() const
Returns the number of supported external load types by this physics. Based on the list returned by su...
Definition gmpFemPhysics.h:83
virtual FemResultType fillElementDataForBc(const GmElement *e, const GmBoundaryCondition *bc, int bcIndex, int bcListIndex, int border, GmpFemMatrixSet &elemMatrices, GmpFemVectorSet &elemVectors)
Method called by the FEM process in a similar way as the call to fillElementData() for the physics to...
Definition gmpFemPhysics.h:336
int _intRuleSet
The integration rule set used by this physics.
Definition gmpFemPhysics.h:713
GmElementMesh * mesh() const
Returns the element mesh that this physics object is tied to.
Definition gmpFemPhysics.h:69
virtual QList< int > changedElements() const
Method called by the assembler to obtain the list of elements that had their dofs changed since the p...
Definition gmpFemPhysics.h:545
int integrationRuleSet() const
Returns the integration rule set in use by this physics object.
Definition gmpFemPhysics.h:558
virtual bool bcAffectsCalc(const GmBoundaryCondition *bc) const
Method called by the FEM process asking the physics whether the supplied boundary condition affects t...
Definition gmpFemPhysics.h:313
A convenience class that builds a GmVectorSet with the types given by GmpFemVectorTypes and also asso...
Definition gmpFemVectorSet.h:50
Declaration of the GmpFemMatrixSet class.
Declaration of useful configuration definitions for the plugin library.
Declaration of the GmpFemVectorSet class.