OOFEM 3.0
Loading...
Searching...
No Matches
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 - 2025 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
38#include "gausspoint.h"
39#include "element.h"
40#include "floatarray.h"
41
42namespace oofem {
44
46StructuralInterfaceCrossSection :: giveInterfaceMaterial() const
47{
48 return static_cast< StructuralInterfaceMaterial * >( this->giveDomain()->giveMaterial(this->materialNum) );
49}
50
51int
52StructuralInterfaceCrossSection :: checkConsistency()
53{
54 // Checks if the given cross section material is a 'StructuralInterfaceMaterial'
55 Material *mat = this->giveDomain()->giveMaterial(this->materialNum);
56 if ( !dynamic_cast< StructuralInterfaceMaterial * >(mat) ) {
57 OOFEM_WARNING("material %s is not a structural interface material", mat->giveClassName() );
58 return 0;
59 }
60
61 return 1;
62}
63
64void
65StructuralInterfaceCrossSection :: initializeFrom(InputRecord &ir)
66{
67 CrossSection :: initializeFrom(ir);
69
70 double thickness = 0.0;
73 propertyDictionary.add(CS_Thickness, thickness);
74 }
75}
76
77
79StructuralInterfaceCrossSection :: give1dStiffnessMatrix_Eng(MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep) const
80{
82 if ( mat->useNumericalTangent ) {
83 return mat->give1dStiffnessMatrix_Eng_Num( gp, tStep );
84 } else if( mat->hasAnalyticalTangentStiffness() ) {
85 return mat->give1dStiffnessMatrix_Eng( rMode, gp, tStep );
86 } else {
87 OOFEM_ERROR("Not implemented - use numerical tangent instead (keyword: 'use_num_tangent') ");
88 }
89}
90
92StructuralInterfaceCrossSection :: give2dStiffnessMatrix_Eng(MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep) const
93{
95 if ( mat->useNumericalTangent ) {
96 return mat->give2dStiffnessMatrix_Eng_Num( gp, tStep );
97 } else if ( mat->hasAnalyticalTangentStiffness() ) {
98 return mat->give2dStiffnessMatrix_Eng( rMode, gp, tStep);
99 } else {
100 OOFEM_ERROR("not implemented - use numerical tangent instead (keyword: 'use_num_tangent') ");
101 }
102}
103
105StructuralInterfaceCrossSection :: give3dStiffnessMatrix_Eng(MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep) const
106{
108 if ( mat->useNumericalTangent ) {
109 return mat->give3dStiffnessMatrix_Eng_Num(gp, tStep);
110 } else if ( mat->hasAnalyticalTangentStiffness() ) {
111 return mat->give3dStiffnessMatrix_Eng(rMode, gp, tStep);
112 } else {
113 OOFEM_ERROR("Not implemented - use numerical tangent instead (keyword: 'use_num_tangent') ");
114 }
115}
116
117
119StructuralInterfaceCrossSection :: give1dStiffnessMatrix_dTdj(MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep) const
120{
122 if ( mat->useNumericalTangent ) {
123 return mat->give1dStiffnessMatrix_dTdj_Num(gp, tStep);
124 } else if ( mat->hasAnalyticalTangentStiffness() ) {
125 return mat->give1dStiffnessMatrix_dTdj(rMode, gp, tStep);
126 } else {
127 OOFEM_ERROR("not implemented - use numerical tangent instead (keyword: 'use_num_tangent') ");
128 }
129}
130
132StructuralInterfaceCrossSection :: give2dStiffnessMatrix_dTdj(MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep) const
133{
135 if ( mat->useNumericalTangent ) {
136 return mat->give2dStiffnessMatrix_dTdj_Num(gp, tStep );
137 } else if ( mat->hasAnalyticalTangentStiffness() ) {
138 return mat->give2dStiffnessMatrix_dTdj(rMode, gp, tStep);
139 } else {
140 OOFEM_ERROR("not implemented - use numerical tangent instead (keyword: 'use_num_tangent') ");
141 }
142}
143
144
146StructuralInterfaceCrossSection :: give3dStiffnessMatrix_dTdj(MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep) const
147{
149 if ( mat->useNumericalTangent ) {
150 return mat->give3dStiffnessMatrix_dTdj_Num(gp, tStep);
151 } else if ( mat->hasAnalyticalTangentStiffness() ) {
152 return mat->give3dStiffnessMatrix_dTdj(rMode, gp, tStep);
153 } else {
154 OOFEM_ERROR("not implemented - use numerical tangent instead (keyword: 'use_num_tangent') ");
155 }
156}
157
158
159int
160StructuralInterfaceCrossSection :: giveIPValue(FloatArray &answer, GaussPoint *ip, InternalStateType type, TimeStep *tStep)
161{
162 if ( type == IST_CrossSectionNumber ) {
163 answer.resize(1);
164 answer.at(1) = this->giveNumber();
165 return 1;
166 }
167 return this->giveInterfaceMaterial()->giveIPValue(answer, ip, type, tStep);
168}
169
170
171Material *StructuralInterfaceCrossSection :: giveMaterial(IntegrationPoint *ip) const
172{
173 if ( this->giveMaterialNumber() ) {
174 return this->giveDomain()->giveMaterial( this->giveMaterialNumber() );
175 } else {
176 return ip->giveElement()->giveMaterial();
177 }
178}
179
180
181int
182StructuralInterfaceCrossSection :: packUnknowns(DataStream &buff, TimeStep *tStep, GaussPoint *gp)
183{
184 return this->giveInterfaceMaterial()->packUnknowns(buff, tStep, gp);
185}
186
187int
188StructuralInterfaceCrossSection :: unpackAndUpdateUnknowns(DataStream &buff, TimeStep *tStep, GaussPoint *gp)
189{
190 return this->giveInterfaceMaterial()->unpackAndUpdateUnknowns(buff, tStep, gp);
191}
192
193int
194StructuralInterfaceCrossSection :: estimatePackSize(DataStream &buff, GaussPoint *gp)
195{
196 return this->giveInterfaceMaterial()->estimatePackSize(buff, gp);
197}
198
199} // end namespace oofem
#define REGISTER_CrossSection(class)
Dictionary propertyDictionary
virtual Material * giveMaterial()
Definition element.C:523
Domain * giveDomain() const
Definition femcmpnn.h:97
virtual const char * giveClassName() const =0
int giveNumber() const
Definition femcmpnn.h:104
void resize(Index s)
Definition floatarray.C:94
double & at(Index i)
Definition floatarray.h:202
Element * giveElement()
Returns corresponding element to receiver.
Definition gausspoint.h:187
virtual bool hasField(InputFieldType id)=0
Returns true if record contains field identified by idString keyword.
StructuralInterfaceMaterial * giveInterfaceMaterial() const
FloatMatrixF< 3, 3 > give3dStiffnessMatrix_Eng_Num(GaussPoint *gp, TimeStep *tStep) const
FloatMatrixF< 1, 1 > give1dStiffnessMatrix_Eng_Num(GaussPoint *gp, TimeStep *tStep) const
virtual FloatMatrixF< 2, 2 > give2dStiffnessMatrix_dTdj(MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep) const
virtual FloatMatrixF< 1, 1 > give1dStiffnessMatrix_dTdj(MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep) const
FloatMatrixF< 1, 1 > give1dStiffnessMatrix_dTdj_Num(GaussPoint *gp, TimeStep *tStep) const
virtual FloatMatrixF< 1, 1 > give1dStiffnessMatrix_Eng(MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep) const
FloatMatrixF< 2, 2 > give2dStiffnessMatrix_dTdj_Num(GaussPoint *gp, TimeStep *tStep) const
virtual bool hasAnalyticalTangentStiffness() const =0
FloatMatrixF< 2, 2 > give2dStiffnessMatrix_Eng_Num(GaussPoint *gp, TimeStep *tStep) const
virtual FloatMatrixF< 3, 3 > give3dStiffnessMatrix_dTdj(MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep) const
virtual FloatMatrixF< 2, 2 > give2dStiffnessMatrix_Eng(MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep) const
FloatMatrixF< 3, 3 > give3dStiffnessMatrix_dTdj_Num(GaussPoint *gp, TimeStep *tStep) const
virtual FloatMatrixF< 3, 3 > give3dStiffnessMatrix_Eng(MatResponseMode rMode, GaussPoint *gp, TimeStep *tStep) const
#define OOFEM_WARNING(...)
Definition error.h:80
#define OOFEM_ERROR(...)
Definition error.h:79
#define IR_GIVE_OPTIONAL_FIELD(__ir, __value, __id)
Definition inputrecord.h:75
#define IR_GIVE_FIELD(__ir, __value, __id)
Definition inputrecord.h:67
@ CS_Thickness
Thickness.
GaussPoint IntegrationPoint
Definition gausspoint.h:272
#define _IFT_StructuralInterfaceCrossSection_thickness
#define _IFT_StructuralInterfaceCrossSection_Material

This page is part of the OOFEM-3.0 documentation. Copyright Copyright (C) 1994-2025 Borek Patzak Bořek Patzák
Project e-mail: oofem@fsv.cvut.cz
Generated at for OOFEM by doxygen 1.15.0 written by Dimitri van Heesch, © 1997-2011