VISU_GaussPtsAct
::GetMemorySize()
{
- unsigned long int aSize = Superclass::GetMemorySize();
vtkDataSet* aDataSet = myDeviceActor->GetMapper()->GetInput();
- aSize += aDataSet->GetActualMemorySize() * 1024;
+ unsigned long int aSize = aDataSet->GetActualMemorySize() * 1024;
+
+ //aSize += Superclass::GetMemorySize();
+
return aSize;
}
::GetMemorySize()
{
unsigned long int aSize = Superclass::GetMemorySize();
- {
- vtkDataSet* aDataSet = myInsideDeviceActor->GetMapper()->GetInput();
- aSize += aDataSet->GetActualMemorySize() * 1024;
- }
- {
- vtkDataSet* aDataSet = myOutsideDeviceActor->GetMapper()->GetInput();
- aSize += aDataSet->GetActualMemorySize() * 1024;
+ if(IsSegmentationEnabled()){
+ aSize += myInsideDeviceActor->GetMemorySize();
+ aSize += myOutsideDeviceActor->GetMemorySize();
}
return aSize;
}
}
+//----------------------------------------------------------------------------
+unsigned long int
+VISU_GaussPtsAct2
+::GetMemorySize()
+{
+ if(IsSegmentationEnabled())
+ return Superclass::GetMemorySize();
+ return 0;
+}
+
+
//----------------------------------------------------------------------------
void
VISU_GaussPtsAct2
void
SetWidgetCtrl(VISU_WidgetCtrl* theWidgetCtrl);
+ //! Gets memory size used by the instance (bytes).
+ virtual
+ unsigned long int
+ GetMemorySize();
+
protected:
//----------------------------------------------------------------------------
VISU_GaussPtsAct2();
return myMapper.GetPointer();
}
+//----------------------------------------------------------------------------
+unsigned long int
+VISU_GaussPtsDeviceActor
+::GetMemorySize()
+{
+ vtkDataSet* aDataSet = GetMapper()->GetInput();
+ unsigned long int aSize = aDataSet->GetActualMemorySize() * 1024;
+
+ aSize += GetPipeLine()->GetMemorySize();
+
+ return aSize;
+}
+
+//----------------------------------------------------------------------------
int
VISU_GaussPtsDeviceActor
::GetPickable()
VISU_OpenGLPointSpriteMapper*
GetPSMapper();
+ //! Gets memory size used by the instance (bytes).
+ virtual
+ unsigned long int
+ GetMemorySize();
+
virtual
int
GetPickable();
VISU_DeformedShapePL
::GetMemorySize()
{
- vtkDataSet* aDataSet = myCellDataToPointData->GetOutput();
+ vtkDataSet* aDataSet = myWarpVector->GetOutput();
unsigned long int aSize = aDataSet->GetActualMemorySize() * 1024;
- aDataSet = myWarpVector->GetOutput();
- aSize += aDataSet->GetActualMemorySize() * 1024;
+ if(myCellDataToPointData->GetInput()){
+ aDataSet = myCellDataToPointData->GetOutput();
+ aSize += aDataSet->GetActualMemorySize() * 1024;
+ }
aSize += Superclass::GetMemorySize();
VISU_ScalarMapPL::Update();
}
+//----------------------------------------------------------------------------
+unsigned long int
+VISU_GaussPointsPL
+::GetMemorySize()
+{
+ vtkDataSet* aDataSet = myGeomFilter->GetOutput();
+ unsigned long int aSize = aDataSet->GetActualMemorySize() * 1024;
+
+ if(myCellDataToPointData->GetInput()){
+ aDataSet = myCellDataToPointData->GetOutput();
+ aSize += aDataSet->GetActualMemorySize() * 1024;
+ }
+
+ if(GetIsDeformed()){
+ aDataSet = myWarpVector->GetOutput();
+ aSize += aDataSet->GetActualMemorySize() * 1024;
+ }
+
+ if(GetPrimitiveType() == VISU_OpenGLPointSpriteMapper::GeomSphere){
+ aDataSet = myGlyph->GetOutput();
+ aSize += aDataSet->GetActualMemorySize() * 1024;
+ }
+
+ return aSize;
+}
+
+
//----------------------------------------------------------------------------
void
VISU_GaussPointsPL
void
Update();
+ //! Gets memory size used by the instance (bytes).
+ virtual
+ unsigned long int
+ GetMemorySize();
+
//! Update glyph.
void
UpdateGlyph();
aDataSet = myExtractGeometry->GetOutput();
aSize += aDataSet->GetActualMemorySize() * 1024;
- aDataSet = GetMapper()->GetInput();
- aSize += aDataSet->GetActualMemorySize() * 1024;
-
return aSize;
}
vtkDataSet* aDataSet = myGeometryFilter->GetOutput();
unsigned long int aSize = aDataSet->GetActualMemorySize() * 1024;
- aDataSet = myCellDataToPointData->GetInput();
- aSize += aDataSet->GetActualMemorySize() * 1024;
+ if(myCellDataToPointData->GetInput()){
+ aDataSet = myCellDataToPointData->GetOutput();
+ aSize += aDataSet->GetActualMemorySize() * 1024;
+ }
aDataSet = myContourFilter->GetInput();
aSize += aDataSet->GetActualMemorySize() * 1024;
static int MYDEBUG = 0;
#endif
+static int INCMEMORY = 10;
+
//----------------------------------------------------------------------------
size_t
VISU::GaussPoints_i
bool theIsMemoryCheck)
{
try{
- if(theEntity != VISU::NODE)
- return VISU::ScalarMap_i::IsPossible(theResult,theMeshName,theEntity,theFieldName,theTimeStampNumber,theIsMemoryCheck);
+ if(theEntity == VISU::NODE)
+ return 0;
+ size_t aResult = VISU::ScalarMap_i::IsPossible(theResult,theMeshName,theEntity,theFieldName,theTimeStampNumber,false);
+ if(theIsMemoryCheck && aResult){
+ VISU::Result_i::TInput* anInput = theResult->GetInput();
+ float aSize = anInput->GetTimeStampSize(theMeshName,
+ (VISU::TEntity)theEntity,
+ theFieldName,
+ theTimeStampNumber);
+ aSize *= INCMEMORY;
+ aResult = VISU_PipeLine::CheckAvailableMemory(aSize);
+ if(MYDEBUG)
+ MESSAGE("Vectors_i::IsPossible - CheckAvailableMemory = "<<float(aSize)<<"; aResult = "<<aResult);
+ }
}catch(std::exception& exc){
INFOS("Follow exception was occured :\n"<<exc.what());
}catch(...){
::GetMemorySize()
{
// To calculate memory used by VISU Converter
- static int INCMEMORY = 2;
+ static int INCMEMORY = 4;
vtkDataSet* aDataSet = GetPipeLine()->GetInput();
- CORBA::Float aSize = aDataSet->GetActualMemorySize() * INCMEMORY / 1024.0;
+ CORBA::Float aSize = aDataSet->GetActualMemorySize() * INCMEMORY * 1024.0;
+ cout<<"Prs3d_i::GetMemorySize - "<<this<<"; aDataSet = "<<aSize / (1024.0 * 1024.0)<<endl;
// To calculate memory used by VISU PipeLine
aSize += GetPipeLine()->GetMemorySize();
+ cout<<"Prs3d_i::GetMemorySize - "<<this<<"; GetPipeLine = "<<aSize / (1024.0 * 1024.0)<<endl;
// To calculate memory used by VISU Actos
int anEnd = myActorCollection->GetNumberOfItems();
if(vtkObject* anObject = myActorCollection->GetItemAsObject(anId))
if(VISU_Actor* anActor = dynamic_cast<VISU_Actor*>(anObject)){
aSize += anActor->GetMemorySize();
+ cout<<"Prs3d_i::GetMemorySize - "<<this<<"; anActor = "<<aSize / (1024.0 * 1024.0)<<endl;
}
+ cout<<endl;
// Convert to mega bytes
return aSize / (1024.0 * 1024.0);
}
theTimeStampNumber);
aSize *= INCMEMORY;
aResult = VISU_PipeLine::CheckAvailableMemory(aSize);
- MESSAGE("Vectors_i::IsPossible - CheckAvailableMemory = "<<float(aSize)<<"; aResult = "<<aResult);
+ if(MYDEBUG)
+ MESSAGE("Vectors_i::IsPossible - CheckAvailableMemory = "<<float(aSize)<<"; aResult = "<<aResult);
}
}catch(std::exception& exc){
INFOS("Follow exception was occured :\n"<<exc.what());