MechanicalFemPhysics
The GeMA Mechanical FEM Physics Plugin
Loading...
Searching...
No Matches
gmpMechanicalEmbeddedFracture.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_EMBEDDED_FRACTURE_H_
25#define _GEMA_PLUGIN_MECHANICAL_EMBEDDED_FRACTURE_H_
26
28
29#include <gmpFemPhysicsCommon.h>
30#include <gmpFemPhysicsData.h>
31#include <gmDiscontinuitySet.h>
32#include <gmDiscontinuity.h>
34#include <gmTrace.h>
35
36class GmGaussAccessor;
37
40class GMP_MECHANICAL_PHYSICS_API_EXPORT GmpMechanicalEmbeddedFracture: public GmpMechanicalSolid
41{
42public:
43
44 // constructor
45 GmpMechanicalEmbeddedFracture(const char* pluginType, GmSimulationData* simulation, QString id, QString description,
46 const GmpFemPhysicsCommonMaterialFactory* matFactory, const GmLogCategory& logger);
47
48 // destructor
50
51 // set physic map
52 virtual const QVariantMap* physicsMetaDataMap();
53 bool checkAndLoadAttributeAccessors(LuaTable& nodeTable, LuaTable& cellTable, LuaTable& gaussTable);
54 //virtual bool beforeElementStiffnessLoop(const GmpFemMatrixSet& elemMatrices, const GmpFemVectorSet& elemVectors);
55 virtual FemResultType fillElementData(const GmElement* e, GmpFemMatrixSet& elemMatrices, GmpFemVectorSet& elemVectors);
56 virtual FemResultType fillEnrichedElementData(const GmElement* e, GmpFemMatrixSet& elemMatrices, GmpFemVectorSet& elemVectors);
57 int getNumberEnrichedDofs(const GmElement* e);
58 int getNumberEnrichedDofsPerDiscontinuity() const;
59 int getDisplacementJumpOrder() const;
60 FemResultType solveDiscontinuityEquilibriumEq(const GmElement* e, int nRegDofs, int nEnrDof, GmMatrix& Kuu, GmMatrix& Kuw, GmMatrix& Kwu, GmMatrix& Kww, GmVector& fiu, GmVector& fia, GmVector& ue, GmVector& ae);
61 FemResultType fillEnrichedElementSubData(const GmElement* e, const GmVector& ue, const GmVector& we, const GmMatrix& stressCoeffs, GmMatrix& Kuu, GmMatrix& Kuw, GmMatrix& Kwu, GmMatrix& Kww, GmVector& fiu, GmVector& fiw);
62 FemResultType fillDiscontinuitySetElementData(const GmElement* e, const GmVector& ue, const GmVector& ae, GmMatrix& Kd, GmVector& fid, GmMatrix& Kstab) const;
63 FemResultType fillInternalBorderElementData(const GmElement* e, GmVector& ue, GmVector& ae, GmMatrix& Kb_uu, GmMatrix& Kb_ua, GmMatrix& Kb_au, GmMatrix& Kb_aa, GmVector& fbu, GmVector& fba);
64 void getDiscontinuitySubElementIds(const GmElement* e, int k, int& idDiscontinuityElem, int& idDiscontinuityMesh);
65 void displacementJumpShapeFunction(const GmMatrix& DX, const GmMatrix& mn, GmMatrix& Nd) const;
66 void fillGrMatrix(const GmElement* e, const GmMatrix& Xe, const GmMatrix& Bu, GmMatrix& Gc) const;
67 void fillGvMatrix(const GmElement* e, const GmShape* elemShape, const GmVector& Xn, const GmMatrix& Xe, const GmMatrix& C, GmMatrix& G) const;
68 void projectionMatrix(const GmVector& nd, GmMatrix& P) const;
69 int dimPolynomialStressInterpolation(const GmElement* e) const;
70 void polynomialStressInterpolation(int etype, const GmVector& X, GmMatrix& p) const;
71 void GramMatrixPolynomialStress(const GmElement* e, int stressOrder, GmMatrix& H) const;
72 void discontinuityIntegralPolynomialStress(const GmElement* ef, int displacementJumpOrder, int stressOrder, GmMatrix& S) const;
73 double lineSearch(const GmElement* e, GmMatrix& stressCoeffs, GmVector& ue, GmVector& x0, GmVector& d, GmVector& r);
74 FemResultType fillEnrichedElementLocalEquation(const GmElement* e, const GmMatrix& stressCoeffs, const GmVector& ue, const GmVector& ae, GmVector& fia);
75 void fillElementOldEnrichedDof(const GmElement* e, GmVector& ae);
76 void setElementEnrichedDof(const GmElement* e, GmVector& ae);
77 void fillEnrichedShapeFncMatrix(const GmElement* e, const GmMatrix& Xe, const GmVector& N, GmMatrix& Nenr) const;
78 double auxiliaryFunctionPhi(const GmVector& N, const GmMatrix& Xe, const GmVector& Xref, const GmVector& nd) const;
79 void fillDisplacementShapeFncMatrix(const GmElement* e, const GmVector& Nv, GmMatrix& Nm) const;
80 void fillStressInterpolationCoeffs(const GmElement* e, GmMatrix& stressCoeffs) const;
81 FemResultType fillElementDataForLoads(const GmElement* e, int loadId, GmpFemVectorSet& elemVectors);
82 void fillStabilizationMatrix(const GmElement* e, const GmElement* ef, const GmMatrix& Td, const GmMatrix& Dep, GmMatrix& S) const;
83
86 {
89 LINESEARCH, // Flag to use the line search method during the local equilibrium equation solution
90 RELROTATIONMODE, // Flag to add the relative rotation modes
91 STRETCHINGMODE, // Flag to add the stretching mode
92 SYMFORMULATION, // Flag to use the symmetric formulation
93
94 // ------ NO ADDING BELOW THIS LINE
96 };
97
100 {
102 A_ID, // Current enrichment dof vector associated with a discontinuity
103 AOLD_ID, // Old enrichment dof vector associated with a discontinuity
104
105 // ------ NO ADDING BELOW THIS LINE
107 };
108
109private:
110 const char* _pluginType;
111};
112
113#endif
Basic class for the mechanical physics plugin object.
Definition gmpMechanicalEmbeddedFracture.h:41
const char * _pluginType
The plugin type name.
Definition gmpMechanicalEmbeddedFracture.h:110
embeddedPhysicsAttributeIds
IDs for physics attributes.
Definition gmpMechanicalEmbeddedFracture.h:86
@ NUM_ATTRI_IDS
The number of physics attribute ids above.
Definition gmpMechanicalEmbeddedFracture.h:95
embeddedCellAttributeIds
IDs for cell attributes.
Definition gmpMechanicalEmbeddedFracture.h:100
@ NUM_CELLATTRI_IDS
The number of physics attribute ids above.
Definition gmpMechanicalEmbeddedFracture.h:106
@ A_ID
Id for the cell attributes.
Definition gmpMechanicalEmbeddedFracture.h:102
@ NUM_ATTRI_IDS
The number of physics attribute ids above.
Definition gmpMechanicalPhysics.h:102
Basic class for the mechanical physics plugin object.
Definition gmpMechanicalSolid.h:36
virtual bool checkAndLoadAttributeAccessors(LuaTable &nodeTable, LuaTable &cellTable, LuaTable &gaussTable)
Reimplementation of the common function t o init the _mechanicPoint structure.
Definition gmpMechanicalSolid.cpp:196
virtual FemResultType fillElementData(const GmElement *e, GmpFemMatrixSet &elemMatrices, GmpFemVectorSet &elemVectors)
Fills the element matrices and vectors for a generic elements.
Definition gmpMechanicalSolid.cpp:238
virtual const QVariantMap * physicsMetaDataMap()
Returns a reference for the single mechanical physics attribute map, built when the function is calle...
Definition gmpMechanicalSolid.cpp:62
arma::mat GmMatrix
arma::vec GmVector
Declaration of the GmpMechanicalPhysics class.