XC Open source finite element analysis program
NodeLoader.h
1 //----------------------------------------------------------------------------
2 // XC program; finite element analysis code
3 // for structural analysis and design.
4 //
5 // Copyright (C) Luis Claudio Pérez Tato
6 //
7 // This program derives from OpenSees <http://opensees.berkeley.edu>
8 // developed by the «Pacific earthquake engineering research center».
9 //
10 // Except for the restrictions that may arise from the copyright
11 // of the original program (see copyright_opensees.txt)
12 // XC is free software: you can redistribute it and/or modify
13 // it under the terms of the GNU General Public License as published by
14 // the Free Software Foundation, either version 3 of the License, or
15 // (at your option) any later version.
16 //
17 // This software is distributed in the hope that it will be useful, but
18 // WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 // GNU General Public License for more details.
21 //
22 //
23 // You should have received a copy of the GNU General Public License
24 // along with this program.
25 // If not, see <http://www.gnu.org/licenses/>.
26 //----------------------------------------------------------------------------
27 //NodeLoader.h
28 
29 #ifndef NODELOADER_H
30 #define NODELOADER_H
31 
32 #include "Loader.h"
33 #include "xc_utils/src/geom/pos_vec/Pos3d.h"
34 
35 namespace XC {
36 
37 class Node;
38 
42 class NodeLoader: public Loader
43  {
44  private:
45  size_t ngdl_def_node;
46  size_t ncoo_def_node;
47  Node *seed_node;
48  void libera(void);
49  Node *new_node(const int &tag,const size_t &dim,const int &ngdl,const double &x,const double &y=0.0,const double &z=0.0);
50  public:
52  virtual ~NodeLoader(void);
53  const Node *get_seed_node(void) const
54  { return seed_node; }
55  Node *newNode(const double &x,const double &y,const double &z);
56  Node *newNode(const double &x,const double &y);
57  Node *newNode(const double &x);
58  Node *newNode(const Pos3d &p);
59  Node *newNode(const Pos2d &p);
60  Node *newNode(const Vector &);
61  Node *newSeedNode(void);
62  Node *newNodeIDXYZ(const int &,const double &,const double &,const double &);
63  Node *newNodeIDXY(const int &,const double &,const double &);
64  Node *newNodeIDV(const int &,const Vector &);
65  Node *duplicateNode(const int &);
66 
67  size_t getDimEspacio(void) const
68  { return ncoo_def_node; }
69  void setDimEspacio(const size_t &dim)
70  { ncoo_def_node= dim; }
71  void setNumGdls(const size_t &ngdl)
72  { ngdl_def_node= ngdl; }
73  size_t getNumGdls(void) const
74  { return ngdl_def_node; }
75  Node *getNode(const int &tag);
76  int getDefaultTag(void) const;
77  void setDefaultTag(const int &tag);
78  void clearAll(void);
79 
80  void calculateNodalReactions(bool inclInertia);
81 
82  };
83 
84 } // end of XC namespace
85 
86 #endif
Node * newSeedNode(void)
Defines the seed node.
Definition: NodeLoader.cc:188
Node * newNodeIDXYZ(const int &, const double &, const double &, const double &)
Create a node whose ID=tag from global coordinates (x,y,z).
Definition: NodeLoader.cc:202
Definition: Vector.h:82
int getDefaultTag(void) const
Return the default value for next node.
Definition: NodeLoader.cc:56
Mesh node.
Definition: Node.h:99
void setDefaultTag(const int &tag)
Set the default value for next node.
Definition: NodeLoader.cc:60
Finite element model generation tools.
Definition: Preprocessor.h:58
Node * getNode(const int &tag)
Get the node whose ID is passed as parameter.
Definition: NodeLoader.cc:217
virtual ~NodeLoader(void)
Destructor.
Definition: NodeLoader.cc:52
Base class for the preprocessor objects that create model entities: nodes, elements, loads, etc.
Definition: Loader.h:50
Node creation manager.
Definition: NodeLoader.h:42
void clearAll(void)
Clear all nodes.
Definition: NodeLoader.cc:64
================================================================================
Definition: ContinuaReprComponent.h:34
void calculateNodalReactions(bool inclInertia)
Calculate nodal reaction forces and moments.
Definition: NodeLoader.cc:222
Node * duplicateNode(const int &)
Create a duplicate copy of node whose tag is passed as parameter.
Definition: NodeLoader.cc:89