OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
shell7basexfem.h
Go to the documentation of this file.
1 /*
2  *
3  * ##### ##### ###### ###### ### ###
4  * ## ## ## ## ## ## ## ### ##
5  * ## ## ## ## #### #### ## # ##
6  * ## ## ## ## ## ## ## ##
7  * ## ## ## ## ## ## ## ##
8  * ##### ##### ## ###### ## ##
9  *
10  *
11  * OOFEM : Object Oriented Finite Element Code
12  *
13  * Copyright (C) 1993 - 2013 Borek Patzak
14  *
15  *
16  *
17  * Czech Technical University, Faculty of Civil Engineering,
18  * Department of Structural Mechanics, 166 29 Prague, Czech Republic
19  *
20  * This library is free software; you can redistribute it and/or
21  * modify it under the terms of the GNU Lesser General Public
22  * License as published by the Free Software Foundation; either
23  * version 2.1 of the License, or (at your option) any later version.
24  *
25  * This program is distributed in the hope that it will be useful,
26  * but WITHOUT ANY WARRANTY; without even the implied warranty of
27  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
28  * Lesser General Public License for more details.
29  *
30  * You should have received a copy of the GNU Lesser General Public
31  * License along with this library; if not, write to the Free Software
32  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
33  */
34 
35 #ifndef Shell7BaseXFEM_h
36 #define Shell7BaseXFEM_h
37 
38 #include "../sm/Elements/Shells/shell7base.h"
39 #include "../sm/xfem/enrichmentitems/delamination.h"
41 #include "fei3dtrquad.h"
42 
44 
45 #define _IFT_Shell7BaseXFEM_CohesiveZoneMaterial "czmaterial"
46 
47 
48 
49 namespace oofem {
50 class FEI3dTrQuad;
51 class BoundaryLoad;
52 class EnrichmentItem;
53 class ShellCrack;
61 #define _ExportCZ
63 {
64 protected:
66  virtual void updateYourself(TimeStep *tStep);
67  virtual void postInitialize();
68  void computeOrderingArray(IntArray &orderingArray, IntArray &activeDofsArray, EnrichmentItem *ei);
69 
70  virtual void evalCovarBaseVectorsAt(const FloatArray &lCoords, FloatMatrix &gcon, FloatArray &solVec, TimeStep *tStep);
71  void discGiveInitialSolutionVector(FloatArray &answer, IntArray &eiDofIdArray); // should be replaced with general function
72  void computeDiscGeneralizedStrainVector(FloatArray &dGenEps, const FloatArray &lCoords, EnrichmentItem *ei, TimeStep *tStep);
73  void computeDiscSolutionVector(IntArray &dofIdArray , TimeStep *tStep, FloatArray &solVecD);
74  void computeInterfaceJumpAt(int interf, FloatArray &lCoords, TimeStep *tStep, FloatArray &answer);
75 
76  // Internal forces
77  void giveInternalForcesVector(FloatArray &answer, TimeStep *tStep, int useUpdatedGpRecord);
78  void discComputeSectionalForces(FloatArray &answer, TimeStep *tStep, FloatArray &solVec, FloatArray &solVecD, EnrichmentItem *ei);
79  void computeSectionalForcesAt(FloatArray &sectionalForces, IntegrationPoint *ip, Material *mat, TimeStep *tStep, FloatArray &genEps, double zeta);
80 
81  double evaluateLevelSet(const FloatArray &lCoords, EnrichmentItem *ei);
82 // double edgeEvaluateLevelSet(const FloatArray &lCoords, EnrichmentItem *ei, const int edge);
83  double evaluateHeavisideXi(double xi, ShellCrack *ei);
84  double evaluateHeavisideXi(double xi, Delamination *ei);
85  double evaluateCutHeaviside(const double xi, const double xiBottom, const double xiTop) const;
86  void computeCohesiveForces(FloatArray &answer, TimeStep *tStep, FloatArray &solVec, FloatArray &solVecD, EnrichmentItem *ei, EnrichmentItem *coupledToEi);
87 
88  // Tangent matrices
89  void computeLambdaGMatricesDis(FloatMatrix lambdaD [ 3 ], double zeta);
90  void computeLambdaNMatrixDis(FloatMatrix &lambda_xd, double zeta);
91  virtual void OLDcomputeStiffnessMatrix(FloatMatrix &answer, MatResponseMode rMode, TimeStep *tStep);
92  virtual void computeStiffnessMatrix(FloatMatrix &answer, MatResponseMode rMode, TimeStep *tStep);
93 
94  virtual void discComputeBulkTangentMatrix(FloatMatrix &KdIJ, IntegrationPoint *ip, EnrichmentItem *eiI, EnrichmentItem *eiJ, int layer, FloatMatrix A [ 3 ] [ 3 ], TimeStep *tStep);
95  virtual void discComputeStiffness(FloatMatrix &LCC, FloatMatrix &LDD, FloatMatrix &LDC, IntegrationPoint *ip, int layer, FloatMatrix A [ 3 ] [ 3 ], TimeStep *tStep);
96 
97  double EvaluateEnrFuncInDofMan(int dofManNum, EnrichmentItem *ei);
98  void computeEnrichedBmatrixAt(const FloatArray &lCoords, FloatMatrix &answer, EnrichmentItem *ei);
99  void computeEnrichedNmatrixAt(const FloatArray &lCoords, FloatMatrix &answer, EnrichmentItem *ei);
100  void computeCohesiveNmatrixAt(const FloatArray &lCoords, FloatMatrix &answer, EnrichmentItem *ei);
101 
102  virtual void edgeGiveUpdatedSolutionVector(FloatArray &answer, const int iedge, TimeStep *tStep);
103 
104  void edgeEvalEnrCovarBaseVectorsAt(const FloatArray &lCoords, const int iedge, FloatMatrix &gcov, TimeStep *tStep, EnrichmentItem *ei);
105  void computeCohesiveTangent(FloatMatrix &answer, TimeStep *tStep);
107 
108  void edgeComputeEnrichedNmatrixAt(const FloatArray &lCoords, FloatMatrix &answer, EnrichmentItem *ei, const int edge);
109  void edgeComputeEnrichedBmatrixAt(const FloatArray &lCoords, FloatMatrix &answer, EnrichmentItem *ei, const int edge);
110 
111  void computePressureTangentMatrixDis(FloatMatrix &KCC, FloatMatrix &KCD, FloatMatrix &KDD, IntegrationPoint *ip, Load *load, const int iSurf, TimeStep *tStep);
112 
113  // External loads
114  // Overloaded, as the element is using enhanced approximation
115  void computeBoundaryEdgeLoadVector(FloatArray &answer, BoundaryLoad *load, int boundary, CharType type, ValueModeType mode, TimeStep *tStep, bool global);
116  // overloaded, the computeBoundaryEdgeLoadVector returns full element DOFs
117  virtual void giveBoundaryLocationArray(IntArray &locationArray, const IntArray &bNodes, const UnknownNumberingScheme &s, IntArray *dofIdArray)
118  { this->giveLocationArray (locationArray, s, dofIdArray);}
119 
120 
121  void computeEnrTractionForce(FloatArray &answer, const int iedge, BoundaryLoad *edgeLoad, TimeStep *tStep,
122  ValueModeType mode, EnrichmentItem *ei);
123 
124  // Mass matrices
125  void computeMassMatrixNum(FloatMatrix &answer, TimeStep *tStep);
126 
127  // VTK
128  virtual void giveCompositeExportData(std::vector < VTKPiece > &vtkPieces, IntArray &primaryVarsToExport, IntArray &internalVarsToExport, IntArray cellVarsToExport, TimeStep *tStep );
129  virtual void giveCompositeExportData(VTKPiece &vtkPiece, IntArray &primaryVarsToExport, IntArray &internalVarsToExport, IntArray cellVarsToExport, TimeStep *tStep );
130  virtual void giveShellExportData(VTKPiece &vtkPiece, IntArray &primaryVarsToExport, IntArray &internalVarsToExport, IntArray cellVarsToExport, TimeStep *tStep );
131  virtual void giveCZExportData(VTKPiece &vtkPiece, IntArray &primaryVarsToExport, IntArray &internalVarsToExport, IntArray cellVarsToExport, TimeStep *tStep );
132 
133  virtual void vtkEvalUpdatedGlobalCoordinateAt(const FloatArray &localCoords, int layer, FloatArray &globalCoords, TimeStep *tStep);
134  void giveDisUnknownsAt(const FloatArray &lCoords, EnrichmentItem *ei, FloatArray &solVec, FloatArray &x, FloatArray &m, double &gam, TimeStep *tStep);
137 
138 
139  // Subdivision
140  std :: vector< Triangle > allTri;
141 
142  std :: vector < std :: vector< Triangle > > crackSubdivisions;
144 
145  void giveFictiousNodeCoordsForExport(std::vector<FloatArray> &nodes, int layer, int subCell);
146  void giveFictiousCZNodeCoordsForExport(std::vector<FloatArray> &nodes, int layer, int subCell);
147  void giveFictiousUpdatedNodeCoordsForExport(std::vector<FloatArray> &nodes, int layer, TimeStep *tStep, int subCell);
148  void giveFictiousUpdatedCZNodeCoordsForExport(std::vector<FloatArray> &nodes, int layer, TimeStep *tStep, int subCell);
149  void giveLocalNodeCoordsForExport(FloatArray &nodeLocalXi1Coords, FloatArray &nodeLocalXi2Coords, FloatArray &nodeLocalXi3Coords, int subCell, int layer, FloatMatrix &localNodeCoords);
150  void giveLocalCZNodeCoordsForExport(FloatArray &nodeLocalXi1Coords, FloatArray &nodeLocalXi2Coords, FloatArray &nodeLocalXi3Coords, int subCell, FloatMatrix &localNodeCoords);
151  void mapXi3FromLocalToShell(FloatArray &answer, FloatArray &local, int layer);
152  void recoverValuesFromCZIP(std::vector<FloatArray> &recoveredValues, int interfce, InternalStateType type, TimeStep *tStep);
153 
156 
157  std::vector< IntArray > orderingArrays;
158  std::vector< IntArray > activeDofsArrays;
159 
160  void computeTripleProduct(FloatMatrix &answer, const FloatMatrix &a, const FloatMatrix &b, const FloatMatrix &c);
161 
162  // Recovery of through thickness stresses by momentum balance
163  void recoverShearStress(TimeStep *tStep);
164 
165 
166 public:
167  Shell7BaseXFEM(int n, Domain * d);
168  virtual ~Shell7BaseXFEM();
169  virtual int checkConsistency();
170 
171  void giveMaxCZDamages(FloatArray &answer, TimeStep *tStep);
172  virtual const char *giveClassName() const { return "Shell7BaseXFEM"; }
173  std :: string errorInfo(const char *func) const { return std :: string(giveClassName()) + func; }
175 
177  virtual void giveDofManDofIDMask(int inode, IntArray &answer) const;
178  virtual int giveNumberOfDofs();
179 
180  // Recovery of through thickness stresses by momentum balance
181  virtual void giveFailedInterfaceNumber(IntArray &failedInterfaces, FloatArray &initiationFactor, TimeStep *tStep, bool recoverStresses = true);
182  virtual void giveAverageTransverseInterfaceStress(std::vector<FloatMatrix> &transverseStress, TimeStep *tStep);
183  virtual void giveRecoveredTransverseInterfaceStress(std::vector<FloatMatrix> &transverseStress, TimeStep *tStep);
184 
185  bool hasCohesiveZone(int interfaceNum);
186  std :: vector< std :: unique_ptr< IntegrationRule > > czIntegrationRulesArray;
187 private:
188  void jump(FloatMatrix lambda, FloatArray deltaUnknowns);
189 };
190 } // end namespace oofem
191 #endif
double evaluateHeavisideXi(double xi, ShellCrack *ei)
virtual void giveFailedInterfaceNumber(IntArray &failedInterfaces, FloatArray &initiationFactor, TimeStep *tStep, bool recoverStresses=true)
InternalStateType
Type representing the physical meaning of element or constitutive model internal variable.
std::vector< Triangle > allTri
void computeCohesiveTangent(FloatMatrix &answer, TimeStep *tStep)
void computeLambdaGMatricesDis(FloatMatrix lambdaD[3], double zeta)
std::string errorInfo(const char *func) const
Abstract class representing entity, which is included in the FE model using one (or more) global func...
void giveFictiousNodeCoordsForExport(std::vector< FloatArray > &nodes, int layer, int subCell)
void giveMaxCZDamages(FloatArray &answer, TimeStep *tStep)
Class and object Domain.
Definition: domain.h:115
void computeCohesiveNmatrixAt(const FloatArray &lCoords, FloatMatrix &answer, EnrichmentItem *ei)
virtual void evalCovarBaseVectorsAt(const FloatArray &lCoords, FloatMatrix &gcon, FloatArray &solVec, TimeStep *tStep)
std::vector< std::vector< Triangle > > crackSubdivisions
virtual void updateYourself(TimeStep *tStep)
Updates element state after equilibrium in time step has been reached.
Provides Xfem interface for an element.
virtual Interface * giveInterface(InterfaceType it)
Interface requesting service.
Class representing implementation of quadratic wedge interpolation class.
void giveFictiousCZNodeCoordsForExport(std::vector< FloatArray > &nodes, int layer, int subCell)
virtual void giveAverageTransverseInterfaceStress(std::vector< FloatMatrix > &transverseStress, TimeStep *tStep)
ValueModeType
Type representing the mode of UnknownType or CharType, or similar types.
Definition: valuemodetype.h:78
void computeEnrTractionForce(FloatArray &answer, const int iedge, BoundaryLoad *edgeLoad, TimeStep *tStep, ValueModeType mode, EnrichmentItem *ei)
Shell7BaseXFEM(int n, Domain *d)
void computeFailureCriteriaQuantities(FailureCriteriaStatus *fc, TimeStep *tStep)
void computeSectionalForcesAt(FloatArray &sectionalForces, IntegrationPoint *ip, Material *mat, TimeStep *tStep, FloatArray &genEps, double zeta)
void discGiveInitialSolutionVector(FloatArray &answer, IntArray &eiDofIdArray)
void computeInterfaceJumpAt(int interf, FloatArray &lCoords, TimeStep *tStep, FloatArray &answer)
Delamination.
Definition: delamination.h:58
void jump(FloatMatrix lambda, FloatArray deltaUnknowns)
virtual void giveCZExportData(VTKPiece &vtkPiece, IntArray &primaryVarsToExport, IntArray &internalVarsToExport, IntArray cellVarsToExport, TimeStep *tStep)
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Class implementing an array of integers.
Definition: intarray.h:61
MatResponseMode
Describes the character of characteristic material matrix.
virtual void discComputeBulkTangentMatrix(FloatMatrix &KdIJ, IntegrationPoint *ip, EnrichmentItem *eiI, EnrichmentItem *eiJ, int layer, FloatMatrix A[3][3], TimeStep *tStep)
void computePressureTangentMatrixDis(FloatMatrix &KCC, FloatMatrix &KCD, FloatMatrix &KDD, IntegrationPoint *ip, Load *load, const int iSurf, TimeStep *tStep)
void computeDiscSolutionVector(IntArray &dofIdArray, TimeStep *tStep, FloatArray &solVecD)
virtual void discComputeStiffness(FloatMatrix &LCC, FloatMatrix &LDD, FloatMatrix &LDC, IntegrationPoint *ip, int layer, FloatMatrix A[3][3], TimeStep *tStep)
void giveFictiousUpdatedNodeCoordsForExport(std::vector< FloatArray > &nodes, int layer, TimeStep *tStep, int subCell)
void mapXi3FromLocalToShell(FloatArray &answer, FloatArray &local, int layer)
Second order triangular interpolation in 3D space (6 nodes).
Definition: fei3dtrquad.h:47
void computeMassMatrixNum(FloatMatrix &answer, TimeStep *tStep)
FEI3dWedgeQuad interpolationForExport
bool hasCohesiveZone(int interfaceNum)
Abstract base class representing a boundary load (force, momentum, ...) that acts directly on a bound...
Definition: boundaryload.h:110
std::vector< IntArray > orderingArrays
void giveLocalNodeCoordsForExport(FloatArray &nodeLocalXi1Coords, FloatArray &nodeLocalXi2Coords, FloatArray &nodeLocalXi3Coords, int subCell, int layer, FloatMatrix &localNodeCoords)
void giveLocationArray(IntArray &locationArray, const UnknownNumberingScheme &s, IntArray *dofIds=NULL) const
Returns the location array (array of code numbers) of receiver for given numbering scheme...
Definition: element.C:390
void computeBoundaryEdgeLoadVector(FloatArray &answer, BoundaryLoad *load, int boundary, CharType type, ValueModeType mode, TimeStep *tStep, bool global)
Computes the contribution of the given load at the given boundary edge.
Abstract base class allowing to control the way, how equations are assigned to individual DOFs...
std::vector< IntArray > activeDofsArrays
virtual void edgeGiveUpdatedSolutionVector(FloatArray &answer, const int iedge, TimeStep *tStep)
void recoverShearStress(TimeStep *tStep)
virtual int checkConsistency()
Performs consistency check.
double evaluateCutHeaviside(const double xi, const double xiBottom, const double xiTop) const
virtual void computeStiffnessMatrix(FloatMatrix &answer, MatResponseMode rMode, TimeStep *tStep)
Computes the stiffness matrix of receiver.
void computeEnrichedNmatrixAt(const FloatArray &lCoords, FloatMatrix &answer, EnrichmentItem *ei)
Abstract base class for all material models.
Definition: material.h:95
virtual void OLDcomputeStiffnessMatrix(FloatMatrix &answer, MatResponseMode rMode, TimeStep *tStep)
virtual void giveShellExportData(VTKPiece &vtkPiece, IntArray &primaryVarsToExport, IntArray &internalVarsToExport, IntArray cellVarsToExport, TimeStep *tStep)
std::vector< std::unique_ptr< IntegrationRule > > czIntegrationRulesArray
void computeDiscGeneralizedStrainVector(FloatArray &dGenEps, const FloatArray &lCoords, EnrichmentItem *ei, TimeStep *tStep)
void computeCohesiveTangentAt(FloatMatrix &answer, TimeStep *tStep, Delamination *dei, EnrichmentItem *ei_j, EnrichmentItem *ei_k)
Class representing vector of real numbers.
Definition: floatarray.h:82
virtual void vtkEvalUpdatedGlobalCoordinateAt(const FloatArray &localCoords, int layer, FloatArray &globalCoords, TimeStep *tStep)
void computeLambdaNMatrixDis(FloatMatrix &lambda_xd, double zeta)
void giveDisUnknownsAt(const FloatArray &lCoords, EnrichmentItem *ei, FloatArray &solVec, FloatArray &x, FloatArray &m, double &gam, TimeStep *tStep)
void computeOrderingArray(IntArray &orderingArray, IntArray &activeDofsArray, EnrichmentItem *ei)
Implementation of matrix containing floating point numbers.
Definition: floatmatrix.h:94
IntArray DelaminatedInterfaceList
This class manages the xfem part.
Definition: xfemmanager.h:109
IRResultType
Type defining the return values of InputRecord reading operations.
Definition: irresulttype.h:47
void edgeComputeEnrichedBmatrixAt(const FloatArray &lCoords, FloatMatrix &answer, EnrichmentItem *ei, const int edge)
virtual int giveNumberOfDofs()
This class represent a 7 parameter shell element.
Definition: shell7base.h:68
CharType
Definition: chartype.h:87
Class representing the general Input Record.
Definition: inputrecord.h:101
Class Interface.
Definition: interface.h:82
void edgeComputeEnrichedNmatrixAt(const FloatArray &lCoords, FloatMatrix &answer, EnrichmentItem *ei, const int edge)
void giveInternalForcesVector(FloatArray &answer, TimeStep *tStep, int useUpdatedGpRecord)
Evaluates nodal representation of real internal forces.
double evaluateLevelSet(const FloatArray &lCoords, EnrichmentItem *ei)
virtual void giveRecoveredTransverseInterfaceStress(std::vector< FloatMatrix > &transverseStress, TimeStep *tStep)
virtual void postInitialize()
Performs post initialization steps.
virtual void giveDofManDofIDMask(int inode, IntArray &answer) const
Returns dofmanager dof mask for node.
virtual void giveCompositeExportData(std::vector< VTKPiece > &vtkPieces, IntArray &primaryVarsToExport, IntArray &internalVarsToExport, IntArray cellVarsToExport, TimeStep *tStep)
InterfaceType
Enumerative type, used to identify interface type.
Definition: interfacetype.h:43
void computeEnrichedBmatrixAt(const FloatArray &lCoords, FloatMatrix &answer, EnrichmentItem *ei)
double EvaluateEnrFuncInDofMan(int dofManNum, EnrichmentItem *ei)
Load is base abstract class for all loads.
Definition: load.h:61
void edgeEvalEnrCovarBaseVectorsAt(const FloatArray &lCoords, const int iedge, FloatMatrix &gcov, TimeStep *tStep, EnrichmentItem *ei)
void giveFictiousUpdatedCZNodeCoordsForExport(std::vector< FloatArray > &nodes, int layer, TimeStep *tStep, int subCell)
the oofem namespace is to define a context or scope in which all oofem names are defined.
virtual void giveBoundaryLocationArray(IntArray &locationArray, const IntArray &bNodes, const UnknownNumberingScheme &s, IntArray *dofIdArray)
Returns the location array for the boundary of the element.
void computeCohesiveForces(FloatArray &answer, TimeStep *tStep, FloatArray &solVec, FloatArray &solVecD, EnrichmentItem *ei, EnrichmentItem *coupledToEi)
virtual const char * giveClassName() const
void recoverValuesFromCZIP(std::vector< FloatArray > &recoveredValues, int interfce, InternalStateType type, TimeStep *tStep)
void discComputeSectionalForces(FloatArray &answer, TimeStep *tStep, FloatArray &solVec, FloatArray &solVecD, EnrichmentItem *ei)
FEI3dTrQuad interpolationForCZExport
Class representing integration point in finite element program.
Definition: gausspoint.h:93
void giveLocalCZNodeCoordsForExport(FloatArray &nodeLocalXi1Coords, FloatArray &nodeLocalXi2Coords, FloatArray &nodeLocalXi3Coords, int subCell, FloatMatrix &localNodeCoords)
void computeTripleProduct(FloatMatrix &answer, const FloatMatrix &a, const FloatMatrix &b, const FloatMatrix &c)
Class representing solution step.
Definition: timestep.h:80

This page is part of the OOFEM documentation. Copyright (c) 2011 Borek Patzak
Project e-mail: info@oofem.org
Generated at Tue Jan 2 2018 20:07:31 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011