OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
xfemelementinterface.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 xfemelementinterface_h
36 #define xfemelementinterface_h
37 
38 #include "interface.h"
39 #include "xfemmanager.h"
40 #include "geometry.h"
41 #include "matresponsemode.h"
42 #include "materialmode.h"
43 
44 #define _IFT_XfemElementInterface_CohesiveZoneMaterial "czmaterial"
45 #define _IFT_XfemElementInterface_NumIntPointsCZ "nipcz"
46 #define _IFT_XfemElementInterface_PlaneStrain "useplanestrain"
47 
48 namespace oofem {
49 class FloatArray;
50 class FloatMatrix;
51 class Triangle;
52 class Element;
53 class GaussPoint;
54 class Element;
55 class XfemManager;
56 class IntegrationRule;
57 class MaterialStatus;
58 
63 class OOFEM_EXPORT XfemElementInterface : public Interface
64 {
65 public:
67 
68 
70  std :: vector< int >mCZEnrItemIndices; // TODO: Not nice. /ES
71 
77  std :: vector< std :: vector< int > >mCZTouchingEnrItemIndices;
78 
81 
82  virtual const char *giveClassName() const { return "XfemElementInterface"; }
83  std :: string errorInfo(const char *func) const { return std :: string( giveClassName() ) + func; }
84 
85 public:
88 
89  virtual ~XfemElementInterface();
90  XfemElementInterface (const XfemElementInterface& src) = delete;
91  XfemElementInterface &operator = (const XfemElementInterface &src) = delete;
92 
94  void XfemElementInterface_createEnrBmatrixAt(FloatMatrix &oAnswer, GaussPoint &iGP, Element &iEl);
95 
97  void XfemElementInterface_createEnrBHmatrixAt(FloatMatrix &oAnswer, GaussPoint &iGP, Element &iEl);
98 
103  void ComputeBOrBHMatrix(FloatMatrix &oAnswer, GaussPoint &iGP, Element &iEl, bool iComputeBH, const FloatArray &iNaturalGpCoord);
104 
106  void XfemElementInterface_createEnrNmatrixAt(FloatMatrix &oAnswer, const FloatArray &iLocCoord, Element &iEl, bool iSetDiscontContribToZero);
107 
111  void XfemElementInterface_createEnrNmatrixAt(FloatMatrix &oAnswer, const FloatArray &iLocCoord, Element &iEl, const std :: vector< int > &iLocNodeInd, bool iSetDiscontContribToZero);
112 
116  int XfemElementInterface_giveNumDofManEnrichments(const DofManager &iDMan, XfemManager &iXMan) const;
117 
119  virtual void XfemElementInterface_partitionElement(std :: vector< Triangle > &oTriangles, const std :: vector< FloatArray > &iPoints);
121  virtual bool XfemElementInterface_updateIntegrationRule();
122 
124  virtual void XfemElementInterface_prepareNodesForDelaunay(std :: vector< std :: vector< FloatArray > > &oPointPartitions, double &oCrackStartXi, double &oCrackEndXi, int iEnrItemIndex, bool &oIntersection);
125  virtual void XfemElementInterface_prepareNodesForDelaunay(std :: vector< std :: vector< FloatArray > > &oPointPartitions, double &oCrackStartXi, double &oCrackEndXi, const Triangle &iTri, int iEnrItemIndex, bool &oIntersection);
126 
127  // Help functions for partitioning
128  void putPointsInCorrectPartition(std :: vector< std :: vector< FloatArray > > &oPointPartitions, const std :: vector< FloatArray > &iIntersecPoints, const std :: vector< const FloatArray * > &iNodeCoord) const;
129 
135  void partitionEdgeSegment(int iBndIndex, std :: vector< Line > &oSegments, std :: vector< FloatArray > &oIntersectionPoints, const double &iTangDistPadding = 0.0);
136 
137  // TODO: Move to XfemStructuralElementInterface
138  std :: vector< std :: unique_ptr< IntegrationRule > >mpCZIntegrationRules;
139 
140  // For non-standard CZ formulation
141  std :: vector< std :: unique_ptr< IntegrationRule > >mpCZExtraIntegrationRules;
142 
143 
144  // Temporary storage to facilitate state variable mapping
145  std :: vector< std :: unique_ptr< IntegrationRule > >mpCZIntegrationRules_tmp;
146  std :: vector< std :: unique_ptr< IntegrationRule > >mpCZExtraIntegrationRules_tmp;
147  std :: vector< std :: unique_ptr< IntegrationRule > >mIntRule_tmp;
148 
149  MaterialMode giveMaterialMode();
150 
151  void updateYourselfCZ(TimeStep *tStep);
152 
153  void computeDisplacementJump(GaussPoint &iGP, FloatArray &oJump, const FloatArray &iSolVec, const FloatMatrix &iNMatrix);
154 
158  void computeNCohesive(FloatMatrix &oN, GaussPoint &iGP, int iEnrItemIndex, const std :: vector< int > &iTouchingEnrItemIndices);
159 };
160 } // end namespace oofem
161 #endif // xfemelementinterface_h
Provides Xfem interface for an element.
virtual const char * giveClassName() const
std::vector< std::unique_ptr< IntegrationRule > > mIntRule_tmp
Abstract base class for all finite elements.
Definition: element.h:145
Base class for dof managers.
Definition: dofmanager.h:113
MaterialMode
Type representing material mode of integration point.
Definition: materialmode.h:89
std::vector< std::unique_ptr< IntegrationRule > > mpCZIntegrationRules_tmp
std::string errorInfo(const char *func) const
std::vector< std::vector< int > > mCZTouchingEnrItemIndices
Indices of enrichment items that give cohesive zone contributions to a given GP, even though the GP i...
std::vector< std::unique_ptr< IntegrationRule > > mpCZIntegrationRules
std::vector< std::unique_ptr< IntegrationRule > > mpCZExtraIntegrationRules
Class representing vector of real numbers.
Definition: floatarray.h:82
std::vector< int > mCZEnrItemIndices
Index of enrichment items associated with cohesive zones.
Implementation of matrix containing floating point numbers.
Definition: floatmatrix.h:94
This class manages the xfem part.
Definition: xfemmanager.h:109
Class Interface.
Definition: interface.h:82
bool mUsePlaneStrain
Flag that tells if plane stress or plane strain is assumed.
the oofem namespace is to define a context or scope in which all oofem names are defined.
Class representing integration point in finite element program.
Definition: gausspoint.h:93
Class representing solution step.
Definition: timestep.h:80
std::vector< std::unique_ptr< IntegrationRule > > mpCZExtraIntegrationRules_tmp

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:32 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011