xc
SetBase.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 //SetBase.h
28 
29 #ifndef SETBASE_H
30 #define SETBASE_H
31 
35 
36 #include "preprocessor/EntMdlrBase.h"
37 #include "preprocessor/MeshingParams.h"
38 #include "utility/matrix/Vector.h"
39 
40 namespace XC {
41 class SFreedom_Constraint;
42 class Face;
43 class Body;
44 class UniformGrid;
45 
49 class SetBase: public EntMdlrBase
50  {
51  Vector color;
52  public:
53  SetBase(const std::string &nmb="",Preprocessor *preprocessor= nullptr);
54  inline virtual ~SetBase(void)
55  {}
56  void setColorComponents(const double &, const double &, const double &);
57  void setColor(const Vector &);
58  const Vector &getColor(void) const;
59  virtual void genMesh(meshing_dir dm);
60  virtual void fix(const SFreedom_Constraint &);
61 
62  virtual std::set<int> getNodeTags(void) const= 0;
63  virtual std::set<int> getElementTags(void) const= 0;
64  const ID &getIdNodeTags(void) const;
65  const ID &getIdElementTags(void) const;
66 
67 
68  virtual bool In(const Node *) const= 0;
69  virtual bool In(const Element *) const= 0;
70  virtual bool In(const Pnt *) const;
71  virtual bool In(const Edge *) const;
72  virtual bool In(const Face *) const;
73  virtual bool In(const Body *) const;
74  virtual bool In(const UniformGrid *) const;
75 
76  void resetTributaries(void) const;
77  void computeTributaryLengths(bool initialGeometry= true) const;
78  void computeTributaryAreas(bool initialGeometry= true) const;
79  void computeTributaryVolumes(bool initialGeometry= true) const;
80 
81  virtual size_t getNumberOfNodes(void) const= 0;
82  virtual size_t getNumberOfElements(void) const= 0;
83  };
84 
85 } //end of XC namespace
86 #endif
Float vector abstraction.
Definition: Vector.h:93
void computeTributaryVolumes(bool initialGeometry=true) const
Computes the tributary volumes that correspond to each node of the element set.
Definition: SetBase.cc:208
Base class for one-dimensional geometry objects.
Definition: Edge.h:46
Finite element model generation tools.
Definition: Preprocessor.h:58
Base class of the preprocessor objects.
Definition: EntMdlrBase.h:45
void setColor(const Vector &)
Set the color of the object [red,green,blue] as integers from 0 to 255.
Definition: SetBase.cc:53
Vector of integers.
Definition: ID.h:93
const ID & getIdElementTags(void) const
Returns the tags of the elements en un vector de enteros.
Definition: SetBase.cc:99
Base de las clases Set y SetEstruct.
Definition: SetBase.h:49
Base class for the finite elements.
Definition: Element.h:109
Uniform mesh.
Definition: UniformGrid.h:40
const Vector & getColor(void) const
Return the color of the object [red,green,blue] as integers from 0 to 255.
Definition: SetBase.cc:65
void computeTributaryAreas(bool initialGeometry=true) const
Computes the tributary areas that correspond to each node of the element set.
Definition: SetBase.cc:184
SetBase(const std::string &nmb="", Preprocessor *preprocessor=nullptr)
Constructor.
Definition: SetBase.cc:42
Single freedom constraint.
Definition: SFreedom_Constraint.h:84
void resetTributaries(void) const
Reset tributary areas (or lengths, or volumes) for the nodes that are connected to the set elements...
Definition: SetBase.cc:136
void computeTributaryLengths(bool initialGeometry=true) const
Computes the tributary lengths that correspond to each node of the element set.
Definition: SetBase.cc:160
Point (KPoint).
Definition: Pnt.h:49
void setColorComponents(const double &, const double &, const double &)
Set the color of the object (red,green,blue) as integers from 0 to 255.
Definition: SetBase.cc:48
const ID & getIdNodeTags(void) const
Returns the tags of the nodes en un vector de enteros.
Definition: SetBase.cc:83
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:34
virtual void genMesh(meshing_dir dm)
Generates a finite element mesh from the set components.
Definition: SetBase.cc:69
Six-faced solid.
Definition: Body.h:64
Mesh node.
Definition: Node.h:110
virtual void fix(const SFreedom_Constraint &)
Impone desplazamiento nulo for all the nodes of this set.
Definition: SetBase.cc:76
Surface.
Definition: Face.h:41