OOFEM
3.0
Loading...
Searching...
No Matches
src
core
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
57
namespace
oofem
{
58
class
Dof;
59
class
NodalLoad;
60
class
TimeStep;
61
class
FloatArray;
62
class
IntArray;
63
class
ParamKey;
64
91
class
OOFEM_EXPORT
Node
:
public
DofManager
92
{
93
protected
:
100
std::unique_ptr<FloatMatrix>
localCoordinateSystem
;
101
102
static
ParamKey
IPK_Node_lcs
;
103
static
ParamKey
IPK_Node_coords
;
104
105
public
:
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
); }
149
FloatMatrix
*
giveLocalCoordinateTriplet
() {
return
localCoordinateSystem
.get(); }
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
oofem::DataStream
Definition
datastream.h:55
oofem::DofManager::hasSlaveDofs
bool hasSlaveDofs
Flag indicating whether receiver has slave DOFs.
Definition
dofmanager.h:115
oofem::DofManager::DofManager
DofManager(int n, Domain *aDomain)
Definition
dofmanager.C:71
oofem::DofManager::coordinates
FloatArray coordinates
Array storing nodal coordinates.
Definition
dofmanager.h:103
oofem::Domain
Definition
domain.h:121
oofem::DynamicInputRecord
Definition
dynamicinputrecord.h:60
oofem::FloatArray
Definition
floatarray.h:92
oofem::FloatMatrix
Definition
floatmatrix.h:87
oofem::InputRecord
Definition
inputrecord.h:98
oofem::IntArray
Definition
intarray.h:63
oofem::Load
Definition
load.h:63
oofem::Node
Definition
node.h:92
oofem::Node::isDofTypeCompatible
bool isDofTypeCompatible(dofType type) const override
Returns true if dof of given type is allowed to be associated to receiver.
Definition
node.h:176
oofem::Node::Node
Node(int n, Domain *aDomain)
Definition
node.C:73
oofem::Node::setCoordinates
void setCoordinates(FloatArray coords)
Definition
node.h:117
oofem::Node::giveInputRecordName
const char * giveInputRecordName() const override
Definition
node.h:168
oofem::Node::giveLocalCoordinateTriplet
FloatMatrix * giveLocalCoordinateTriplet()
Definition
node.h:149
oofem::Node::giveQcNodeType
virtual int giveQcNodeType()
Definition
node.h:177
oofem::Node::hasLocalCS
bool hasLocalCS()
Returns nonzero if node has prescribed local coordinate system.
Definition
node.h:141
oofem::Node::initializeFrom
void initializeFrom(InputRecord &ir) override
Definition
node.h:169
oofem::Node::IPK_Node_coords
static ParamKey IPK_Node_coords
Definition
node.h:103
oofem::Node::giveClassName
const char * giveClassName() const override
Definition
node.h:167
oofem::Node::IPK_Node_lcs
static ParamKey IPK_Node_lcs
Definition
node.h:102
oofem::Node::localCoordinateSystem
std::unique_ptr< FloatMatrix > localCoordinateSystem
Definition
node.h:100
oofem::Node::requiresTransformation
bool requiresTransformation() override
Definition
node.h:154
oofem::ParamKey
Definition
paramkey.h:51
oofem::TimeStep
Definition
timestep.h:82
oofem::oofegGraphicContext
Definition
oofeggraphiccontext.h:133
dofmanager.h
floatarray.h
floatmatrix.h
oofem
Definition
additivemanufacturingproblem.C:83
oofem::ContextMode
long ContextMode
Definition
contextmode.h:43
oofem::dofType
dofType
Dof Type, determines the type of DOF created.
Definition
doftype.h:48
oofem::CharType
CharType
Definition
chartype.h:141
_IFT_Node_Name
#define _IFT_Node_Name
Definition
node.h:52
gc
oofem::oofegGraphicContext gc[OOFEG_LAST_LAYER]
OOFEM_EXPORT
#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