#include "MED_SharedPtr.hxx"
#include "MED_Vector.hxx"
+#include <vtkSystemIncludes.h>
+
class vtkUnstructuredGrid;
namespace VISU
struct TValForTime;
typedef SharedPtr<TValForTime> PValForTime;
+ struct TMeshValForTime;
+ typedef SharedPtr<TMeshValForTime> PMeshValForTime;
+
+ struct TGaussPtsValForTime;
+ typedef SharedPtr<TGaussPtsValForTime> PGaussPtsValForTime;
+
typedef std::string TName;
typedef TVector<TName> TNames;
struct TGaussSubMesh: virtual TBaseStructure
{
PSubProfile mySubProfile;
- PGauss myGauss;
};
//---------------------------------------------------------------
+ typedef vtkIdType TCellID;
+ typedef vtkIdType TLocalPntID;
+ typedef std::pair<TCellID,TLocalPntID> TGaussPointID;
+
struct TGaussMesh: virtual TBaseStructure
{};
//---------------------------------------------------------------
- typedef std::map<int,PValForTime> TValField;
+ typedef std::map<int,PGaussPtsValForTime> TValField;
struct TField: virtual TIntId
{
TName myMeshName;
TName myFieldName;
TTime myTime;
-
+ };
+
+
+ //---------------------------------------------------------------
+ struct TMeshValForTime: virtual TValForTime
+ {
PProfile myProfile;
+ };
+
+
+ struct TGaussPtsValForTime: virtual TValForTime
+ {
PGaussMesh myGaussMesh;
};
+
+ //---------------------------------------------------------------
PFamily
FindFamily(VISU::PMesh theMesh,
const std::string& theFamilyName);
const std::string& theFieldName,
int theStampsNum) = 0;
+ virtual
+ TOutput*
+ GetGaussPointsOnMesh(const std::string& theMeshName,
+ const VISU::TEntity& theEntity,
+ const std::string& theFieldName,
+ int theStampsNum) = 0;
+
virtual
float
GetTimeStampSize(const std::string& theMeshName,
static int MYVTKDEBUG = 0;
#ifdef _DEBUG_
-static int MYDEBUG = 0;
+static int MYDEBUG = 1;
static int MYDEBUGWITHFILES = 0;
#else
static int MYDEBUG = 0;
myStatus(eNone)
{}
+ TGaussPointID
+ TGaussSubMeshImpl
+ ::GetObjID(vtkIdType theID) const
+ {
+ TCellID aCellID = theID / myGauss->myNbPoints;
+ TLocalPntID aLocalPntID = theID % myGauss->myNbPoints;
+
+ return TGaussPointID(aCellID,aLocalPntID);
+ }
//---------------------------------------------------------------
bool
operator<(const PGaussSubMesh& theLeft, const PGaussSubMesh& theRight)
{
- PGaussImpl aLeft(theLeft->myGauss), aRight(theRight->myGauss);
+ PGaussSubMeshImpl aLeft(theLeft), aRight(theRight);
+ const PGaussImpl& aGaussLeft = aLeft->myGauss;
+ const PGaussImpl& aGaussRight = aRight->myGauss;
- if(aLeft->myGeom != aRight->myGeom)
- return aLeft->myGeom < aRight->myGeom;
+ if(aGaussLeft->myGeom != aGaussRight->myGeom)
+ return aGaussLeft->myGeom < aGaussRight->myGeom;
- if(aLeft->myName != aRight->myName)
- return aLeft->myName < aRight->myName;
+ if(aGaussLeft->myName != aGaussRight->myName)
+ return aGaussLeft->myName < aGaussRight->myName;
return theLeft->mySubProfile < theRight->mySubProfile;
}
::GetCompValueSliceArr(vtkIdType theElemId) const
{
TCValueSliceArr aValueSliceArr(myNbComp);
- vtkIdType anId = theElemId*myStep;
+ vtkIdType anId = theElemId;
for(vtkIdType aCompId = 0; aCompId < myNbComp; aCompId++){
aValueSliceArr[aCompId] =
TCValueSlice(myValue,std::slice(anId,myNbGauss,myNbGauss));
TValForTimeImpl
::GetNbGauss(vtkIdType theGeom) const
{
- PGaussMeshImpl aGaussMesh = myGaussMesh;
- if(aGaussMesh){
+ return myNbGauss;
+ }
+
+ int
+ TGaussPtsValForTimeImpl
+ ::GetNbGauss(vtkIdType theGeom) const
+ {
+ if(PGaussMeshImpl aGaussMesh = myGaussMesh){
const TGeom2GaussSubMesh& aGeom2GaussSubMesh = aGaussMesh->myGeom2GaussSubMesh;
TGeom2GaussSubMesh::const_iterator anIter = aGeom2GaussSubMesh.find(theGeom);
if(anIter != aGeom2GaussSubMesh.end()){
- PGaussSubMesh aGaussSubMesh = anIter->second;
+ PGaussSubMeshImpl aGaussSubMesh = anIter->second;
PGaussImpl aGauss = aGaussSubMesh->myGauss;
return aGauss->myNbPoints;
}
void
GetTimeStampOnGaussMesh(const TVTKSource& theSource,
const PFieldImpl& theField,
- const PValForTimeImpl& theValForTime)
+ const PGaussPtsValForTimeImpl& 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);
- PValForTimeImpl aValForTime = boost::get<4>(aFindTimeStamp);
+ PGaussPtsValForTimeImpl aValForTime = boost::get<4>(aFindTimeStamp);
PFieldImpl aField = boost::get<3>(aFindTimeStamp);
//Main part of code
- const TVTKSource& aSource = aValForTime->GetSource();
+ TSource& aMeshSource = aValForTime->myMeshSource;
+ const TVTKSource& aSource = aMeshSource.GetSource();
#ifndef _DEXCEPT_
try{
#endif
- if(!aValForTime->myIsVTKDone){
- LoadFieldOnMesh(aMesh,aMeshOnEntity,aField,aValForTime);
+ if(!aMeshSource.myIsVTKDone){
+ LoadValForTimeOnMesh(aMesh,aMeshOnEntity,aField,aValForTime);
try{
LoadMeshOnEntity(aVTKMeshOnEntity);
GetMeshOnEntity(aVTKMeshOnEntity->myMeshName,aVTKMeshOnEntity->myEntity);
PProfileImpl aProfile = aValForTime->myProfile;
+ GetMeshOnProfile(aMesh,aVTKMeshOnEntity,aProfile);
+
+ const TVTKAppendFilter& anAppendFilter = aProfile->GetFilter();
+ aSource->ShallowCopy(anAppendFilter->GetOutput());
+ GetTimeStampOnProfile(aSource,aField,aValForTime);
+
+ aMeshSource.myIsVTKDone = true;
+
+ if(MYDEBUGWITHFILES){
+ string aMeshName = QString(theMeshName.c_str()).simplifyWhiteSpace().latin1();
+ string aFieldName = QString(theFieldName.c_str()).simplifyWhiteSpace().latin1();
+ string aPrefix = string("/users/")+getenv("USER")+"/"+getenv("USER")+"-";
+ string aFileName = aPrefix + aMeshName + dtos("-%d-",int(theEntity)) +
+ aFieldName + dtos("-%d",theStampsNum) + "-Conv.vtk";
+ VISU::WriteToFile(aSource.GetPointer(),aFileName);
+ }
+ if(MYVTKDEBUG){
+ GetTimeStampSize(theMeshName,theEntity,theFieldName,theStampsNum);
+ aSource->Update();
+ if(theEntity == VISU::NODE_ENTITY)
+ BEGMSG(MYVTKDEBUG,"GetPointData() = "<<float(aSource->GetPointData()->GetActualMemorySize()*1000)<<endl);
+ else
+ BEGMSG(MYVTKDEBUG,"GetCellData() = "<<float(aSource->GetCellData()->GetActualMemorySize()*1000)<<endl);
+ BEGMSG(MYVTKDEBUG,"GetActualMemorySize() = "<<float(aSource->GetActualMemorySize()*1000)<<endl);
+ }
+ }
+#ifndef _DEXCEPT_
+ }catch(std::exception& exc){
+ throw;
+ }catch(...){
+ throw;
+ }
+#endif
+
+ return aSource.GetPointer();
+}
+
+
+//---------------------------------------------------------------
+VISU_Convertor::TOutput*
+VISU_Convertor_impl
+::GetGaussPointsOnMesh(const string& theMeshName,
+ const VISU::TEntity& theEntity,
+ const string& theFieldName,
+ int theStampsNum)
+{
+ INITMSG(MYDEBUG,"GetGaussPointsOnMesh"<<
+ "; theMeshName = '"<<theMeshName<<"'"<<
+ "; theEntity = "<<theEntity<<
+ "; theFieldName = '"<<theFieldName<<"'"<<
+ "; theStampsNum = "<<theStampsNum<<
+ endl);
+
+ //Cheching possibility do the query
+ TFindTimeStamp aFindTimeStamp = FindTimeStamp(theMeshName,
+ theEntity,
+ theFieldName,
+ theStampsNum);
+
+ PMeshImpl aMesh = boost::get<0>(aFindTimeStamp);
+ PMeshOnEntityImpl aMeshOnEntity = boost::get<1>(aFindTimeStamp);
+ PMeshOnEntityImpl aVTKMeshOnEntity = aMeshOnEntity;
+ PGaussPtsValForTimeImpl aValForTime = boost::get<4>(aFindTimeStamp);
+ PFieldImpl aField = boost::get<3>(aFindTimeStamp);
+
+ //Main part of code
+ TSource& aGaussPtsSource = aValForTime->myGaussPtsSource;
+ const TVTKSource& aSource = aGaussPtsSource.GetSource();
+#ifndef _DEXCEPT_
+ try{
+#endif
+ if(!aGaussPtsSource.myIsVTKDone){
+ LoadValForTimeOnGaussPts(aMesh,aMeshOnEntity,aField,aValForTime);
+
+ GetMeshOnEntity(aVTKMeshOnEntity->myMeshName,aVTKMeshOnEntity->myEntity);
+
PGaussMeshImpl aGaussMesh = aValForTime->myGaussMesh;
INITMSG(MYDEBUG,"aGaussMesh = "<<bool(aGaussMesh)<<endl);
- if(!aGaussMesh){
- GetMeshOnProfile(aMesh,aVTKMeshOnEntity,aProfile);
-
- const TVTKAppendFilter& anAppendFilter = aProfile->GetFilter();
- aSource->ShallowCopy(anAppendFilter->GetOutput());
- GetTimeStampOnProfile(aSource,aField,aValForTime);
- }else{
- const TGeom2GaussSubMesh& aGeom2GaussSubMesh = aGaussMesh->myGeom2GaussSubMesh;
- GetGaussMesh(aMesh,aVTKMeshOnEntity,aGaussMesh);
-
- const TVTKAppendFilter& anAppendFilter = aGaussMesh->GetFilter();
- aSource->ShallowCopy(anAppendFilter->GetOutput());
- GetTimeStampOnGaussMesh(aSource,aField,aValForTime);
- }
+ const TGeom2GaussSubMesh& aGeom2GaussSubMesh = aGaussMesh->myGeom2GaussSubMesh;
+ GetGaussMesh(aMesh,aVTKMeshOnEntity,aGaussMesh);
+
+ const TVTKAppendFilter& anAppendFilter = aGaussMesh->GetFilter();
+ aSource->ShallowCopy(anAppendFilter->GetOutput());
+ GetTimeStampOnGaussMesh(aSource,aField,aValForTime);
- aValForTime->myIsVTKDone = true;
+ aGaussPtsSource.myIsVTKDone = true;
if(MYDEBUGWITHFILES){
string aMeshName = QString(theMeshName.c_str()).simplifyWhiteSpace().latin1();
PMeshImpl aMesh = boost::get<0>(aFindField);
PMeshOnEntityImpl aMeshOnEntity = boost::get<1>(aFindField);
PMeshOnEntityImpl aVTKMeshOnEntity = boost::get<2>(aFindField);
- PValForTimeImpl aValForTime = aValFieldIter->second;
+ PGaussPtsValForTimeImpl aValForTime = aValFieldIter->second;
return TFindTimeStamp(aMesh,
aMeshOnEntity,
#ifndef VISU_Convertor_impl_HeaderFile
#define VISU_Convertor_impl_HeaderFile
-#include <vtkSystemIncludes.h>
-
#include <vtkSmartPointer.h>
#include <boost/tuple/tuple.hpp>
TGaussSubMeshImpl();
virtual
- vtkIdType
- GetObjID(vtkIdType theID) const
- {
- return theID;
- }
+ TGaussPointID
+ GetObjID(vtkIdType theID) const;
- TPointCoords myPointCoords;
+ PGaussImpl myGauss;
ESubMeshStatus myStatus;
+ TPointCoords myPointCoords;
};
typedef SharedPtr<TGaussSubMeshImpl> PGaussSubMeshImpl;
//---------------------------------------------------------------
typedef std::map<vtkIdType,TMeshValue> TGeom2Value;
- struct TValForTimeImpl: virtual TValForTime, virtual TSource
+ struct TValForTimeImpl: virtual TValForTime
{
TGeom2Value myGeom2Value;
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;
+
+ virtual
+ int
+ GetNbGauss(vtkIdType theGeom) const;
+ };
+ typedef SharedPtr<TGaussPtsValForTimeImpl> PGaussPtsValForTimeImpl;
+
+
+ //---------------------------------------------------------------
vtkIdType
VTKGeom2NbNodes(vtkIdType theGeom);
}
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::PValForTimeImpl> TFindTimeStamp;
+ VISU::PGaussPtsValForTimeImpl> TFindTimeStamp;
TFindTimeStamp
FindTimeStamp(const std::string& theMeshName,
const VISU::TEntity& theEntity,
virtual
int
- LoadFieldOnMesh(VISU::PMeshImpl theMesh,
- VISU::PMeshOnEntityImpl theMeshOnEntity,
- VISU::PFieldImpl theField,
- VISU::PValForTimeImpl theValForTime) = 0;
+ LoadValForTimeOnMesh(VISU::PMeshImpl theMesh,
+ VISU::PMeshOnEntityImpl theMeshOnEntity,
+ VISU::PFieldImpl theField,
+ VISU::PValForTimeImpl theValForTime) = 0;
+
+ virtual
+ int
+ LoadValForTimeOnGaussPts(VISU::PMeshImpl theMesh,
+ VISU::PMeshOnEntityImpl theMeshOnEntity,
+ VISU::PFieldImpl theField,
+ VISU::PValForTimeImpl theValForTime) = 0;
};
#endif
using MED::EBooleen;
#ifdef _DEBUG_
-static int MYDEBUG = 0;
+static int MYDEBUG = 1;
static int MYVALUEDEBUG = 0;
static int MY_FAMILY_DEBUG = 0;
static int MY_GROUP_DEBUG = 0;
}
}
+ TGaussPointID
+ TMEDGaussSubMesh
+ ::GetObjID(vtkIdType theID) const
+ {
+ TCellID aCellID = theID / myGauss->myNbPoints;
+ TLocalPntID aLocalPntID = theID % myGauss->myNbPoints;
+
+ if(myIsElemNum)
+ aCellID = myElemNum[theID];
+ else
+ aCellID = theID;
+
+ return TGaussPointID(aCellID,aLocalPntID);
+ }
+
}
//---------------------------------------------------------------
int
VISU_MedConvertor
-::LoadFieldOnMesh(VISU::PMeshImpl theMesh,
- VISU::PMeshOnEntityImpl theMeshOnEntity,
- VISU::PFieldImpl theField,
- VISU::PValForTimeImpl theValForTime)
+::LoadValForTimeOnMesh(VISU::PMeshImpl theMesh,
+ VISU::PMeshOnEntityImpl theMeshOnEntity,
+ VISU::PFieldImpl theField,
+ VISU::PValForTimeImpl theValForTime)
{
MED::PWrapper aMed = MED::CrWrapper(myFileInfo.absFilePath().latin1());
int isPointsUpdated = LoadPoints(aMed,theMesh);
int isCellsOnEntityUpdated = LoadCellsOnEntity(aMed,theMesh,theMeshOnEntity);
- int isFieldUpdated = LoadField(aMed,theMesh,theMeshOnEntity,theField,theValForTime);
+ int isFieldUpdated = LoadValForTimeOnMesh(aMed,theMesh,theMeshOnEntity,theField,theValForTime);
+
+ return (isPointsUpdated || isCellsOnEntityUpdated || isFieldUpdated);
+}
+
+
+//---------------------------------------------------------------
+int
+VISU_MedConvertor
+::LoadValForTimeOnGaussPts(VISU::PMeshImpl theMesh,
+ VISU::PMeshOnEntityImpl theMeshOnEntity,
+ VISU::PFieldImpl theField,
+ VISU::PValForTimeImpl theValForTime)
+{
+ MED::PWrapper aMed = MED::CrWrapper(myFileInfo.absFilePath().latin1());
+ int isPointsUpdated = LoadPoints(aMed,theMesh);
+ int isCellsOnEntityUpdated = LoadCellsOnEntity(aMed,theMesh,theMeshOnEntity);
+ int isFieldUpdated = LoadValForTimeOnGaussPts(aMed,theMesh,theMeshOnEntity,theField,theValForTime);
return (isPointsUpdated || isCellsOnEntityUpdated || isFieldUpdated);
}
//---------------------------------------------------------------
int
-VISU_MedConvertor
-::LoadField(const MED::PWrapper& theMed,
- VISU::PMEDMesh theMesh,
- VISU::PMEDMeshOnEntity theMeshOnEntity,
- VISU::PMEDField theField,
- VISU::PMEDValForTime theValForTime)
+LoadValForTime(const MED::PWrapper& theMed,
+ VISU::PMEDMesh theMesh,
+ VISU::PMEDMeshOnEntity theMeshOnEntity,
+ VISU::PMEDField theField,
+ VISU::PMEDValForTime theValForTime,
+ bool theIsGauss)
{
- INITMSG(MYDEBUG,"LoadField"<<endl);
+ INITMSG(MYDEBUG,"LoadValForTime - theIsGauss = "<<theIsGauss<<endl);
//Check on loading already done
- if(theValForTime->myIsDone)
+ TSource& aMeshSource = theValForTime->myMeshSource;
+ if(aMeshSource.myIsDone)
return 0;
//Main part of code
theValForTime,
theMeshOnEntity);
- LoadGaussMesh(theMed,
- theMesh,
- aTimeStampVal,
- theValForTime,
- theMeshOnEntity);
+ if(theIsGauss)
+ LoadGaussMesh(theMed,
+ theMesh,
+ aTimeStampVal,
+ theValForTime,
+ theMeshOnEntity);
PMEDProfile aProfile = theValForTime->myProfile;
TGeom2SubProfile& aGeom2SubProfile = aProfile->myGeom2SubProfile;
}
}
- theValForTime->myIsDone = true;
+ aMeshSource.myIsDone = true;
return 1;
}
+
+
+//---------------------------------------------------------------
+int
+VISU_MedConvertor
+::LoadValForTimeOnMesh(const MED::PWrapper& theMed,
+ VISU::PMEDMesh theMesh,
+ VISU::PMEDMeshOnEntity theMeshOnEntity,
+ VISU::PMEDField theField,
+ VISU::PMEDValForTime theValForTime)
+{
+ return LoadValForTime(theMed,theMesh,theMeshOnEntity,theField,theValForTime,false);
+}
+
+
+//---------------------------------------------------------------
+int
+VISU_MedConvertor
+::LoadValForTimeOnGaussPts(const MED::PWrapper& theMed,
+ VISU::PMEDMesh theMesh,
+ VISU::PMEDMeshOnEntity theMeshOnEntity,
+ VISU::PMEDField theField,
+ VISU::PMEDValForTime theValForTime)
+{
+ return LoadValForTime(theMed,theMesh,theMeshOnEntity,theField,theValForTime,true);
+}
MED::TElemNum myElemNum;
virtual
- vtkIdType
- GetObjID(vtkIdType theID) const
- {
- if(myIsElemNum)
- return myElemNum[theID];
- else
- return theID;
- }
+ TGaussPointID
+ GetObjID(vtkIdType theID) const;
};
typedef SharedPtr<TMEDGaussSubMesh> PMEDGaussSubMesh;
//---------------------------------------------------------------
- struct TMEDValForTime: virtual TValForTimeImpl
+ struct TMEDValForTime: virtual TGaussPtsValForTimeImpl
{};
typedef SharedPtr<TMEDValForTime> PMEDValForTime;
virtual
int
- LoadFieldOnMesh(VISU::PMeshImpl theMesh,
- VISU::PMeshOnEntityImpl theMeshOnEntity,
- VISU::PFieldImpl theField,
- VISU::PValForTimeImpl theValForTime);
+ LoadValForTimeOnMesh(VISU::PMeshImpl theMesh,
+ VISU::PMeshOnEntityImpl theMeshOnEntity,
+ VISU::PFieldImpl theField,
+ VISU::PValForTimeImpl theValForTime);
+ virtual
+ int
+ LoadValForTimeOnGaussPts(VISU::PMeshImpl theMesh,
+ VISU::PMeshOnEntityImpl theMeshOnEntity,
+ VISU::PFieldImpl theField,
+ VISU::PValForTimeImpl theValForTime);
+
int
LoadPoints(const MED::PWrapper& theMed,
VISU::PMEDMesh theMesh,
const std::string& theFamilyName = "");
int
- LoadField(const MED::PWrapper& theMed,
- VISU::PMEDMesh theMesh,
- VISU::PMEDMeshOnEntity theMeshOnEntity,
- VISU::PMEDField theField,
- VISU::PMEDValForTime theValForTime);
+ LoadValForTimeOnMesh(const MED::PWrapper& theMed,
+ VISU::PMEDMesh theMesh,
+ VISU::PMEDMeshOnEntity theMeshOnEntity,
+ VISU::PMEDField theField,
+ VISU::PMEDValForTime theValForTime);
+ int
+ LoadValForTimeOnGaussPts(const MED::PWrapper& theMed,
+ VISU::PMEDMesh theMesh,
+ VISU::PMEDMeshOnEntity theMeshOnEntity,
+ VISU::PMEDField theField,
+ VISU::PMEDValForTime theValForTime);
};
#endif
//---------------------------------------------------------------
int
-VISU_MEDConvertor::LoadFieldOnMesh(VISU::PMeshImpl theMesh,
- VISU::PMeshOnEntityImpl theMeshOnEntity,
- VISU::PFieldImpl theField,
- VISU::PValForTimeImpl theValForTime)
+VISU_MEDConvertor::LoadValForTimeOnMesh(VISU::PMeshImpl theMesh,
+ VISU::PMeshOnEntityImpl theMeshOnEntity,
+ VISU::PFieldImpl theField,
+ VISU::PValForTimeImpl theValForTime)
{
//Main part of code
int isPointsUpdated = LoadPoints(theMesh);
VISU::PCValForTime theValForTime)
{
//Check on loading already done
- if(theValForTime->myIsDone)
+ TSource& aMeshSource = theValForTime->myMeshSource;
+ if(aMeshSource.myIsDone)
return 0;
SALOME_MED::FIELD_var aMEDField = theValForTime->myField;
::ImportField(anArray,theMesh,theField,theValForTime,theMeshOnEntity);
}
- theValForTime->myIsDone = true;
+ aMeshSource.myIsDone = true;
return 1;
}
//---------------------------------------------------------------
- struct TCValForTime: virtual TValForTimeImpl
+ struct TCValForTime: virtual TGaussPtsValForTimeImpl
{
SALOME_MED::FIELD_var myField;
};
VISU_MEDConvertor() {};
public:
- VISU_MEDConvertor(SALOMEDS::SObject_ptr theMedSObject) : mySObject(SALOMEDS::SObject::_duplicate(theMedSObject)) {}
- virtual VISU_Convertor* Build();
-
- protected:
+ VISU_MEDConvertor(SALOMEDS::SObject_ptr theMedSObject):
+ mySObject(SALOMEDS::SObject::_duplicate(theMedSObject))
+ {}
- VISU_Convertor* Build(SALOME_MED::MED_ptr theMED);
- VISU_Convertor* Build(SALOMEDS::ChildIterator_ptr theTimeStampIterator);
+ virtual
+ VISU_Convertor*
+ Build();
- virtual int LoadMeshOnEntity(VISU::PMeshOnEntityImpl theMeshOnEntity,
- const std::string& theFamilyName = "");
+ protected:
- virtual int LoadMeshOnGroup(VISU::PMeshImpl theMesh,
- const VISU::TFamilyAndEntitySet& theFamilyAndEntitySet);
+ VISU_Convertor*
+ Build(SALOME_MED::MED_ptr theMED);
+
+ VISU_Convertor*
+ Build(SALOMEDS::ChildIterator_ptr theTimeStampIterator);
- virtual int LoadFieldOnMesh(VISU::PMeshImpl theMesh,
- VISU::PMeshOnEntityImpl theMeshOnEntity,
- VISU::PFieldImpl theField,
- VISU::PValForTimeImpl theValForTime);
+ virtual
+ int
+ LoadMeshOnEntity(VISU::PMeshOnEntityImpl theMeshOnEntity,
+ const std::string& theFamilyName = "");
+
+ virtual
+ int
+ LoadMeshOnGroup(VISU::PMeshImpl theMesh,
+ const VISU::TFamilyAndEntitySet& theFamilyAndEntitySet);
+
+ virtual
+ int
+ LoadValForTimeOnMesh(VISU::PMeshImpl theMesh,
+ VISU::PMeshOnEntityImpl theMeshOnEntity,
+ VISU::PFieldImpl theField,
+ VISU::PValForTimeImpl theValForTime);
+
+ virtual
+ int
+ LoadValForTimeOnGaussPts(VISU::PMeshImpl theMesh,
+ VISU::PMeshOnEntityImpl theMeshOnEntity,
+ VISU::PFieldImpl theField,
+ VISU::PValForTimeImpl theValForTime)
+ {}
- int LoadPoints(VISU::PCMesh theMesh,
- const std::string& theFamilyName = "") ;
+ int
+ LoadPoints(VISU::PCMesh theMesh,
+ const std::string& theFamilyName = "") ;
- int LoadCellsOnEntity(VISU::PCMesh theMesh,
- VISU::PCMeshOnEntity theMeshOnEntity,
- const std::string& theFamilyName = "");
+ int
+ LoadCellsOnEntity(VISU::PCMesh theMesh,
+ VISU::PCMeshOnEntity theMeshOnEntity,
+ const std::string& theFamilyName = "");
- int LoadField(VISU::PCMesh theMesh,
- VISU::PCMeshOnEntity theMeshOnEntity,
- VISU::PField theField,
- VISU::PCValForTime theValForTime);
+ int
+ LoadField(VISU::PCMesh theMesh,
+ VISU::PCMeshOnEntity theMeshOnEntity,
+ VISU::PField theField,
+ VISU::PCValForTime theValForTime);
};
}
-void VISU::GaussPoints_i::DoSetInput(Result_i* theResult){
- ScalarMap_i::DoSetInput(theResult);
+void
+VISU::GaussPoints_i
+::DoSetInput(Result_i* theResult)
+{
+ if(theResult->GetInput() == NULL)
+ throw std::runtime_error("Mesh_i::Build - theResult->GetInput() == NULL !!!");
+ myField = theResult->GetInput()->GetField(myMeshName,myEntity,myFieldName);
+ if(myField == NULL)
+ throw std::runtime_error("There is no Field with the parameters !!!");
+ VISU_Convertor::TOutput *anOutput =
+ theResult->GetInput()->GetGaussPointsOnMesh(myMeshName,myEntity,myFieldName,myIteration);
+ if(anOutput == NULL)
+ throw std::runtime_error("There is no TimeStamp with the parameters !!!");
+ myScalarMapPL->SetInput(anOutput);
+ myScalarMapPL->Build();
}