#include <vtkIdList.h>
#include <vtkCellType.h>
-#include <vtkIntArray.h>
+#include <vtkIdTypeArray.h>
#include <vtkCellArray.h>
#include <vtkFloatArray.h>
#include <vtkUnsignedCharArray.h>
using namespace std;
using namespace VISU;
-static float ERR_SIZE_CALC = 1.00;
+static vtkFloatingPointType ERR_SIZE_CALC = 1.00;
static int MYVTKDEBUG = 0;
return myNamedPointCoords->GetVTKID(theID);
}
- float*
+ vtkFloatingPointType*
TProfileImpl
::GetNodeCoord(vtkIdType theObjID)
{
return myIDMapper.GetNodeVTKID(theID);
}
- float*
+ vtkFloatingPointType*
TIDMapperFilter
::GetNodeCoord(vtkIdType theObjID)
{
}
vtkIdType *pts = 0, npts = 0;
- vtkIntArray* aCellLocationsArray = vtkIntArray::New();
+ vtkIdTypeArray* aCellLocationsArray = vtkIdTypeArray::New();
aCellLocationsArray->SetNumberOfComponents(1);
aCellLocationsArray->SetNumberOfTuples(aNbCells);
aConnectivity->InitTraversal();
}
}
vtkIdType *pts = 0, npts = 0;
- vtkIntArray* aCellLocationsArray = vtkIntArray::New();
+ vtkIdTypeArray* aCellLocationsArray = vtkIdTypeArray::New();
aCellLocationsArray->SetNumberOfComponents(1);
aCellLocationsArray->SetNumberOfTuples(aNbCells);
aConnectivity->InitTraversal();
}
vtkIdType *pts = 0, npts = 0;
- vtkIntArray* aCellLocationsArray = vtkIntArray::New();
+ vtkIdTypeArray* aCellLocationsArray = vtkIdTypeArray::New();
aCellLocationsArray->SetNumberOfComponents(1);
aCellLocationsArray->SetNumberOfTuples(aNbCells);
endl);
int aSize = max(3,aNbComp);
- TVector<float> aDataValues(aSize,0.0);
+ TVector<vtkFloatingPointType> aDataValues(aSize,0.0);
const TGeom2Value& aGeom2Value = theValForTime->myGeom2Value;
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];
}
anIdList->Delete();
- vtkIntArray* aCellLocationsArray = vtkIntArray::New();
+ vtkIdTypeArray* aCellLocationsArray = vtkIdTypeArray::New();
aCellLocationsArray->SetNumberOfComponents(1);
aCellLocationsArray->SetNumberOfTuples(aNbCells);
PrintMemorySize(vtkUnstructuredGrid* theDataSet)
{
theDataSet->Update();
- BEGMSG(1,"GetPoints() = "<<float(theDataSet->GetPoints()->GetActualMemorySize()*1000)<<endl);
- BEGMSG(1,"GetCells() = "<<float(theDataSet->GetCells()->GetActualMemorySize()*1000)<<endl);
- BEGMSG(1,"GetCellTypesArray() = "<<float(theDataSet->GetCellTypesArray()->GetActualMemorySize()*1000)<<endl);
- BEGMSG(1,"GetCellLocationsArray() = "<<float(theDataSet->GetCellLocationsArray()->GetActualMemorySize()*1000)<<endl);
+ BEGMSG(1,"GetPoints() = "<<vtkFloatingPointType(theDataSet->GetPoints()->GetActualMemorySize()*1000)<<endl);
+ BEGMSG(1,"GetCells() = "<<vtkFloatingPointType(theDataSet->GetCells()->GetActualMemorySize()*1000)<<endl);
+ BEGMSG(1,"GetCellTypesArray() = "<<vtkFloatingPointType(theDataSet->GetCellTypesArray()->GetActualMemorySize()*1000)<<endl);
+ BEGMSG(1,"GetCellLocationsArray() = "<<vtkFloatingPointType(theDataSet->GetCellLocationsArray()->GetActualMemorySize()*1000)<<endl);
theDataSet->BuildLinks();
- BEGMSG(1,"GetCellLinks() = "<<float(theDataSet->GetCellLinks()->GetActualMemorySize()*1000)<<endl);
- BEGMSG(1,"GetPointData() = "<<float(theDataSet->GetPointData()->GetActualMemorySize()*1000)<<endl);
- BEGMSG(1,"GetCellData() = "<<float(theDataSet->GetCellData()->GetActualMemorySize()*1000)<<endl);
- BEGMSG(1,"GetActualMemorySize() = "<<float(theDataSet->GetActualMemorySize()*1000)<<endl);
+ BEGMSG(1,"GetCellLinks() = "<<vtkFloatingPointType(theDataSet->GetCellLinks()->GetActualMemorySize()*1000)<<endl);
+ BEGMSG(1,"GetPointData() = "<<vtkFloatingPointType(theDataSet->GetPointData()->GetActualMemorySize()*1000)<<endl);
+ BEGMSG(1,"GetCellData() = "<<vtkFloatingPointType(theDataSet->GetCellData()->GetActualMemorySize()*1000)<<endl);
+ BEGMSG(1,"GetActualMemorySize() = "<<vtkFloatingPointType(theDataSet->GetActualMemorySize()*1000)<<endl);
}
}
GetTimeStampSize(theMeshName,theEntity,theFieldName,theStampsNum);
anOutput->Update();
if(theEntity == VISU::NODE_ENTITY)
- BEGMSG(MYVTKDEBUG,"GetPointData() = "<<float(anOutput->GetPointData()->GetActualMemorySize()*1000)<<endl);
+ BEGMSG(MYVTKDEBUG,"GetPointData() = "<<vtkFloatingPointType(anOutput->GetPointData()->GetActualMemorySize()*1000)<<endl);
else
- BEGMSG(MYVTKDEBUG,"GetCellData() = "<<float(anOutput->GetCellData()->GetActualMemorySize()*1000)<<endl);
- BEGMSG(MYVTKDEBUG,"GetActualMemorySize() = "<<float(anOutput->GetActualMemorySize()*1000)<<endl);
+ BEGMSG(MYVTKDEBUG,"GetCellData() = "<<vtkFloatingPointType(anOutput->GetCellData()->GetActualMemorySize()*1000)<<endl);
+ BEGMSG(MYVTKDEBUG,"GetActualMemorySize() = "<<vtkFloatingPointType(anOutput->GetActualMemorySize()*1000)<<endl);
}
}
#ifndef _DEXCEPT_
GetTimeStampSize(theMeshName,theEntity,theFieldName,theStampsNum);
anOutput->Update();
if(theEntity == VISU::NODE_ENTITY)
- BEGMSG(MYVTKDEBUG,"GetPointData() = "<<float(anOutput->GetPointData()->GetActualMemorySize()*1000)<<endl);
+ BEGMSG(MYVTKDEBUG,"GetPointData() = "<<vtkFloatingPointType(anOutput->GetPointData()->GetActualMemorySize()*1000)<<endl);
else
- BEGMSG(MYVTKDEBUG,"GetCellData() = "<<float(anOutput->GetCellData()->GetActualMemorySize()*1000)<<endl);
- BEGMSG(MYVTKDEBUG,"GetActualMemorySize() = "<<float(anOutput->GetActualMemorySize()*1000)<<endl);
+ BEGMSG(MYVTKDEBUG,"GetCellData() = "<<vtkFloatingPointType(anOutput->GetCellData()->GetActualMemorySize()*1000)<<endl);
+ BEGMSG(MYVTKDEBUG,"GetActualMemorySize() = "<<vtkFloatingPointType(anOutput->GetActualMemorySize()*1000)<<endl);
}
}
#ifndef _DEXCEPT_
//---------------------------------------------------------------
-float
+vtkFloatingPointType
VISU_Convertor_impl
::GetSize()
{
- float aResult = 0.0;
+ vtkFloatingPointType aResult = 0.0;
const VISU::TMeshMap& aMeshMap = GetMeshMap();
VISU::TMeshMap::const_iterator aMeshMapIter = aMeshMap.begin();
for(; aMeshMapIter != aMeshMap.end(); aMeshMapIter++){
aResult += GetMeshOnEntitySize(aMeshName,anEntity);
}
}
- MSG(MYDEBUG,"GetSize - aResult = "<<float(aResult));
+ MSG(MYDEBUG,"GetSize - aResult = "<<vtkFloatingPointType(aResult));
return aResult;
}
//---------------------------------------------------------------
-float
+vtkFloatingPointType
VISU_Convertor_impl
::GetMeshOnEntitySize(const std::string& theMeshName,
const VISU::TEntity& theEntity)
vtkIdType aConnectivitySize = aCellsSize*sizeof(vtkIdType);
vtkIdType aTypesSize = aNbCells*sizeof(char);
vtkIdType aLocationsSize = aNbCells*sizeof(int);
- float aNbCellsPerPoint = aCellsSize / aNbCells - 1;
+ vtkFloatingPointType aNbCellsPerPoint = aCellsSize / aNbCells - 1;
vtkIdType aLinksSize = aMesh->myNbPoints *
(vtkIdType(sizeof(vtkIdType)*aNbCellsPerPoint) + sizeof(vtkCellLinks::Link));
aLinksSize = 0;
vtkIdType aResult = aPointsSize + aConnectivitySize + aTypesSize + aLocationsSize + aLinksSize;
MSG(MYDEBUG,"GetMeshOnEntitySize "<<
- "- aResult = "<<float(aResult)<<
+ "- aResult = "<<vtkFloatingPointType(aResult)<<
"; theMeshName = '"<<theMeshName<<"'"<<
"; theEntity = "<<theEntity);
if(MYDEBUG){
- INITMSG(MYVTKDEBUG,"- aPointsSize = "<<float(aPointsSize)<<"\n");
- BEGMSG(MYVTKDEBUG,"- aConnectivitySize = "<<float(aConnectivitySize)<<"\n");
- BEGMSG(MYVTKDEBUG,"- aTypesSize = "<<float(aTypesSize)<<"\n");
- BEGMSG(MYVTKDEBUG,"- aLocationsSize = "<<float(aLocationsSize)<<"\n");
- BEGMSG(MYVTKDEBUG,"- aLinksSize = "<<float(aLinksSize)<<"\n");
+ INITMSG(MYVTKDEBUG,"- aPointsSize = "<<vtkFloatingPointType(aPointsSize)<<"\n");
+ BEGMSG(MYVTKDEBUG,"- aConnectivitySize = "<<vtkFloatingPointType(aConnectivitySize)<<"\n");
+ BEGMSG(MYVTKDEBUG,"- aTypesSize = "<<vtkFloatingPointType(aTypesSize)<<"\n");
+ BEGMSG(MYVTKDEBUG,"- aLocationsSize = "<<vtkFloatingPointType(aLocationsSize)<<"\n");
+ BEGMSG(MYVTKDEBUG,"- aLinksSize = "<<vtkFloatingPointType(aLinksSize)<<"\n");
}
aResult = vtkIdType(aResult*ERR_SIZE_CALC);
//---------------------------------------------------------------
-float
+vtkFloatingPointType
VISU_Convertor_impl
::GetFamilyOnEntitySize(const std::string& theMeshName,
const VISU::TEntity& theEntity,
vtkIdType aConnectivitySize = aCellsSize*sizeof(vtkIdType);
vtkIdType aTypesSize = aNbCells*sizeof(char);
vtkIdType aLocationsSize = aNbCells*sizeof(int);
- float aNbCellsPerPoint = aCellsSize / aNbCells - 1;
+ vtkFloatingPointType aNbCellsPerPoint = aCellsSize / aNbCells - 1;
vtkIdType aLinksSize = aMesh->myNbPoints *
(vtkIdType(sizeof(vtkIdType)*aNbCellsPerPoint) + sizeof(vtkCellLinks::Link));
aLinksSize = 0;
vtkIdType aResult = aPointsSize + aConnectivitySize + aTypesSize + aLocationsSize + aLinksSize;
MSG(MYDEBUG,"GetFamilyOnEntitySize "<<
- "- aResult = "<<float(aResult)<<
+ "- aResult = "<<vtkFloatingPointType(aResult)<<
"; theMeshName = '"<<theMeshName<<"'"<<
"; theEntity = "<<theEntity<<
"; theFamilyName = '"<<theFamilyName<<"'");
if(MYDEBUG){
- INITMSG(MYVTKDEBUG,"- aPointsSize = "<<float(aPointsSize)<<"\n");
- BEGMSG(MYVTKDEBUG,"- aConnectivitySize = "<<float(aConnectivitySize)<<"\n");
- BEGMSG(MYVTKDEBUG,"- aTypesSize = "<<float(aTypesSize)<<"\n");
- BEGMSG(MYVTKDEBUG,"- aLocationsSize = "<<float(aLocationsSize)<<"\n");
- BEGMSG(MYVTKDEBUG,"- aLinksSize = "<<float(aLinksSize)<<"\n");
+ INITMSG(MYVTKDEBUG,"- aPointsSize = "<<vtkFloatingPointType(aPointsSize)<<"\n");
+ BEGMSG(MYVTKDEBUG,"- aConnectivitySize = "<<vtkFloatingPointType(aConnectivitySize)<<"\n");
+ BEGMSG(MYVTKDEBUG,"- aTypesSize = "<<vtkFloatingPointType(aTypesSize)<<"\n");
+ BEGMSG(MYVTKDEBUG,"- aLocationsSize = "<<vtkFloatingPointType(aLocationsSize)<<"\n");
+ BEGMSG(MYVTKDEBUG,"- aLinksSize = "<<vtkFloatingPointType(aLinksSize)<<"\n");
}
aResult = vtkIdType(aResult*ERR_SIZE_CALC);
}
-float
+vtkFloatingPointType
VISU_Convertor_impl
::GetMeshOnGroupSize(const std::string& theMeshName,
const std::string& theGroupName)
vtkIdType aCellsSize = aNbASizeCells.second;
vtkIdType aConnectivityAndTypesSize = aCellsSize*sizeof(vtkIdType);
vtkIdType aLocationsSize = aNbCells*sizeof(int);
- float aNbCellsPerPoint = aCellsSize / aNbCells - 1;
+ vtkFloatingPointType aNbCellsPerPoint = aCellsSize / aNbCells - 1;
vtkIdType aLinksSize = aMesh->myNbPoints *
(vtkIdType(sizeof(vtkIdType)*aNbCellsPerPoint) + sizeof(short));
aLinksSize = 0;
vtkIdType aResult = aPointsSize + aConnectivityAndTypesSize + aLocationsSize + aLinksSize;
if(MYDEBUG){
- MSG(MYVTKDEBUG,"GetMeshOnGroupSize - aPointsSize = "<<float(aPointsSize));
- MSG(MYVTKDEBUG,"GetMeshOnGroupSize - aConnectivityAndTypesSize = "<<float(aConnectivityAndTypesSize));
- MSG(MYVTKDEBUG,"GetMeshOnGroupSize - aLocationsSize = "<<float(aLocationsSize));
- MSG(MYVTKDEBUG,"GetMeshOnGroupSize - aLinksSize = "<<float(aLinksSize));
+ MSG(MYVTKDEBUG,"GetMeshOnGroupSize - aPointsSize = "<<vtkFloatingPointType(aPointsSize));
+ MSG(MYVTKDEBUG,"GetMeshOnGroupSize - aConnectivityAndTypesSize = "<<vtkFloatingPointType(aConnectivityAndTypesSize));
+ MSG(MYVTKDEBUG,"GetMeshOnGroupSize - aLocationsSize = "<<vtkFloatingPointType(aLocationsSize));
+ MSG(MYVTKDEBUG,"GetMeshOnGroupSize - aLinksSize = "<<vtkFloatingPointType(aLinksSize));
}
- MSG(MYDEBUG,"GetMeshOnGroupSize - aResult = "<<float(aResult)<<"; theMeshName = '"
+ MSG(MYDEBUG,"GetMeshOnGroupSize - aResult = "<<vtkFloatingPointType(aResult)<<"; theMeshName = '"
<<theMeshName<<"'; theGroupName = '"<<theGroupName<<"'");
aResult = vtkIdType(aResult*ERR_SIZE_CALC);
}
-float
+vtkFloatingPointType
VISU_Convertor_impl
::GetFieldOnMeshSize(const std::string& theMeshName,
const VISU::TEntity& theEntity,
PMeshOnEntityImpl aVTKMeshOnEntity = boost::get<2>(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 = "<<float(aFieldOnMeshSize));
- MSG(MYDEBUG,"GetFieldOnMeshSize - aResult = "<<float(aResult)<<"; theMeshName = '"<<theMeshName<<
+ MSG(MYVTKDEBUG,"GetFieldOnMeshSize - aFieldOnMeshSize = "<<vtkFloatingPointType(aFieldOnMeshSize));
+ MSG(MYDEBUG,"GetFieldOnMeshSize - aResult = "<<vtkFloatingPointType(aResult)<<"; theMeshName = '"<<theMeshName<<
"'; theEntity = "<<theEntity<<"; theFieldName = '"<<theFieldName<<"'");
return aResult;
}
-float
+vtkFloatingPointType
VISU_Convertor_impl
::GetTimeStampSize(const std::string& theMeshName,
const VISU::TEntity& theEntity,
PMeshOnEntityImpl aVTKMeshOnEntity = boost::get<2>(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 = "<<float(aTimeStampSize));
- MSG(MYDEBUG,"GetTimeStampSize - aResult = "<<float(aResult)<<
+ MSG(MYDEBUG && MYVTKDEBUG,"GetTimeStampSize - aTimeStampSize = "<<vtkFloatingPointType(aTimeStampSize));
+ MSG(MYDEBUG,"GetTimeStampSize - aResult = "<<vtkFloatingPointType(aResult)<<
"; theMeshName = '"<<theMeshName<<"'; theEntity = "<<theEntity<<
"; theFieldName = '"<<theFieldName<<"'; theStampsNum = "<<theStampsNum);