From: jfa Date: Fri, 2 Jun 2006 11:35:08 +0000 (+0000) Subject: Join modifications from branch BR_DEBUG_3_2_0b1 02Jun06 X-Git-Tag: T3_2_0b2~3 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4b36a0d2a14649d6cf81c3df1d157eb1c7f7c271;p=modules%2Fmed.git Join modifications from branch BR_DEBUG_3_2_0b1 02Jun06 --- diff --git a/Makefile.in b/Makefile.in index 6c65e20a0..0666443ca 100644 --- a/Makefile.in +++ b/Makefile.in @@ -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 index 000000000..276542a2b 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 index 000000000..1caeedbc0 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 index 000000000..ff1db4364 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 index 000000000..3acdce53c 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 index 000000000..0b782e047 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 index 000000000..66e07e7a5 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 index 000000000..29faf686e 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 index 000000000..d3422df21 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 index 000000000..8f323379b 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 index 000000000..06c40ba7d 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 index 000000000..21d8051bc 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 index 000000000..2271b7399 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 index 000000000..66c7a8f6c 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 index 000000000..e78c802cb 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 index 000000000..cab910310 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 index 000000000..5827a4546 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 index 000000000..fcb50b71c 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 index 000000000..0a9e11ac8 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 index 000000000..d4457e98f 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 index 000000000..422a10b58 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 index 000000000..ff6966478 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 index 000000000..a72920361 Binary files /dev/null and b/resources/Old_maillage_chemvalIV_cas1_40elts.med differ diff --git a/src/MEDMEM/MEDMEM_Connectivity.cxx b/src/MEDMEM/MEDMEM_Connectivity.cxx index c8a4bdab0..9f686ec45 100644 --- a/src/MEDMEM/MEDMEM_Connectivity.cxx +++ b/src/MEDMEM/MEDMEM_Connectivity.cxx @@ -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];ifacegetIndexValue(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;curCellgetIndex():_polyhedronDescending->getIndex(); + MEDSKYLINEARRAY *currentDescending=(!polyhCell)?_descending:_polyhedronDescending; + for(int iface=newDescendingIndex[cell-1];ifacegetIndexValue(iface); + if (abs(curValue)==faceId) + currentDescending->setIndexValue(iface,-curValue); + } + } } } diff --git a/src/MEDMEM/MEDMEM_Init.cxx b/src/MEDMEM/MEDMEM_Init.cxx index 7d8c3d656..32a646747 100644 --- a/src/MEDMEM/MEDMEM_Init.cxx +++ b/src/MEDMEM/MEDMEM_Init.cxx @@ -17,6 +17,11 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +#include +#include +#include + +#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); } diff --git a/src/MEDMEM/MEDMEM_MedFieldDriver21.hxx b/src/MEDMEM/MEDMEM_MedFieldDriver21.hxx index fea7fd134..8912451da 100644 --- a/src/MEDMEM/MEDMEM_MedFieldDriver21.hxx +++ b/src/MEDMEM/MEDMEM_MedFieldDriver21.hxx @@ -346,16 +346,21 @@ MED_FIELD_DRIVER21::createFieldSupport(med_2_1::med_idt id, //EF : Gérer le meshName pour le driver 2.2 const char * LOC="MED_FIELD_DRIVER::search_field(...)"; + BEGIN_OF(LOC); + map > CellAndNodeEntities; map >::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::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 ( 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 ( 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 ( 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 ( 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::createFieldSupport(med_2_1::med_idt id, // Search how many (,,) has ret = med_2_1::MEDpasdetempsInfo(id, const_cast ( 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::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::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::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 void @@ -492,9 +533,13 @@ MED_FIELD_DRIVER21::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::const_iterator currentGeometry; bool alreadyFoundAnEntity = false; @@ -551,8 +596,10 @@ template void MED_FIELD_RDONLY_DRIVER21::read(void) MED_FIELD_DRIVER::_fieldName=MED_FIELD_DRIVER::_ptrField->_name; if ( MED_FIELD_DRIVER::_fieldName.size() > MED_TAILLE_NOM ) - throw MEDEXCEPTION(LOCALIZED(STRING(LOC) - <<" size in object driver FIELD is > MED_TAILLE_NOM .")); + MESSAGE(LOC << "Warning size in object driver FIELD is > MED_TAILLE_NOM ."); + +// throw MEDEXCEPTION(LOCALIZED(STRING(LOC) +// <<" size in object driver FIELD is > MED_TAILLE_NOM .")); MESSAGE("###### "<::_fieldName << @@ -580,7 +627,7 @@ template void MED_FIELD_RDONLY_DRIVER21::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 void MED_FIELD_RDONLY_DRIVER21::read(void) } } - delete[] fieldName ; + //delete[] fieldName ; if (MED_FIELD_DRIVER::_fieldNum==MED_INVALID) throw MEDEXCEPTION(LOCALIZED( STRING(LOC) << ": Field "<::_fieldName << " not found in file " << MED_FIELD_DRIVER::_fileName ) ); diff --git a/src/MEDMEM/MEDMEM_MedMeshDriver22.cxx b/src/MEDMEM/MEDMEM_MedMeshDriver22.cxx index d1dfec3fb..829e28ab3 100644 --- a/src/MEDMEM/MEDMEM_MedMeshDriver22.cxx +++ b/src/MEDMEM/MEDMEM_MedMeshDriver22.cxx @@ -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 "<_entity<<" and geometric type "<_geometricTypes[i])); + throw MEDEXCEPTION(LOCALIZED(STRING(LOC)<<" Family not found for entity "<_entity<<" and geometric type "<_entity<<" and geometric type "<_geometricTypes[i])); + throw MEDEXCEPTION(LOCALIZED(STRING(LOC)<<" Family not found for entity "<_entity<<" and geometric type "<_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; igetNumberOfElementsWithPoly(entity,types[i]); #if defined(IRIX64) || defined(OSF1) || defined(VPP5000) err = MEDfamEcr(_medIdt, const_cast ( _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 ( _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; isecond; } @@ -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; } diff --git a/src/MED_SWIG/Makefile.in b/src/MED_SWIG/Makefile.in index 5e4b7731a..187f07369 100644 --- a/src/MED_SWIG/Makefile.in +++ b/src/MED_SWIG/Makefile.in @@ -36,4 +36,4 @@ VPATH=.:@srcdir@:@top_srcdir@/idl EXPORT_SHAREDPYSCRIPTS=\ MED_shared_modules.py -@CONCLUDE@ \ No newline at end of file +@CONCLUDE@