MechanicalFemPhysics
The GeMA Mechanical FEM Physics Plugin
gmpBar.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 
26 #ifndef _GEMA_PLUGIN_BAR_H_
27 #define _GEMA_PLUGIN_BAR_H_
28 
29 #include "gmpMechanicalPhysics.h"
30 #include <gmpFemPhysicsCommon.h>
31 #include <gmMathUtils.h>
32 
33 class GmGaussAccessor;
34 
38 {
39 public:
40 
41  //constructor
42  GmpBar(const char* pluginType, GmSimulationData* simulation, QString id, QString description,
43  const GmpFemPhysicsCommonMaterialFactory* matFactory, const GmLogCategory& logger);
44 
45  //destructor
46  virtual ~GmpBar();
47 
50  {
52 
53  // --- NO ADDING BELOW THIS LINE
55  };
56 
57  // See comments on the base class
58  virtual const QVariantMap* physicsMetaDataMap();
59  // See comments on the base class
60  virtual double fillBuMatrix(const GmElement* e, const GmShape* shape, const GmVector& ncoord, const GmMatrix& X, const GmVector& N, const GmMatrix& J, GmMatrix& Bp);
61  // See comments on the base class
62  virtual FemResultType fillElementData(const GmElement* e, GmpFemMatrixSet& elemMatrices, GmpFemVectorSet& elemVectors);
63  // Recovers the derived results
64  virtual bool calcDerivedResults(bool nonLinearSolver);
68  virtual void updateNodalCoordinates(const GmElement* e, GmMatrix& Xe, GmVector& ue);
69 
70 protected:
71  // See comments on the base class
72  virtual bool checkAndLoadAttributeAccessors(LuaTable& nodeTable, LuaTable& gaussTable);
73 
74 private:
75  double calcElementStress(GmElement* e);
76 
77 };
78 
79 #endif
The number of property ids above.
Definition: gmpMechanicalPhysics.h:171
Declaration of the GmpMechanicalPhysics class.
double calcElementStress(GmElement *e)
Calculates the bar internal stress.
Definition: gmpBar.cpp:388
The number of property ids above.
Definition: gmpBar.h:54
virtual double fillBuMatrix(const GmElement *e, const GmShape *shape, const GmVector &ncoord, const GmMatrix &X, const GmVector &N, const GmMatrix &J, GmMatrix &Bp)
Given a point 'ncood', the element coordinate matrix 'X', the point shape functions 'N' and the trans...
Definition: gmpBar.cpp:309
virtual const QVariantMap * physicsMetaDataMap()
Returns a reference for the single Hydraulics attribute map, built when the function is called for th...
Definition: gmpBar.cpp:65
virtual FemResultType fillElementData(const GmElement *e, GmpFemMatrixSet &elemMatrices, GmpFemVectorSet &elemVectors)
Fills the element internal force and stiffness.
Definition: gmpBar.cpp:134
virtual bool checkAndLoadAttributeAccessors(LuaTable &nodeTable, LuaTable &gaussTable)
Reimplementation of the common function to init the _mechanicPoint structure.
Definition: gmpBar.cpp:99
Id for retrieving the accessor of cross section area.
Definition: gmpBar.h:51
GmpBar(const char *pluginType, GmSimulationData *simulation, QString id, QString description, const GmpFemPhysicsCommonMaterialFactory *matFactory, const GmLogCategory &logger)
Constructor.
Definition: gmpBar.cpp:53
barPropertyIds
IDs for physics element properties.
Definition: gmpBar.h:49
Basic class for the standard stress bar physics plugin object.
Definition: gmpBar.h:37
virtual bool calcDerivedResults(bool nonLinearSolver)
Recovers per element stresses for bar elements, storing the results in an element attribute.
Definition: gmpBar.cpp:337
virtual ~GmpBar()
Destructor.
Definition: gmpBar.cpp:60
arma::vec GmVector
arma::mat GmMatrix
Basic class for the mechanical physics plugin object.
Definition: gmpMechanicalPhysics.h:37
virtual void updateNodalCoordinates(const GmElement *e, GmMatrix &Xe, GmVector &ue)
Updates the nodal coordinates using nodal displacements Xen = Xe + ue.
Definition: gmpBar.cpp:432