OOFEM 3.0
Loading...
Searching...
No Matches
prescribeddispslipmultiple.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
36#include "classfactory.h"
37#include "node.h"
38#include "masterdof.h"
39#include "element.h"
40#include "feinterpol.h"
41#include "feinterpol2d.h"
42#include "gausspoint.h"
43#include "sparsemtrx.h"
46#include "timestep.h"
47#include "function.h"
48#include "sparselinsystemnm.h"
50#include "engngm.h"
51#include "mathfem.h"
52#include "dynamicinputrecord.h"
53
54
55namespace oofem {
57
58PrescribedDispSlipMultiple :: PrescribedDispSlipMultiple(int n, Domain *d) :
61{
62}
63
64PrescribedDispSlipMultiple :: ~PrescribedDispSlipMultiple()
65{
66}
67
68
69void PrescribedDispSlipMultiple :: initializeFrom(InputRecord &ir)
70{
71 ActiveBoundaryCondition :: initializeFrom(ir);
72 PrescribedDispSlipHomogenization :: initializeFrom(ir);
74}
75
76
77void PrescribedDispSlipMultiple :: giveInputRecord(DynamicInputRecord &input)
78{
79 ActiveBoundaryCondition :: giveInputRecord(input);
80 PrescribedDispSlipHomogenization :: giveInputRecord(input);
82}
83
84
86{
87 this->slipField = t;
88 for ( int i : this->bcs ) {
89 auto bc = dynamic_cast<PrescribedDispSlipHomogenization*>(this->giveDomain()->giveBc(i));
90 bc->setSlipField(t);
91 }
92}
93
94
96{
98 for ( int i : this->bcs ) {
99 auto bc = dynamic_cast<PrescribedDispSlipHomogenization*>(this->giveDomain()->giveBc(i));
100 bc->setDispGradient(t);
101 }
102}
103
104
106{
108 for ( int i : this->bcs ) {
109 auto bc = dynamic_cast<PrescribedDispSlipHomogenization*>(this->giveDomain()->giveBc(i));
110 bc->setSlipGradient(t);
111 }
112}
113
114
116{
117 this->mCenterCoord = x;
118 for ( int i : this->bcs ) {
119 auto bc = dynamic_cast<PrescribedDispSlipHomogenization*>(this->giveDomain()->giveBc(i));
120 bc->setCenterCoordinate(x);
121 }
122}
123
124
126{
127 for ( int j: this->bcs ) {
128 auto bc = dynamic_cast<ActiveBoundaryCondition*>(this->giveDomain()->giveBc(j));
129 if ( bc != nullptr ) {
130 return bc->giveInternalDofManager(i);
131 }
132 }
133 return nullptr;
134}
135
136
137void PrescribedDispSlipMultiple :: scale(double s)
138{
139 this->dispField.times(s);
140 this->dispGradient.times(s);
141 this->slipField.times(s);
142 this->slipGradient.times(s);
143}
144
145
146void PrescribedDispSlipMultiple :: computeStress(FloatArray &sigma, TimeStep *tStep)
147{
148 sigma.clear();
149 for ( int i : this->bcs ) {
150 FloatArray tmp;
151 auto bc = dynamic_cast<PrescribedDispSlipHomogenization*>(this->giveDomain()->giveBc(i));
152 bc->computeStress(tmp, tStep);
153 sigma.add(tmp);
154 }
155}
156
157
159{
160 bStress.clear();
161 for ( int i : this->bcs ) {
162 FloatArray tmp;
163 auto bc = dynamic_cast<PrescribedDispSlipHomogenization*>(this->giveDomain()->giveBc(i));
164 bc->computeTransferStress(tmp, tStep);
165 bStress.add(tmp);
166 }
167}
168
169
171{
172 rStress.clear();
173 for ( int i : this->bcs ) {
174 FloatArray tmp;
175 auto bc = dynamic_cast<PrescribedDispSlipHomogenization*>(this->giveDomain()->giveBc(i));
176 bc->computeReinfStress(tmp, tStep);
177 rStress.add(tmp);
178 }
179}
180
181
182void PrescribedDispSlipMultiple :: computeTangent(FloatMatrix &tangent, TimeStep *tStep)
183{
184 OOFEM_ERROR("Not implemented")
185}
186} /* namespace oofem */
#define REGISTER_BoundaryCondition(class)
ActiveBoundaryCondition(int n, Domain *d)
Definition activebc.h:71
GeneralBoundaryCondition * giveBc(int n)
Definition domain.C:246
void setField(int item, InputFieldType id)
Domain * giveDomain() const
Definition femcmpnn.h:97
void add(const FloatArray &src)
Definition floatarray.C:218
static FloatMatrix fromArray(const FloatArray &vector, bool transpose=false)
void computeTransferStress(FloatArray &bStress, TimeStep *tStep) override
void setSlipField(const FloatArray &t) override
void setCenterCoordinate(FloatArray &x) override
void setDispGradient(const FloatArray &t) override
void setSlipGradient(const FloatArray &t) override
DofManager * giveInternalDofManager(int i) override
Gives an internal dof manager from receiver.
void computeReinfStress(FloatArray &rStress, TimeStep *tStep) override
#define OOFEM_ERROR(...)
Definition error.h:79
#define IR_GIVE_FIELD(__ir, __value, __id)
Definition inputrecord.h:67
#define _IFT_PrescribedDispSlipMultiple_BCs

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