MechanicalFemPhysics
The GeMA Mechanical FEM Physics Plugin
gmpMechanicalSolid.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_MECHANICAL_PHYSICS_SOLID_H_
25 #define _GEMA_PLUGIN_MECHANICAL_PHYSICS_SOLID_H_
26 
27 #include "gmpMechanicalPhysics.h"
28 #include <gmpFemPhysicsCommon.h>
29 #include <gmTrace.h>
30 
31 class GmGaussAccessor;
32 
35 class GMP_MECHANICAL_PHYSICS_API_EXPORT GmpMechanicalSolid: public GmpMechanicalPhysics
36 {
37 public:
38 
39  // constructor
40  GmpMechanicalSolid(const char* pluginType, GmSimulationData* simulation, QString id, QString description,
41  const GmpFemPhysicsCommonMaterialFactory* matFactory, const GmLogCategory& logger);
42 
43  // destructor
44  virtual ~GmpMechanicalSolid();
45 
46  // set physic map
47  virtual const QVariantMap* physicsMetaDataMap();
48  virtual bool beforeElementStiffnessLoop(const GmpFemMatrixSet& elemMatrices, const GmpFemVectorSet& elemVectors);
49  virtual FemResultType fillElementData(const GmElement* e, GmpFemMatrixSet& elemMatrices, GmpFemVectorSet& elemVectors);
50  virtual void fillBodyForce(const GmElement* e, const GmVector* coord, int ip, GmVector& BFc, GmVector& N, double c);
51  virtual void gravityForce(const GmElement* e, const GmVector* coord, int ip, GmVector& Fext_u, GmVector& N, double c);
52  // See comments on the base class
53  virtual bool calcDerivedResults(bool nonLinearSolver);
54  // See comments on the base class
55  virtual bool checkLoadedData();
56  // See comments on the base class
57  virtual bool addStateItemsToGroup(GmStateDump* state, bool fixedHint, int groupId);
58 
59 protected:
60  // See comments on the base class
61  virtual bool checkAndLoadAttributeAccessors(LuaTable& nodeTable, LuaTable& gaussTable);
62 
63  // See comments on the base class
64  virtual void calcElementDerivedResultAtPoints(const GmElement* e, int resultId, const GmMatrix& evalPoints, bool evalAtIp, GmMatrix& result);
65 
66  // See comments on the base class
67  virtual void calcElementResetStrains(const GmElement* e);
68 
69  // Sets initial conditions
70  virtual bool setInitialConditions();
71 
72  // Sets initial conditions
73  virtual bool updatesReturnMappingInfo();
74 
75  // computes derived results used by the material
76  virtual bool calcMaterialDerivedResults();
77 };
78 
79 #endif
Declaration of the GmpMechanicalPhysics class.
virtual const QVariantMap * physicsMetaDataMap()
Returns a reference for the single mechanical physics attribute map, built when the function is calle...
Definition: gmpMechanicalPhysics.cpp:64
virtual bool calcMaterialDerivedResults() const
The virtual function used by calcDerivedResults() to effectively calculate gauss attributes required ...
Definition: gmpMechanicalPhysics.cpp:942
Basic class for the mechanical physics plugin object.
Definition: gmpMechanicalSolid.h:35
virtual bool calcDerivedResults(bool nonLinearSolver)
Calc stress component on nodes and/or Gauss points, ADDING the calculated value to the current result...
Definition: gmpMechanicalPhysics.cpp:931
arma::vec GmVector
arma::mat GmMatrix
Basic class for the mechanical physics plugin object.
Definition: gmpMechanicalPhysics.h:37