00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __MESHCUT_UTILS_HXX__
00021 #define __MESHCUT_UTILS_HXX__
00022
00023 extern "C"
00024 {
00025 #include <med.h>
00026 }
00027
00028 #include <string>
00029 #include <vector>
00030 #include <map>
00031
00032 namespace MESHCUT
00033 {
00034
00035 enum TYPE_MAILLE
00036 {
00037 POI1, SEG2, SEG3, TRIA3, TRIA6, QUAD4, QUAD8, TETRA4, TETRA10, PYRAM5, PYRAM13, PENTA6, PENTA15, HEXA8, HEXA20
00038 };
00039
00040 bool estUnTypeMaille(std::string S);
00041 void ERREUR(const char* msg);
00042 char* string2char(std::string str);
00043 std::string int2string(int k);
00044 float char2float(const char* ch);
00045 std::string float2string(float f);
00046 bool appartient(std::string e, std::string tableau[], int taille);
00047 float arrondi(float x);
00048 int numNoeudPointe(std::string b1, std::string b2, std::string b3);
00049 std::string strip(std::string S);
00050 std::string entierSur10_g(int i);
00051 std::string entierSur10_d(int i);
00052 std::string typeEnsight(std::string type);
00053 int Nnoeuds(TYPE_MAILLE type);
00054 int NnoeudsGeom(TYPE_MAILLE type);
00055 int codeGMSH(std::string type);
00056 std::string floatEnsight(float x);
00057 bool typeComplexe(std::string type);
00058 std::string ASTER8(std::string s);
00059 float dObservateur(float a, float b, float c);
00060
00061 int copieFichier(std::string source, std::string cible);
00062 med_geometry_type InstanceMGE(TYPE_MAILLE TYPE);
00063 int chrono();
00064 TYPE_MAILLE typeMaille(std::string type);
00065 std::string MGE2string(med_geometry_type MGE);
00066 std::string TM2string(TYPE_MAILLE MGE);
00067 TYPE_MAILLE string2TM(std::string stm);
00068 std::string coordIndex_ILS(TYPE_MAILLE tm);
00069 std::string coordIndex_IFS(TYPE_MAILLE tm);
00070 std::string SIGNE(double x);
00071 void champType(std::string type, med_entity_type MEM, med_geometry_type MGE, med_idt fid, med_idt fidout,
00072 char *maa, char *nomChamp, char *nomChampMoy, med_field_type typeChamp, char *compChamp,
00073 char *unitChamp, med_int nCompChamp, std::map<std::string, int> REFGAUSS, int ichamp);
00074 std::string nomMaille(TYPE_MAILLE tm, int nl);
00075 bool appartientVN(int n, std::vector<int> V);
00076 float distance2(float x1, float y1, float z1, float x2, float y2, float z2);
00077 void conversionCNX(int *CNXtm, TYPE_MAILLE tm, int N);
00078
00079 }
00080
00081 #endif