static int MYDEBUG = 0;
#endif
-//#define _DEXCEPT_
+//#define _DEBUG_ID_MAPPING_
+#define _DEXCEPT_
typedef vtkUnstructuredGrid TOutput;
try{
#endif
MSG(MYDEBUG,"'"<<theFileName<<"'...");
+ //theFileName = "Apointe.med";
auto_ptr<VISU_Convertor> aCon(CreateConvertor(theFileName));
//aCon->GetSize();
//return;
aCon->BuildEntities();
+ aCon->BuildGroups();
aCon->BuildFields();
aCon->BuildMinMax();
const VISU::TMeshMap& aMeshMap = aCon->GetMeshMap();
if(anEntity != VISU::NODE_ENTITY){
VISU::PGaussPtsIDMapper aGaussMesh =
aCon->GetTimeStampOnGaussPts(aMeshName,anEntity,aFieldName,aTimeStamp);
- VISU::TVTKOutput* aDataSet = aGaussMesh->GetVTKOutput();
- /*
+#ifdef _DEBUG_ID_MAPPING_
+ vtkDataSet* aDataSet = aGaussMesh->GetOutput();
+ aDataSet->Update();
int aNbCells = aDataSet->GetNumberOfCells();
+ cout<<"aNbCells = "<<aNbCells<<endl;
for(int anCellId = 0; anCellId < aNbCells; anCellId++){
VISU::TGaussPointID anObjID = aGaussMesh->GetObjID(anCellId);
- cout<<anObjID.first<<"; "<<anObjID.second<<endl;
+ cout<<anObjID.first<<"; "<<anObjID.second<<"; "<<aGaussMesh->GetNodeVTKID(anObjID.first)<<endl;
+ vtkFloatingPointType* aCoord = aGaussMesh->GetNodeCoord(anCellId);
+ cout<<aCoord[0]<<"; "<<aCoord[1]<<"; "<<aCoord[2]<<endl;
}
- */
+#endif
}else{
+ //continue;
VISU::PIDMapper anIDMapper =
aCon->GetTimeStampOnMesh(aMeshName,anEntity,aFieldName,aTimeStamp);
- VISU::TVTKOutput* aDataSet = anIDMapper->GetVTKOutput();
- /*
+#ifdef _DEBUG_ID_MAPPING_
+ vtkDataSet* aDataSet = anIDMapper->GetOutput();
+ aDataSet->Update();
int aNbCells = aDataSet->GetNumberOfCells();
for(int anCellId = 0; anCellId < aNbCells; anCellId++){
int anObjID = anIDMapper->GetElemObjID(anCellId);
int aVTKID = anIDMapper->GetElemVTKID(anObjID);
cout<<anObjID<<"; "<<aVTKID<<endl;
}
- */
+#endif
}
//goto OK;
}
for(; aMeshOnEntityMapIter != aMeshOnEntityMap.end(); aMeshOnEntityMapIter++){
const VISU::TEntity& anEntity = aMeshOnEntityMapIter->first;
VISU::PIDMapper anIDMapper = aCon->GetMeshOnEntity(aMeshName,anEntity);
- VISU::TVTKOutput* aDataSet = anIDMapper->GetVTKOutput();
- {
- /*
- int aNbCells, anCellId, anObjID, aVTKID;
- aNbCells = aDataSet->GetNumberOfCells();
- for(anCellId = 0; anCellId < aNbCells; anCellId++){
- anObjID = anIDMapper->GetElemObjID(anCellId);
- aVTKID = anIDMapper->GetElemVTKID(anObjID);
- cout<<anObjID<<"; "<<aVTKID<<endl;
- }
- */
+#ifdef _DEBUG_ID_MAPPING_
+ vtkDataSet* aDataSet = anIDMapper->GetOutput();
+ int aNbCells, anCellId, anObjID, aVTKID;
+ aNbCells = aDataSet->GetNumberOfCells();
+ for(anCellId = 0; anCellId < aNbCells; anCellId++){
+ anObjID = anIDMapper->GetElemObjID(anCellId);
+ aVTKID = anIDMapper->GetElemVTKID(anObjID);
+ cout<<anObjID<<"; "<<aVTKID<<endl;
}
+#endif
}
//Import families