//---------------------------------------------------------------
typedef std::map<int,PValForTime> TValField;
+ typedef std::pair<float,float> TMinMax;
struct TField: virtual TIntId
{
TValField myValField;
TNames myCompNames;
TNames myUnitNames;
- int myNbComp;
+ vtkIdType myNbComp;
+
+ virtual
+ TMinMax
+ GetMinMax(vtkIdType theCompID) = 0;
TField(): myNbComp(0)
{}
}
+ //---------------------------------------------------------------
+ TFieldImpl
+ ::TFieldImpl():
+ myDataSize(0)
+ {}
+
+ void
+ TFieldImpl
+ ::InitArrays(vtkIdType theNbComp)
+ {
+ myNbComp = theNbComp;
+ myCompNames.resize(theNbComp);
+ myUnitNames.resize(theNbComp);
+ myMinMaxArr.resize(theNbComp);
+ for(vtkIdType iComp = 0; iComp < theNbComp; iComp++){
+ TMinMax& aMinMax = myMinMaxArr[iComp];
+ aMinMax.first = -VTK_LARGE_FLOAT;
+ aMinMax.second = VTK_LARGE_FLOAT;
+ }
+ }
+
+ TMinMax
+ TFieldImpl
+ ::GetMinMax(vtkIdType theCompID)
+ {
+ return myMinMaxArr[theCompID];
+ }
+
+
//---------------------------------------------------------------
void
TMeshValue
const PValForTimeImpl& theValForTime)
{
int aNbTuples = theField->myDataSize/theField->myNbComp;
- string aFieldName = GenerateFieldName(theField,theValForTime);
+ std::string aFieldName = GenerateFieldName(theField,theValForTime);
INITMSG(MYDEBUG,"GetTimeStampOnProfile - aNbTuples = "<<aNbTuples<<endl);
vtkDataSetAttributes* aDataSetAttributes;
//---------------------------------------------------------------
+ typedef TVector<TMinMax> TMinMaxArr;
+
struct TFieldImpl: virtual TField
{
vtkIdType myDataSize;
- TFieldImpl(): myDataSize(0)
- {}
+ TMinMaxArr myMinMaxArr;
+
+ virtual
+ TMinMax
+ GetMinMax(vtkIdType theCompID);
+
+ void
+ InitArrays(vtkIdType theNbComp);
+
+ TFieldImpl();
};
typedef SharedPtr<TFieldImpl> PFieldImpl;
aField->myName = aFieldName.in();
aField->myEntity = aVEntity;
aField->myMeshName = aMeshName.in();
- aField->myNbComp = myField->getNumberOfComponents();
+ aField->InitArrays(myField->getNumberOfComponents());
aField->myDataSize = aMeshOnEntity->myNbCells * aField->myNbComp;
- aField->myCompNames.resize(aField->myNbComp);
- aField->myUnitNames.resize(aField->myNbComp);
if(MYDEBUG) MESSAGE("VISU_MEDFieldConvertor::Build - aMeshName = "<<aMeshName<<"; myDim = "<<aMesh->myDim);
aField->myName = aFieldName.in();
aField->myEntity = anEntity;
aField->myMeshName = aMeshName.in();
- aField->myNbComp = aMEDField->getNumberOfComponents();
+ aField->InitArrays(aMEDField->getNumberOfComponents());
aField->myDataSize = aMeshOnEntity->myNbCells * aField->myNbComp;
if(MYDEBUG)
MESSAGE("VISU_MEDConvertor::Build - aMeshOnEntity->myNbCells = "<<aMeshOnEntity->myNbCells);
- aField->myCompNames.resize(aField->myNbComp);
- aField->myUnitNames.resize(aField->myNbComp);
}else
aField = aFieldMapIter->second;
aField->myName = aFieldName.in();
aField->myEntity = aVEntity;
aField->myMeshName = aMeshName.in();
- aField->myNbComp = aMEDField->getNumberOfComponents();
+ aField->InitArrays(aMEDField->getNumberOfComponents());
aField->myDataSize = aMeshOnEntity->myNbCells * aField->myNbComp;
if(MYDEBUG)
MESSAGE("VISU_MEDConvertor::Build - aMeshOnEntity->myNbCells = "<<aMeshOnEntity->myNbCells);
- aField->myCompNames.resize(aField->myNbComp);
- aField->myUnitNames.resize(aField->myNbComp);
}
TValField& aValField = aField->myValField;
int anId = aMEDField->getIterationNumber();