MechanicalFemPhysics
The GeMA Mechanical FEM Physics Plugin
gmpMechanicalInterface.h
Go to the documentation of this file.
1 /************************************************************************
2 **
3 ** Copyright (C) 2014 by Carlos Augusto Teixera Mendes
4 ** All rights reserved.
5 **
6 ** This file is part of the "GeMA" software. It's use should respect
7 ** the terms in the license agreement that can be found together
8 ** with this source code.
9 ** It is provided AS IS, with NO WARRANTY OF ANY KIND,
10 ** INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR
11 ** A PARTICULAR PURPOSE.
12 **
13 ************************************************************************/
14 
24 #ifndef _GEMA_PLUGIN_MECHANICALINTERFACE_H_
25 #define _GEMA_PLUGIN_MECHANICALINTERFACE_H_
26 
27 
28 #include "gmpMechanicalPhysics.h"
29 #include <gmpFemPhysicsCommon.h>
30 #include <gmTrace.h>
31 
32 class GmGaussAccessor;
33 
36 class GMP_MECHANICAL_PHYSICS_API_EXPORT GmpMechanicalInterface : public GmpMechanicalPhysics
37 {
38 public:
39  // constructor
40  GmpMechanicalInterface(const char* pluginType, GmSimulationData* simulation, QString id, QString description,
41  const GmpFemPhysicsCommonMaterialFactory* matFactory, const GmLogCategory& logger);
42 
43  // destructor
44  virtual ~GmpMechanicalInterface();
45 
46  // set physic map
47  virtual const QVariantMap* physicsMetaDataMap();
48  // See comments on the base class
49  virtual bool checkAndLoadAttributeAccessors(LuaTable& nodeTable, LuaTable& gaussTable);
50  // See comments on the base class
51  virtual bool beforeElementStiffnessLoop(const GmpFemMatrixSet& elemMatrices, const GmpFemVectorSet& elemVectors);
52  // See comments on the base class
53  virtual FemResultType fillElementData(const GmElement* e, GmpFemMatrixSet& elemMatrices, GmpFemVectorSet& elemVectors);
54 
59  virtual void fillMiddleCoordinates(const GmElement* e, GmMatrix& Xnode, GmMatrix& MX) const;
60 
65  virtual void fillMiddlePressure(const GmElement* e, GmVector& Pe, GmVector& Pm) const;
66 
69  virtual void fillElementDisplacements(const GmElement* e, GmVector& ue);
70 
74  virtual void updateNodalCoordinates(const GmElement* e, GmMatrix& Xe, GmVector& ue);
75 
76  virtual FemResultType fillElementDataForLoads(const GmElement* e, int loadId, GmpFemVectorSet& elemVectors);
77 
78  // See comments on the base class
79  virtual bool addStateItemsToGroup(GmStateDump* state, bool fixedHint, int groupId);
80 
83  {
88 
89 
90  // ------ NO ADDING BELOW THIS LINE
92  };
93 
94 protected:
97  virtual bool setInitialConditions();
98 };
99 
100 #endif
Base Id for Gauss attribute(s) used to store the internal variable at the current state.
Definition: gmpMechanicalInterface.h:86
Declaration of the GmpMechanicalPhysics class.
InterfaceGaussAttributeIds
IDs for physics Gauss attributes.
Definition: gmpMechanicalInterface.h:82
Id for retrieving the damage variable accessor at the previous state.
Definition: gmpMechanicalInterface.h:85
void fillElementDisplacements(const GmElement *e, GmVector &ue)
Given an element, fills the vector 'ue' with nodal displacements. The vector should have size equal t...
Definition: gmpMechanicalPhysics.cpp:234
virtual const QVariantMap * physicsMetaDataMap()
Returns a reference for the single mechanical physics attribute map, built when the function is calle...
Definition: gmpMechanicalPhysics.cpp:64
Id for retrieving the internal variable accessor at the previous state.
Definition: gmpMechanicalInterface.h:87
The number of gauss attributes.
Definition: gmpMechanicalInterface.h:91
The number of Gauss attribute ids above.
Definition: gmpMechanicalPhysics.h:158
Basic class for the mechanical interface element plugin object.
Definition: gmpMechanicalInterface.h:36
arma::vec GmVector
arma::mat GmMatrix
Basic class for the mechanical physics plugin object.
Definition: gmpMechanicalPhysics.h:37