OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
node.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  * The original idea for this class comes from
37  * Dubois-Pelerin, Y.: "Object-Oriented Finite Elements: Programming concepts and Implementation",
38  * PhD Thesis, EPFL, Lausanne, 1992.
39  */
40 
41 #ifndef node_h
42 #define node_h
43 
44 #include "dofmanager.h"
45 #include "floatarray.h"
46 
48 
49 #define _IFT_Node_Name "node"
50 #define _IFT_Node_coords "coords"
51 #define _IFT_Node_lcs "lcs"
52 
53 
54 namespace oofem {
55 class Dof;
56 class NodalLoad;
57 class TimeStep;
58 class FloatArray;
59 class IntArray;
60 
87 class OOFEM_EXPORT Node : public DofManager
88 {
89 protected:
99 
100 
101 public:
102 
108  Node(int n, Domain * aDomain);
110  virtual ~Node();
111 
112  virtual bool hasCoordinates() { return true; }
113  virtual double giveCoordinate(int i);
114  virtual FloatArray *giveCoordinates() { return & coordinates; }
115 
120  inline const FloatArray &giveNodeCoordinates() const {return coordinates;}
121 
126  void setCoordinates(FloatArray coords) { this->coordinates = std :: move(coords); }
136  virtual double giveUpdatedCoordinate(int ic, TimeStep *tStep, double scale = 1.);
146  virtual void giveUpdatedCoordinates(FloatArray &answer, TimeStep *tStep, double scale = 1.);
147 
148  // local coordinate system
150  bool hasLocalCS() { return ( localCoordinateSystem != NULL ); }
158  FloatMatrix *giveLocalCoordinateTriplet() { return localCoordinateSystem; }
160  bool hasSameLCS(Node *remote);
161 
162  virtual bool computeL2GTransformation(FloatMatrix &answer, const IntArray &dofIDArry);
163  virtual bool requiresTransformation() { return ( this->hasLocalCS() || hasSlaveDofs ); }
164  virtual void computeLoadVector(FloatArray &answer, Load *load, CharType type, TimeStep *tStep, ValueModeType mode);
165 
173  virtual void updateYourself(TimeStep *tStep);
174 
175  // miscellaneous
176  virtual const char *giveClassName() const { return "Node"; }
177  virtual const char *giveInputRecordName() const { return _IFT_Node_Name; }
178  virtual IRResultType initializeFrom(InputRecord *ir);
179  virtual void giveInputRecord(DynamicInputRecord &input);
180  virtual void printYourself();
181  virtual int checkConsistency();
182  virtual bool isDofTypeCompatible(dofType type) const { return ( type == DT_master || type == DT_simpleSlave || type == DT_active ); }
183  virtual int giveQcNodeType() {return 0;};
184 
185 
186  virtual contextIOResultType saveContext(DataStream &stream, ContextMode mode, void *obj = NULL);
187  virtual contextIOResultType restoreContext(DataStream &stream, ContextMode mode, void *obj = NULL);
188 
189 #ifdef __OOFEG
190  virtual void drawYourself(oofegGraphicContext &gc, TimeStep *tStep);
191 #endif
192 };
193 } // end namespace oofem
194 #endif // node_h
virtual bool requiresTransformation()
Indicates, whether dofManager requires the transformation.
Definition: node.h:163
Class and object Domain.
Definition: domain.h:115
bool hasLocalCS()
Returns nonzero if node has prescribed local coordinate system.
Definition: node.h:150
FloatMatrix * localCoordinateSystem
Triplet defining the local coordinate system in node.
Definition: node.h:98
FloatMatrix * giveLocalCoordinateTriplet()
Returns pointer to local coordinate triplet in node.
Definition: node.h:158
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
oofem::oofegGraphicContext gc[OOFEG_LAST_LAYER]
dofType
Dof Type, determines the type of DOF created.
Definition: doftype.h:48
Base class for dof managers.
Definition: dofmanager.h:113
virtual bool isDofTypeCompatible(dofType type) const
Returns true if dof of given type is allowed to be associated to receiver.
Definition: node.h:182
Class implementing an array of integers.
Definition: intarray.h:61
virtual bool hasCoordinates()
Definition: node.h:112
#define _IFT_Node_Name
Definition: node.h:49
virtual const char * giveClassName() const
Definition: node.h:176
FloatArray coordinates
Array storing nodal coordinates.
Definition: node.h:91
Class representing vector of real numbers.
Definition: floatarray.h:82
virtual const char * giveInputRecordName() const
Definition: node.h:177
Implementation of matrix containing floating point numbers.
Definition: floatmatrix.h:94
IRResultType
Type defining the return values of InputRecord reading operations.
Definition: irresulttype.h:47
void setCoordinates(FloatArray coords)
Sets node coordinates to given array.
Definition: node.h:126
const FloatArray & giveNodeCoordinates() const
As giveCoordinates, but non-virtual and therefore faster (because it can be inlined).
Definition: node.h:120
CharType
Definition: chartype.h:87
Class representing the general Input Record.
Definition: inputrecord.h:101
virtual int giveQcNodeType()
Definition: node.h:183
Class representing the a dynamic Input Record.
long ContextMode
Context mode (mask), defining the type of information written/read to/from context.
Definition: contextmode.h:43
virtual FloatArray * giveCoordinates()
Definition: node.h:114
Load is base abstract class for all loads.
Definition: load.h:61
the oofem namespace is to define a context or scope in which all oofem names are defined.
Class implementing node in finite element mesh.
Definition: node.h:87
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:30 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011