int aTimeStamp = aValFieldIter->first;
if(anEntity != VISU::NODE_ENTITY){
- VISU::PGaussMesh aGaussMesh =
+ VISU::PGaussPtsIDMapper aGaussMesh =
aCon->GetTimeStampOnGaussPts(aMeshName,anEntity,aFieldName,aTimeStamp);
VISU::TVTKOutput* aDataSet = aGaussMesh->GetVTKOutput();
GetSize() = 0;
virtual
- VISU::PIDMapper
+ VISU::PNamedIDMapper
GetMeshOnEntity(const std::string& theMeshName,
const VISU::TEntity& theEntity) = 0;
int theStampsNum) = 0;
virtual
- VISU::PGaussMesh
+ VISU::PGaussPtsIDMapper
GetTimeStampOnGaussPts(const std::string& theMeshName,
const VISU::TEntity& theEntity,
const std::string& theFieldName,
//---------------------------------------------------------------
TVTKOutput*
- TProfileMergeFilter
+ TIDMapperFilter
::GetVTKOutput()
{
if(!myFilter.GetPointer()){
- const TVTKAppendFilter& anAppendFilter = myProfile.GetFilter();
+ const TVTKAppendFilter& anAppendFilter = myIDMapper.GetFilter();
TVTKOutput* aGeometry = anAppendFilter->GetOutput();
const TVTKSource& aSource = mySource.GetSource();
}
vtkIdType
- TProfileMergeFilter
+ TIDMapperFilter
::GetNodeObjID(vtkIdType theID) const
{
- return myProfile.GetNodeObjID(theID);
+ return myIDMapper.GetNodeObjID(theID);
}
vtkIdType
- TProfileMergeFilter
+ TIDMapperFilter
::GetNodeVTKID(vtkIdType theID) const
{
- return myProfile.GetNodeVTKID(theID);
+ return myIDMapper.GetNodeVTKID(theID);
}
float*
- TProfileMergeFilter
+ TIDMapperFilter
::GetNodeCoord(vtkIdType theObjID)
{
- return myProfile.GetNodeCoord(theObjID);
+ return myIDMapper.GetNodeCoord(theObjID);
}
vtkIdType
- TProfileMergeFilter
+ TIDMapperFilter
::GetElemObjID(vtkIdType theID) const
{
- return myProfile.GetElemObjID(theID);
+ return myIDMapper.GetElemObjID(theID);
}
vtkIdType
- TProfileMergeFilter
+ TIDMapperFilter
::GetElemVTKID(vtkIdType theID) const
{
- return myProfile.GetElemVTKID(theID);
+ return myIDMapper.GetElemVTKID(theID);
}
vtkCell*
- TProfileMergeFilter
+ TIDMapperFilter
::GetElemCell(vtkIdType theObjID)
{
- return myProfile.GetElemCell(theObjID);
+ return myIDMapper.GetElemCell(theObjID);
}
TGaussPointID
TGaussMeshImpl
- ::GetObjID(int theID) const
+ ::GetObjID(vtkIdType theID) const
{
const TVTKAppendFilter& anAppendFilter = GetFilter();
vtkIdType anInputDataSetID;
return myParent;
}
+
+ //---------------------------------------------------------------
+ TGaussPointID
+ TGaussPtsIDFilter
+ ::GetObjID(vtkIdType theID) const
+ {
+ return myGaussPtsIDMapper->GetObjID(theID);
+ }
+
+ TNamedIDMapper*
+ TGaussPtsIDFilter::
+ GetParent()
+ {
+ return myGaussPtsIDMapper->GetParent();
+ }
+
+
//---------------------------------------------------------------
vtkIdType
TSubMeshImpl
//---------------------------------------------------------------
TValForTimeImpl
::TValForTimeImpl():
- myProfileMergeFilter(new TProfileMergeFilter())
+ myGaussPtsIDFilter(new TGaussPtsIDFilter()),
+ myIDMapperFilter(new TIDMapperFilter())
{}
const TMeshValue&
//---------------------------------------------------------------
-VISU::PIDMapper
+VISU::PNamedIDMapper
VISU_Convertor_impl
::GetMeshOnEntity(const string& theMeshName,
const VISU::TEntity& theEntity)
PFieldImpl aField = boost::get<3>(aFindTimeStamp);
//Main part of code
- PProfileMergeFilter aProfileMergeFilter = aValForTime->myProfileMergeFilter;
+ PIDMapperFilter anIDMapperFilter = aValForTime->myIDMapperFilter;
#ifndef _DEXCEPT_
try{
#endif
- if(!aProfileMergeFilter->myIsVTKDone){
+ if(!anIDMapperFilter->myIsVTKDone){
LoadValForTimeOnMesh(aMesh,aMeshOnEntity,aField,aValForTime);
try{
aProfileSource.myIsVTKDone = true;
}
- aProfileMergeFilter->myProfile = aProfile;
- TVTKOutput* anOutput = aProfileMergeFilter->GetVTKOutput();
- const TVTKSource& aSource = aProfileMergeFilter->mySource.GetSource();
+ anIDMapperFilter->myIDMapper = aProfile;
+ TVTKOutput* anOutput = anIDMapperFilter->GetVTKOutput();
+ const TVTKSource& aSource = anIDMapperFilter->mySource.GetSource();
GetTimeStampOnProfile(aSource,aField,aValForTime);
- aProfileMergeFilter->myIsVTKDone = true;
+ anIDMapperFilter->myIsVTKDone = true;
if(MYDEBUGWITHFILES){
string aMeshName = QString(theMeshName.c_str()).simplifyWhiteSpace().latin1();
}
#endif
- return aProfileMergeFilter;
+ return anIDMapperFilter;
}
//---------------------------------------------------------------
-VISU::PGaussMesh
+VISU::PGaussPtsIDMapper
VISU_Convertor_impl
::GetTimeStampOnGaussPts(const string& theMeshName,
const VISU::TEntity& theEntity,
PFieldImpl aField = boost::get<3>(aFindTimeStamp);
//Main part of code
- PGaussMeshImpl aGaussMesh = aValForTime->myGaussMesh;
- TSource& aGaussPtsSource = aGaussMesh->mySource;
+ PGaussPtsIDFilter aGaussPtsIDFilter = aValForTime->myGaussPtsIDFilter;
#ifndef _DEXCEPT_
try{
#endif
- if(!aGaussPtsSource.myIsVTKDone){
+ if(!aGaussPtsIDFilter->myIsVTKDone){
LoadValForTimeOnGaussPts(aMesh,aMeshOnEntity,aField,aValForTime);
GetMeshOnEntity(aVTKMeshOnEntity->myMeshName,aVTKMeshOnEntity->myEntity);
PGaussMeshImpl aGaussMesh = aValForTime->myGaussMesh;
- const TGeom2GaussSubMesh& aGeom2GaussSubMesh = aGaussMesh->myGeom2GaussSubMesh;
- BuildGaussMesh(aMesh,aVTKMeshOnEntity,aGaussMesh);
+ TSource& aGaussPtsSource = aGaussMesh->mySource;
+ if(!aGaussPtsSource.myIsVTKDone){
+ BuildGaussMesh(aMesh,aVTKMeshOnEntity,aGaussMesh);
+ aGaussPtsSource.myIsVTKDone = true;
+ }
- const TVTKAppendFilter& anAppendFilter = aGaussMesh->GetFilter();
- const TVTKSource& aSource = aGaussPtsSource.GetSource();
- aSource->ShallowCopy(anAppendFilter->GetOutput());
+ aGaussPtsIDFilter->myIDMapper = aGaussMesh;
+ aGaussPtsIDFilter->myGaussPtsIDMapper = aGaussMesh;
+ TVTKOutput* anOutput = aGaussPtsIDFilter->GetVTKOutput();
+ const TVTKSource& aSource = aGaussPtsIDFilter->mySource.GetSource();
GetTimeStampOnGaussMesh(aSource,aField,aValForTime);
- aGaussPtsSource.myIsVTKDone = true;
+ aGaussPtsIDFilter->myIsVTKDone = true;
if(MYDEBUGWITHFILES){
string aMeshName = QString(theMeshName.c_str()).simplifyWhiteSpace().latin1();
string aPrefix = string(getenv("HOME"))+"/"+getenv("USER")+"-";
string aFileName = aPrefix + aMeshName + dtos("-%d-",int(theEntity)) +
aFieldName + dtos("-%d",theStampsNum) + "-Conv.vtk";
- VISU::WriteToFile(aSource.GetPointer(),aFileName);
+ VISU::WriteToFile(anOutput,aFileName);
}
if(MYVTKDEBUG){
GetTimeStampSize(theMeshName,theEntity,theFieldName,theStampsNum);
- aSource->Update();
+ anOutput->Update();
if(theEntity == VISU::NODE_ENTITY)
- BEGMSG(MYVTKDEBUG,"GetPointData() = "<<float(aSource->GetPointData()->GetActualMemorySize()*1000)<<endl);
+ BEGMSG(MYVTKDEBUG,"GetPointData() = "<<float(anOutput->GetPointData()->GetActualMemorySize()*1000)<<endl);
else
- BEGMSG(MYVTKDEBUG,"GetCellData() = "<<float(aSource->GetCellData()->GetActualMemorySize()*1000)<<endl);
- BEGMSG(MYVTKDEBUG,"GetActualMemorySize() = "<<float(aSource->GetActualMemorySize()*1000)<<endl);
+ BEGMSG(MYVTKDEBUG,"GetCellData() = "<<float(anOutput->GetCellData()->GetActualMemorySize()*1000)<<endl);
+ BEGMSG(MYVTKDEBUG,"GetActualMemorySize() = "<<float(anOutput->GetActualMemorySize()*1000)<<endl);
}
}
#ifndef _DEXCEPT_
}
#endif
- return aGaussMesh;
+ return aGaussPtsIDFilter;
}
//---------------------------------------------------------------
//---------------------------------------------------------------
- struct TProfileMergeFilter: virtual TMergeFilter
- {
- TProfileImpl myProfile;
+ struct TIDMapperFilter: virtual TMergeFilter
+ {
+ TAppendFilter myIDMapper;
TSource mySource;
virtual
TVTKOutput*
GetVTKOutput();
};
- typedef SharedPtr<TProfileMergeFilter> PProfileMergeFilter;
+ typedef SharedPtr<TIDMapperFilter> PIDMapperFilter;
//---------------------------------------------------------------
typedef SharedPtr<TGaussMeshImpl> PGaussMeshImpl;
+ struct TGaussPtsIDFilter: virtual TIDMapperFilter,
+ virtual TGaussPtsIDMapper
+ {
+ PGaussPtsIDMapper myGaussPtsIDMapper;
+
+ virtual
+ TGaussPointID
+ GetObjID(vtkIdType theID) const;
+
+ virtual
+ TNamedIDMapper*
+ GetParent();
+ };
+ typedef SharedPtr<TGaussPtsIDFilter> PGaussPtsIDFilter;
+
+
//---------------------------------------------------------------
typedef TVector<vtkIdType> TConnect;
typedef TVector<TConnect> TCell2Connect;
struct TValForTimeImpl: virtual TValForTime
{
- PProfileMergeFilter myProfileMergeFilter;
+ PGaussPtsIDFilter myGaussPtsIDFilter;
+ PIDMapperFilter myIDMapperFilter;
TGeom2Value myGeom2Value;
vtkIdType myNbGauss;
GetSize();
virtual
- VISU::PIDMapper
+ VISU::PNamedIDMapper
GetMeshOnEntity(const std::string& theMeshName,
const VISU::TEntity& theEntity);
int theStampsNum);
virtual
- VISU::PGaussMesh
+ VISU::PGaussPtsIDMapper
GetTimeStampOnGaussPts(const std::string& theMeshName,
const VISU::TEntity& theEntity,
const std::string& theFieldName,
VISU::PMEDField theField,
VISU::PMEDValForTime theValForTime)
{
- PProfileMergeFilter aProfileMergeFilter = theValForTime->myProfileMergeFilter;
+ PIDMapperFilter anIDMapperFilter = theValForTime->myIDMapperFilter;
return LoadValForTime(theMed,
theMesh,
theMeshOnEntity,
theField,
theValForTime,
false,
- aProfileMergeFilter->myIsVTKDone);
+ anIDMapperFilter->myIsVTKDone);
}
VISU::PMEDField theField,
VISU::PMEDValForTime theValForTime)
{
- PGaussMeshImpl aGaussMesh = theValForTime->myGaussMesh;
- TSource& aGaussPtsSource = aGaussMesh->mySource;
+ PGaussPtsIDFilter aGaussPtsIDFilter = theValForTime->myGaussPtsIDFilter;
return LoadValForTime(theMed,
theMesh,
theMeshOnEntity,
theField,
theValForTime,
true,
- aGaussPtsSource.myIsDone);
+ aGaussPtsIDFilter->myIsVTKDone);
}
std::ostringstream aStr;
aStr<<"Global ID: "<<anObjId;
- const VISU::PGaussMesh& aGaussMesh = myGaussPointsPL->GetGaussMesh();
- VISU::TNamedIDMapper* aParent = aGaussMesh->GetParent();
+ const VISU::PGaussPtsIDMapper& aGaussPtsIDMapper = myGaussPointsPL->GetGaussPtsIDMapper();
+ VISU::TNamedIDMapper* aParent = aGaussPtsIDMapper->GetParent();
VISU::TGaussPointID aGaussPointID = myGaussPointsPL->GetObjID(anObjId);
VISU::TCellID aCellID = aGaussPointID.first;
if(aSelectionMode == CellSelection){
// Hilighting an element from the parent Mesh
if(theSelector->HasIndex(myIO)){
- const VISU::PGaussMesh& aGaussMesh = myGaussPointsPL->GetGaussMesh();
- VISU::TNamedIDMapper* aParent = aGaussMesh->GetParent();
+ const VISU::PGaussPtsIDMapper& aGaussPtsIDMapper = myGaussPointsPL->GetGaussPtsIDMapper();
+ VISU::TNamedIDMapper* aParent = aGaussPtsIDMapper->GetParent();
myCellSource->Reset();
myCellSource->Modified(); // a VTK bug
myCellSource->SetPoints(aParent->GetVTKOutput()->GetPoints());
- VISU::TGaussPointID aGaussPointID = aGaussMesh->GetObjID(anObjId);
+ VISU::TGaussPointID aGaussPointID = aGaussPtsIDMapper->GetObjID(anObjId);
vtkIdType aCellID = aGaussPointID.first;
vtkCell* aCell = aParent->GetElemCell(aCellID);
myCellSource->InsertNextCell(aCell->GetCellType(),aCell->GetPointIds());
{
Superclass::ShallowCopy(thePipeLine);
if(VISU_GaussPointsPL *aPipeLine = dynamic_cast<VISU_GaussPointsPL*>(thePipeLine)){
- SetGaussMesh(aPipeLine->GetGaussMesh());
+ SetGaussPtsIDMapper(aPipeLine->GetGaussPtsIDMapper());
vtkPolyData* aDatsSet = myPSMapper->GetInput();
myPSMapper->ShallowCopy(aPipeLine->GetPSMapper());
// To restore mapper input from pipeline
myPSMapper->SetInput(aDatsSet);
- SetGaussMesh(aPipeLine->GetGaussMesh());
+ SetGaussPtsIDMapper(aPipeLine->GetGaussPtsIDMapper());
SetClamp(aPipeLine->GetClamp());
SetRelativeSize(aPipeLine->GetRelativeSize());
SetRelativeMinSize(aPipeLine->GetRelativeMinSize());
VISU_GaussPointsPL
::GetObjID(vtkIdType theID) const
{
- return myGaussMesh->GetObjID(theID);
+ return myGaussPtsIDMapper->GetObjID(theID);
}
void
VISU_GaussPointsPL
-::SetGaussMesh(const VISU::PGaussMesh& theGaussMesh)
+::SetGaussPtsIDMapper(const VISU::PGaussPtsIDMapper& theGaussPtsIDMapper)
{
- myGaussMesh = theGaussMesh;
- SetIDMapper(myGaussMesh);
+ myGaussPtsIDMapper = theGaussPtsIDMapper;
+ SetIDMapper(myGaussPtsIDMapper);
}
-const VISU::PGaussMesh&
+const VISU::PGaussPtsIDMapper&
VISU_GaussPointsPL
-::GetGaussMesh() const
+::GetGaussPtsIDMapper() const
{
- return myGaussMesh;
+ return myGaussPtsIDMapper;
}
//----------------------------------------------------------------------------
GetObjID(vtkIdType theID) const;
void
- SetGaussMesh(const VISU::PGaussMesh& theGaussMesh);
+ SetGaussPtsIDMapper(const VISU::PGaussPtsIDMapper& theGaussPtsIDMapper);
- const VISU::PGaussMesh&
- GetGaussMesh() const;
+ const VISU::PGaussPtsIDMapper&
+ GetGaussPtsIDMapper() const;
void
SetBicolor(bool theBicolor);
protected:
VISU_OpenGLPointSpriteMapper* myPSMapper;
vtkGeometryFilter* myGeomFilter;
- VISU::PGaussMesh myGaussMesh;
+ VISU::PGaussPtsIDMapper myGaussPtsIDMapper;
vtkDataArray *myScalarArray;
float mySourceScalarRange[2];
if(myField == NULL)
throw std::runtime_error("There is no Field with the parameters !!!");
- VISU::PGaussMesh aGaussMesh =
+ VISU::PGaussPtsIDMapper aGaussPtsIDMapper =
theResult->GetInput()->GetTimeStampOnGaussPts(myMeshName,myEntity,myFieldName,myIteration);
- if(!aGaussMesh)
+ if(!aGaussPtsIDMapper)
throw std::runtime_error("There is no TimeStamp with the parameters !!!");
- myGaussPointsPL->SetGaussMesh(aGaussMesh);
+ myGaussPointsPL->SetGaussPtsIDMapper(aGaussPtsIDMapper);
myGaussPointsPL->Build();
}
SetTextures( const QString& theMainTexture,
const QString& theAlphaTexture );
- void SetIsActiveLocalScalarBar(const bool theFlag);
- bool GetIsActiveLocalScalarBar()const;
- void SetIsDispGlobalScalarBar(const bool theFlag);
- bool GetIsDispGlobalScalarBar()const;
+ void
+ SetIsActiveLocalScalarBar(const bool theFlag);
+
+ bool
+ GetIsActiveLocalScalarBar() const;
+
+ void
+ SetIsDispGlobalScalarBar(const bool theFlag);
+
+ bool
+ GetIsDispGlobalScalarBar() const;
protected:
virtual