xc
NodeHandler.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 //NodeHandler.h
28 
29 #ifndef NODELOADER_H
30 #define NODELOADER_H
31 
32 #include "PrepHandler.h"
33 #include "xc_utils/src/geom/pos_vec/Pos3d.h"
34 
35 namespace XC {
36 
37 class Node;
38 
42 class NodeHandler: public PrepHandler
43  {
44  private:
45  size_t ndof_def_node;
46  size_t ncoo_def_node;
47  Node *seed_node;
48  void free_mem(void);
49  Node *new_node(const int &tag,const size_t &dim,const int &ndof,const double &x,const double &y=0.0,const double &z=0.0);
50  public:
52  virtual ~NodeHandler(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 setNumDOFs(const size_t &ndof)
72  { ndof_def_node= ndof; }
73  size_t getNumDOFs(void) const
74  { return ndof_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, const double &tol);
81 
82  };
83 
84 } // end of XC namespace
85 
86 #endif
Node * duplicateNode(const int &)
Create a duplicate copy of the node whose tag is passed as parameter.
Definition: NodeHandler.cc:89
Float vector abstraction.
Definition: Vector.h:93
virtual ~NodeHandler(void)
Destructor.
Definition: NodeHandler.cc:52
Node creation manager.
Definition: NodeHandler.h:42
Finite element model generation tools.
Definition: Preprocessor.h:58
Node * newNodeIDXYZ(const int &, const double &, const double &, const double &)
Create a node whose ID=tag from global coordinates (x,y,z).
Definition: NodeHandler.cc:202
Node * newSeedNode(void)
Defines the seed node.
Definition: NodeHandler.cc:188
void clearAll(void)
Clear all nodes.
Definition: NodeHandler.cc:64
Base class for the preprocessor objects that create model entities: nodes, elements, loads, etc.
Definition: PrepHandler.h:46
void setDefaultTag(const int &tag)
Set the default value for next node.
Definition: NodeHandler.cc:60
int getDefaultTag(void) const
Return the default value for next node.
Definition: NodeHandler.cc:56
void calculateNodalReactions(bool inclInertia, const double &tol)
Calculate nodal reaction forces and moments.
Definition: NodeHandler.cc:223
Node * getNode(const int &tag)
Get the node whose ID is passed as parameter.
Definition: NodeHandler.cc:217
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:34
Mesh node.
Definition: Node.h:110