OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
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 - 2013 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 
45 namespace oofem {
46 class Domain;
47 class DofManager;
48 class TimeStep;
49 class BoundaryCondition;
50 class InitialCondition;
51 
92 class OOFEM_EXPORT MasterDof : public Dof
93 {
94 protected:
98  int bc;
100  int ic;
103 
104 public:
115  MasterDof(DofManager * aNode, int nbc, int nic, DofIDItem id);
116  MasterDof(DofManager * aNode, DofIDItem id = Undef);
118  virtual ~MasterDof();
119 
120  virtual dofType giveDofType() { return DT_master; }
121  virtual const char *giveClassName() const { return "MasterDof"; }
122 
123  virtual int __giveEquationNumber() const;
124 
125  virtual int __givePrescribedEquationNumber();
126 
127  virtual int askNewEquationNumber(TimeStep *tStep);
128 
129  virtual double giveUnknown(ValueModeType mode, TimeStep *tStep);
130  virtual double giveUnknown(PrimaryField &field, ValueModeType, TimeStep *tStep);
131 
132  virtual bool hasBc(TimeStep *tStep);
133  virtual bool hasIc();
134  virtual bool hasIcOn(ValueModeType);
135 
136  virtual bool isPrimaryDof() { return true; }
137 
138  virtual int giveBcId();
139  virtual int giveIcId();
140 
141  virtual void printYourself();
142  virtual void updateYourself(TimeStep *tStep);
143 
144  virtual void updateUnknownsDictionary(TimeStep *tStep, ValueModeType mode, double dofValue);
145 
146  virtual double giveUnknownsDictionaryValue(TimeStep *tStep, ValueModeType mode);
147 
148  virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj = NULL);
149  virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj = NULL);
150 
151  virtual void setBcId(int bcId) { this->bc = bcId; }
152  virtual void setIcId(int icId) { this->ic = icId; }
153  virtual void setEquationNumber(int newEquationNumber) { this->equationNumber = newEquationNumber; }
154  virtual Dictionary *giveUnknowns() { return &this->unknowns; }
155  virtual int giveEqn() { return equationNumber; }
156 
157 protected:
158  BoundaryCondition *giveBc();
159  InitialCondition *giveIc();
160 };
161 } // end namespace oofem
162 #endif // masterdof_h
int ic
Initial condition number associated to dof.
Definition: masterdof.h:100
virtual dofType giveDofType()
Returns the type of the receiver.
Definition: masterdof.h:120
Class implementing general initial condition.
virtual const char * giveClassName() const
Returns class name of the receiver.
Definition: masterdof.h:121
Abstract class representing field of primary variables (those, which are unknown and are typically as...
Definition: primaryfield.h:104
The purpose of DataStream abstract class is to allow to store/restore context to different streams...
Definition: datastream.h:54
virtual void setIcId(int icId)
Overwrites the initial condition id (0-inactive IC)
Definition: masterdof.h:152
ValueModeType
Type representing the mode of UnknownType or CharType, or similar types.
Definition: valuemodetype.h:78
Dictionary unknowns
Unknowns dictionary to support changes of static system.
Definition: masterdof.h:102
dofType
Dof Type, determines the type of DOF created.
Definition: doftype.h:48
Base class for dof managers.
Definition: dofmanager.h:113
Class representing "master" degree of freedom.
Definition: masterdof.h:92
Class implementing Dirichlet boundary condition on DOF (primary boundary condition).
virtual void setBcId(int bcId)
Overwrites the boundary condition id (0-inactive BC), intended for specific purposes such as coupling...
Definition: masterdof.h:151
DofIDItem
Type representing particular dof type.
Definition: dofiditem.h:86
int equationNumber
Corresponding equation number (positive value) or prescribed equation number (negative value)...
Definition: masterdof.h:96
This class implements a linked list whose entries are Pairs (see below).
Definition: dictionary.h:58
int bc
Boundary condition number associated to dof.
Definition: masterdof.h:98
long ContextMode
Context mode (mask), defining the type of information written/read to/from context.
Definition: contextmode.h:43
virtual void setEquationNumber(int newEquationNumber)
Sets a specific equation number to receiver.
Definition: masterdof.h:153
virtual bool isPrimaryDof()
Tests if receiver is primary DOF.
Definition: masterdof.h:136
the oofem namespace is to define a context or scope in which all oofem names are defined.
Abstract class Dof represents Degree Of Freedom in finite element mesh.
Definition: dof.h:93
virtual Dictionary * giveUnknowns()
Receives the dictionary of unknowns in receiver.
Definition: masterdof.h:154
virtual int giveEqn()
Gives number for equation, negative for prescribed equations.
Definition: masterdof.h:155
Class representing solution step.
Definition: timestep.h:80

This page is part of the OOFEM documentation. Copyright (c) 2011 Borek Patzak
Project e-mail: info@oofem.org
Generated at Tue Jan 2 2018 20:07:29 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011