OOFEM 3.0
Loading...
Searching...
No Matches
masterdof.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
36#ifndef masterdof_h
37#define masterdof_h
38
39#include "dof.h"
40#include "dictionary.h"
41#include "dofmanager.h"
42
43#include <cstdio>
44
45namespace oofem {
46class Domain;
47class DofManager;
48class TimeStep;
51
93{
94protected:
98 int bc;
100 int ic;
103
104public:
115 MasterDof(DofManager * aNode, int nbc, int nic, DofIDItem id);
116 MasterDof(DofManager * aNode, DofIDItem id = Undef);
118 virtual ~MasterDof();
119
120 dofType giveDofType() override { return DT_master; }
121 const char *giveClassName() const override { return "MasterDof"; }
122
123 int __giveEquationNumber() const override;
124
125 int __givePrescribedEquationNumber() override;
126
127 int askNewEquationNumber(TimeStep *tStep) override;
128
129 double giveUnknown(ValueModeType mode, TimeStep *tStep) override;
130 double giveUnknown(PrimaryField &field, ValueModeType, TimeStep *tStep) override;
131
132 bool hasBc(TimeStep *tStep) override;
133 bool hasIc() override;
134 bool hasIcOn(ValueModeType) override;
135
136 bool isPrimaryDof() override { return true; }
137
138 int giveBcId() override;
139 int giveIcId() override;
140
141 void printYourself() override;
142 void updateYourself(TimeStep *tStep) override;
143
144 void updateUnknownsDictionary(TimeStep *tStep, ValueModeType mode, double dofValue) override;
145
146 double giveUnknownsDictionaryValue(TimeStep *tStep, ValueModeType mode) override;
147
148 void saveContext(DataStream &stream, ContextMode mode) override;
149 void restoreContext(DataStream &stream, ContextMode mode) override;
150
151 void setBcId(int bcId) override { this->bc = bcId; }
152 void setIcId(int icId) override { this->ic = icId; }
153 void setEquationNumber(int newEquationNumber) override { this->equationNumber = newEquationNumber; }
154 Dictionary *giveUnknowns() override { return &this->unknowns; }
155 int giveEqn() override { return equationNumber; }
156
157protected:
158 BoundaryCondition *giveBc() override;
159 InitialCondition *giveIc() override;
160};
161} // end namespace oofem
162#endif // masterdof_h
Dof(DofManager *aNode, DofIDItem id=Undef)
Definition dof.C:50
dofType giveDofType() override
Returns the type of the receiver.
Definition masterdof.h:120
bool isPrimaryDof() override
Definition masterdof.h:136
void setIcId(int icId) override
Overwrites the initial condition id (0-inactive IC).
Definition masterdof.h:152
Dictionary * giveUnknowns() override
Definition masterdof.h:154
int ic
Initial condition number associated to dof.
Definition masterdof.h:100
const char * giveClassName() const override
Returns class name of the receiver.
Definition masterdof.h:121
void setBcId(int bcId) override
Overwrites the boundary condition id (0-inactive BC), intended for specific purposes such as coupling...
Definition masterdof.h:151
MasterDof(DofManager *aNode, int nbc, int nic, DofIDItem id)
Definition masterdof.C:48
int bc
Boundary condition number associated to dof.
Definition masterdof.h:98
void setEquationNumber(int newEquationNumber) override
Definition masterdof.h:153
Dictionary unknowns
Unknowns dictionary to support changes of static system.
Definition masterdof.h:102
int equationNumber
Corresponding equation number (positive value) or prescribed equation number (negative value).
Definition masterdof.h:96
int giveEqn() override
Definition masterdof.h:155
long ContextMode
Definition contextmode.h:43
dofType
Dof Type, determines the type of DOF created.
Definition doftype.h:48
#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