OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
simpleslavedof.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 simpleslavedof_h
36 #define simpleslavedof_h
37 
38 #include "dof.h"
39 #include "error.h"
40 
41 namespace oofem {
42 class Domain;
43 class DofManager;
44 class TimeStep;
45 class BoundaryCondition;
46 class InitialCondition;
47 
70 class OOFEM_EXPORT SimpleSlaveDof : public Dof
71 {
72 private:
76  mutable int masterDofIndx;
77 
78 public:
87  SimpleSlaveDof(DofManager * aNode, int master, DofIDItem id);
88  SimpleSlaveDof(DofManager * aNode, DofIDItem id = Undef);
90  virtual ~SimpleSlaveDof() { }
91 
92  virtual dofType giveDofType() { return DT_simpleSlave; }
93  virtual const char *giveClassName() const { return "SimpleSlaveDof"; }
99  virtual int __giveEquationNumber() const;
105  virtual int __givePrescribedEquationNumber();
109  virtual int askNewEquationNumber(TimeStep *tStep) { return 1; }
110  virtual double giveUnknown(ValueModeType, TimeStep *);
111  virtual double giveUnknown(PrimaryField &field, ValueModeType, TimeStep *tStep);
112  virtual bool hasBc(TimeStep *tStep);
113  virtual bool hasIc();
114  virtual bool hasIcOn(ValueModeType);
115  virtual int giveBcId();
116  virtual int giveIcId();
117  virtual double giveBcValue(ValueModeType mode, TimeStep *tStep);
118 
119  virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj = NULL);
120  virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj = NULL);
121 
123  int giveMasterDofManagerNum() const { return masterDofMngr; }
124  virtual void giveMasterDofManArray(IntArray &answer) {
125  answer.resize(1);
126  answer.at(1) = masterDofMngr;
127  }
129  void setMasterDofManagerNum(int i) { masterDofMngr = i; }
131  int giveMasterDofIndx() const { return masterDofIndx; }
132 
133  virtual void updateLocalNumbering(EntityRenumberingFunctor &f);
134 
135 private:
137  Dof *giveMasterDof() const;
138 
139 protected:
140  BoundaryCondition *giveBc();
141  InitialCondition *giveIc();
142 };
143 } // end namespace oofem
144 #endif // simpleslavedof_h
Class implementing general initial condition.
virtual ~SimpleSlaveDof()
Destructor.
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
void setMasterDofManagerNum(int i)
Sets master dof manager.
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 & at(int i)
Coefficient access function.
Definition: intarray.h:103
int giveMasterDofManagerNum() const
Returns Master Dof Manager Number.
Class implementing Dirichlet boundary condition on DOF (primary boundary condition).
DofIDItem
Type representing particular dof type.
Definition: dofiditem.h:86
virtual const char * giveClassName() const
Returns class name of the receiver.
int giveMasterDofIndx() const
Returns number of master dof in master dofManager.
void resize(int n)
Checks size of receiver towards requested bounds.
Definition: intarray.C:124
virtual int askNewEquationNumber(TimeStep *tStep)
Asks new equation number.
Class representing "slave" degree of freedom.
int masterDofMngr
Number of DofManager containing master dof (Master DofManager)
int masterDofIndx
Number of master dof in master dofManager.
long ContextMode
Context mode (mask), defining the type of information written/read to/from context.
Definition: contextmode.h:43
virtual void giveMasterDofManArray(IntArray &answer)
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 solution step.
Definition: timestep.h:80
virtual dofType giveDofType()
Returns the type of the receiver.

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