XC Open source finite element analysis program
MEDMapIndices.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 //MEDMapIndices.h
23 //Envoltorio para el objeto MESHING de MED (para exportar archivos a «salome»).
24 
25 #ifndef MEDMAPINDICES_H
26 #define MEDMAPINDICES_H
27 
28 #include <map>
29 #include <vector>
30 #include <iostream>
31 
32 namespace XC {
34 //
37  {
38  std::map<int,int> indices;
39  typedef std::map<int,int>::const_iterator const_iterator;
40  typedef std::map<int,int>::iterator iterator;
41 
42  public:
43  void new_tag(size_t i);
44 
45  int getMEDIndice(const size_t &i) const;
46  std::vector<int> getMEDIndices(const std::vector<int> &) const;
47 
48  void clear(void);
49 
50  void print(std::ostream &os) const;
51  };
52 
53  std::ostream &operator<<(std::ostream &,const MEDMapIndices &);
54 } // end of XC namespace
55 #endif
std::vector< int > getMEDIndices(const std::vector< int > &) const
Returns the indexes that correspond to those being passed as parameter.
Definition: MEDMapIndices.cc:54
Map between the indexes in XC and in MEDMEM.
Definition: MEDMapIndices.h:36
int getMEDIndice(const size_t &i) const
Returns the index that corresponds to the argument.
Definition: MEDMapIndices.cc:38
void print(std::ostream &os) const
Prints indexes map.
Definition: MEDMapIndices.cc:64
================================================================================
Definition: ContinuaReprComponent.h:34
void clear(void)
Erases los indices.
Definition: MEDMapIndices.cc:28