OOFEM 3.0
Loading...
Searching...
No Matches
activebc.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 activebc_h
36#define activebc_h
37
39#include "intarray.h"
40#include "inputrecord.h"
41#include "chartype.h"
42#include "valuemodetype.h"
43#include "error.h"
44
45#include <vector>
46
48
49#define _IFT_ActiveBoundaryCondition_elementSides "elementsides"
51
52namespace oofem {
53class SparseMtrx;
54class UnknownNumberingScheme;
55class ActiveDof;
56class Dof;
57class PrimaryField;
58
64{
65public:
74
75 void initializeFrom(InputRecord &ir) override
76 {
77 GeneralBoundaryCondition :: initializeFrom(ir);
78
79 IntArray tempA, tempB, tempC;
81 for ( int i = 0; i < tempB.giveSize() / 2; ++i ) {
82 this->addElementSide( tempB[i * 2], tempB[i * 2 + 1] );
83 }
84 }
85
87
88
93 virtual void addElementSide(int elem, int side) { OOFEM_ERROR("Not supported"); }
95
107 virtual void assemble(SparseMtrx &answer, TimeStep *tStep,
108 CharType type, const UnknownNumberingScheme &r_s, const UnknownNumberingScheme &c_s, double scale = 1.0, void* lock=nullptr) { }
109
121 virtual void assembleVector(FloatArray &answer, TimeStep *tStep,
122 CharType type, ValueModeType mode,
123 const UnknownNumberingScheme &s, FloatArray *eNorms=nullptr, void*lock=nullptr) { }
124
137 virtual void giveLocationArrays(std :: vector< IntArray > &rows, std :: vector< IntArray > &cols, CharType type,
138 const UnknownNumberingScheme &r_s, const UnknownNumberingScheme &c_s) { }
139
140
147
151 virtual bool requiresActiveDofs() { return false; }
156 virtual bool isPrimaryDof(ActiveDof *dof) { return true; }
160 virtual double giveBcValue(Dof *dof, ValueModeType mode, TimeStep *tStep) { return 0.0; }
165 virtual bool hasBc(Dof *dof, TimeStep *tStep) { return false; }
172 {
173 OOFEM_ERROR("Not supported by bc.");
174 }
175
181 virtual Dof *giveMasterDof(ActiveDof *dof, int mdof)
182 {
183 OOFEM_ERROR("Not supported by bc.");
184 }
185 virtual void computeDofTransformation(ActiveDof *dof, FloatArray &masterContribs)
186 {
187 OOFEM_ERROR("Not supported by bc.");
188 }
189
197 virtual double giveUnknown(PrimaryField &field, ValueModeType mode, TimeStep *tStep, ActiveDof *dof)
198 {
199 OOFEM_ERROR("Not supported by bc.");
200 }
201
208 virtual double giveUnknown(ValueModeType mode, TimeStep *tStep, ActiveDof *dof)
209 {
210 OOFEM_ERROR("Not supported by bc.");
211 }
212
213};
214} // end namespace oofem
215#endif // activebc_h
#define _IFT_ActiveBoundaryCondition_elementSides
Definition activebc.h:49
virtual void computeDofTransformation(ActiveDof *dof, FloatArray &masterContribs)
Definition activebc.h:185
virtual double giveUnknown(PrimaryField &field, ValueModeType mode, TimeStep *tStep, ActiveDof *dof)
Definition activebc.h:197
virtual double giveUnknown(ValueModeType mode, TimeStep *tStep, ActiveDof *dof)
Definition activebc.h:208
virtual void assembleVector(FloatArray &answer, TimeStep *tStep, CharType type, ValueModeType mode, const UnknownNumberingScheme &s, FloatArray *eNorms=nullptr, void *lock=nullptr)
Definition activebc.h:121
virtual double giveBcValue(Dof *dof, ValueModeType mode, TimeStep *tStep)
Definition activebc.h:160
virtual void assemble(SparseMtrx &answer, TimeStep *tStep, CharType type, const UnknownNumberingScheme &r_s, const UnknownNumberingScheme &c_s, double scale=1.0, void *lock=nullptr)
Definition activebc.h:107
virtual void giveLocationArrays(std ::vector< IntArray > &rows, std ::vector< IntArray > &cols, CharType type, const UnknownNumberingScheme &r_s, const UnknownNumberingScheme &c_s)
Definition activebc.h:137
virtual void addElementSide(int elem, int side)
Definition activebc.h:93
void initializeFrom(InputRecord &ir) override
Definition activebc.h:75
virtual bool isPrimaryDof(ActiveDof *dof)
Definition activebc.h:156
virtual bool requiresActiveDofs()
Definition activebc.h:151
virtual Dof * giveMasterDof(ActiveDof *dof, int mdof)
Definition activebc.h:181
ActiveBoundaryCondition(int n, Domain *d)
Definition activebc.h:71
virtual ~ActiveBoundaryCondition()
Destructor.
Definition activebc.h:73
virtual int giveNumberOfMasterDofs(ActiveDof *dof)
Definition activebc.h:171
virtual bool hasBc(Dof *dof, TimeStep *tStep)
Definition activebc.h:165
int giveSize() const
Definition intarray.h:211
#define OOFEM_ERROR(...)
Definition error.h:79
#define IR_GIVE_OPTIONAL_FIELD(__ir, __value, __id)
Definition inputrecord.h:75
#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