OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
structuralinterfacecrosssection.C
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 #include "../sm/CrossSections/structuralinterfacecrosssection.h"
36 #include "../sm/Materials/InterfaceMaterials/structuralinterfacematerialstatus.h"
37 #include "../sm/Materials/InterfaceMaterials/structuralinterfacematerial.h"
38 #include "gausspoint.h"
39 #include "element.h"
40 #include "floatarray.h"
41 
42 namespace oofem {
43 REGISTER_CrossSection(StructuralInterfaceCrossSection);
44 
45 StructuralInterfaceMaterial *
47 {
48  return static_cast< StructuralInterfaceMaterial * >( this->giveDomain()->giveMaterial(this->materialNum) );
49 }
50 
51 const FloatArray &
53 {
54  // Returns the traction vector stored in the material status
55  //return static_cast< StructuralInterfaceMaterialStatus *> ( this->giveInterfaceMaterial()->giveStatus(ip) )->giveTraction();
56  return static_cast< StructuralInterfaceMaterialStatus * >( this->giveInterfaceMaterial()->giveStatus(ip) )->giveFirstPKTraction();
57 }
58 
59 
60 int
62 {
63  // Checks if the given cross section material is a 'StructuralInterfaceMaterial'
64  Material *mat = this->giveDomain()->giveMaterial(this->materialNum);
65  if ( !dynamic_cast< StructuralInterfaceMaterial * >(mat) ) {
66  OOFEM_WARNING("material %s is not a structural interface material", mat->giveClassName() );
67  return 0;
68  }
69 
70  return 1;
71 }
72 
75 {
76  IRResultType result; // Required by IR_GIVE_FIELD macro
77 
80 
81  double thickness = 0.0;
85  }
86 
87  return IRRT_OK;
88 }
89 
90 
91 void
93 {
95  if ( mat->useNumericalTangent ) {
96  mat->give1dStiffnessMatrix_Eng_Num( answer, gp, tStep );
97  } else if( mat->hasAnalyticalTangentStiffness() ) {
98  mat->give1dStiffnessMatrix_Eng( answer, rMode, gp, tStep );
99  } else {
100  OOFEM_ERROR("Not implemented - use numerical tangent instead (keyword: 'use_num_tangent') ");
101  }
102 }
103 
104 void
106 {
108  if ( mat->useNumericalTangent ) {
109  mat->give2dStiffnessMatrix_Eng_Num( answer, gp, tStep );
110  } else if ( mat->hasAnalyticalTangentStiffness() ) {
111  mat->give2dStiffnessMatrix_Eng(answer, rMode, gp, tStep);
112  } else {
113  OOFEM_ERROR("not implemented - use numerical tangent instead (keyword: 'use_num_tangent') ");
114  }
115 }
116 
117 void
119 {
121  if ( mat->useNumericalTangent ) {
122  mat->give3dStiffnessMatrix_Eng_Num(answer, gp, tStep);
123  } else if ( mat->hasAnalyticalTangentStiffness() ) {
124  mat->give3dStiffnessMatrix_Eng(answer, rMode, gp, tStep);
125  } else {
126  OOFEM_ERROR("Not implemented - use numerical tangent instead (keyword: 'use_num_tangent') ");
127  }
128 }
129 
130 
131 
132 
133 void
135 {
137  if ( mat->useNumericalTangent ) {
138  mat->give1dStiffnessMatrix_dTdj_Num( answer, gp, tStep);
139  } else if ( mat->hasAnalyticalTangentStiffness() ) {
140  mat->give1dStiffnessMatrix_dTdj(answer, rMode, gp, tStep);
141  } else {
142  OOFEM_ERROR("not implemented - use numerical tangent instead (keyword: 'use_num_tangent') ");
143  }
144 }
145 
146 void
148 {
150  if ( mat->useNumericalTangent ) {
151  mat->give2dStiffnessMatrix_dTdj_Num( answer, gp, tStep );
152  } else if ( mat->hasAnalyticalTangentStiffness() ) {
153  mat->give2dStiffnessMatrix_dTdj(answer, rMode, gp, tStep);
154  } else {
155  OOFEM_ERROR("not implemented - use numerical tangent instead (keyword: 'use_num_tangent') ");
156  }
157 }
158 
159 
160 void
162 {
164  if ( mat->useNumericalTangent ) {
165  mat->give3dStiffnessMatrix_dTdj_Num(answer, gp, tStep);
166  } else if ( mat->hasAnalyticalTangentStiffness() ) {
167  mat->give3dStiffnessMatrix_dTdj(answer, rMode, gp, tStep);
168  } else {
169  OOFEM_ERROR("not implemented - use numerical tangent instead (keyword: 'use_num_tangent') ");
170  }
171 }
172 
173 
174 int
176 {
177  if ( type == IST_CrossSectionNumber ) {
178  answer.resize(1);
179  answer.at(1) = this->giveNumber();
180  return 1;
181  }
182  return this->giveInterfaceMaterial()->giveIPValue(answer, ip, type, tStep);
183 }
184 
185 
187 {
188  if ( this->giveMaterialNumber() ) {
189  return this->giveDomain()->giveMaterial( this->giveMaterialNumber() );
190  } else {
191  return ip->giveElement()->giveMaterial();
192  }
193 }
194 
195 
196 int
198 {
199  return this->giveInterfaceMaterial()->packUnknowns(buff, tStep, gp);
200 }
201 
202 int
204 {
205  return this->giveInterfaceMaterial()->unpackAndUpdateUnknowns(buff, tStep, gp);
206 }
207 
208 int
210 {
211  return this->giveInterfaceMaterial()->estimatePackSize(buff, gp);
212 }
213 
214 } // end namespace oofem
InternalStateType
Type representing the physical meaning of element or constitutive model internal variable.
StructuralInterfaceMaterial * giveInterfaceMaterial()
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Definition: crosssection.C:67
void give3dStiffnessMatrix_dTdj_Num(FloatMatrix &answer, GaussPoint *gp, TimeStep *tStep)
virtual MaterialStatus * giveStatus(GaussPoint *gp) const
Returns material status of receiver in given integration point.
Definition: material.C:244
void give3dStiffnessMatrix_dTdj(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep)
virtual void give3dStiffnessMatrix_dTdj(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep)
void give2dStiffnessMatrix_dTdj(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep)
void give1dStiffnessMatrix_Eng(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep)
virtual int packUnknowns(DataStream &buff, TimeStep *tStep, GaussPoint *ip)
Pack all necessary data of integration point (according to element parallel_mode) into given communic...
Definition: material.h:285
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
Definition: datastream.h:54
double & at(int i)
Coefficient access function.
Definition: floatarray.h:131
#define _IFT_StructuralInterfaceCrossSection_Material
virtual int checkConsistency()
Allows programmer to test some internal data, before computation begins.
virtual bool hasField(InputFieldType id)=0
Returns true if record contains field identified by idString keyword.
REGISTER_CrossSection(EmptyCS)
Element * giveElement()
Returns corresponding element to receiver.
Definition: gausspoint.h:188
void give1dStiffnessMatrix_dTdj_Num(FloatMatrix &answer, GaussPoint *gp, TimeStep *tStep)
MatResponseMode
Describes the character of characteristic material matrix.
virtual void give1dStiffnessMatrix_dTdj(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep)
Gives the tangent: .
void give2dStiffnessMatrix_dTdj_Num(FloatMatrix &answer, GaussPoint *gp, TimeStep *tStep)
virtual int giveIPValue(FloatArray &answer, GaussPoint *gp, InternalStateType type, TimeStep *tStep)
Returns the integration point corresponding value in Reduced form.
Dictionary propertyDictionary
Dictionary for storing cross section parameters (like dimensions).
Definition: crosssection.h:115
Material * giveMaterial(int n)
Service for accessing particular domain material model.
Definition: domain.C:281
virtual int unpackAndUpdateUnknowns(DataStream &buff, TimeStep *tStep, GaussPoint *gp)
Unpack and updates all necessary data of given integration point (according to element parallel_mode)...
#define OOFEM_ERROR(...)
Definition: error.h:61
virtual void give2dStiffnessMatrix_Eng(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep)
virtual Material * giveMaterial(IntegrationPoint *ip)
Returns the material associated with the GP.
const FloatArray & giveTraction(IntegrationPoint *ip)
This class implements a structural interface material status information.
Abstract base class for all material models.
Definition: material.h:95
virtual int estimatePackSize(DataStream &buff, GaussPoint *gp)
Estimates the necessary pack size to hold all packed data of receiver.
void give1dStiffnessMatrix_dTdj(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep)
void give2dStiffnessMatrix_Eng_Num(FloatMatrix &answer, GaussPoint *gp, TimeStep *tStep)
virtual void give1dStiffnessMatrix_Eng(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep)
Pair * add(int aKey, double value)
Adds a new Pair with given keyword and value into receiver.
Definition: dictionary.C:81
Class representing vector of real numbers.
Definition: floatarray.h:82
void give3dStiffnessMatrix_Eng(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep)
Implementation of matrix containing floating point numbers.
Definition: floatmatrix.h:94
virtual int giveIPValue(FloatArray &answer, GaussPoint *ip, InternalStateType type, TimeStep *tStep)
Returns the integration point corresponding value in Reduced form.
IRResultType
Type defining the return values of InputRecord reading operations.
Definition: irresulttype.h:47
virtual const char * giveClassName() const =0
void give3dStiffnessMatrix_Eng_Num(FloatMatrix &answer, GaussPoint *gp, TimeStep *tStep)
void give2dStiffnessMatrix_Eng(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep)
Class representing the general Input Record.
Definition: inputrecord.h:101
virtual void give2dStiffnessMatrix_dTdj(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep)
virtual int estimatePackSize(DataStream &buff, GaussPoint *ip)
Estimates the necessary pack size to hold all packed data of receiver.
Definition: material.h:298
virtual IRResultType initializeFrom(InputRecord *ir)
Initializes receiver according to object description stored in input record.
Domain * giveDomain() const
Definition: femcmpnn.h:100
#define IR_GIVE_OPTIONAL_FIELD(__ir, __value, __id)
Macro facilitating the use of input record reading methods.
Definition: inputrecord.h:78
Abstract base class for all "structural" interface models.
void give1dStiffnessMatrix_Eng_Num(FloatMatrix &answer, GaussPoint *gp, TimeStep *tStep)
the oofem namespace is to define a context or scope in which all oofem names are defined.
virtual void give3dStiffnessMatrix_Eng(FloatMatrix &answer, MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep)
virtual int unpackAndUpdateUnknowns(DataStream &buff, TimeStep *tStep, GaussPoint *ip)
Unpack and updates all necessary data of given integration point (according to element parallel_mode)...
Definition: material.h:294
#define IR_GIVE_FIELD(__ir, __value, __id)
Macro facilitating the use of input record reading methods.
Definition: inputrecord.h:69
int giveNumber() const
Definition: femcmpnn.h:107
virtual int packUnknowns(DataStream &buff, TimeStep *tStep, GaussPoint *gp)
Pack all necessary data of integration point (according to element parallel_mode) into given communic...
virtual bool hasAnalyticalTangentStiffness() const =0
Tells if the model has implemented analytical tangent stiffness.
#define _IFT_StructuralInterfaceCrossSection_thickness
Class representing integration point in finite element program.
Definition: gausspoint.h:93
#define OOFEM_WARNING(...)
Definition: error.h:62
Class representing solution step.
Definition: timestep.h:80
virtual Material * giveMaterial()
Definition: element.C:484
void resize(int s)
Resizes receiver towards requested size.
Definition: floatarray.C:631

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