From: apo Date: Wed, 5 Apr 2006 12:22:41 +0000 (+0000) Subject: Porting on Mandriva 64 (to use vtkFloatingPointType instead of "float") X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d35b7b22c176b92e91e51c92296565021acaaa16;p=modules%2Fvisu.git Porting on Mandriva 64 (to use vtkFloatingPointType instead of "float") --- diff --git a/src/CONVERTOR/VISU_Convertor.hxx b/src/CONVERTOR/VISU_Convertor.hxx index 304f7de3..4dc7b49c 100644 --- a/src/CONVERTOR/VISU_Convertor.hxx +++ b/src/CONVERTOR/VISU_Convertor.hxx @@ -181,7 +181,7 @@ namespace VISU //--------------------------------------------------------------- typedef std::map TValField; - typedef std::pair TMinMax; + typedef std::pair TMinMax; //! Define a basic class for MED FIELD entity struct TField: virtual TIntId @@ -308,7 +308,7 @@ public: //! Get amount of memory to build VTK representations for all existing MED entities virtual - float + vtkFloatingPointType GetSize() = 0; //! Get mesh for corresponding MED ENTITY @@ -319,7 +319,7 @@ public: //! Get amount of memory to build mesh for corresponding MED ENTITY virtual - float + vtkFloatingPointType GetMeshOnEntitySize(const std::string& theMeshName, const VISU::TEntity& theEntity) = 0; @@ -332,7 +332,7 @@ public: //! Get amount of memory to build mesh for corresponding MED FAMILY virtual - float + vtkFloatingPointType GetFamilyOnEntitySize(const std::string& theMeshName, const VISU::TEntity& theEntity, const std::string& theFamilyName) = 0; @@ -345,7 +345,7 @@ public: //! Get amount of memory to build mesh for corresponding MED GROUP virtual - float + vtkFloatingPointType GetMeshOnGroupSize(const std::string& theMeshName, const std::string& theGroupName) = 0; @@ -367,7 +367,7 @@ public: //! Get amount of memory to build mesh for corresponding MED TIMESTAMP virtual - float + vtkFloatingPointType GetTimeStampSize(const std::string& theMeshName, const VISU::TEntity& theEntity, const std::string& theFieldName, @@ -375,7 +375,7 @@ public: //! Get amount of memory to build all MED TIMESTAMPS for corresponding MED FIELD virtual - float + vtkFloatingPointType GetFieldOnMeshSize(const std::string& theMeshName, const VISU::TEntity& theEntity, const std::string& theFieldName) = 0; diff --git a/src/CONVERTOR/VISU_Convertor_impl.cxx b/src/CONVERTOR/VISU_Convertor_impl.cxx index 8d1fe336..edbec305 100644 --- a/src/CONVERTOR/VISU_Convertor_impl.cxx +++ b/src/CONVERTOR/VISU_Convertor_impl.cxx @@ -34,7 +34,7 @@ #include #include -#include +#include #include #include #include @@ -52,7 +52,7 @@ using namespace std; using namespace VISU; -static float ERR_SIZE_CALC = 1.00; +static vtkFloatingPointType ERR_SIZE_CALC = 1.00; static int MYVTKDEBUG = 0; @@ -308,7 +308,7 @@ namespace VISU return myNamedPointCoords->GetVTKID(theID); } - float* + vtkFloatingPointType* TProfileImpl ::GetNodeCoord(vtkIdType theObjID) { @@ -429,7 +429,7 @@ namespace VISU return myIDMapper.GetNodeVTKID(theID); } - float* + vtkFloatingPointType* TIDMapperFilter ::GetNodeCoord(vtkIdType theObjID) { @@ -1208,7 +1208,7 @@ namespace } vtkIdType *pts = 0, npts = 0; - vtkIntArray* aCellLocationsArray = vtkIntArray::New(); + vtkIdTypeArray* aCellLocationsArray = vtkIdTypeArray::New(); aCellLocationsArray->SetNumberOfComponents(1); aCellLocationsArray->SetNumberOfTuples(aNbCells); aConnectivity->InitTraversal(); @@ -1282,7 +1282,7 @@ namespace } } vtkIdType *pts = 0, npts = 0; - vtkIntArray* aCellLocationsArray = vtkIntArray::New(); + vtkIdTypeArray* aCellLocationsArray = vtkIdTypeArray::New(); aCellLocationsArray->SetNumberOfComponents(1); aCellLocationsArray->SetNumberOfTuples(aNbCells); aConnectivity->InitTraversal(); @@ -1445,7 +1445,7 @@ namespace } vtkIdType *pts = 0, npts = 0; - vtkIntArray* aCellLocationsArray = vtkIntArray::New(); + vtkIdTypeArray* aCellLocationsArray = vtkIdTypeArray::New(); aCellLocationsArray->SetNumberOfComponents(1); aCellLocationsArray->SetNumberOfTuples(aNbCells); @@ -1581,7 +1581,7 @@ namespace endl); int aSize = max(3,aNbComp); - TVector aDataValues(aSize,0.0); + TVector aDataValues(aSize,0.0); const TGeom2Value& aGeom2Value = theValForTime->myGeom2Value; @@ -1674,7 +1674,7 @@ namespace for(vtkIdType aPointId = 0; aPointId < aNbPoints; aPointId++){ TCCoordSlice aSlice = aCoords.GetCoordSlice(aPointId); - float aCoords[3] = {0.0, 0.0, 0.0}; + vtkFloatingPointType aCoords[3] = {0.0, 0.0, 0.0}; for(vtkIdType aDimId = 0; aDimId < aDim; aDimId++) aCoords[aDimId] = aSlice[aDimId]; @@ -1686,7 +1686,7 @@ namespace } anIdList->Delete(); - vtkIntArray* aCellLocationsArray = vtkIntArray::New(); + vtkIdTypeArray* aCellLocationsArray = vtkIdTypeArray::New(); aCellLocationsArray->SetNumberOfComponents(1); aCellLocationsArray->SetNumberOfTuples(aNbCells); @@ -1774,15 +1774,15 @@ namespace PrintMemorySize(vtkUnstructuredGrid* theDataSet) { theDataSet->Update(); - BEGMSG(1,"GetPoints() = "<GetPoints()->GetActualMemorySize()*1000)<myNbPoints * (vtkIdType(sizeof(vtkIdType)*aNbCellsPerPoint) + sizeof(vtkCellLinks::Link)); aLinksSize = 0; vtkIdType aResult = aPointsSize + aConnectivitySize + aTypesSize + aLocationsSize + aLinksSize; MSG(MYDEBUG,"GetFamilyOnEntitySize "<< - "- aResult = "<myNbPoints * (vtkIdType(sizeof(vtkIdType)*aNbCellsPerPoint) + sizeof(short)); aLinksSize = 0; vtkIdType aResult = aPointsSize + aConnectivityAndTypesSize + aLocationsSize + aLinksSize; if(MYDEBUG){ - MSG(MYVTKDEBUG,"GetMeshOnGroupSize - aPointsSize = "<(aFindField); PFieldImpl aField = boost::get<3>(aFindField); - float aMeshSize = GetMeshOnEntitySize(theMeshName,aVTKMeshOnEntity->myEntity); - float aFieldOnMeshSize = float(aField->myDataSize*sizeof(float)*aField->myValField.size()*ERR_SIZE_CALC); - float aResult = aMeshSize + aFieldOnMeshSize; + vtkFloatingPointType aMeshSize = GetMeshOnEntitySize(theMeshName,aVTKMeshOnEntity->myEntity); + vtkFloatingPointType aFieldOnMeshSize = vtkFloatingPointType(aField->myDataSize*sizeof(vtkFloatingPointType)*aField->myValField.size()*ERR_SIZE_CALC); + vtkFloatingPointType aResult = aMeshSize + aFieldOnMeshSize; if(MYDEBUG) - MSG(MYVTKDEBUG,"GetFieldOnMeshSize - aFieldOnMeshSize = "<(aFindTimeStamp); PFieldImpl aField = boost::get<3>(aFindTimeStamp); - float aMeshSize = GetMeshOnEntitySize(theMeshName,aVTKMeshOnEntity->myEntity); - float aTimeStampSize = float(aField->myDataSize*sizeof(float) * ERR_SIZE_CALC); - float aResult = aMeshSize + aTimeStampSize; + vtkFloatingPointType aMeshSize = GetMeshOnEntitySize(theMeshName,aVTKMeshOnEntity->myEntity); + vtkFloatingPointType aTimeStampSize = vtkFloatingPointType(aField->myDataSize*sizeof(vtkFloatingPointType) * ERR_SIZE_CALC); + vtkFloatingPointType aResult = aMeshSize + aTimeStampSize; - MSG(MYDEBUG && MYVTKDEBUG,"GetTimeStampSize - aTimeStampSize = "<