OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
slavedof.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 #ifndef slavedof_h
36 #define slavedof_h
37 
38 #include "dof.h"
39 
40 namespace oofem {
47 class OOFEM_EXPORT SlaveDof : public Dof
48 {
49 protected:
60 
61 public:
67  SlaveDof(DofManager * aNode, DofIDItem id = Undef);
69  virtual ~SlaveDof(void) { }
70 
71  virtual dofType giveDofType() { return DT_slave; }
72 
73  void initialize(const IntArray &masterNodes, const IntArray &mstrDofID, const FloatArray &mstrContribution);
74  virtual int giveNumberOfPrimaryMasterDofs();
75  virtual void giveMasterDofManArray(IntArray &answer);
76  virtual void giveUnknowns(FloatArray &masterUnknowns, ValueModeType mode, TimeStep *tStep);
77  virtual void giveUnknowns(FloatArray &masterUnknowns, PrimaryField &field, ValueModeType mode, TimeStep *tStep);
78  virtual void computeDofTransformation(FloatArray &primaryMasterContribs);
79  virtual void giveEquationNumbers(IntArray &masterEqNumbers, const UnknownNumberingScheme &s);
80  virtual void giveDofIDs(IntArray &masterDofIDs);
81 
93  virtual double giveUnknown(ValueModeType mode, TimeStep *tStep);
94  virtual double giveUnknown(PrimaryField &field, ValueModeType mode, TimeStep *tStep);
95 
103  virtual int __giveEquationNumber() const;
111  virtual int __givePrescribedEquationNumber();
115  virtual int askNewEquationNumber(TimeStep *tStep) { return 1; }
116 
122  virtual bool hasBc(TimeStep *tStep) { return false; }
123 
129  virtual bool hasIc() { return false; }
130 
135  virtual bool hasIcOn(ValueModeType) { return false; }
136 
137  virtual int giveBcId() { return 0; }
138  virtual int giveIcId() { return 0; }
139 
140  virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj = NULL);
141  virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj = NULL);
142 
143  virtual const char *giveClassName() const { return "SlaveDof"; }
144 
145  virtual void updateLocalNumbering(EntityRenumberingFunctor &f);
146 
147 protected:
148  inline Dof *giveMasterDof(int i);
149 };
150 } // end namespace oofem
151 #endif // slavedof_h
IntArray dofIDs
Array of master dofIDs.
Definition: slavedof.h:57
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
ValueModeType
Type representing the mode of UnknownType or CharType, or similar types.
Definition: valuemodetype.h:78
FloatArray masterContribution
Vector of master contribution coefficients.
Definition: slavedof.h:59
dofType
Dof Type, determines the type of DOF created.
Definition: doftype.h:48
Base class for dof managers.
Definition: dofmanager.h:113
Class implementing an array of integers.
Definition: intarray.h:61
int countOfPrimaryMasterDofs
Count of master DofManagers.
Definition: slavedof.h:53
virtual ~SlaveDof(void)
Destructor.
Definition: slavedof.h:69
DofIDItem
Type representing particular dof type.
Definition: dofiditem.h:86
Abstract base class allowing to control the way, how equations are assigned to individual DOFs...
virtual int giveBcId()
Returns the id of associated boundary condition, if there is any.
Definition: slavedof.h:137
virtual bool hasIcOn(ValueModeType)
RigidArmSlaveDof can not be subjected to IC - it is only mapping to master.
Definition: slavedof.h:135
Class representing vector of real numbers.
Definition: floatarray.h:82
virtual const char * giveClassName() const
Returns class name of the receiver.
Definition: slavedof.h:143
IntArray masterDofMans
Array of master DofManagers.
Definition: slavedof.h:55
virtual bool hasIc()
Returns initial condition of dof if it is prescribed.
Definition: slavedof.h:129
virtual dofType giveDofType()
Returns the type of the receiver.
Definition: slavedof.h:71
virtual int giveIcId()
Returns the id of associated initial condition, if there is any.
Definition: slavedof.h:138
long ContextMode
Context mode (mask), defining the type of information written/read to/from context.
Definition: contextmode.h:43
virtual bool hasBc(TimeStep *tStep)
Returns boundary condition of dof if it is prescribed.
Definition: slavedof.h:122
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
Class representing "slave" degree of freedom.
Definition: slavedof.h:47
int countOfMasterDofs
Count of master DofManagers.
Definition: slavedof.h:51
Class representing solution step.
Definition: timestep.h:80
virtual int askNewEquationNumber(TimeStep *tStep)
Asks new equation number.
Definition: slavedof.h:115

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:31 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011