XC Open source finite element analysis program
FieldInfo.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 // XC is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by
9 // the Free Software Foundation, either version 3 of the License, or
10 // (at your option) any later version.
11 //
12 // This software is distributed in the hope that it will be useful, but
13 // WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
16 //
17 //
18 // You should have received a copy of the GNU General Public License
19 // along with this program.
20 // If not, see <http://www.gnu.org/licenses/>.
21 //----------------------------------------------------------------------------
22 //FieldInfo.h
23 
24 #ifndef FIELDINFO_H
25 #define FIELDINFO_H
26 
27 #include "xc_utils/src/nucleo/EntConNmb.h"
28 #include "xc_basic/src/matrices/m_string.h"
29 #include <boost/python/list.hpp>
30 
31 namespace XC {
32 class Set;
33 
35 //
37 //
39 class FieldInfo: public EntConNmb
40  {
41  protected:
42  std::string nmb_set;
43  bool on_nodes;
45  std::vector<std::string> componentNames;
46  std::vector<std::string> componentDescriptions;
47  std::vector<std::string> componentUnits;
48  std::string componentsProperty;
49  std::string componentsType;
52  double time;
53 
54  public:
55  FieldInfo(const std::string &);
56 
57  inline bool isDefinedOnNodes(void) const
58  { return on_nodes; }
59  inline void definedOnNodes(void)
60  { on_nodes= true; }
61  inline bool isDefinedOnElements(void) const
62  { return !isDefinedOnNodes(); }
63  inline void definedOnElements(void)
64  { on_nodes= false; }
65  inline bool isDefinedOnGaussPoints(void) const
66  { return on_gauss_points; }
67  void definedOnGaussPoints(void);
68  void setSetName(const std::string &nmb)
69  { nmb_set= nmb; }
70  inline const std::string &getSetName(void) const
71  { return nmb_set; }
72  inline size_t getNumberOfComponents(void) const
73  { return componentNames.size(); }
74  inline void setComponentsType(const std::string &s)
75  { componentsType= s; }
76  inline const std::string &getComponentsType(void) const
77  { return componentsType; }
78  void setComponentNames(const boost::python::list &);
79  inline const std::vector<std::string> &getComponentNames(void) const
80  { return componentNames; }
81  void setComponentDescriptions(const boost::python::list &);
82  inline const std::vector<std::string> &getComponentDescriptions(void) const
83  { return componentDescriptions; }
84  void setComponentUnits(const boost::python::list &);
85  inline const std::vector<std::string> &getComponentUnits(void) const
86  { return componentUnits; }
87  inline void setComponentsProperty(const std::string &s)
88  { componentsProperty= s; }
89  const std::string &getComponentsProperty(void) const;
90  inline void setIterationNumber(const int &in)
91  { iterationNumber= in; }
92  inline const int &getIterationNumber(void) const
93  { return iterationNumber; }
94  inline void setOrderNumber(const int &on)
95  { orderNumber= on; }
96  inline const int &getOrderNumber(void) const
97  { return orderNumber; }
98  inline void setTime(const double &t)
99  { time= t; }
100  inline const double &getTime(void) const
101  { return time; }
102  };
103 } // end of XC namespace
104 #endif
std::string componentsProperty
Propiedad mediante la cual se obtienen los valores de las componentes.
Definition: FieldInfo.h:48
Information about a field defined over a set.
Definition: FieldInfo.h:39
std::vector< std::string > componentDescriptions
Field components description.
Definition: FieldInfo.h:46
std::vector< std::string > componentNames
Name of the field components.
Definition: FieldInfo.h:45
void setComponentUnits(const boost::python::list &)
Assigns field component units.
Definition: FieldInfo.cc:56
bool in(const NodePtrSet &, const std::vector< const Node * > &)
Returns true if the node pointers in nodes_edget are in the set being passed as parameter.
Definition: NodeTopology.cc:96
FieldInfo(const std::string &)
Constructor.
Definition: FieldInfo.cc:29
void setComponentDescriptions(const boost::python::list &)
Assigns field component descriptions.
Definition: FieldInfo.cc:48
int iterationNumber
Number of the iteration in which this values were obtained.
Definition: FieldInfo.h:50
std::string componentsType
Component data type ("int", "double", "string",...)
Definition: FieldInfo.h:49
bool on_nodes
True if defined over the nodes of the set.
Definition: FieldInfo.h:43
bool on_gauss_points
Verdadero si se define sobre puntos de Gauss of the elements.
Definition: FieldInfo.h:44
void setComponentNames(const boost::python::list &)
Assigns field component names.
Definition: FieldInfo.cc:40
std::vector< std::string > componentUnits
Units for each component.
Definition: FieldInfo.h:47
std::string nmb_set
name of the set.
Definition: FieldInfo.h:42
================================================================================
Definition: ContinuaReprComponent.h:34
double time
Time.
Definition: FieldInfo.h:52
int orderNumber
Order number.
Definition: FieldInfo.h:51