OOFEM 3.0
Loading...
Searching...
No Matches
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 - 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 * 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#include "floatmatrix.h"
47
48#include <memory>
49
51
52#define _IFT_Node_Name "node"
53#define _IFT_Node_coords "coords"
54#define _IFT_Node_lcs "lcs"
56
57namespace oofem {
58class Dof;
59class NodalLoad;
60class TimeStep;
61class FloatArray;
62class IntArray;
63class ParamKey;
64
92{
93protected:
100 std::unique_ptr<FloatMatrix> localCoordinateSystem;
101
104
105public:
111 Node(int n, Domain * aDomain);
112
117 void setCoordinates(FloatArray coords) { this->coordinates = std :: move(coords); }
127 virtual double giveUpdatedCoordinate(int ic, TimeStep *tStep, double scale = 1.);
137 virtual void giveUpdatedCoordinates(FloatArray &answer, TimeStep *tStep, double scale = 1.);
138
139 // local coordinate system
141 bool hasLocalCS() { return ( localCoordinateSystem != nullptr ); }
151 bool hasSameLCS(Node *remote);
152
153 bool computeL2GTransformation(FloatMatrix &answer, const IntArray &dofIDArry) override;
154 bool requiresTransformation() override { return ( this->hasLocalCS() || hasSlaveDofs ); }
155 void computeLoadVector(FloatArray &answer, Load *load, CharType type, TimeStep *tStep, ValueModeType mode) override;
156
164 void updateYourself(TimeStep *tStep) override;
165
166 // miscellaneous
167 const char *giveClassName() const override { return "Node"; }
168 const char *giveInputRecordName() const override { return _IFT_Node_Name; }
169 void initializeFrom(InputRecord &ir) override { initializeFrom(ir, 1); }
170 void initializeFrom(InputRecord &ir, int priority) override;
172 void initializeFinish() override;
173 void giveInputRecord(DynamicInputRecord &input) override;
174 void printYourself() override;
175 int checkConsistency() override;
176 bool isDofTypeCompatible(dofType type) const override { return ( type == DT_master || type == DT_simpleSlave || type == DT_active ); }
177 virtual int giveQcNodeType() { return 0; }
178
179 void saveContext(DataStream &stream, ContextMode mode) override;
180 void restoreContext(DataStream &stream, ContextMode mode) override;
181
182#ifdef __OOFEG
183 void drawYourself(oofegGraphicContext &gc, TimeStep *tStep) override;
184#endif
185};
186} // end namespace oofem
187#endif // node_h
bool hasSlaveDofs
Flag indicating whether receiver has slave DOFs.
Definition dofmanager.h:115
DofManager(int n, Domain *aDomain)
Definition dofmanager.C:71
FloatArray coordinates
Array storing nodal coordinates.
Definition dofmanager.h:103
bool isDofTypeCompatible(dofType type) const override
Returns true if dof of given type is allowed to be associated to receiver.
Definition node.h:176
Node(int n, Domain *aDomain)
Definition node.C:73
void setCoordinates(FloatArray coords)
Definition node.h:117
const char * giveInputRecordName() const override
Definition node.h:168
FloatMatrix * giveLocalCoordinateTriplet()
Definition node.h:149
virtual int giveQcNodeType()
Definition node.h:177
bool hasLocalCS()
Returns nonzero if node has prescribed local coordinate system.
Definition node.h:141
void initializeFrom(InputRecord &ir) override
Definition node.h:169
static ParamKey IPK_Node_coords
Definition node.h:103
const char * giveClassName() const override
Definition node.h:167
static ParamKey IPK_Node_lcs
Definition node.h:102
std::unique_ptr< FloatMatrix > localCoordinateSystem
Definition node.h:100
bool requiresTransformation() override
Definition node.h:154
long ContextMode
Definition contextmode.h:43
dofType
Dof Type, determines the type of DOF created.
Definition doftype.h:48
#define _IFT_Node_Name
Definition node.h:52
oofem::oofegGraphicContext gc[OOFEG_LAST_LAYER]
#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