Version: 8.3.0
MeshCut_Utils.hxx
Go to the documentation of this file.
1 // Copyright (C) 2006-2016 EDF R&D
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19 
20 #ifndef __MESHCUT_UTILS_HXX__
21 #define __MESHCUT_UTILS_HXX__
22 
23 #include <med.h>
24 
25 #include <string>
26 #include <vector>
27 #include <map>
28 
29 namespace MESHCUT
30  {
31 
33  {
35  };
36 
37  bool estUnTypeMaille(std::string S);
38  void ERREUR(const char* msg);
39  char* string2char(std::string str);
40  std::string int2string(int k);
41  float char2float(const char* ch);
42  std::string float2string(float f);
43  bool appartient(std::string e, std::string tableau[], int taille);
44  float arrondi(float x);
45  int numNoeudPointe(std::string b1, std::string b2, std::string b3);
46  std::string strip(std::string S);
47  std::string entierSur10_g(int i);
48  std::string entierSur10_d(int i);
49  std::string typeEnsight(std::string type);
50  int Nnoeuds(TYPE_MAILLE type);
51  int NnoeudsGeom(TYPE_MAILLE type);
52  int codeGMSH(std::string type);
53  std::string floatEnsight(float x);
54  bool typeComplexe(std::string type);
55  std::string ASTER8(std::string s);
56  float dObservateur(float a, float b, float c);
57 
58  int copieFichier(std::string source, std::string cible);
59  med_geometry_type InstanceMGE(TYPE_MAILLE TYPE);
60  int salome_chrono();
61  TYPE_MAILLE typeMaille(std::string type);
62  std::string MGE2string(med_geometry_type MGE);
63  std::string TM2string(TYPE_MAILLE MGE);
64  TYPE_MAILLE string2TM(std::string stm);
65  std::string coordIndex_ILS(TYPE_MAILLE tm);
66  std::string coordIndex_IFS(TYPE_MAILLE tm);
67  std::string SIGNE(double x);
68  void champType(std::string type, med_entity_type MEM, med_geometry_type MGE, med_idt fid, med_idt fidout,
69  char *maa, char *nomChamp, char *nomChampMoy, med_field_type typeChamp, char *compChamp,
70  char *unitChamp, med_int nCompChamp, std::map<std::string, int> REFGAUSS, int ichamp);
71  std::string nomMaille(TYPE_MAILLE tm, int nl);
72  bool appartientVN(int n, std::vector<int> V);
73  float distance2(float x1, float y1, float z1, float x2, float y2, float z2);
74  void conversionCNX(int *CNXtm, TYPE_MAILLE tm, int N);
75 
76  }
77 
78 #endif