OOFEM 3.0
Loading...
Searching...
No Matches
load.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 - 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
35#ifndef load_h
36#define load_h
37
39#include "gausspoint.h"
40#include "intarray.h"
41#include "floatarray.h"
42#include "valuemodetype.h"
43#include "error.h"
44
46
47#define _IFT_Load_components "components"
48#define _IFT_Load_dofexcludemask "dofexcludemask"
49#define _IFT_Load_reference "reference"
51
52namespace oofem {
63{
64public:
75
83
84protected:
98
99public:
100 // Marks the BC as a reference load.
102
108 Load(int n, Domain * d);
110 virtual ~Load() { }
111
120 virtual void computeComponentArrayAt(FloatArray &answer, TimeStep *tStep, ValueModeType mode);
128 virtual void computeValueAt(FloatArray &answer, TimeStep *tStep, const FloatArray &coords, ValueModeType mode) = 0;
136 virtual void computeValueAt(FloatArray &answer, TimeStep *tStep, GaussPoint* gp, ValueModeType mode) {
137 if (this->giveFormulationType() == FT_Entity) {
138 this->computeValueAt(answer, tStep, gp->giveNaturalCoordinates(), mode);
139 } else {
140 this->computeValueAt(answer, tStep, gp->giveGlobalCoordinates(), mode);
141 }
142 }
143
152 virtual void computeValues(FloatArray &answer, TimeStep *tStep, const FloatArray &coords, const IntArray &dofids, ValueModeType mode);
159 int isDofExcluded(int index);
160
161 void scale(double s) override;
162
174 virtual int giveApproxOrder() { return 0; }
181 virtual double giveProperty(int aProperty, TimeStep *tStep) const override {
182 OOFEM_ERROR("Not supported for this boundary condition.");
183 }
184
185 void initializeFrom(InputRecord &ir) override;
186 void giveInputRecord(DynamicInputRecord &input) override;
187
191 const FloatArray &giveComponentArray() const;
192 void setComponentArray(FloatArray &arry) { componentArray = std::move(arry); }
193
194 void saveContext(DataStream &stream, ContextMode mode) override;
195 void restoreContext(DataStream &stream, ContextMode mode) override;
196};
197} // end namespace oofem
198#endif // load_h
const FloatArray & giveGlobalCoordinates()
Definition gausspoint.h:159
const FloatArray & giveNaturalCoordinates() const
Returns coordinate array of receiver.
Definition gausspoint.h:138
FloatArray componentArray
Components of boundary condition.
Definition load.h:86
void setComponentArray(FloatArray &arry)
Definition load.h:192
FormulationType
Definition load.h:79
@ FT_Global
Definition load.h:81
@ FT_Entity
Definition load.h:80
virtual void computeValueAt(FloatArray &answer, TimeStep *tStep, const FloatArray &coords, ValueModeType mode)=0
virtual void computeValueAt(FloatArray &answer, TimeStep *tStep, GaussPoint *gp, ValueModeType mode)
Definition load.h:136
virtual CoordSystType giveCoordSystMode()
Definition load.h:166
Load(int n, Domain *d)
Definition load.C:44
bool reference
Definition load.h:101
virtual int giveApproxOrder()
Definition load.h:174
IntArray dofExcludeMask
Definition load.h:97
virtual ~Load()
Destructor.
Definition load.h:110
virtual double giveProperty(int aProperty, TimeStep *tStep) const override
Definition load.h:181
CoordSystType
Definition load.h:70
@ CST_UpdatedGlobal
Load is specified in global c.s. but follows the deformation.
Definition load.h:73
@ CST_Local
Load is specified in local element c.s.
Definition load.h:72
@ CST_Global
Load is specified in global c.s.
Definition load.h:71
virtual FormulationType giveFormulationType()
Definition load.h:170
#define OOFEM_ERROR(...)
Definition error.h:79
long ContextMode
Definition contextmode.h:43
#define OOFEM_EXPORT
Definition oofemcfg.h:7

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