XC Open source finite element analysis program
MEDVertexInfo.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 //MEDVertexInfo.h
23 //Envoltorio para el objeto MESHING de MED (para exportar archivos a «salome»).
24 
25 #ifndef MEDVERTEXINFO_H
26 #define MEDVERTEXINFO_H
27 
28 #include "MEDBaseInfo.h"
29 #include "xc_basic/src/med_xc/MEDMEM_Meshing.hxx"
30 
31 namespace XC {
32 
33 class Mesh;
35 //
38  {
39  std::vector<double> coordenadas;
40  size_t spaceDimension;
41  std::string tipoCoordenadas;
42  std::vector<std::string> nombresCoordenadas;
43  std::vector<std::string> nombresUnidades;
44 
45  protected:
46  void new_vertice(size_t i,const std::vector<double> &coo);
47 
48  public:
49  MEDVertexInfo(void);
50  MEDVertexInfo(const Mesh &);
51 
53  inline size_t getNumVertices(void) const
54  { return coordenadas.size()/spaceDimension; }
55  const std::vector<double> &getCoordenadas(void) const;
56  inline size_t getSpaceDimension(void) const
57  { return spaceDimension; }
58  inline void setSpaceDimension(const size_t &sz)
59  { spaceDimension= sz; }
60  inline const std::string &getTipoCoordenadas(void) const
61  { return tipoCoordenadas; }
62  inline void setTipoCoordenadas(const std::string &str)
63  { tipoCoordenadas= str; }
64  inline const std::vector<std::string> &getCoordinateNames(void) const
65  { return nombresCoordenadas; }
66  void setCoordinateNames(const boost::python::list &);
67  inline const std::vector<std::string> &getUnitNames(void) const
68  { return nombresUnidades; }
69  void setUnitNames(const boost::python::list &);
70  void newVertex(const size_t &i,const boost::python::list &);
71 
72  void to_med(MEDMEM::MESHING &mesh) const;
73  void clear(void);
74 
75  };
76 } // end of XC namespace
77 #endif
void to_med(MEDMEM::MESHING &mesh) const
Dumps cells definition on MED mesh.
Definition: MEDVertexInfo.cc:111
Finite element mesh.
Definition: Mesh.h:64
void newVertex(const size_t &i, const boost::python::list &)
Appends a new vertex.
Definition: MEDVertexInfo.cc:81
MEDVertexInfo(void)
Constructor.
Definition: MEDVertexInfo.cc:34
void setUnitNames(const boost::python::list &)
Assigns coordinate units.
Definition: MEDVertexInfo.cc:103
void new_vertice(size_t i, const std::vector< double > &coo)
Creates the i-th vertex.
Definition: MEDVertexInfo.cc:63
Base class for infomation objects.
Definition: MEDBaseInfo.h:37
size_t getNumVertices(void) const
Returns the number of vertices.
Definition: MEDVertexInfo.h:53
================================================================================
Definition: ContinuaReprComponent.h:34
void setCoordinateNames(const boost::python::list &)
Assigns coordinate names.
Definition: MEDVertexInfo.cc:95
Information about mesh vertex.
Definition: MEDVertexInfo.h:37
const std::vector< double > & getCoordenadas(void) const
Acceso al vector de coordenadas.
Definition: MEDVertexInfo.cc:91
void clear(void)
Deletes mesh.
Definition: MEDVertexInfo.cc:56