]> SALOME platform Git repositories - modules/med.git/commitdiff
Salome HOME
Join modifications from branch BR_DEBUG_3_2_0b1 02Jun06
authorjfa <jfa@opencascade.com>
Fri, 2 Jun 2006 11:35:08 +0000 (11:35 +0000)
committerjfa <jfa@opencascade.com>
Fri, 2 Jun 2006 11:35:08 +0000 (11:35 +0000)
29 files changed:
Makefile.in
resources/Old_ChampsDarcy.med [new file with mode: 0755]
resources/Old_Deff_fdt_5.8_castem_efmh_diff_conc_dom.med [new file with mode: 0755]
resources/Old_Deff_fdt_5.8_castem_vf_diff_conc_dom.med [new file with mode: 0755]
resources/Old_H_CastCast_EFMH_I129_COUPLEX1.med [new file with mode: 0755]
resources/Old_H_CastCast_VF_I129_COUPLEX1.med [new file with mode: 0755]
resources/Old_H_CastCast_VF_Se79_COUPLEX1.med [new file with mode: 0755]
resources/Old_H_CastPorf_I129_COUPLEX1.med [new file with mode: 0755]
resources/Old_H_CastPorf_Se79_COUPLEX1.med [new file with mode: 0755]
resources/Old_H_PorfCast_EFMH_I129_COUPLEX1.med [new file with mode: 0755]
resources/Old_H_PorfCast_EFMH_Se79_COUPLEX1.med [new file with mode: 0755]
resources/Old_H_PorfPorf_I129_COUPLEX1.med [new file with mode: 0755]
resources/Old_H_PorfPorf_Se79_COUPLEX1.med [new file with mode: 0755]
resources/Old_H_Traces_I129_COUPLEX1.med [new file with mode: 0755]
resources/Old_H_Traces_Se79_COUPLEX1.med [new file with mode: 0755]
resources/Old_darcy2_Castem_EFMH.med [new file with mode: 0755]
resources/Old_darcy2_Castem_qua_EFMH.med [new file with mode: 0755]
resources/Old_darcy2_Castem_qua_VF.med [new file with mode: 0755]
resources/Old_darcy_1.1_res.med [new file with mode: 0755]
resources/Old_darcy_1.3_resCASTEM.med [new file with mode: 0755]
resources/Old_darcy_1.3_resPORFLOW.med [new file with mode: 0755]
resources/Old_darcy_1.3_resTRACES.med [new file with mode: 0755]
resources/Old_maillage_chemvalIV_cas1_40elts.med [new file with mode: 0644]
src/MEDMEM/MEDMEM_Connectivity.cxx
src/MEDMEM/MEDMEM_Init.cxx
src/MEDMEM/MEDMEM_MedFieldDriver21.hxx
src/MEDMEM/MEDMEM_MedMeshDriver22.cxx
src/MEDWrapper/Base/MED_Structures.cxx
src/MED_SWIG/Makefile.in

index 6c65e20a0ea84f2ff821802f87156e4c61da6f94..0666443cab3feb239481a1b5874b012bc234272f 100644 (file)
@@ -114,6 +114,28 @@ H_Traces_I129_COUPLEX1.med \
 H_Traces_Se79_COUPLEX1.med \
 maillage_5_5_5.med \
 maillage_chemvalIV_cas1_40elts.med \
+Old_ChampsDarcy.med \
+Old_darcy_1.1_res.med \
+Old_darcy_1.3_resCASTEM.med \
+Old_darcy_1.3_resPORFLOW.med \
+Old_darcy_1.3_resTRACES.med \
+Old_darcy2_Castem_EFMH.med \
+Old_darcy2_Castem_qua_EFMH.med \
+Old_darcy2_Castem_qua_VF.med \
+Old_Deff_fdt_5.8_castem_efmh_diff_conc_dom.med \
+Old_Deff_fdt_5.8_castem_vf_diff_conc_dom.med \
+Old_H_CastCast_EFMH_I129_COUPLEX1.med \
+Old_H_CastCast_VF_I129_COUPLEX1.med \
+Old_H_CastCast_VF_Se79_COUPLEX1.med \
+Old_H_CastPorf_I129_COUPLEX1.med \
+Old_H_CastPorf_Se79_COUPLEX1.med \
+Old_H_PorfCast_EFMH_I129_COUPLEX1.med \
+Old_H_PorfCast_EFMH_Se79_COUPLEX1.med \
+Old_H_PorfPorf_I129_COUPLEX1.med \
+Old_H_PorfPorf_Se79_COUPLEX1.med \
+Old_H_Traces_I129_COUPLEX1.med \
+Old_H_Traces_Se79_COUPLEX1.med \
+Old_maillage_chemvalIV_cas1_40elts.med \
 Darcy3_3D_H_10x10x10.sauve \
 dx200_dy1_avec_2couches.sauve \
 elle_2D_QT_10x10.sauve \
diff --git a/resources/Old_ChampsDarcy.med b/resources/Old_ChampsDarcy.med
new file mode 100755 (executable)
index 0000000..276542a
Binary files /dev/null and b/resources/Old_ChampsDarcy.med differ
diff --git a/resources/Old_Deff_fdt_5.8_castem_efmh_diff_conc_dom.med b/resources/Old_Deff_fdt_5.8_castem_efmh_diff_conc_dom.med
new file mode 100755 (executable)
index 0000000..1caeedb
Binary files /dev/null and b/resources/Old_Deff_fdt_5.8_castem_efmh_diff_conc_dom.med differ
diff --git a/resources/Old_Deff_fdt_5.8_castem_vf_diff_conc_dom.med b/resources/Old_Deff_fdt_5.8_castem_vf_diff_conc_dom.med
new file mode 100755 (executable)
index 0000000..ff1db43
Binary files /dev/null and b/resources/Old_Deff_fdt_5.8_castem_vf_diff_conc_dom.med differ
diff --git a/resources/Old_H_CastCast_EFMH_I129_COUPLEX1.med b/resources/Old_H_CastCast_EFMH_I129_COUPLEX1.med
new file mode 100755 (executable)
index 0000000..3acdce5
Binary files /dev/null and b/resources/Old_H_CastCast_EFMH_I129_COUPLEX1.med differ
diff --git a/resources/Old_H_CastCast_VF_I129_COUPLEX1.med b/resources/Old_H_CastCast_VF_I129_COUPLEX1.med
new file mode 100755 (executable)
index 0000000..0b782e0
Binary files /dev/null and b/resources/Old_H_CastCast_VF_I129_COUPLEX1.med differ
diff --git a/resources/Old_H_CastCast_VF_Se79_COUPLEX1.med b/resources/Old_H_CastCast_VF_Se79_COUPLEX1.med
new file mode 100755 (executable)
index 0000000..66e07e7
Binary files /dev/null and b/resources/Old_H_CastCast_VF_Se79_COUPLEX1.med differ
diff --git a/resources/Old_H_CastPorf_I129_COUPLEX1.med b/resources/Old_H_CastPorf_I129_COUPLEX1.med
new file mode 100755 (executable)
index 0000000..29faf68
Binary files /dev/null and b/resources/Old_H_CastPorf_I129_COUPLEX1.med differ
diff --git a/resources/Old_H_CastPorf_Se79_COUPLEX1.med b/resources/Old_H_CastPorf_Se79_COUPLEX1.med
new file mode 100755 (executable)
index 0000000..d3422df
Binary files /dev/null and b/resources/Old_H_CastPorf_Se79_COUPLEX1.med differ
diff --git a/resources/Old_H_PorfCast_EFMH_I129_COUPLEX1.med b/resources/Old_H_PorfCast_EFMH_I129_COUPLEX1.med
new file mode 100755 (executable)
index 0000000..8f32337
Binary files /dev/null and b/resources/Old_H_PorfCast_EFMH_I129_COUPLEX1.med differ
diff --git a/resources/Old_H_PorfCast_EFMH_Se79_COUPLEX1.med b/resources/Old_H_PorfCast_EFMH_Se79_COUPLEX1.med
new file mode 100755 (executable)
index 0000000..06c40ba
Binary files /dev/null and b/resources/Old_H_PorfCast_EFMH_Se79_COUPLEX1.med differ
diff --git a/resources/Old_H_PorfPorf_I129_COUPLEX1.med b/resources/Old_H_PorfPorf_I129_COUPLEX1.med
new file mode 100755 (executable)
index 0000000..21d8051
Binary files /dev/null and b/resources/Old_H_PorfPorf_I129_COUPLEX1.med differ
diff --git a/resources/Old_H_PorfPorf_Se79_COUPLEX1.med b/resources/Old_H_PorfPorf_Se79_COUPLEX1.med
new file mode 100755 (executable)
index 0000000..2271b73
Binary files /dev/null and b/resources/Old_H_PorfPorf_Se79_COUPLEX1.med differ
diff --git a/resources/Old_H_Traces_I129_COUPLEX1.med b/resources/Old_H_Traces_I129_COUPLEX1.med
new file mode 100755 (executable)
index 0000000..66c7a8f
Binary files /dev/null and b/resources/Old_H_Traces_I129_COUPLEX1.med differ
diff --git a/resources/Old_H_Traces_Se79_COUPLEX1.med b/resources/Old_H_Traces_Se79_COUPLEX1.med
new file mode 100755 (executable)
index 0000000..e78c802
Binary files /dev/null and b/resources/Old_H_Traces_Se79_COUPLEX1.med differ
diff --git a/resources/Old_darcy2_Castem_EFMH.med b/resources/Old_darcy2_Castem_EFMH.med
new file mode 100755 (executable)
index 0000000..cab9103
Binary files /dev/null and b/resources/Old_darcy2_Castem_EFMH.med differ
diff --git a/resources/Old_darcy2_Castem_qua_EFMH.med b/resources/Old_darcy2_Castem_qua_EFMH.med
new file mode 100755 (executable)
index 0000000..5827a45
Binary files /dev/null and b/resources/Old_darcy2_Castem_qua_EFMH.med differ
diff --git a/resources/Old_darcy2_Castem_qua_VF.med b/resources/Old_darcy2_Castem_qua_VF.med
new file mode 100755 (executable)
index 0000000..fcb50b7
Binary files /dev/null and b/resources/Old_darcy2_Castem_qua_VF.med differ
diff --git a/resources/Old_darcy_1.1_res.med b/resources/Old_darcy_1.1_res.med
new file mode 100755 (executable)
index 0000000..0a9e11a
Binary files /dev/null and b/resources/Old_darcy_1.1_res.med differ
diff --git a/resources/Old_darcy_1.3_resCASTEM.med b/resources/Old_darcy_1.3_resCASTEM.med
new file mode 100755 (executable)
index 0000000..d4457e9
Binary files /dev/null and b/resources/Old_darcy_1.3_resCASTEM.med differ
diff --git a/resources/Old_darcy_1.3_resPORFLOW.med b/resources/Old_darcy_1.3_resPORFLOW.med
new file mode 100755 (executable)
index 0000000..422a10b
Binary files /dev/null and b/resources/Old_darcy_1.3_resPORFLOW.med differ
diff --git a/resources/Old_darcy_1.3_resTRACES.med b/resources/Old_darcy_1.3_resTRACES.med
new file mode 100755 (executable)
index 0000000..ff69664
Binary files /dev/null and b/resources/Old_darcy_1.3_resTRACES.med differ
diff --git a/resources/Old_maillage_chemvalIV_cas1_40elts.med b/resources/Old_maillage_chemvalIV_cas1_40elts.med
new file mode 100644 (file)
index 0000000..a729203
Binary files /dev/null and b/resources/Old_maillage_chemvalIV_cas1_40elts.med differ
index c8a4bdab02c0c20f3062048e4f82580e6ddc1939..9f686ec454056e0742004448c9b82a4510664cac 100644 (file)
@@ -2133,25 +2133,30 @@ void CONNECTIVITY::invertConnectivityForAFace(int faceId, const int *nodalConnFo
     _reverseDescendingConnectivity->setIJ(faceId,1,cell2);
     _reverseDescendingConnectivity->setIJ(faceId,2,cell1);
     // Updating _constituent->_nodal because of reversity
-    MEDSKYLINEARRAY *currentNodal=(!polygonFace)?_constituent->_nodal:_constituent->_polygonsNodal;
-    MEDSKYLINEARRAY *currentDescending=(!polygonFace)?_descending:_polygonsDescending;
     const int *descendingNodalIndex=(!polygonFace)?_constituent->_nodal->getIndex():_constituent->_polygonsNodal->getIndex();
-    const int *newDescendingIndex=(!polygonFace)?_descending->getIndex():_polygonsDescending->getIndex();
-    for(int iarray=1;iarray<=(descendingNodalIndex[faceId]-descendingNodalIndex[faceId-1]);iarray++)
-      currentNodal->setIJ(faceId,iarray,nodalConnForFace[iarray-1]);
+    MEDSKYLINEARRAY *currentNodal=(!polygonFace)?_constituent->_nodal:_constituent->_polygonsNodal;
+    int faceIdRelative=(!polygonFace)?faceId:faceId-getNumberOf(MED_FACE,MED_ALL_ELEMENTS);
+    for(int iarray=1;iarray<=(descendingNodalIndex[faceIdRelative]-descendingNodalIndex[faceIdRelative-1]);iarray++)
+      currentNodal->setIJ(faceIdRelative,iarray,nodalConnForFace[iarray-1]);
 
     // Updating _descending for cell1 and cell2
-    for(int iface=newDescendingIndex[cell1-1];iface<=newDescendingIndex[cell1];iface++)
-      if (currentDescending->getIndexValue(iface)==faceId)
-       currentDescending->setIndexValue(iface,-faceId);
-      else if (currentDescending->getIndexValue(iface)==-faceId)
-       currentDescending->setIndexValue(iface,faceId);
-
-    for(int iface=newDescendingIndex[cell2-1];iface<newDescendingIndex[cell2];iface++)
-      if (currentDescending->getIndexValue(iface)==faceId)
-       currentDescending->setIndexValue(iface,-faceId);
-      else if (_descending->getIndexValue(iface)==-faceId)
-       currentDescending->setIndexValue(iface,faceId);
+    const int NB_OF_CELLS_SHARING_A_FACE=2;
+    int cellsToUpdate[NB_OF_CELLS_SHARING_A_FACE]; cellsToUpdate[0]=cell1; cellsToUpdate[1]=cell2;
+    for(int curCell=0;curCell<NB_OF_CELLS_SHARING_A_FACE;curCell++)
+      {
+       int cell=cellsToUpdate[curCell];
+       bool polyhCell=(getElementTypeWithPoly(MED_CELL,cell)==MED_POLYHEDRA);
+       if(polyhCell)
+         cell-=getNumberOf(MED_CELL,MED_ALL_ELEMENTS);
+       const int *newDescendingIndex=(!polyhCell)?_descending->getIndex():_polyhedronDescending->getIndex();
+       MEDSKYLINEARRAY *currentDescending=(!polyhCell)?_descending:_polyhedronDescending;
+       for(int iface=newDescendingIndex[cell-1];iface<newDescendingIndex[cell];iface++)
+         {
+           int curValue=currentDescending->getIndexValue(iface);
+           if (abs(curValue)==faceId)
+             currentDescending->setIndexValue(iface,-curValue);
+         }
+      }
   }
 }
 
index 7d8c3d656e3b3071ebf0506e4eee53091299d41f..32a646747e6df34d840e8b184fe55862a6550cb8 100644 (file)
 //
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+#include <stdlib.h>
+#include <string.h>
+#include <cassert>
+
+#include "MEDMEM_Utilities.hxx"
 #  ifdef MED_WITH_KERNEL
 //#include "LocalTraceCollector.hxx"
 #  endif /* ifdef MED_WITH_KERNEL*/
@@ -37,4 +42,15 @@ MEDMEM::INIT::INIT()
 #ifdef MED_WITH_KERNEL
 //  LocalTraceCollector::instance();
 #endif /* ifdef MED_WITH_KERNEL*/
+
+//   char* traceKind = getenv("SALOME_trace");
+
+//   if (traceKind == NULL)
+//     {
+//       setenv("SALOME_trace","local",1);
+//       traceKind = getenv("SALOME_trace");
+//       assert(traceKind);
+//     }
+
+//   MESSAGE("Med Memory Initialization with $SALOME_trace = " << traceKind);
 }
index fea7fd134f112f8388734aee62530058abdd09f3..8912451da57d81665602c6045a20aa31387ce313 100644 (file)
@@ -346,16 +346,21 @@ MED_FIELD_DRIVER21<T>::createFieldSupport(med_2_1::med_idt id,
   //EF : Gérer le meshName pour le driver 2.2
   const char * LOC="MED_FIELD_DRIVER<T>::search_field(...)";
 
+  BEGIN_OF(LOC);
+
   map<int, list<MED_EN::medGeometryElement> > CellAndNodeEntities;
   map<int, list<MED_EN::medGeometryElement> >::iterator currentEntity;
   CellAndNodeEntities[MED_EN::MED_CELL]  = MED_EN::meshEntities[MED_EN::MED_CELL];
   CellAndNodeEntities[MED_EN::MED_NODE] = MED_EN::meshEntities[MED_EN::MED_NODE];
   list< MED_EN::medGeometryElement >::const_iterator currentGeometry;
 
+  MED_EN::medEntityMesh entityCurrent;
+  MED_EN::medGeometryElement geometryCurrent;
+
   //med_2_1::med_entite_maillage
   MED_EN::medEntityMesh entity;
   bool alreadyFoundAnEntity=false, alreadyFoundPdtIt = false, anyGauss=false;
-  int  numberOfElements = 0;
+  int  numberOfElements = 0, numberOfElements1 = 0,numberOfElements2 = 0;
   int  numberOfGeometricType = 0;
   //med_2_1::med_geometrie_element..
   MED_EN::medGeometryElement geometricType[MED_NBR_GEOMETRIE_MAILLE];
@@ -373,27 +378,55 @@ MED_FIELD_DRIVER21<T>::createFieldSupport(med_2_1::med_idt id,
     for (currentGeometry  = (*currentEntity).second.begin();
         currentGeometry != (*currentEntity).second.end(); currentGeometry++) {
 
-      if ( (numberOfElements =  med_2_1::MEDnVal(id, const_cast <char*> ( fieldName.c_str() ),
-                                               (med_2_1::med_entite_maillage)   (*currentEntity).first,
-                                               (med_2_1::med_geometrie_element) *currentGeometry,
-                                               ndt, od))  <=  0 )
+      entityCurrent = (*currentEntity).first ;
+      geometryCurrent = (*currentGeometry) ;
+
+      // That is a difference between Med File and Med Memory (NB)
+
+      if (geometryCurrent == MED_EN::MED_SEG2 || geometryCurrent == MED_EN::MED_SEG3)
+       entityCurrent = MED_EN::MED_EDGE;
+
+      if (geometryCurrent == MED_EN::MED_TRIA3 || geometryCurrent == MED_EN::MED_QUAD4 ||
+         geometryCurrent == MED_EN::MED_TRIA6 || geometryCurrent == MED_EN::MED_QUAD8)
+       entityCurrent = MED_EN::MED_FACE;
+
+      numberOfElements1 =  med_2_1::MEDnVal(id, const_cast <char*> ( fieldName.c_str() ),
+                                           (med_2_1::med_entite_maillage)   (*currentEntity).first,
+                                           (med_2_1::med_geometrie_element) *currentGeometry,
+                                           ndt, od);
+
+      numberOfElements2 =  med_2_1::MEDnVal(id, const_cast <char*> ( fieldName.c_str() ),
+                                           (med_2_1::med_entite_maillage) entityCurrent,
+                                           (med_2_1::med_geometrie_element) *currentGeometry,
+                                           ndt, od);
+      if (numberOfElements2 < numberOfElements1) entityCurrent = (*currentEntity).first ;
+
+      numberOfElements = (numberOfElements1>numberOfElements2)?numberOfElements1:numberOfElements2;
+
+      SCRUTE(numberOfElements);
+
+      if ( numberOfElements <=  0 )
        continue;
 
       if ( alreadyFoundAnEntity ) {
-       if (entity != (*currentEntity).first )
+       if (entity != entityCurrent)
          throw MEDEXCEPTION(LOCALIZED(STRING(LOC)<<" Field |"  << fieldName
                                       << "| with (ndt,or) = (" << ndt << ","
                                       << od << ") must not be defined on nodes and cells" ));
 
-      } else { entity=(*currentEntity).first; alreadyFoundAnEntity = true; };
+      } else { entity=entityCurrent; alreadyFoundAnEntity = true; };
 
       nbPdtIt = med_2_1::MEDnPasdetemps(id, const_cast <char*> ( fieldName.c_str() ),
-                                       (med_2_1::med_entite_maillage)   (*currentEntity).first,
+                                       (med_2_1::med_entite_maillage) entityCurrent,
                                        (med_2_1::med_geometrie_element)  *currentGeometry );
+
+      SCRUTE(nbPdtIt);
+      SCRUTE(numberOfElements);
+
       if ( nbPdtIt < 0 )
        throw MEDEXCEPTION(LOCALIZED(STRING(LOC)<<" Field |" << fieldName << "| with (ndt,or) = ("
                                     << ndt << "," << od << ") should be defined for (entityType,geometricType)=("
-                                    << MED_EN::entNames[(*currentEntity).first] << ","
+                                    << MED_EN::entNames[entityCurrent] << ","
                                     << MED_EN::geoNames[*currentGeometry] << ")" ));
 
       ret = 0; alreadyFoundPdtIt = false; ngauss =0;
@@ -401,7 +434,7 @@ MED_FIELD_DRIVER21<T>::createFieldSupport(med_2_1::med_idt id,
 
        // Search how many <ngauss> (<fieldName>,<ndt>,<ot>) has
        ret = med_2_1::MEDpasdetempsInfo(id, const_cast <char*> ( fieldName.c_str() ),
-                                        (med_2_1::med_entite_maillage)   (*currentEntity).first,
+                                        (med_2_1::med_entite_maillage) entityCurrent,
                                         (med_2_1::med_geometrie_element)  *currentGeometry,
                                         j,maa,&ngauss,&numdt,dtunit,&dt,&numo);
 
@@ -424,7 +457,7 @@ MED_FIELD_DRIVER21<T>::createFieldSupport(med_2_1::med_idt id,
                //                  }
                throw MEDEXCEPTION(LOCALIZED(STRING(LOC)<<" Field |" << fieldName << "| with (ndt,or) = ("
                                             << ndt << "," << od << ") for (entityType,geometricType)=("
-                                            << MED_EN::entNames[(*currentEntity).first] << ","
+                                            << MED_EN::entNames[entityCurrent] << ","
                                             << MED_EN::geoNames[*currentGeometry] << ")"
                                             << "is defined on mesh |" << maa << "| not on mesh |" << meshName ));
              }
@@ -433,17 +466,19 @@ MED_FIELD_DRIVER21<T>::createFieldSupport(med_2_1::med_idt id,
        }
       }
 
+      MESSAGE(LOC << " a (dt,it) is found ?? " << alreadyFoundPdtIt);
+
       if ( !alreadyFoundPdtIt )
        throw MEDEXCEPTION(LOCALIZED(STRING(LOC)<<" Field |" << fieldName << "| with (ndt,or) = ("
                                     << ndt << "," << od << ") should be defined for (entityType,geometricType)=("
-                                    << MED_EN::entNames[(*currentEntity).first] << ","
+                                    << MED_EN::entNames[entityCurrent] << ","
                                     << MED_EN::geoNames[*currentGeometry] << ")" ));
 
       if ( (ret != 0)  || (ngauss < 1 ) )
        throw MEDEXCEPTION(LOCALIZED(STRING(LOC)<<"Error in MEDpasdetempsInfo for  Field |" << fieldName 
                                     << "| with (ndt,or) = ("
                                     << ndt << "," << od << ") for (entityType,geometricType)=("
-                                    << MED_EN::entNames[(*currentEntity).first] << ","
+                                    << MED_EN::entNames[entityCurrent] << ","
                                     << MED_EN::geoNames[*currentGeometry] << ")" )); ;
 
       //totalNumberOfElements+=numberOfElements;
@@ -469,9 +504,15 @@ MED_FIELD_DRIVER21<T>::createFieldSupport(med_2_1::med_idt id,
     support.setNumberOfElements(numberOfElementsOfType);    //setNumberOfElements effectue une copie
     support.setAll(true);
 
+    END_OF(LOC);
+
     return alreadyFoundAnEntity;
   } else
-    return false;
+    {
+      END_OF(LOC);
+
+      return false;
+    }
 }
 
 template <class T> void
@@ -492,9 +533,13 @@ MED_FIELD_DRIVER21<T>::getMeshGeometricType(med_2_1::med_idt id,
   else
     if (entity == MED_EN::MED_NODE) quoi=med_2_1::MED_COOR;
     else
-      throw MEDEXCEPTION(LOCALIZED(STRING(LOC)<<" Support Creation from Mesh |"  << meshName
+      MESSAGE(LOC<<" Support Creation from Mesh |"  << meshName
                                   << "| on entity " << MED_EN::entNames[entity]
-                                  << "| is impossible,  must be  on MED_NODE or MED_CELL" ));
+                                  << "| is impossible,  must be  on MED_NODE or MED_CELL");
+
+//       throw MEDEXCEPTION(LOCALIZED(STRING(LOC)<<" Support Creation from Mesh |"  << meshName
+//                                << "| on entity " << MED_EN::entNames[entity]
+//                                << "| is impossible,  must be  on MED_NODE or MED_CELL" ));
 
   list<MED_EN::medGeometryElement>::const_iterator currentGeometry;
   bool alreadyFoundAnEntity = false;
@@ -551,8 +596,10 @@ template <class T> void MED_FIELD_RDONLY_DRIVER21<T>::read(void)
     MED_FIELD_DRIVER<T>::_fieldName=MED_FIELD_DRIVER<T>::_ptrField->_name;
 
   if ( MED_FIELD_DRIVER<T>::_fieldName.size() > MED_TAILLE_NOM )
-    throw MEDEXCEPTION(LOCALIZED(STRING(LOC)
-                                <<" <fieldName> size in object driver FIELD is > MED_TAILLE_NOM ."));
+    MESSAGE(LOC << "Warning <fieldName> size in object driver FIELD is > MED_TAILLE_NOM .");
+   
+//     throw MEDEXCEPTION(LOCALIZED(STRING(LOC)
+//                              <<" <fieldName> size in object driver FIELD is > MED_TAILLE_NOM ."));
 
 
   MESSAGE("###### "<<LOC<<" fieldNameDRIVER : "<< MED_FIELD_DRIVER<T>::_fieldName << 
@@ -580,7 +627,7 @@ template <class T> void MED_FIELD_RDONLY_DRIVER21<T>::read(void)
 //                    l'ensemble des profils par type géométrique est lu
 //                    Le nom du maillage associé est lu mais le pointeur SUPPORT-MESH non initialisé
 
-  char * fieldName = new char[MED_TAILLE_NOM+1] ;
+  char fieldName[MED_TAILLE_NOM+1] ;
 
   int err ;
   int    numberOfComponents          = 0;
@@ -627,7 +674,7 @@ template <class T> void MED_FIELD_RDONLY_DRIVER21<T>::read(void)
        }
     }
       
-  delete[] fieldName ;
+  //delete[] fieldName ;
 
   if (MED_FIELD_DRIVER<T>::_fieldNum==MED_INVALID)
     throw MEDEXCEPTION(LOCALIZED( STRING(LOC) << ": Field "<<MED_FIELD_DRIVER<T>::_fieldName << " not found in file " << MED_FIELD_DRIVER<T>::_fileName ) );
index d1dfec3fbaab409125da00b150c3bab2f796ce2a..829e28ab3e33ee7e7481e2f039b18ee525ea3bf8 100644 (file)
@@ -1860,7 +1860,7 @@ int  MED_MESH_RDONLY_DRIVER22::getCellsFamiliesNumber(int **MEDArrayFamily,
                           med_2_2::MED_MAILLE,
                           (med_2_2::med_geometrie_element)types[i]);
            if (err != MED_VALID)
-             throw MEDEXCEPTION(LOCALIZED(STRING(LOC)<<" Family not found for entity "<<Connectivity->_entity<<" and geometric type "<<Connectivity->_geometricTypes[i]));
+             throw MEDEXCEPTION(LOCALIZED(STRING(LOC)<<" Family not found for entity "<<Connectivity->_entity<<" and geometric type "<<types[i]));
          }
         int ii ;
         for ( ii = 0 ; ii < NumberOfCell ; ii++ )
@@ -1879,7 +1879,7 @@ int  MED_MESH_RDONLY_DRIVER22::getCellsFamiliesNumber(int **MEDArrayFamily,
                           med_2_2::MED_MAILLE,
                           (med_2_2::med_geometrie_element)types[i]);
            if (err != MED_VALID)
-             throw MEDEXCEPTION(LOCALIZED(STRING(LOC)<<" Family not found for entity "<<Connectivity->_entity<<" and geometric type "<<Connectivity->_geometricTypes[i]));
+             throw MEDEXCEPTION(LOCALIZED(STRING(LOC)<<" Family not found for entity "<<Connectivity->_entity<<" and geometric type "<<types[i]));
          }
 #endif
       }
@@ -2770,8 +2770,8 @@ int MED_MESH_WRONLY_DRIVER22::writeFamilyNumbers() const {
     // SOLUTION TEMPORAIRE CAR _ptrMesh->_MEDArray____Family DOIT ETRE ENLEVER DE LA CLASSE MESH
     if  ( ( _ptrMesh->existConnectivity(MED_NODAL,entity) )|( _ptrMesh->existConnectivity(MED_DESCENDING,entity) ) ) { 
 
-      int numberOfTypes           = _ptrMesh->getNumberOfTypes (entity) ;
-      const medGeometryElement  * types = _ptrMesh->getTypes         (entity) ;
+      int numberOfTypes           = _ptrMesh->getNumberOfTypesWithPoly(entity) ;
+      medGeometryElement  * types = _ptrMesh->getTypesWithPoly(entity) ;
 
       // We build the array from the families list objects :
       int NumberOfElements = _ptrMesh->getNumberOfElements(entity, MED_ALL_ELEMENTS);
@@ -2816,8 +2816,7 @@ int MED_MESH_WRONLY_DRIVER22::writeFamilyNumbers() const {
        SCRUTE(MEDArrayFamily[i]);
 
 
-
-      const int * typeCount = _ptrMesh->getGlobalNumberingIndex(entity) ;
+      int offset=0;
 #if defined(IRIX64) || defined(OSF1) || defined(VPP5000)
        int lgth=NumberOfElements;
        med_2_2::med_int *temp=new med_2_2::med_int[lgth];
@@ -2825,17 +2824,18 @@ int MED_MESH_WRONLY_DRIVER22::writeFamilyNumbers() const {
          temp[i2]=(med_2_2::med_int) (MEDArrayFamily[i2]);
 #endif
       for (int i=0; i<numberOfTypes; i++) {
+         int typeNumberOfElements=_ptrMesh->getNumberOfElementsWithPoly(entity,types[i]);
 #if defined(IRIX64) || defined(OSF1) || defined(VPP5000)
        err = MEDfamEcr(_medIdt, const_cast <char *> ( _meshName.c_str() ),
-                       (temp+(typeCount[i]-1)),(typeCount[i+1]-typeCount[i]),
+                       (temp+offset),(typeCount[i+1]-typeCount[i]),
                        //CCRT                  med_2_2::MED_REMP ,
 //                     (med_2_2::med_entite_maillage) entity, because Med Memory works only in Nodal connectivity
                        (med_2_2::med_entite_maillage) MED_CELL,
                        (med_2_2::med_geometrie_element) types[i]);
 #else
        err = MEDfamEcr(_medIdt, const_cast <char *> ( _meshName.c_str() ),
-                       (MEDArrayFamily+(typeCount[i]-1)),
-                       (typeCount[i+1]-typeCount[i]),
+                       (MEDArrayFamily+offset),
+                       typeNumberOfElements,
 //                     (med_2_2::med_entite_maillage) entity, because Med Memory works only in Nodal connectivity
                        (med_2_2::med_entite_maillage) MED_CELL,
                        (med_2_2::med_geometrie_element) types[i]); 
@@ -2851,6 +2851,7 @@ int MED_MESH_WRONLY_DRIVER22::writeFamilyNumbers() const {
 //CCRT      delete [] temp;
 //CCRT#endif
       delete[] MEDArrayFamily ;
+      delete[] types;
       //if (true == ToDestroy) {
       //  int NumberOfFamilies = myFamilies->size();
       //  for (int i=0; i<NumberOfFamilies; i++)
index f0008a77c26ca49c0a34a87620e310315644231b..c8e316a9ff59e22023b69052b853ffdb61d49066 100644 (file)
@@ -320,7 +320,7 @@ TTimeStampInfo
 {
   TGeom2NbGauss::const_iterator anIter = myGeom2NbGauss.find(theGeom);
   if(anIter == myGeom2NbGauss.end())
-    EXCEPTION(runtime_error,"TTimeStampInfo::GetNbGauss - myGeom2NbGauss.find(theGeom) fails");
+    return 1;//EXCEPTION(runtime_error,"TTimeStampInfo::GetNbGauss - myGeom2NbGauss.find(theGeom) fails");
 
   return anIter->second;
 }
@@ -418,22 +418,24 @@ TValueSliceArr
 TMeshValue
 ::GetCompValueSliceArr(TInt theElemId)
 {
-  TValueSliceArr aValueSliceArr(myNbGauss);
   if(GetModeSwitch() == eFULL_INTERLACE){
+    TValueSliceArr aValueSliceArr(myNbComp);
     TInt anId = theElemId*myStep;
     for(TInt aCompId = 0; aCompId < myNbComp; aCompId++){
       aValueSliceArr[aCompId] =
        TValueSlice(myValue,std::slice(anId,myNbGauss,myNbComp));
       anId += 1;
     }
+    return aValueSliceArr;
   }
   else{
+    TValueSliceArr aValueSliceArr(myNbGauss);
     for(TInt aGaussId = 0; aGaussId < myNbGauss; aGaussId++){
       aValueSliceArr[aGaussId] =
        TValueSlice(myValue,std::slice(theElemId,myNbComp,myStep));
     }
+    return aValueSliceArr;
   }
-  return aValueSliceArr;
 }
 
 
index 5e4b7731a6c69e4257064934e562117e85d8b91b..187f073695b294342d6dea3a363cf4f960eb1765 100644 (file)
@@ -36,4 +36,4 @@ VPATH=.:@srcdir@:@top_srcdir@/idl
 EXPORT_SHAREDPYSCRIPTS=\
                 MED_shared_modules.py
 
-@CONCLUDE@
\ No newline at end of file
+@CONCLUDE@