#ifdef _DEBUG_
static int MYDEBUG = 1;
-static int MYDEBUGWITHFILES = 0;
+static int MYDEBUGWITHFILES = 1;
#else
static int MYDEBUG = 0;
static int MYDEBUGWITHFILES = 0;
}
+ vtkIdType
+ TSubProfileImpl
+ ::GetNodeObjId(vtkIdType theID) const
+ {
+ return theID;
+ }
+
+ vtkIdType
+ TSubProfileImpl
+ ::GetElemObjId(vtkIdType theID) const
+ {
+ return theID;
+ }
+
+
//---------------------------------------------------------------
bool
operator<(const PSubProfile& theLeft, const PSubProfile& theRight)
myIsAll(true)
{}
+ vtkIdType
+ TProfileImpl
+ ::GetNodeObjId(vtkIdType theID) const
+ {
+ vtkIdType anInputID;
+ const TVTKAppendFilter& anAppendFilter = GetFilter();
+ vtkIdType aID = anAppendFilter->GetNodeObjId(theID,anInputID);
+ const TSubProfileImpl& aSubProfileImpl = mySubProfileArr[anInputID];
+ return aSubProfileImpl.GetNodeObjId(aID);
+ }
+
+ vtkIdType
+ TProfileImpl
+ ::GetElemObjId(vtkIdType theID) const
+ {
+ vtkIdType anInputID;
+ const TVTKAppendFilter& anAppendFilter = GetFilter();
+ vtkIdType aID = anAppendFilter->GetElemObjId(theID,anInputID);
+ const TSubProfileImpl& aSubProfileImpl = mySubProfileArr[anInputID];
+ return aSubProfileImpl.GetElemObjId(aID);
+ }
+
//---------------------------------------------------------------
TGaussSubMeshImpl::TGaussSubMeshImpl():
{}
//---------------------------------------------------------------
- TGaussPointID TGaussMeshImpl::GetObjId(int theVtkI)
+ TGaussPointID
+ TGaussMeshImpl
+ ::GetObjId(int theVtkI) const
{
TGaussPointID aRetVID;
int aID, anIndexDS;
const TVTKAppendFilter& anAppendFilter = GetFilter();
aID=anAppendFilter->GetElemObjId(theVtkI, anIndexDS);
//
- TGaussSubMeshImpl& aSubMeshImpl=myGaussSubMeshArr[anIndexDS];
+ const TGaussSubMeshImpl& aSubMeshImpl = myGaussSubMeshArr[anIndexDS];
aVID=(vtkIdType)aID;
aRetVID=aSubMeshImpl.GetObjID(aVID);
return aRetVID;
vtkIdType anId = theElemId;
for(vtkIdType aCompId = 0; aCompId < myNbComp; aCompId++){
aValueSliceArr[aCompId] =
- TCValueSlice(myValue,std::slice(anId,myNbGauss,myNbGauss));
+ TCValueSlice(myValue,std::slice(anId,myNbGauss,myNbComp));
anId += 1;
}
return aValueSliceArr;
::GetCompValueSliceArr(vtkIdType theElemId)
{
TValueSliceArr aValueSliceArr(myNbComp);
- vtkIdType anId = theElemId*myStep;
+ vtkIdType anId = theElemId;
for(vtkIdType aCompId = 0; aCompId < myNbComp; aCompId++){
aValueSliceArr[aCompId] =
- TValueSlice(myValue,std::slice(anId,myNbGauss,myNbGauss));
+ TValueSlice(myValue,std::slice(anId,myNbGauss,myNbComp));
anId += 1;
}
return aValueSliceArr;
int
TValForTimeImpl
::GetNbGauss(vtkIdType theGeom) const
- {
- return myNbGauss;
- }
-
- int
- TGaussPtsValForTimeImpl
- ::GetNbGauss(vtkIdType theGeom) const
{
if(PGaussMeshImpl aGaussMesh = myGaussMesh){
const TGeom2GaussSubMesh& aGeom2GaussSubMesh = aGaussMesh->myGeom2GaussSubMesh;
}
return myNbGauss;
}
-
+
//---------------------------------------------------------------
vtkIdType
void
GetTimeStampOnGaussMesh(const TVTKSource& theSource,
const PFieldImpl& theField,
- const PGaussPtsValForTimeImpl& theValForTime)
+ const PValForTimeImpl& theValForTime)
{
int aNbTuples = theSource->GetNumberOfPoints();
std::string aFieldName = GenerateFieldName(theField,theValForTime);
PMeshImpl aMesh = boost::get<0>(aFindTimeStamp);
PMeshOnEntityImpl aMeshOnEntity = boost::get<1>(aFindTimeStamp);
PMeshOnEntityImpl aVTKMeshOnEntity = boost::get<2>(aFindTimeStamp);
- PGaussPtsValForTimeImpl aValForTime = boost::get<4>(aFindTimeStamp);
+ PValForTimeImpl aValForTime = boost::get<4>(aFindTimeStamp);
PFieldImpl aField = boost::get<3>(aFindTimeStamp);
//Main part of code
//---------------------------------------------------------------
VISU_Convertor::TOutput*
VISU_Convertor_impl
-::GetGaussPointsOnMesh(const string& theMeshName,
- const VISU::TEntity& theEntity,
- const string& theFieldName,
- int theStampsNum)
+::GetTimeStampOnGaussPts(const string& theMeshName,
+ const VISU::TEntity& theEntity,
+ const string& theFieldName,
+ int theStampsNum)
{
- INITMSG(MYDEBUG,"GetGaussPointsOnMesh"<<
+ INITMSG(MYDEBUG,"GetTimeStampOnGaussPts"<<
"; theMeshName = '"<<theMeshName<<"'"<<
"; theEntity = "<<theEntity<<
"; theFieldName = '"<<theFieldName<<"'"<<
PMeshImpl aMesh = boost::get<0>(aFindTimeStamp);
PMeshOnEntityImpl aMeshOnEntity = boost::get<1>(aFindTimeStamp);
PMeshOnEntityImpl aVTKMeshOnEntity = aMeshOnEntity;
- PGaussPtsValForTimeImpl aValForTime = boost::get<4>(aFindTimeStamp);
+ PValForTimeImpl aValForTime = boost::get<4>(aFindTimeStamp);
PFieldImpl aField = boost::get<3>(aFindTimeStamp);
//Main part of code
GetMeshOnEntity(aVTKMeshOnEntity->myMeshName,aVTKMeshOnEntity->myEntity);
PGaussMeshImpl aGaussMesh = aValForTime->myGaussMesh;
- INITMSG(MYDEBUG,"aGaussMesh = "<<bool(aGaussMesh)<<endl);
const TGeom2GaussSubMesh& aGeom2GaussSubMesh = aGaussMesh->myGeom2GaussSubMesh;
BuildGaussMesh(aMesh,aVTKMeshOnEntity,aGaussMesh);
- //GetGaussMesh(aMesh,aVTKMeshOnEntity,aGaussMesh);
const TVTKAppendFilter& anAppendFilter = aGaussMesh->GetFilter();
aSource->ShallowCopy(anAppendFilter->GetOutput());
}
//---------------------------------------------------------------
-VISU::PGaussMesh VISU_Convertor_impl::GetGaussMesh(const string& theMeshName,
- const VISU::TEntity& theEntity,
- const string& theFieldName,
- int theStampsNum)
+VISU::PGaussMesh
+VISU_Convertor_impl
+::GetGaussMesh(const string& theMeshName,
+ const VISU::TEntity& theEntity,
+ const string& theFieldName,
+ int theStampsNum)
{
- GetTimeStampOnMesh(theMeshName, theEntity, theFieldName, theStampsNum);
+ GetTimeStampOnGaussPts(theMeshName, theEntity, theFieldName, theStampsNum);
TFindTimeStamp aFindTimeStamp = FindTimeStamp(theMeshName,
theEntity,
theFieldName,
theStampsNum);
- PGaussPtsValForTimeImpl aValForTime = boost::get<4>(aFindTimeStamp);
+ PValForTimeImpl aValForTime = boost::get<4>(aFindTimeStamp);
PGaussMeshImpl aGaussMesh=aValForTime->myGaussMesh;
return aGaussMesh;
PMeshImpl aMesh = boost::get<0>(aFindField);
PMeshOnEntityImpl aMeshOnEntity = boost::get<1>(aFindField);
PMeshOnEntityImpl aVTKMeshOnEntity = boost::get<2>(aFindField);
- PGaussPtsValForTimeImpl aValForTime = aValFieldIter->second;
+ PValForTimeImpl aValForTime = aValFieldIter->second;
return TFindTimeStamp(aMesh,
aMeshOnEntity,
vtkIdType myGeom;
std::string myName;
+ virtual
+ vtkIdType
+ GetNodeObjId(int theVtkI) const;
+
+ virtual
+ vtkIdType
+ GetElemObjId(int theVtkI) const;
+
ESubMeshStatus myStatus;
TSubMeshID mySubMeshID;
};
//---------------------------------------------------------------
- typedef std::map<vtkIdType,PSubProfile> TGeom2SubProfile;
+ typedef std::vector<PSubProfileImpl> TSubProfileArr;
+ typedef std::map<vtkIdType,PSubProfileImpl> TGeom2SubProfile;
struct TProfileImpl: virtual TProfile, virtual TAppendFilter
{
TProfileImpl();
bool myIsAll;
+
+ virtual
+ vtkIdType
+ GetNodeObjId(int theVtkI) const;
+
+ virtual
+ vtkIdType
+ GetElemObjId(int theVtkI) const;
+
+ TSubProfileArr mySubProfileArr;
TGeom2SubProfile myGeom2SubProfile;
};
typedef SharedPtr<TProfileImpl> PProfileImpl;
struct TGaussMeshImpl: virtual TGaussMesh, virtual TAppendFilter
{
TGaussMeshImpl();
- virtual TGaussPointID GetObjId(int theVtkI);
+
+ virtual
+ TGaussPointID
+ GetObjId(int theVtkI) const;
+
TGaussSubMeshArr myGaussSubMeshArr;
TGeom2GaussSubMesh myGeom2GaussSubMesh;
};
TMeshValue&
GetMeshValue(vtkIdType theGeom);
- int myNbGauss;
-
- virtual
- int
- GetNbGauss(vtkIdType theGeom) const;
- };
- typedef SharedPtr<TValForTimeImpl> PValForTimeImpl;
-
-
- //---------------------------------------------------------------
- struct TMeshValForTimeImpl: virtual TMeshValForTime, virtual TValForTimeImpl
- {
TSource myMeshSource;
- };
-
-
- //---------------------------------------------------------------
- struct TGaussPtsValForTimeImpl: virtual TGaussPtsValForTime, virtual TMeshValForTimeImpl
- {
TSource myGaussPtsSource;
+ int myNbGauss;
+
virtual
int
GetNbGauss(vtkIdType theGeom) const;
};
- typedef SharedPtr<TGaussPtsValForTimeImpl> PGaussPtsValForTimeImpl;
+ typedef SharedPtr<TValForTimeImpl> PValForTimeImpl;
//---------------------------------------------------------------
const std::string& theFieldName,
int theStampsNum);
virtual
+ TOutput*
+ GetTimeStampOnGaussPts(const std::string& theMeshName,
+ const VISU::TEntity& theEntity,
+ const std::string& theFieldName,
+ int theStampsNum);
+
+ virtual
VISU::PGaussMesh
GetGaussMesh(const std::string& theMeshName,
const VISU::TEntity& theEntity,
const std::string& theFieldName,
int theStampsNum);
- virtual
- TOutput*
- GetGaussPointsOnMesh(const std::string& theMeshName,
- const VISU::TEntity& theEntity,
- const std::string& theFieldName,
- int theStampsNum);
-
protected:
VISU::PMeshImpl
FindMesh(const std::string& theMeshName);
VISU::PMeshOnEntityImpl,
VISU::PMeshOnEntityImpl,
VISU::PFieldImpl,
- VISU::PGaussPtsValForTimeImpl> TFindTimeStamp;
+ VISU::PValForTimeImpl> TFindTimeStamp;
TFindTimeStamp
FindTimeStamp(const std::string& theMeshName,
const VISU::TEntity& theEntity,