xc
NodeHandler.h
1 // -*-c++-*-
2 //----------------------------------------------------------------------------
3 // XC program; finite element analysis code
4 // for structural analysis and design.
5 //
6 // Copyright (C) Luis C. Pérez Tato
7 //
8 // This program derives from OpenSees <http://opensees.berkeley.edu>
9 // developed by the «Pacific earthquake engineering research center».
10 //
11 // Except for the restrictions that may arise from the copyright
12 // of the original program (see copyright_opensees.txt)
13 // XC is free software: you can redistribute it and/or modify
14 // it under the terms of the GNU General Public License as published by
15 // the Free Software Foundation, either version 3 of the License, or
16 // (at your option) any later version.
17 //
18 // This software is distributed in the hope that it will be useful, but
19 // WITHOUT ANY WARRANTY; without even the implied warranty of
20 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 // GNU General Public License for more details.
22 //
23 //
24 // You should have received a copy of the GNU General Public License
25 // along with this program.
26 // If not, see <http://www.gnu.org/licenses/>.
27 //----------------------------------------------------------------------------
28 //NodeHandler.h
29 
30 #ifndef NODELOADER_H
31 #define NODELOADER_H
32 
33 #include "PrepHandler.h"
34 #include "utility/geom/pos_vec/Pos3d.h"
35 
36 namespace XC {
37 
38 class Node;
39 
43 class NodeHandler: public PrepHandler
44  {
45  private:
46  Node *seed_node;
47  void freeSeedNode(void);
48  void node_setup(Node *);
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(const size_t &dim= 2, const size_t ndof= 3);
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 getSpaceDim(void) const;
68  void setSpaceDim(const size_t &);
69  void setNumDOFs(const size_t &);
70  size_t getNumDOFs(void) const;
71  Node *getNode(const int &tag);
72  int getDefaultTag(void) const;
73  void setDefaultTag(const int &tag);
74  void clearAll(void);
75 
76  int calculateNodalReactions(bool inclInertia, const double &tol);
77 
78  };
79 
80 } // end of XC namespace
81 
82 #endif
Node * duplicateNode(const int &)
Create a duplicate copy of the node whose tag is passed as parameter.
Definition: NodeHandler.cc:136
Float vector abstraction.
Definition: Vector.h:94
virtual ~NodeHandler(void)
Destructor.
Definition: NodeHandler.cc:79
int calculateNodalReactions(bool inclInertia, const double &tol)
Calculate nodal reaction forces and moments.
Definition: NodeHandler.cc:293
Node creation manager.
Definition: NodeHandler.h:43
Finite element model generation tools.
Definition: Preprocessor.h:59
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:272
Posición en dos dimensiones.
Definition: Pos2d.h:41
void clearAll(void)
Clear all nodes.
Definition: NodeHandler.cc:91
Node * newSeedNode(const size_t &dim=2, const size_t ndof=3)
Defines the seed node.
Definition: NodeHandler.cc:55
Base class for the preprocessor objects that create model entities: nodes, elements, loads, etc.
Definition: PrepHandler.h:47
void setDefaultTag(const int &tag)
Set the default value for next node.
Definition: NodeHandler.cc:87
int getDefaultTag(void) const
Return the default value for next node.
Definition: NodeHandler.cc:83
Node * getNode(const int &tag)
Get the node whose ID is passed as parameter.
Definition: NodeHandler.cc:287
Posición en tres dimensiones.
Definition: Pos3d.h:44
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
Mesh node.
Definition: Node.h:111
Node * newNode(const double &x, const double &y, const double &z)
Creates a new node with the coordinate arguments.
Definition: NodeHandler.cc:166