X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FINTERPOLATION%2FMEDMEM_InterpolationHighLevelObjects.hxx;h=b816efe928cc8667db85de84717d853c0de47f01;hb=153861724418e21fd2707b2dfb4bea760533928b;hp=6a50ea4fc2932139d38bbda63e28940ebab58193;hpb=b7d5c783f2d85cda6d4f781e2135608053bc9930;p=modules%2Fmed.git diff --git a/src/INTERPOLATION/MEDMEM_InterpolationHighLevelObjects.hxx b/src/INTERPOLATION/MEDMEM_InterpolationHighLevelObjects.hxx index 6a50ea4fc..b816efe92 100644 --- a/src/INTERPOLATION/MEDMEM_InterpolationHighLevelObjects.hxx +++ b/src/INTERPOLATION/MEDMEM_InterpolationHighLevelObjects.hxx @@ -11,6 +11,8 @@ #include "MEDMEM_WrapperField.hxx" #include "MEDMEM_InterpolationTools.hxx" +#define _CALCUL_HYBRIDE_ Calcul_Hybride,Wrapper_Nuage_Noeud,Wrapper_Noeud,Meta_Nuage_Maille> + ////////////////////////////////////////////////////////////////// /// /// /// DECLARATIONS /// @@ -53,7 +55,7 @@ class Meta_Nuage_Maille : public Wrapper_Nuage_Maille protected : Wrapper_Med_Connectivity * connectivite_med; public : - Meta_Nuage_Maille(CONNECTIVITY * connmed); + Meta_Nuage_Maille(MEDMEM::CONNECTIVITY * connmed); Meta_Nuage_Maille():connectivite_med(NULL) {} ~Meta_Nuage_Maille() {if (connectivite_med) delete connectivite_med;} }; @@ -106,20 +108,20 @@ public : Meta_Wrapper():noeuds(NULL),mailles(NULL),maillage(NULL),champ(NULL){} ~Meta_Wrapper(); inline void Construit_Wrapper_Nuage_Noeud ( int nn, double * nodes ); - inline void Construit_Wrapper_Nuage_Maille ( CONNECTIVITY * connmed ); + inline void Construit_Wrapper_Nuage_Maille ( MEDMEM::CONNECTIVITY * connmed ); inline void Construit_Wrapper_Maillage ( void ); - inline void Construit_Wrapper_Champ ( const FIELD * medfield ); - Meta_Wrapper(int nn,double *nodes,CONNECTIVITY *connmed, int flag_maillage=1); + inline void Construit_Wrapper_Champ ( const MEDMEM::FIELD * medfield ); + Meta_Wrapper(int nn,double *nodes,MEDMEM::CONNECTIVITY *connmed, int flag_maillage=1); Meta_Wrapper(int nn,double *nodes); // defaultly, the connectivity (neighbouhood and so like) is built, // Set flag_mesh to 0 if you don't want these informations to be built - Meta_Wrapper(int nn,double *nodes,CONNECTIVITY *connmed, const FIELD * c,int flag_mesh=1); + Meta_Wrapper(int nn,double *nodes,MEDMEM::CONNECTIVITY *connmed, const MEDMEM::FIELD * c,int flag_mesh=1); // fonctions d'acces sures inline Wrapper_Nuage_Noeud * Get_Nuage_Noeuds ( void ); inline Meta_Nuage_Maille * Get_Nuage_Mailles ( void ); inline Meta_Maillage * Get_Maillage ( void ); inline Wrapper_MED_Field * Get_Champ ( void ); - inline void Change_Champ ( const FIELD * medfield ); + inline void Change_Champ ( const MEDMEM::FIELD * medfield ); }; /*********************************************************/ @@ -157,20 +159,20 @@ public : Meta_Nuage_Maille * nm = MW->Get_Nuage_Mailles(); Wrapper_MED_Field * c = MW->Get_Champ(); - mailles=nm; + _CALCUL_HYBRIDE_::mailles=nm; - fonctions[MED_TRIA3 ]=new Calcul_Interpolation_Tria3 ,Wrapper_Nuage_Noeud,Wrapper_Noeud,Meta_Nuage_Maille>(nn,nm,c); - fonctions[MED_QUAD4 ]=new Calcul_Interpolation_Quad4 ,Wrapper_Nuage_Noeud,Wrapper_Noeud,Meta_Nuage_Maille>(nn,nm,c); - fonctions[MED_TETRA4 ]=new Calcul_Interpolation_Tetra4 ,Wrapper_Nuage_Noeud,Wrapper_Noeud,Meta_Nuage_Maille>(nn,nm,c); - fonctions[MED_HEXA8 ]=new Calcul_Interpolation_Hexa8 ,Wrapper_Nuage_Noeud,Wrapper_Noeud,Meta_Nuage_Maille>(nn,nm,c); - fonctions[MED_PENTA6 ]=new Calcul_Interpolation_Penta6 ,Wrapper_Nuage_Noeud,Wrapper_Noeud,Meta_Nuage_Maille>(nn,nm,c); - fonctions[MED_PYRA5 ]=new Calcul_Interpolation_Pyra5 ,Wrapper_Nuage_Noeud,Wrapper_Noeud,Meta_Nuage_Maille>(nn,nm,c); - fonctions[MED_TRIA6 ]=fonctions[MED_TRIA3 ]; - fonctions[MED_QUAD8 ]=fonctions[MED_QUAD4 ]; - fonctions[MED_TETRA10]=fonctions[MED_TETRA4 ]; - fonctions[MED_HEXA20 ]=fonctions[MED_HEXA8 ]; - fonctions[MED_PENTA15]=fonctions[MED_PENTA6 ]; - fonctions[MED_PYRA13 ]=fonctions[MED_PYRA5 ]; + _CALCUL_HYBRIDE_::fonctions[ MED_EN::MED_TRIA3 ]=new Calcul_Interpolation_Tria3 ,Wrapper_Nuage_Noeud,Wrapper_Noeud,Meta_Nuage_Maille>(nn,nm,c); + _CALCUL_HYBRIDE_::fonctions[ MED_EN::MED_QUAD4 ]=new Calcul_Interpolation_Quad4 ,Wrapper_Nuage_Noeud,Wrapper_Noeud,Meta_Nuage_Maille>(nn,nm,c); + _CALCUL_HYBRIDE_::fonctions[ MED_EN::MED_TETRA4 ]=new Calcul_Interpolation_Tetra4 ,Wrapper_Nuage_Noeud,Wrapper_Noeud,Meta_Nuage_Maille>(nn,nm,c); + _CALCUL_HYBRIDE_::fonctions[ MED_EN::MED_HEXA8 ]=new Calcul_Interpolation_Hexa8 ,Wrapper_Nuage_Noeud,Wrapper_Noeud,Meta_Nuage_Maille>(nn,nm,c); + _CALCUL_HYBRIDE_::fonctions[ MED_EN::MED_PENTA6 ]=new Calcul_Interpolation_Penta6 ,Wrapper_Nuage_Noeud,Wrapper_Noeud,Meta_Nuage_Maille>(nn,nm,c); + _CALCUL_HYBRIDE_::fonctions[ MED_EN::MED_PYRA5 ]=new Calcul_Interpolation_Pyra5 ,Wrapper_Nuage_Noeud,Wrapper_Noeud,Meta_Nuage_Maille>(nn,nm,c); + _CALCUL_HYBRIDE_::fonctions[ MED_EN::MED_TRIA6 ]=_CALCUL_HYBRIDE_::fonctions[ MED_EN::MED_TRIA3 ]; + _CALCUL_HYBRIDE_::fonctions[ MED_EN::MED_QUAD8 ]=_CALCUL_HYBRIDE_::fonctions[ MED_EN::MED_QUAD4 ]; + _CALCUL_HYBRIDE_::fonctions[ MED_EN::MED_TETRA10]=_CALCUL_HYBRIDE_::fonctions[ MED_EN::MED_TETRA4 ]; + _CALCUL_HYBRIDE_::fonctions[ MED_EN::MED_HEXA20 ]=_CALCUL_HYBRIDE_::fonctions[ MED_EN::MED_HEXA8 ]; + _CALCUL_HYBRIDE_::fonctions[ MED_EN::MED_PENTA15]=_CALCUL_HYBRIDE_::fonctions[ MED_EN::MED_PENTA6 ]; + _CALCUL_HYBRIDE_::fonctions[ MED_EN::MED_PYRA13 ]=_CALCUL_HYBRIDE_::fonctions[ MED_EN::MED_PYRA5 ]; } Valeur operator() (Wrapper_Noeud & node, int num_maille){return Calcul_Hybride,Wrapper_Nuage_Noeud,Wrapper_Noeud,Meta_Nuage_Maille>::operator()(node,num_maille);} Valeur operator() (double * node, int num_maille) @@ -305,7 +307,7 @@ template inline int Meta_dTree::trouve_plus_proche_po /* */ /*********************************************************/ -inline Meta_Nuage_Maille::Meta_Nuage_Maille(CONNECTIVITY * conmed):Wrapper_Nuage_Maille(connectivite_med=new Wrapper_Med_Connectivity(conmed)) +inline Meta_Nuage_Maille::Meta_Nuage_Maille(MEDMEM::CONNECTIVITY * conmed):Wrapper_Nuage_Maille(connectivite_med=new Wrapper_Med_Connectivity(conmed)) { } @@ -347,7 +349,7 @@ template inline void Meta_Wrapper::Construit_Wrapper exit(-1); } } -template inline void Meta_Wrapper::Construit_Wrapper_Nuage_Maille ( CONNECTIVITY * connmed ) +template inline void Meta_Wrapper::Construit_Wrapper_Nuage_Maille ( MEDMEM::CONNECTIVITY * connmed ) { if (connmed) mailles=new Meta_Nuage_Maille(connmed); else @@ -370,7 +372,7 @@ template inline void Meta_Wrapper::Construit_Wrapper } maillage=new Meta_Maillage(mailles,noeuds->SIZE()); } -template inline void Meta_Wrapper::Construit_Wrapper_Champ ( const FIELD * medfield ) +template inline void Meta_Wrapper::Construit_Wrapper_Champ ( const MEDMEM::FIELD * medfield ) { if (medfield) champ=new Wrapper_MED_Field(medfield); else @@ -379,7 +381,7 @@ template inline void Meta_Wrapper::Construit_Wrapper exit(-1); } } -template inline void Meta_Wrapper::Change_Champ ( const FIELD * medfield ) +template inline void Meta_Wrapper::Change_Champ ( const MEDMEM::FIELD * medfield ) { if (medfield) { @@ -392,14 +394,14 @@ template inline void Meta_Wrapper::Change_Champ exit(-1); } } -template Meta_Wrapper::Meta_Wrapper(int nn,double *nodes,CONNECTIVITY *connmed, int flag_maillage) +template Meta_Wrapper::Meta_Wrapper(int nn,double *nodes,MEDMEM::CONNECTIVITY *connmed, int flag_maillage) { init(); Construit_Wrapper_Nuage_Noeud(nn,nodes); Construit_Wrapper_Nuage_Maille(connmed); if (flag_maillage) Construit_Wrapper_Maillage(); } -template Meta_Wrapper::Meta_Wrapper(int nn,double *nodes,CONNECTIVITY *connmed, const FIELD * c,int flag_maillage) +template Meta_Wrapper::Meta_Wrapper(int nn,double *nodes,MEDMEM::CONNECTIVITY *connmed, const MEDMEM::FIELD * c,int flag_maillage) { init(); Construit_Wrapper_Nuage_Noeud(nn,nodes);