OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
contactelement.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 contactelement_h
36 #define contactelement_h
37 
38 #include "chartype.h"
39 #include "valuemodetype.h"
40 
41 
42 
43 // remove
44 #include "oofemcfg.h"
45 #include "datareader.h"
46 #include "inputrecord.h"
47 #include "intarray.h"
48 #include "floatarray.h"
49 
50 #include <unordered_map>
51 #include <list>
52 #include <vector>
53 #include <memory>
54 
56 
57 //#define _IFT_ContactManager_Name "contactmanager"
58 
60 
61 namespace oofem {
62 class Domain;
63 class ContactManager;
64 class ContactDefinition;
65 class SparseMtrx;
66 class TimeStep;
67 class DofManager;
68 class GaussPoint;
69 class UnknownNumberingScheme;
70 class FloatMatrix;
71 class IntegrationRule;
72 
73 // contact elements
74 
75 class OOFEM_EXPORT ContactElement
76 {
77 private:
78  //ContactDefinition *cDef;
79 
80  std :: vector< ContactElement *> slaveObjectList; // remove?
81 
83 
84 
85 
86 protected:
87  bool inContact;
88 public:
93  virtual ~ContactElement(){};
94 
95  virtual void setupIntegrationPoints(){};
96 
97 
98  ContactElement *giveSlave(const int num) { return slaveObjectList[num-1]; }
99  int giveNumberOfSlaves() { return (int)slaveObjectList.size(); }
100  virtual int instanciateYourself(DataReader &dr){ return 1; }
101  //virtual const char *giveClassName() const { return "ContactDefinition"; }
102  bool isInContact() { return inContact; }
103  virtual void giveDofManagersToAppendTo(IntArray &answer) { answer.clear(); }
104 
105 
106  virtual void computeContactForces(FloatArray &answer, TimeStep *tStep, ValueModeType mode,
107  const UnknownNumberingScheme &s, Domain *domain, FloatArray *eNorms) = 0;
108 
109  virtual void computeContactTangent(FloatMatrix &answer, TimeStep *tStep) = 0;
110 
111 
112  virtual void giveLocationArray(IntArray &answer, const UnknownNumberingScheme &s) = 0;
113  // set the dof id array if the contact element has its own dofs (Lagrange multipliers)
114  virtual void setDofIdArray(IntArray &array){ this->dofIdArray = array; }
115  virtual IntArray &giveDofIdArray(){ return this->dofIdArray; }
116 };
117 
118 
119 /*
120 class OOFEM_EXPORT Node2NodeContact : public ContactElement
121 {
122 protected:
123  ContactDefinition *cDef;
124 
125 private:
126  DofManager *masterNode;
127  DofManager *slaveNode;
128 
129  // should be set by input:
130  double area; // The area associated with the node (default = 1)- in order to represent some physical dimension.
131  double epsN; // penalty stiffness
132 
133  FloatArray normal;
134 public:
135 
137  Node2NodeContact(DofManager *master, DofManager *slave);
139  virtual ~Node2NodeContact(){};
140  virtual int instanciateYourself(DataReader &dr);
141  virtual void setupIntegrationPoints();
142 
143  virtual void computeGap(FloatArray &answer, TimeStep *tStep);
144  virtual void computeContactTractionAt(GaussPoint *gp, FloatArray &t, FloatArray &gap, TimeStep *tStep);
145  virtual void computeCmatrixAt(GaussPoint *gp, FloatArray &answer, TimeStep *TimeStep);
146  FloatArray &giveNormal() { return this->normal; }
147 
148 
149  // Necessary methods - pure virtual in base class
150  virtual void computeContactForces(FloatArray &answer, TimeStep *tStep, CharType type, ValueModeType mode,
151  const UnknownNumberingScheme &s, Domain *domain, FloatArray *eNorms);
152 
153  virtual void computeContactTangent(FloatMatrix &answer, CharType type, TimeStep *tStep);
154 
155  virtual void giveLocationArray(IntArray &answer, const UnknownNumberingScheme &s);
156 };
157 
158 
159 
160 
161 class OOFEM_EXPORT Node2NodeContactL : public Node2NodeContact
162 {
163 protected:
164  ContactDefinition *cDef;
165 
166 private:
167  DofManager *masterNode;
168  DofManager *slaveNode;
169  int lagrangeId; // dof Id associated with the Lagrange multiplier
170 
171  // should be set by input:
172  double area; // The area associated with the node (default = 1)- in order to represent some physical dimension.
173 
174 
175 public:
176 
178  Node2NodeContactL(DofManager *master, DofManager *slave);
180  virtual ~Node2NodeContactL(){};
181  //virtual int instanciateYourself(DataReader &dr);
182  virtual void giveDofManagersToAppendTo(IntArray &answer);
183  virtual void computeContactTractionAt(GaussPoint *gp, FloatArray &t, FloatArray &gap, TimeStep *tStep);
184 
185  //virtual void computeGap(FloatArray &answer, TimeStep *tStep);
186  //virtual void computeContactTractionAt(GaussPoint *gp, FloatArray &t, FloatArray &gap, TimeStep *tStep);
187  //virtual void computeCmatrixAt(GaussPoint *gp, FloatArray &answer, TimeStep *TimeStep);
188 
189  // Necessary methods - pure virtual in base class
190  virtual void computeContactForces(FloatArray &answer, TimeStep *tStep, CharType type, ValueModeType mode,
191  const UnknownNumberingScheme &s, Domain *domain, FloatArray *eNorms);
192 
193  virtual void computeContactTangent(FloatMatrix &answer, CharType type, TimeStep *tStep);
194 
195  virtual void giveLocationArray(IntArray &answer, const UnknownNumberingScheme &s);
196 };*/
197 
198 
199 
200 } // end namespace oofem
201 #endif // contactelement_h
Class and object Domain.
Definition: domain.h:115
std::vector< ContactElement * > slaveObjectList
ContactElement * giveSlave(const int num)
ValueModeType
Type representing the mode of UnknownType or CharType, or similar types.
Definition: valuemodetype.h:78
virtual int instanciateYourself(DataReader &dr)
virtual IntArray & giveDofIdArray()
Class representing the abstraction for input data source.
Definition: datareader.h:50
Class implementing an array of integers.
Definition: intarray.h:61
Abstract base class representing integration rule.
void clear()
Clears the array (zero size).
Definition: intarray.h:177
virtual void giveDofManagersToAppendTo(IntArray &answer)
virtual void setupIntegrationPoints()
virtual void setDofIdArray(IntArray &array)
Abstract base class allowing to control the way, how equations are assigned to individual DOFs...
Class representing vector of real numbers.
Definition: floatarray.h:82
Implementation of matrix containing floating point numbers.
Definition: floatmatrix.h:94
IntegrationRule * integrationRule
virtual ~ContactElement()
Destructor.
the oofem namespace is to define a context or scope in which all oofem names are defined.
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:28 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011