// File:
// Author:
// Module : VISU
-//
+
#include "VISU_MeshValue.hxx"
#include "VISU_ElnoMeshValue.hxx"
#include "VISU_Structures_impl.hxx"
#include <vtkIntArray.h>
#include <vtkUnsignedIntArray.h>
#include <vtkLongArray.h>
-#include <vtkUnsignedLongArray.h>
-#include <vtkFloatArray.h>
-#include <vtkDoubleArray.h>
+#include <vtkUnsignedLongArray.h>
+#include <vtkFloatArray.h>
+#include <vtkDoubleArray.h>
#include <string>
#include <algorithm>
//---------------------------------------------------------------
std::string
GenerateFieldName(const PFieldImpl& theField,
- const PValForTimeImpl& theValForTime)
+ const PValForTimeImpl& theValForTime)
{
const VISU::TTime& aTime = theValForTime->myTime;
- std::string aFieldName = theField->myMeshName + ", " + theField->myName + ": " +
+ std::string aFieldName = theField->myMeshName + ", " + theField->myName + ": " +
VISU_Convertor::GenerateName(aTime);
return aFieldName;
}
void
TMeshValueBase
::Init(vtkIdType theNbElem,
- vtkIdType theNbGauss,
- vtkIdType theNbComp)
+ vtkIdType theNbGauss,
+ vtkIdType theNbComp)
{
myNbElem = theNbElem;
myNbGauss = theNbGauss;
myStep = theNbComp*theNbGauss;
}
- vtkIdType
+ vtkIdType
TMeshValueBase
::GetNbElem() const
{
return myNbElem;
}
- vtkIdType
+ vtkIdType
TMeshValueBase
::GetNbComp() const
{
return myNbComp;
}
- vtkIdType
+ vtkIdType
TMeshValueBase
::GetNbGauss() const
{
return myNbGauss;
}
- size_t
+ size_t
TMeshValueBase
::size() const
{
//----------------------------------------------------------------------------
template<int EDataType>
- void
+ void
InitTimeStampOnProfile(const PUnstructuredGrid& theSource,
- const PFieldImpl& theField,
- const PValForTimeImpl& theValForTime,
- const VISU::TEntity& theEntity);
+ const PFieldImpl& theField,
+ const PValForTimeImpl& theValForTime,
+ const VISU::TEntity& theEntity);
//----------------------------------------------------------------------------
- void
+ void
GetTimeStampOnProfile(const PUnstructuredGrid& theSource,
- const PFieldImpl& theField,
- const PValForTimeImpl& theValForTime,
- const VISU::TEntity& theEntity)
+ const PFieldImpl& theField,
+ const PValForTimeImpl& theValForTime,
+ const VISU::TEntity& theEntity)
{
vtkIdType aDataType = theField->GetDataType();
switch(aDataType){
break;
default:
EXCEPTION(std::runtime_error,
- "GetTimeStampOnProfile - handling unsupported data type - "<<aDataType);
+ "GetTimeStampOnProfile - handling unsupported data type - "<<aDataType);
}
}
TDataArrayHolder(TVTKDataArray* theDataArray):
myDataArray(theDataArray)
{}
-
+
void
WritePointer(TVTKDataArray* theDataArray,
- vtkIdType theTupleId,
- TVTKBasicType* thePointer)
+ vtkIdType theTupleId,
+ TVTKBasicType* thePointer)
{
vtkIdType aNumberOfComponents = theDataArray->GetNumberOfComponents();
vtkIdType aPosition = theTupleId * aNumberOfComponents;
TVTKBasicType *aPtr = theDataArray->WritePointer(aPosition, aNumberOfComponents);
for(vtkIdType anId = 0; anId < aNumberOfComponents; anId++)
- *aPtr++ = *thePointer++;
+ *aPtr++ = *thePointer++;
}
virtual
void
- SetTuple(vtkIdType theTupleId,
- TVTKBasicType* thePointer)
+ SetTuple(vtkIdType theTupleId,
+ TVTKBasicType* thePointer)
{
this->WritePointer(myDataArray, theTupleId, thePointer);
}
TVTKDataArray* myDataArray2;
TDataArrayHolder2(TVTKDataArray* theDataArray,
- TVTKDataArray* theDataArray2):
+ TVTKDataArray* theDataArray2):
TSuperClass(theDataArray),
myDataArray2(theDataArray2)
{}
-
+
virtual
void
- SetTuple(vtkIdType theTupleId,
- TVTKBasicType* thePointer)
+ SetTuple(vtkIdType theTupleId,
+ TVTKBasicType* thePointer)
{
this->WritePointer(this->myDataArray, theTupleId, thePointer);
this->WritePointer(this->myDataArray2, theTupleId, thePointer);
TTimeStampOnProfileInitArray(const PDataArrayHolder& theDataArrayHolder):
myDataArrayHolder(theDataArrayHolder)
{}
-
+
void
Execute(const PFieldImpl& theField,
- const PValForTimeImpl& theValForTime,
- const TGaussMetric theGaussMetric = VISU::AVERAGE_METRIC)
+ const PValForTimeImpl& theValForTime,
+ const TGaussMetric theGaussMetric = VISU::AVERAGE_METRIC)
{
vtkIdType aNbComp = theField->myNbComp;
vtkIdType aSize = std::max(vtkIdType(3), aNbComp);
- TVector<TVTKBasicType> aDataValues(aSize);
-
+ TVector<TVTKBasicType> aDataValues (aSize);
+
+ const TGeom2MeshValue& aGeom2MeshValue = theValForTime->GetGeom2MeshValue();
+ TGeom2MeshValue::const_iterator anIter = aGeom2MeshValue.begin();
+ for (int aTupleId = 0; anIter != aGeom2MeshValue.end(); anIter++) {
+ EGeometry aEGeom = anIter->first;
+ const TMeshValuePtr aMeshValue = anIter->second;
+
+ vtkIdType aNbElem = aMeshValue->GetNbElem();
+ vtkIdType aNbGauss = aMeshValue->GetNbGauss();
+
+ INITMSG(MYDEBUG,
+ "- aEGeom = "<<aEGeom<<
+ "; aNbElem = "<<aNbElem<<
+ "; aNbGauss = "<<aNbGauss<<
+ std::endl);
+
+ for (vtkIdType iElem = 0; iElem < aNbElem; iElem++, aTupleId++) {
+ typename TMeshValue::TCValueSliceArr aValueSliceArr = aMeshValue->GetCompValueSliceArr(iElem);
+
+ for (vtkIdType iComp = 0; iComp < aNbComp; iComp++) {
+ const typename TMeshValue::TCValueSlice& aValueSlice = aValueSliceArr[iComp];
+ //jfa//aDataValues[iComp] = TVTKBasicType();
+ for (vtkIdType iGauss = 0; iGauss < aNbGauss; iGauss++) {
+ TVTKBasicType aValue = aValueSlice[iGauss];
+ //jfa//if (iGauss == 0 && theGaussMetric != VISU::AVERAGE_METRIC) {
+ if (iGauss == 0) {
+ aDataValues[iComp] = aValue; // init
+ }
+ else {
+ switch (theGaussMetric) {
+ case VISU::AVERAGE_METRIC:
+ aDataValues[iComp] += aValue; break;
+ case VISU::MINIMUM_METRIC:
+ aDataValues[iComp] = std::min( aValue, aDataValues[iComp] ); break;
+ case VISU::MAXIMUM_METRIC:
+ aDataValues[iComp] = std::max( aValue, aDataValues[iComp] ); break;
+ }
+ }
+ }
+ if (theGaussMetric == VISU::AVERAGE_METRIC)
+ aDataValues[iComp] /= aNbGauss;
+ }
+
+ this->myDataArrayHolder->SetTuple(aTupleId, &aDataValues[0]);
+ }
+ }
+ }
+ };
+
+ template<int EDataType>
+ struct TTimeStampOnProfileInitModulus
+ {
+ typedef typename TL::TEnum2VTKArrayType<EDataType>::TResult TVTKDataArray;
+ typedef typename TL::TEnum2VTKBasicType<EDataType>::TResult TVTKBasicType;
+ typedef TTMeshValue<TVTKBasicType> TMeshValue;
+ typedef MED::SharedPtr<TMeshValue> TMeshValuePtr;
+
+ typedef TDataArrayHolder<EDataType> TTDataArrayHolder;
+ typedef MED::SharedPtr<TTDataArrayHolder> PDataArrayHolder;
+ PDataArrayHolder myDataArrayHolder;
+
+ TTimeStampOnProfileInitModulus(const PDataArrayHolder& theDataArrayHolder):
+ myDataArrayHolder(theDataArrayHolder)
+ {}
+
+ void
+ Execute(const PFieldImpl& theField, const PValForTimeImpl& theValForTime)
+ {
+ vtkIdType aNbComp = theField->myNbComp;
+ vtkIdType aSize = vtkIdType(3); // Minimum, Maximum and Average modulus
+ TVector<TVTKBasicType> aDataValues (aSize);
+
const TGeom2MeshValue& aGeom2MeshValue = theValForTime->GetGeom2MeshValue();
TGeom2MeshValue::const_iterator anIter = aGeom2MeshValue.begin();
- for(int aTupleId = 0; anIter != aGeom2MeshValue.end(); anIter++){
- EGeometry aEGeom = anIter->first;
- const TMeshValuePtr aMeshValue = anIter->second;
-
- vtkIdType aNbElem = aMeshValue->GetNbElem();
- vtkIdType aNbGauss = aMeshValue->GetNbGauss();
-
- INITMSG(MYDEBUG,
- "- aEGeom = "<<aEGeom<<
- "; aNbElem = "<<aNbElem<<
- "; aNbGauss = "<<aNbGauss<<
- std::endl);
-
- for(vtkIdType iElem = 0; iElem < aNbElem; iElem++, aTupleId++){
- typename TMeshValue::TCValueSliceArr aValueSliceArr = aMeshValue->GetCompValueSliceArr(iElem);
- for(vtkIdType iComp = 0; iComp < aNbComp; iComp++){
- const typename TMeshValue::TCValueSlice& aValueSlice = aValueSliceArr[iComp];
- aDataValues[iComp] = TVTKBasicType();
- for(vtkIdType iGauss = 0; iGauss < aNbGauss; iGauss++){
- TVTKBasicType aValue = aValueSlice[iGauss];
- if( iGauss == 0 && theGaussMetric != VISU::AVERAGE_METRIC ) {
- aDataValues[iComp] = aValue;
- continue;
- }
- switch( theGaussMetric ) {
- case VISU::AVERAGE_METRIC: aDataValues[iComp] += aValue; break;
- case VISU::MINIMUM_METRIC: aDataValues[iComp] = std::min( aValue, aDataValues[iComp] ); break;
- case VISU::MAXIMUM_METRIC: aDataValues[iComp] = std::max( aValue, aDataValues[iComp] ); break;
- }
- }
- if( theGaussMetric == VISU::AVERAGE_METRIC )
- aDataValues[iComp] /= aNbGauss;
- }
- this->myDataArrayHolder->SetTuple(aTupleId, &aDataValues[0]);
- }
+ for (int aTupleId = 0; anIter != aGeom2MeshValue.end(); anIter++) {
+ EGeometry aEGeom = anIter->first;
+ const TMeshValuePtr aMeshValue = anIter->second;
+
+ vtkIdType aNbElem = aMeshValue->GetNbElem();
+ vtkIdType aNbGauss = aMeshValue->GetNbGauss();
+
+ INITMSG(MYDEBUG,
+ "- aEGeom = "<<aEGeom<<
+ "; aNbElem = "<<aNbElem<<
+ "; aNbGauss = "<<aNbGauss<<
+ std::endl);
+
+ for (vtkIdType iElem = 0; iElem < aNbElem; iElem++, aTupleId++) {
+ typename TMeshValue::TCValueSliceArr aValueSliceArr = aMeshValue->GetCompValueSliceArr(iElem);
+
+ // modules of all gauss points
+ TVector<TVTKBasicType> aModules (aNbGauss);
+
+ for (vtkIdType iComp = 0; iComp < aNbComp; iComp++) {
+ const typename TMeshValue::TCValueSlice& aValueSlice = aValueSliceArr[iComp];
+ for (vtkIdType iGauss = 0; iGauss < aNbGauss; iGauss++) {
+ TVTKBasicType aValue = aValueSlice[iGauss];
+
+ // modules of all gauss points
+ if (iComp == 0)
+ aModules[iGauss] = aValue * aValue; // init
+ else
+ aModules[iGauss] += aValue * aValue;
+ }
+ }
+
+ TVTKBasicType aModule = (TVTKBasicType)sqrt(aModules[0]);
+ aDataValues[0] = aModule; // init Min
+ aDataValues[1] = aModule; // init Max
+ aDataValues[2] = aModule; // init Average
+
+ for (vtkIdType ig = 0; ig < aNbGauss; ig++) {
+ aModule = (TVTKBasicType)sqrt(aModules[ig]);
+
+ aDataValues[0] = std::min(TVTKBasicType(aModule), aDataValues[0]); // Min
+ aDataValues[1] = std::max(TVTKBasicType(aModule), aDataValues[1]); // Max
+ aDataValues[2] += aModule; // Average
+ }
+ aDataValues[2] /= aNbGauss; // Average
+
+ this->myDataArrayHolder->SetTuple(aTupleId, &aDataValues[0]);
+ }
}
}
};
//----------------------------------------------------------------------------
template<int EDataType>
- void
+ void
InitTimeStampOnProfile(const PUnstructuredGrid& theSource,
- const PFieldImpl& theField,
- const PValForTimeImpl& theValForTime,
- const VISU::TEntity& theEntity)
+ const PFieldImpl& theField,
+ const PValForTimeImpl& theValForTime,
+ const VISU::TEntity& theEntity)
{
vtkIdType aNbTuples = theField->myDataSize / theField->myNbComp;
std::string aFieldName = VISU::GenerateFieldName(theField, theValForTime);
-
+
vtkDataSetAttributes* aDataSetAttributes;
switch ( theEntity ) {
- case VISU::NODE_ENTITY :
+ case VISU::NODE_ENTITY :
aDataSetAttributes = theSource->GetPointData();
break;
- default:
+ default:
aDataSetAttributes = theSource->GetCellData();
}
aDataSetAttributes->AddArray( aFullDataArray );
INITMSG(MYDEBUG,"InitTimeStampOnProfile "<<
- "- theEntity = "<<theEntity<<
- "; aNbTuples = "<<aNbTuples<<
- "; aNbComp = "<<aNbComp<<
- std::endl);
+ "- theEntity = "<<theEntity<<
+ "; aNbTuples = "<<aNbTuples<<
+ "; aNbComp = "<<aNbComp<<
+ std::endl);
TTimerLog aTimerLog(MYDEBUG,"InitTimeStampOnProfile");
-
+
const TGeom2MeshValue& aGeom2MeshValue = theValForTime->GetGeom2MeshValue();
typedef typename TL::TEnum2VTKBasicType< EDataType >::TResult TVTKBasicType;
typedef TTMeshValue< TVTKBasicType > TMeshValue;
TMeshValuePtr aMeshValue = theValForTime->GetFirstMeshValue();
if ( aGeom2MeshValue.size() == 1 && aMeshValue->GetNbGauss() == 1 ) {
aFullDataArray->SetVoidArray(aMeshValue->GetPointer(),
- aMeshValue->size(),
- true);
+ aMeshValue->size(),
+ true);
INITMSG(MYDEBUG,"InitTimeStampOnProfile - aFullDataArray->SetVoidArray()"<<std::endl);
if ( aNbComp == 1 ) {
- aSelectedDataArray->SetVoidArray( aMeshValue->GetPointer(),
- aMeshValue->size(),
- true );
- INITMSG(MYDEBUG,"InitTimeStampOnProfile - aSelectedDataArray->SetVoidArray()"<<std::endl);
+ aSelectedDataArray->SetVoidArray( aMeshValue->GetPointer(),
+ aMeshValue->size(),
+ true );
+ INITMSG(MYDEBUG,"InitTimeStampOnProfile - aSelectedDataArray->SetVoidArray()"<<std::endl);
}else{
- PDataArrayHolder aDataArrayHolder(new TTDataArrayHolder(aSelectedDataArray));
- TTimeStampOnProfileInitArray<EDataType>(aDataArrayHolder).Execute(theField, theValForTime);
+ PDataArrayHolder aDataArrayHolder(new TTDataArrayHolder(aSelectedDataArray));
+ TTimeStampOnProfileInitArray<EDataType>(aDataArrayHolder).Execute(theField, theValForTime);
}
- }else{
+ }
+ else {
typedef TDataArrayHolder2<EDataType> TTDataArrayHolder2;
PDataArrayHolder aDataArrayHolder(new TTDataArrayHolder2(aSelectedDataArray, aFullDataArray));
TTimeStampOnProfileInitArray<EDataType>(aDataArrayHolder).Execute(theField, theValForTime);
if ( theValForTime->GetMaxNbGauss() > 1 ) { // at least one of geometry contains multiple gauss points
- TVTKDataArray *aGaussMinDataArray = TVTKDataArray::New();
- aGaussMinDataArray->SetNumberOfComponents( aNbComp );
- aGaussMinDataArray->SetNumberOfTuples( aNbTuples );
- aGaussMinDataArray->SetName( "VISU_FIELD_GAUSS_MIN" );
- aDataSetAttributes->AddArray( aGaussMinDataArray );
-
- PDataArrayHolder aGaussMinDataArrayHolder(new TTDataArrayHolder(aGaussMinDataArray));
- TTimeStampOnProfileInitArray<EDataType>(aGaussMinDataArrayHolder).Execute(theField, theValForTime, VISU::MINIMUM_METRIC);
- aGaussMinDataArray->Delete();
-
- TVTKDataArray *aGaussMaxDataArray = TVTKDataArray::New();
- aGaussMaxDataArray->SetNumberOfComponents( aNbComp );
- aGaussMaxDataArray->SetNumberOfTuples( aNbTuples );
- aGaussMaxDataArray->SetName( "VISU_FIELD_GAUSS_MAX" );
- aDataSetAttributes->AddArray( aGaussMaxDataArray );
-
- PDataArrayHolder aGaussMaxDataArrayHolder(new TTDataArrayHolder(aGaussMaxDataArray));
- TTimeStampOnProfileInitArray<EDataType>(aGaussMaxDataArrayHolder).Execute(theField, theValForTime, VISU::MAXIMUM_METRIC);
- aGaussMaxDataArray->Delete();
+ TVTKDataArray *aGaussMinDataArray = TVTKDataArray::New();
+ aGaussMinDataArray->SetNumberOfComponents( aNbComp );
+ aGaussMinDataArray->SetNumberOfTuples( aNbTuples );
+ aGaussMinDataArray->SetName( "VISU_FIELD_GAUSS_MIN" );
+ aDataSetAttributes->AddArray( aGaussMinDataArray );
+
+ PDataArrayHolder aGaussMinDataArrayHolder(new TTDataArrayHolder(aGaussMinDataArray));
+ TTimeStampOnProfileInitArray<EDataType>(aGaussMinDataArrayHolder).Execute
+ (theField, theValForTime, VISU::MINIMUM_METRIC);
+ aGaussMinDataArray->Delete();
+
+ TVTKDataArray *aGaussMaxDataArray = TVTKDataArray::New();
+ aGaussMaxDataArray->SetNumberOfComponents( aNbComp );
+ aGaussMaxDataArray->SetNumberOfTuples( aNbTuples );
+ aGaussMaxDataArray->SetName( "VISU_FIELD_GAUSS_MAX" );
+ aDataSetAttributes->AddArray( aGaussMaxDataArray );
+
+ PDataArrayHolder aGaussMaxDataArrayHolder(new TTDataArrayHolder(aGaussMaxDataArray));
+ TTimeStampOnProfileInitArray<EDataType>(aGaussMaxDataArrayHolder).Execute
+ (theField, theValForTime, VISU::MAXIMUM_METRIC);
+ aGaussMaxDataArray->Delete();
+
+ TVTKDataArray *aGaussModulusDataArray = TVTKDataArray::New();
+ aGaussModulusDataArray->SetNumberOfComponents( 3 ); // Min, Max and Average
+ aGaussModulusDataArray->SetNumberOfTuples( aNbTuples );
+ aGaussModulusDataArray->SetName( "VISU_FIELD_GAUSS_MOD" );
+ aDataSetAttributes->AddArray( aGaussModulusDataArray );
+
+ PDataArrayHolder aGaussModulusDataArrayHolder(new TTDataArrayHolder(aGaussModulusDataArray));
+ TTimeStampOnProfileInitModulus<EDataType>(aGaussModulusDataArrayHolder).Execute
+ (theField, theValForTime);
+ aGaussModulusDataArray->Delete();
}
}
vtkIdType aEffectNbTuples = 0;
TGeom2MeshValue::const_iterator anIter = aGeom2MeshValue.begin();
for ( ; anIter != aGeom2MeshValue.end(); anIter++ ) {
- const PMeshValue& aMeshValue = anIter->second;
- aEffectNbTuples += aMeshValue->GetNbElem() * aMeshValue->GetNbGauss();
+ const PMeshValue& aMeshValue = anIter->second;
+ aEffectNbTuples += aMeshValue->GetNbElem() * aMeshValue->GetNbGauss();
}
vtkIdType anEffectNbComp = ( aEffectNbTuples * aNbComp ) / aNbTuples + 1;
-
+
// To create corresponding VTK representation for the ELNO data
TSetElnoNodeData< EDataType > aSetElnoNodeData( anEffectNbComp,
- aNbComp,
- aNbTuples,
- "ELNO_FIELD",
- "ELNO_COMPONENT_MAPPER" );
+ aNbComp,
+ aNbTuples,
+ "ELNO_FIELD",
+ "ELNO_COMPONENT_MAPPER" );
std::vector< TVTKBasicType > aDataValues( aNbComp ); // To reserve a temproary value holder
// To initilize these VTK representation for the ELNO data from the MED
anIter = aGeom2MeshValue.begin();
for ( ; anIter != aGeom2MeshValue.end(); anIter++ ) {
- EGeometry aEGeom = anIter->first;
- const TMeshValuePtr aMeshValue = anIter->second;
-
- vtkIdType aNbElem = aMeshValue->GetNbElem();
- vtkIdType aNbGauss = aMeshValue->GetNbGauss();
-
- INITMSG(MYDEBUG,
- "- aEGeom = "<<aEGeom<<
- "; aNbElem = "<<aNbElem<<
- "; aNbGauss = "<<aNbGauss<<
- std::endl);
+ EGeometry aEGeom = anIter->first;
+ const TMeshValuePtr aMeshValue = anIter->second;
+
+ vtkIdType aNbElem = aMeshValue->GetNbElem();
+ vtkIdType aNbGauss = aMeshValue->GetNbGauss();
+
+ INITMSG(MYDEBUG,
+ "- aEGeom = "<<aEGeom<<
+ "; aNbElem = "<<aNbElem<<
+ "; aNbGauss = "<<aNbGauss<<
+ std::endl);
std::vector<int> med2visu(aNbGauss);
InitMed2VisuArray(med2visu,aEGeom);
- for ( vtkIdType iElem = 0; iElem < aNbElem; iElem++ ) {
- const typename TMeshValue::TValueSliceArr& aValueSliceArr = aMeshValue->GetGaussValueSliceArr( iElem );
+ for ( vtkIdType iElem = 0; iElem < aNbElem; iElem++ ) {
+ const typename TMeshValue::TValueSliceArr& aValueSliceArr =
+ aMeshValue->GetGaussValueSliceArr( iElem );
for( vtkIdType iGauss = 0; iGauss < aNbGauss; iGauss++ ) {
const typename TMeshValue::TCValueSlice& aValueSlice = aValueSliceArr[ med2visu[iGauss] ];
aDataValues[ iComp ] = aValueSlice[ iComp ];
}
- aSetElnoNodeData.AddNextPointData( &aDataValues[ 0 ] );
+ aSetElnoNodeData.AddNextPointData( &aDataValues[ 0 ] );
}
- aSetElnoNodeData.InsertNextCellData();
- }
+ aSetElnoNodeData.InsertNextCellData();
+ }
}
-
- // Assign the ELNO data on the corresponding VTK data set attribute
+
+ // Assign the ELNO data on the corresponding VTK data set attribute
aSetElnoNodeData.AddData( aDataSetAttributes );
}
//-------------------------------
//----------------------------------------------------------------------------
template<int EDataType>
- void
+ void
InitTimeStampOnGaussMesh(const PPolyData& theSource,
- const PFieldImpl& theField,
- const PValForTimeImpl& theValForTime);
+ const PFieldImpl& theField,
+ const PValForTimeImpl& theValForTime);
- void
+ void
GetTimeStampOnGaussMesh(const PPolyData& theSource,
- const PFieldImpl& theField,
- const PValForTimeImpl& theValForTime)
+ const PFieldImpl& theField,
+ const PValForTimeImpl& theValForTime)
{
vtkIdType aDataType = theField->GetDataType();
switch(aDataType){
break;
default:
EXCEPTION(std::runtime_error,
- "GetTimeStampOnGaussMesh - handling unsupported data type - "<<aDataType);
+ "GetTimeStampOnGaussMesh - handling unsupported data type - "<<aDataType);
}
}
TTimeStampOnGaussMeshInitArray(const PDataArrayHolder& theDataArrayHolder):
myDataArrayHolder(theDataArrayHolder)
{}
-
+
void
Execute(const PFieldImpl& theField,
- const PValForTimeImpl& theValForTime)
+ const PValForTimeImpl& theValForTime)
{
vtkIdType aNbComp = theField->myNbComp;
vtkIdType aSize = std::max(vtkIdType(3), aNbComp);
const TGeom2GaussSubMesh& aGeom2GaussSubMesh = aGaussMesh->myGeom2GaussSubMesh;
TGeom2GaussSubMesh::const_iterator anIter = aGeom2GaussSubMesh.begin();
for(int aTupleId = 0; anIter != aGeom2GaussSubMesh.end(); anIter++){
- EGeometry aEGeom = anIter->first;
-
- PGaussSubMeshImpl aGaussSubMesh = anIter->second;
- if(!aGaussSubMesh->myIsDone)
- continue;
-
- TGeom2MeshValue::const_iterator anIter2 = aGeom2MeshValue.find(aEGeom);
- if(anIter2 == aGeom2MeshValue.end()){
- EXCEPTION(std::runtime_error,
- "TTimeStampOnGaussMeshInitArray >> Can't find values for corresponding Gauss Points SubMesh");
- }
- TMeshValuePtr aMeshValue = anIter2->second;
- vtkIdType aNbGauss = aMeshValue->GetNbGauss();
- vtkIdType aNbElem = aMeshValue->GetNbElem();
-
- if(aNbGauss < 1)
- continue;
-
- const TPointCoords& aCoords = aGaussSubMesh->myPointCoords;
-
- INITMSG(MYDEBUG,
- "- aEGeom = "<<aEGeom<<
- "; aNbElem = "<<aNbElem<<
- "; aNbGauss = "<<aNbGauss<<
- "; aCoords.GetNbPoints() = "<<aCoords.GetNbPoints()<<
- std::endl);
-
- if(aCoords.GetNbPoints() == aNbElem*aNbGauss){
- for(int iElem = 0; iElem < aNbElem; iElem++){
- typename TMeshValue::TCValueSliceArr aValueSliceArr = aMeshValue->GetGaussValueSliceArr(iElem);
- for(int iGauss = 0; iGauss < aNbGauss; iGauss++, aTupleId++){
- const typename TMeshValue::TCValueSlice& aValueSlice = aValueSliceArr[iGauss];
- for(int iComp = 0; iComp < aNbComp; iComp++){
- aDataValues[iComp] = aValueSlice[iComp];
- }
- this->myDataArrayHolder->SetTuple(aTupleId, &aDataValues[0]);
- }
- }
- }else{
- for(int iElem = 0; iElem < aNbElem; iElem++, aTupleId++){
- typename TMeshValue::TCValueSliceArr aValueSliceArr = aMeshValue->GetCompValueSliceArr(iElem);
- for(int iComp = 0; iComp < aNbComp; iComp++){
- const typename TMeshValue::TCValueSlice& aValueSlice = aValueSliceArr[iComp];
- aDataValues[iComp] = TVTKBasicType();
- for(int iGauss = 0; iGauss < aNbGauss; iGauss++){
- aDataValues[iComp] += aValueSlice[iGauss];
- }
- aDataValues[iComp] /= aNbGauss;
- }
- this->myDataArrayHolder->SetTuple(aTupleId, &aDataValues[0]);
- }
- }
+ EGeometry aEGeom = anIter->first;
+
+ PGaussSubMeshImpl aGaussSubMesh = anIter->second;
+ if(!aGaussSubMesh->myIsDone)
+ continue;
+
+ TGeom2MeshValue::const_iterator anIter2 = aGeom2MeshValue.find(aEGeom);
+ if(anIter2 == aGeom2MeshValue.end()){
+ EXCEPTION(std::runtime_error,
+ "TTimeStampOnGaussMeshInitArray >> Can't find values for corresponding Gauss Points SubMesh");
+ }
+ TMeshValuePtr aMeshValue = anIter2->second;
+ vtkIdType aNbGauss = aMeshValue->GetNbGauss();
+ vtkIdType aNbElem = aMeshValue->GetNbElem();
+
+ if(aNbGauss < 1)
+ continue;
+
+ const TPointCoords& aCoords = aGaussSubMesh->myPointCoords;
+
+ INITMSG(MYDEBUG,
+ "- aEGeom = "<<aEGeom<<
+ "; aNbElem = "<<aNbElem<<
+ "; aNbGauss = "<<aNbGauss<<
+ "; aCoords.GetNbPoints() = "<<aCoords.GetNbPoints()<<
+ std::endl);
+
+ if(aCoords.GetNbPoints() == aNbElem*aNbGauss){
+ for(int iElem = 0; iElem < aNbElem; iElem++){
+ typename TMeshValue::TCValueSliceArr aValueSliceArr = aMeshValue->GetGaussValueSliceArr(iElem);
+ for(int iGauss = 0; iGauss < aNbGauss; iGauss++, aTupleId++){
+ const typename TMeshValue::TCValueSlice& aValueSlice = aValueSliceArr[iGauss];
+ for(int iComp = 0; iComp < aNbComp; iComp++){
+ aDataValues[iComp] = aValueSlice[iComp];
+ }
+ this->myDataArrayHolder->SetTuple(aTupleId, &aDataValues[0]);
+ }
+ }
+ }else{
+ for(int iElem = 0; iElem < aNbElem; iElem++, aTupleId++){
+ typename TMeshValue::TCValueSliceArr aValueSliceArr = aMeshValue->GetCompValueSliceArr(iElem);
+ for(int iComp = 0; iComp < aNbComp; iComp++){
+ const typename TMeshValue::TCValueSlice& aValueSlice = aValueSliceArr[iComp];
+ aDataValues[iComp] = TVTKBasicType();
+ for(int iGauss = 0; iGauss < aNbGauss; iGauss++){
+ aDataValues[iComp] += aValueSlice[iGauss];
+ }
+ aDataValues[iComp] /= aNbGauss;
+ }
+ this->myDataArrayHolder->SetTuple(aTupleId, &aDataValues[0]);
+ }
+ }
}
}
};
template<int EDataType>
- void
+ void
InitTimeStampOnGaussMesh(const PPolyData& theSource,
- const PFieldImpl& theField,
- const PValForTimeImpl& theValForTime)
+ const PFieldImpl& theField,
+ const PValForTimeImpl& theValForTime)
{
vtkIdType aNbTuples = theSource->GetNumberOfPoints();
std::string aFieldName = VISU::GenerateFieldName(theField, theValForTime);
aDataSetAttributes->AddArray(aFullDataArray);
INITMSG(MYDEBUG,"InitTimeStampOnGaussMesh "<<
- "- aNbTuples = "<<aNbTuples<<
- "; aNbComp = "<<aNbComp<<
- std::endl);
+ "- aNbTuples = "<<aNbTuples<<
+ "; aNbComp = "<<aNbComp<<
+ std::endl);
TTimerLog aTimerLog(MYDEBUG,"InitTimeStampOnGaussMesh");
-
+
const TGeom2MeshValue& aGeom2MeshValue = theValForTime->GetGeom2MeshValue();
typedef typename TL::TEnum2VTKBasicType<EDataType>::TResult TVTKBasicType;
typedef TTMeshValue<TVTKBasicType> TMeshValue;
TMeshValuePtr aMeshValue = theValForTime->GetFirstMeshValue();
if(aGeom2MeshValue.size() == 1){
aFullDataArray->SetVoidArray(aMeshValue->GetPointer(),
- aMeshValue->size(),
- true);
+ aMeshValue->size(),
+ true);
INITMSG(MYDEBUG,"InitTimeStampOnGaussMesh - aFullDataArray->SetVoidArray()"<<std::endl);
if(aNbComp == 1 || aNbComp == 3){
- aSelectedDataArray->SetVoidArray(aMeshValue->GetPointer(),
- aMeshValue->size(),
- true);
- INITMSG(MYDEBUG,"InitTimeStampOnGaussMesh - aSelectedDataArray->SetVoidArray()"<<std::endl);
+ aSelectedDataArray->SetVoidArray(aMeshValue->GetPointer(),
+ aMeshValue->size(),
+ true);
+ INITMSG(MYDEBUG,"InitTimeStampOnGaussMesh - aSelectedDataArray->SetVoidArray()"<<std::endl);
}else{
- PDataArrayHolder aDataArrayHolder(new TTDataArrayHolder(aSelectedDataArray));
- TTimeStampOnGaussMeshInitArray<EDataType>(aDataArrayHolder).Execute(theField, theValForTime);
+ PDataArrayHolder aDataArrayHolder(new TTDataArrayHolder(aSelectedDataArray));
+ TTimeStampOnGaussMeshInitArray<EDataType>(aDataArrayHolder).Execute(theField, theValForTime);
}
}else{
typedef TDataArrayHolder2<EDataType> TTDataArrayHolder2;
aFullDataArray->Delete();
}
-
+
//----------------------------------------------------------------------------
void InitMed2VisuArray(std::vector<int>& anArray, EGeometry aEGeom){
#if !(defined(VTK_QUADRATIC_EDGE) && defined(VISU_USE_VTK_QUADRATIC)) && defined(VISU_ENABLE_QUADRATIC)
case eSEG3:
anArray[0] = 0;
- anArray[2] = 1;
+ anArray[2] = 1;
anArray[1] = 2;
break;
#endif
#if !(defined(VTK_QUADRATIC_TRIANGLE) && defined(VISU_USE_VTK_QUADRATIC)) && defined(VISU_ENABLE_QUADRATIC)
case eTRIA6:
anArray[0] = 0;
- anArray[2] = 1;
- anArray[4] = 2;
-
+ anArray[2] = 1;
+ anArray[4] = 2;
+
anArray[1] = 3;
- anArray[3] = 4;
+ anArray[3] = 4;
anArray[5] = 5;
break;
#endif
#if !(defined(VTK_QUADRATIC_QUAD) && defined(VISU_USE_VTK_QUADRATIC)) && defined(VISU_ENABLE_QUADRATIC)
case eQUAD8:
anArray[0] = 0;
- anArray[2] = 1;
- anArray[4] = 2;
- anArray[6] = 3;
-
+ anArray[2] = 1;
+ anArray[4] = 2;
+ anArray[6] = 3;
+
anArray[1] = 4;
- anArray[3] = 5;
- anArray[5] = 6;
+ anArray[3] = 5;
+ anArray[5] = 6;
anArray[7] = 7;
break;
#endif
case eTETRA4:
anArray[0] = 0;
anArray[1] = 2;
- anArray[2] = 1;
+ anArray[2] = 1;
anArray[3] = 3;
break;
case ePYRA5:
anArray[0] = 0;
- anArray[1] = 3;
+ anArray[1] = 3;
anArray[2] = 2;
- anArray[3] = 1;
+ anArray[3] = 1;
anArray[4] = 4;
break;
#if (defined(VTK_QUADRATIC_TETRA) && defined(VISU_USE_VTK_QUADRATIC)) && defined(VISU_ENABLE_QUADRATIC)
case eTETRA10:
anArray[0] = 0;
anArray[1] = 2;
- anArray[2] = 1;
- anArray[3] = 3;
-
+ anArray[2] = 1;
+ anArray[3] = 3;
+
anArray[4] = 6;
anArray[5] = 5;
- anArray[6] = 4;
-
- anArray[7] = 7;
- anArray[8] = 9;
+ anArray[6] = 4;
+
+ anArray[7] = 7;
+ anArray[8] = 9;
anArray[9] = 8;
break;
#endif
case ePYRA13:
anArray[0] = 0;
anArray[1] = 3;
- anArray[2] = 2;
- anArray[3] = 1;
+ anArray[2] = 2;
+ anArray[3] = 1;
anArray[4] = 4;
-
+
anArray[5] = 8;
- anArray[6] = 7;
- anArray[7] = 6;
- anArray[8] = 5;
-
- anArray[9] = 9;
- anArray[10] = 12;
- anArray[11] = 11;
- anArray[12] = 10;
+ anArray[6] = 7;
+ anArray[7] = 6;
+ anArray[8] = 5;
+
+ anArray[9] = 9;
+ anArray[10] = 12;
+ anArray[11] = 11;
+ anArray[12] = 10;
break;
#endif
default:
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
-// File:
+// File:
// Author: Alexey PETROV
// Module : VISU
-//
+
#include "VISU_Structures_impl.hxx"
#include "VISU_PointCoords.hxx"
#include "VISU_MeshValue.hxx"
{
/* vtkIdType
VISUGeom2NbNodes(EGeometry theGeom)
- {
+ {
switch(theGeom){
#ifndef VISU_ENABLE_QUADRATIC
- case VISU::eSEG3:
+ case VISU::eSEG3:
return 2;
- case VISU::eTRIA6:
+ case VISU::eTRIA6:
return 3;
- case VISU::eQUAD8:
+ case VISU::eQUAD8:
return 4;
- case VISU::eTETRA10:
+ case VISU::eTETRA10:
return 4;
- case VISU::eHEXA20:
+ case VISU::eHEXA20:
return 8;
- case VISU::ePENTA15:
+ case VISU::ePENTA15:
return 6;
- case VISU::ePYRA13:
+ case VISU::ePYRA13:
return 5;
#endif
- case VISU::ePOLYGONE:
- case VISU::ePOLYEDRE:
+ case VISU::ePOLYGONE:
+ case VISU::ePOLYEDRE:
return -1;
default:
return theGeom % 100;
vtkIdType
VISUGeom2VTK(EGeometry theGeom)
- {
+ {
switch(theGeom){
- case VISU::ePOINT1:
+ case VISU::ePOINT1:
return VTK_VERTEX;
- case VISU::eSEG2:
+ case VISU::eSEG2:
return VTK_LINE;
- case VISU::eTRIA3:
+ case VISU::eTRIA3:
return VTK_TRIANGLE;
- case VISU::eQUAD4:
+ case VISU::eQUAD4:
return VTK_QUAD;
- case VISU::eTETRA4:
+ case VISU::eTETRA4:
return VTK_TETRA;
- case VISU::eHEXA8:
+ case VISU::eHEXA8:
return VTK_HEXAHEDRON;
- case VISU::ePENTA6:
+ case VISU::ePENTA6:
return VTK_WEDGE;
- case VISU::ePYRA5:
+ case VISU::ePYRA5:
return VTK_PYRAMID;
- case VISU::ePOLYGONE:
+ case VISU::ePOLYGONE:
return VTK_POLYGON;
- case VISU::ePOLYEDRE:
+ case VISU::ePOLYEDRE:
return VTK_CONVEX_POINT_SET;
#ifndef VISU_ENABLE_QUADRATIC
- case VISU::eSEG3:
+ case VISU::eSEG3:
return VTK_LINE;
- case VISU::eTRIA6:
+ case VISU::eTRIA6:
return VTK_TRIANGLE;
- case VISU::eQUAD8:
+ case VISU::eQUAD8:
return VTK_QUAD;
- case VISU::eTETRA10:
+ case VISU::eTETRA10:
return VTK_TETRA;
- case VISU::eHEXA20:
+ case VISU::eHEXA20:
return VTK_HEXAHEDRON;
- case VISU::ePENTA15:
+ case VISU::ePENTA15:
return VTK_WEDGE;
- case VISU::ePYRA13:
+ case VISU::ePYRA13:
return VTK_PYRAMID;
#else
- case VISU::eSEG3:
+ case VISU::eSEG3:
#if defined(VTK_QUADRATIC_EDGE) && defined(VISU_USE_VTK_QUADRATIC)
return VTK_QUADRATIC_EDGE;
#else
return VTK_POLY_LINE;
#endif
- case VISU::eTRIA6:
+ case VISU::eTRIA6:
#if defined(VTK_QUADRATIC_TRIANGLE) && defined(VISU_USE_VTK_QUADRATIC)
return VTK_QUADRATIC_TRIANGLE;
#else
return VTK_POLYGON;
#endif
- case VISU::eQUAD8:
+ case VISU::eQUAD8:
#if defined(VTK_QUADRATIC_QUAD) && defined(VISU_USE_VTK_QUADRATIC)
return VTK_QUADRATIC_QUAD;
#else
return VTK_POLYGON;
#endif
- case VISU::eTETRA10:
+ case VISU::eTETRA10:
#if defined(VTK_QUADRATIC_TETRA) && defined(VISU_USE_VTK_QUADRATIC)
return VTK_QUADRATIC_TETRA;
#else
return VTK_CONVEX_POINT_SET;
#endif
- case VISU::eHEXA20:
+ case VISU::eHEXA20:
#if defined(VTK_QUADRATIC_HEXAHEDRON) && defined(VISU_USE_VTK_QUADRATIC)
return VTK_QUADRATIC_HEXAHEDRON;
#else
return VTK_CONVEX_POINT_SET;
#endif
- case VISU::ePENTA15:
+ case VISU::ePENTA15:
#if defined(VTK_QUADRATIC_WEDGE) && defined(VISU_USE_VTK_QUADRATIC)
return VTK_QUADRATIC_WEDGE;
#else
return VTK_CONVEX_POINT_SET;
#endif
- case VISU::ePYRA13:
+ case VISU::ePYRA13:
#if defined(VTK_QUADRATIC_PYRAMID) && defined(VISU_USE_VTK_QUADRATIC)
return VTK_QUADRATIC_PYRAMID;
#else
EGeometry
VTKGeom2VISU(vtkIdType theGeom)
- {
+ {
switch(theGeom){
- case VTK_VERTEX:
+ case VTK_VERTEX:
return VISU::ePOINT1;
- case VTK_LINE:
+ case VTK_LINE:
return VISU::eSEG2;
- case VTK_TRIANGLE:
+ case VTK_TRIANGLE:
return VISU::eTRIA3;
- case VTK_QUAD:
+ case VTK_QUAD:
return VISU::eQUAD4;
- case VTK_TETRA:
+ case VTK_TETRA:
return VISU::eTETRA4;
- case VTK_HEXAHEDRON:
+ case VTK_HEXAHEDRON:
return VISU::eHEXA8;
- case VTK_WEDGE:
+ case VTK_WEDGE:
return VISU::ePENTA6;
- case VTK_PYRAMID:
+ case VTK_PYRAMID:
return VISU::ePYRA5;
- case VTK_POLYGON:
+ case VTK_POLYGON:
return VISU::ePOLYGONE;
- case VTK_CONVEX_POINT_SET:
+ case VTK_CONVEX_POINT_SET:
return VISU::ePOLYEDRE;
#if defined(VISU_ENABLE_QUADRATIC) && defined(VISU_USE_VTK_QUADRATIC)
#if defined(VTK_QUADRATIC_EDGE)
- case VTK_QUADRATIC_EDGE:
+ case VTK_QUADRATIC_EDGE:
return VISU::eSEG3;
#endif
#if defined(VTK_QUADRATIC_TRIANGLE)
- case VTK_QUADRATIC_TRIANGLE:
+ case VTK_QUADRATIC_TRIANGLE:
return VISU::eTRIA6;
#endif
#if defined(VTK_QUADRATIC_QUAD)
- case VTK_QUADRATIC_QUAD:
+ case VTK_QUADRATIC_QUAD:
return VISU::eQUAD8;
#endif
#if defined(VTK_QUADRATIC_TETRA)
- case VTK_QUADRATIC_TETRA:
+ case VTK_QUADRATIC_TETRA:
return VISU::eTETRA10;
#endif
#if defined(VTK_QUADRATIC_HEXAHEDRON)
- case VTK_QUADRATIC_HEXAHEDRON:
+ case VTK_QUADRATIC_HEXAHEDRON:
return VISU::eHEXA20;
#endif
#if defined(VTK_QUADRATIC_WEDGE)
- case VTK_QUADRATIC_WEDGE:
+ case VTK_QUADRATIC_WEDGE:
return VISU::ePENTA15;
#endif
#if defined(VTK_QUADRATIC_PYRAMID)
- case VTK_QUADRATIC_PYRAMID:
+ case VTK_QUADRATIC_PYRAMID:
return VISU::ePYRA13;
#endif
*/
size_t
GetDataSetSize(size_t theNbOfPoints,
- size_t theNbOfCells,
- size_t theCellsSize,
- bool theComputeLinks)
+ size_t theNbOfCells,
+ size_t theCellsSize,
+ bool theComputeLinks)
{
size_t aPointsSize = 3*theNbOfPoints*sizeof(VISU::TCoord);
size_t aConnectivityAndTypesSize = theCellsSize*sizeof(vtkIdType);
::TPolyDataHolder()
{}
- const PPolyData&
+ const PPolyData&
TPolyDataHolder
::GetSource() const
{
return mySource;
}
- vtkPolyData*
+ vtkPolyData*
TPolyDataHolder
::GetPolyDataOutput()
{
::TUnstructuredGridHolder()
{}
- const PUnstructuredGrid&
+ const PUnstructuredGrid&
TUnstructuredGridHolder
::GetSource() const
{
return mySource;
}
- vtkUnstructuredGrid*
+ vtkUnstructuredGrid*
TUnstructuredGridHolder
::GetUnstructuredGridOutput()
{
{
if(myIsVTKDone){
if(vtkDataSet* anOutput = GetOutput()){
- anOutput->Update();
- return anOutput->GetActualMemorySize() * 1024;
+ anOutput->Update();
+ return anOutput->GetActualMemorySize() * 1024;
}
}
throw std::runtime_error("TMemoryCheckIDMapper::GetMemorySize - myIsVTKDone == false !!!");
::TAppendFilterHolder()
{}
- const PAppendFilter&
+ const PAppendFilter&
TAppendFilterHolder
::GetFilter() const
{
return myFilter;
}
- vtkUnstructuredGrid*
+ vtkUnstructuredGrid*
TAppendFilterHolder
::GetUnstructuredGridOutput()
{
::TAppendPolyDataHolder()
{}
- const PAppendPolyData&
+ const PAppendPolyData&
TAppendPolyDataHolder
::GetFilter() const
{
return myFilter;
}
- vtkPolyData*
+ vtkPolyData*
TAppendPolyDataHolder
::GetPolyDataOutput()
{
::TMergeFilterHolder()
{}
- const PMergeFilter&
+ const PMergeFilter&
TMergeFilterHolder
::GetFilter() const
{
return myFilter;
}
- vtkDataSet*
+ vtkDataSet*
TMergeFilterHolder
::GetOutput()
{
//---------------------------------------------------------------
TMeshImpl
- ::TMeshImpl():
+ ::TMeshImpl():
myNbPoints(0)
{}
{
return myNbPoints;
}
-
+
vtkIdType
TMeshImpl::
GetDim() const
{
return myDim;
}
-
+
vtkPointSet*
TMeshImpl::
GetPointSet()
{
if ( !mySubMeshID.empty() )
return mySubMeshID[theID];
-
+
return theID;
}
::GetElemVTKID(vtkIdType theID) const
{
if ( !mySubMeshID.empty() )
- for ( size_t anId = 0; anId < mySubMeshID.size(); anId++ )
- if ( mySubMeshID[ anId ] == theID )
- return anId;
+ for ( size_t anId = 0; anId < mySubMeshID.size(); anId++ )
+ if ( mySubMeshID[ anId ] == theID )
+ return anId;
return theID;
}
{
return myNamedPointCoords->GetObjID(theID);
}
-
+
vtkIdType
TProfileImpl
::GetNodeVTKID(vtkIdType theID) const
return myNamedPointCoords->GetVTKID(theID);
}
- vtkFloatingPointType*
+ vtkFloatingPointType*
TProfileImpl
::GetNodeCoord(vtkIdType theObjID)
{
return VISU::GetElemVTKID(GetFilter()->GetOutput(), theID);
}
- vtkCell*
+ vtkCell*
TProfileImpl
::GetElemCell(vtkIdType theObjID)
{
vtkIdType aVtkID = GetElemVTKID(theObjID);
return GetFilter()->GetOutput()->GetCell(aVtkID);
}
-
- vtkUnstructuredGrid*
+
+ vtkUnstructuredGrid*
TProfileImpl
::GetUnstructuredGridOutput()
{
return aSize;
}
- std::string
+ std::string
TProfileImpl
::GetNodeName(vtkIdType theObjID) const
{
return myNamedPointCoords->GetNodeName(theObjID);
}
- std::string
+ std::string
TProfileImpl
::GetElemName(vtkIdType theObjID) const
{
{
return myIDMapper->GetNodeObjID(theID);
}
-
+
vtkIdType
TUnstructuredGridIDMapperImpl
::GetNodeVTKID(vtkIdType theID) const
return myIDMapper->GetNodeVTKID(theID);
}
- vtkFloatingPointType*
+ vtkFloatingPointType*
TUnstructuredGridIDMapperImpl
::GetNodeCoord(vtkIdType theObjID)
{
return myIDMapper->GetElemVTKID(theID);
}
- vtkCell*
+ vtkCell*
TUnstructuredGridIDMapperImpl
::GetElemCell(vtkIdType theObjID)
{
return myIDMapper->GetElemCell(theObjID);
}
-
- void
+
+ void
TUnstructuredGridIDMapperImpl
::SetReferencedMesh( const PNamedIDMapper& theNamedIDMapper )
{
myCommonCellsFilter->SetCellsUG( theNamedIDMapper->GetUnstructuredGridOutput() );
}
- void
+ void
TUnstructuredGridIDMapperImpl
::Build()
{
aFilter->AddField( "VISU_FIELD", aDataSet );
aFilter->AddField( "VISU_FIELD_GAUSS_MIN", aDataSet );
aFilter->AddField( "VISU_FIELD_GAUSS_MAX", aDataSet );
+ aFilter->AddField( "VISU_FIELD_GAUSS_MOD", aDataSet );
aFilter->AddField( "VISU_CELLS_MAPPER", aDataSet );
aFilter->AddField( "ELNO_FIELD", aDataSet );
aFilter->AddField( "ELNO_COMPONENT_MAPPER", aDataSet );
aFilter->AddField( "VISU_POINTS_MAPPER", aDataSet );
-
+
myCommonCellsFilter->SetProfileUG( aFilter->GetUnstructuredGridOutput() );
- }
+ }
}
- vtkUnstructuredGrid*
+ vtkUnstructuredGrid*
TUnstructuredGridIDMapperImpl
::GetUnstructuredGridOutput()
{
return myCommonCellsFilter->GetOutput();
}
- vtkDataSet*
+ vtkDataSet*
TUnstructuredGridIDMapperImpl
::GetOutput()
{
return GetUnstructuredGridOutput();
}
- PUnstructuredGrid
+ PUnstructuredGrid
TUnstructuredGridIDMapperImpl
::GetSource()
{
{
return myIDMapper->GetNodeObjID(theID);
}
-
+
vtkIdType
TPolyDataIDMapperImpl
::GetNodeVTKID(vtkIdType theID) const
return myIDMapper->GetNodeVTKID(theID);
}
- vtkFloatingPointType*
+ vtkFloatingPointType*
TPolyDataIDMapperImpl
::GetNodeCoord(vtkIdType theObjID)
{
return myIDMapper->GetElemVTKID(theID);
}
- vtkCell*
+ vtkCell*
TPolyDataIDMapperImpl
::GetElemCell(vtkIdType theObjID)
{
return myIDMapper->GetElemCell(theObjID);
}
-
- void
+
+ void
TPolyDataIDMapperImpl
::Build()
{
if ( !myFilter.GetPointer() ) {
const PAppendPolyData& anAppendFilter = myIDMapper->GetFilter();
vtkPolyData* aGeometry = anAppendFilter->GetOutput();
-
+
const PPolyData& aSource = mySource.GetSource();
vtkPolyData* aDataSet = aSource.GetPointer();
aDataSet->ShallowCopy( aGeometry );
-
+
const PMergeFilter& aFilter = GetFilter();
aFilter->SetGeometry( aGeometry );
aFilter->SetScalars( aDataSet );
aFilter->AddField( "VISU_FIELD", aDataSet );
aFilter->AddField( "VISU_FIELD_GAUSS_MIN", aDataSet );
aFilter->AddField( "VISU_FIELD_GAUSS_MAX", aDataSet );
+ aFilter->AddField( "VISU_FIELD_GAUSS_MOD", aDataSet );
aFilter->AddField( "VISU_CELLS_MAPPER", aDataSet );
aFilter->AddField( "VISU_POINTS_MAPPER", aDataSet );
}
}
- vtkPolyData*
+ vtkPolyData*
TPolyDataIDMapperImpl
::GetPolyDataOutput()
{
return myFilter->GetPolyDataOutput();
}
- vtkDataSet*
+ vtkDataSet*
TPolyDataIDMapperImpl
::GetOutput()
{
return GetPolyDataOutput();
}
- PPolyData
+ PPolyData
TPolyDataIDMapperImpl
::GetSource()
{
myGeom(EGeometry(-1)),
myNbPoints(0)
{}
-
+
void
TGaussImpl
::LessThan(const PGaussImpl& theGauss,
- bool& theResult) const
+ bool& theResult) const
{
theResult = false;
}
myStatus(eNone),
myStartID(0)
{}
-
+
TGaussPointID
TGaussSubMeshImpl
::GetObjID(vtkIdType theID) const
{
TCellID aCellID = myStartID + theID / myGauss->myNbPoints;
TLocalPntID aLocalPntID = theID % myGauss->myNbPoints;
-
+
return TGaussPointID(aCellID, aLocalPntID);
}
TCellID aCellID = theID.first;
TLocalPntID aLocalPntID = theID.second;
-
+
vtkIdType aNbPoints = myGauss->myNbPoints;
if ( aLocalPntID >= aNbPoints )
return aResult;
{
return mySubProfile->GetElemObjID( theID );
}
-
-
+
+
vtkIdType
VISU::TGaussSubMeshImpl
::GetElemVTKID(vtkIdType theID) const
return mySubProfile->GetElemVTKID( theID );
}
- vtkIdType
+ vtkIdType
TGaussSubMeshImpl
::GetGlobalID(vtkIdType theID) const
{
PGaussSubMeshImpl aLeft(theLeft), aRight(theRight);
const PGaussImpl& aGaussLeft = aLeft->myGauss;
const PGaussImpl& aGaussRight = aRight->myGauss;
-
+
if(aGaussLeft->myGeom != aGaussRight->myGeom)
return aGaussLeft->myGeom < aGaussRight->myGeom;
myParent(NULL)
{}
- TGaussPointID
+ TGaussPointID
TGaussMeshImpl
::GetObjID(vtkIdType theID) const
{
return VISU::GetObjID(aFilter->GetOutput(), theID);
}
- vtkIdType
+ vtkIdType
TGaussMeshImpl
::GetVTKID(const TGaussPointID& theID) const
{
TCellID aCellID = theID.first;
vtkIdType aVTKCellId = GetParent()->GetElemVTKID( aCellID );
- if ( aVTKCellId < 0 )
+ if ( aVTKCellId < 0 )
return aResult;
-
+
vtkCell* aCell = GetParent()->GetElemCell( aCellID );
if ( !aCell )
return aResult;
EGeometry aVGeom = VISU::VTKGeom2VISU( aCell->GetCellType() );
- if ( aVGeom < EGeometry(0) )
+ if ( aVGeom < EGeometry(0) )
return aResult;
-
+
TGeom2GaussSubMesh::const_iterator anIter = myGeom2GaussSubMesh.find( aVGeom );
if ( anIter == myGeom2GaussSubMesh.end() )
return aResult;
-
+
size_t aSubMeshEnd = myGaussSubMeshArr.size();
const PGaussSubMeshImpl& aGaussSubMesh = anIter->second;
for ( size_t aSubMeshId = 0; aSubMeshId < aSubMeshEnd; aSubMeshId++ ) {
const PGaussSubMeshImpl& aSubMesh = myGaussSubMeshArr[aSubMeshId];
if ( aGaussSubMesh.get() == aSubMesh.get() ) {
- return aGaussSubMesh->GetVTKID(theID);
+ return aGaussSubMesh->GetVTKID(theID);
}
}
return aResult;
}
- vtkPolyData*
+ vtkPolyData*
TGaussMeshImpl
::GetPolyDataOutput()
{
return aSize;
}
- TNamedIDMapper*
+ TNamedIDMapper*
TGaussMeshImpl
::GetParent() const
{
//---------------------------------------------------------------
- TGaussPointID
+ TGaussPointID
TGaussPtsIDFilter
::GetObjID(vtkIdType theID) const
{
return myGaussPtsIDMapper->GetObjID(theID);
}
- vtkIdType
+ vtkIdType
TGaussPtsIDFilter
::GetVTKID(const TGaussPointID& theID) const
{
return myGaussPtsIDMapper->GetVTKID(theID);
}
-
- TNamedIDMapper*
+
+ TNamedIDMapper*
TGaussPtsIDFilter
::GetParent() const
{
return myGaussPtsIDMapper->GetParent();
}
- vtkPolyData*
+ vtkPolyData*
TGaussPtsIDFilter
::GetPolyDataOutput()
{
return TPolyDataIDMapperImpl::GetPolyDataOutput();
}
- vtkDataSet*
+ vtkDataSet*
TGaussPtsIDFilter
::GetOutput()
{
{
TStructured::CopyStructure( theStructured );
- if ( PMeshImpl aMesh = theStructured )
- GetSource()->ShallowCopy( aMesh->GetPointSet() );
+ if ( PMeshImpl aMesh = theStructured )
+ GetSource()->ShallowCopy( aMesh->GetPointSet() );
}
vtkIdType
return myStartID + theID;
}
- std::string
+ std::string
TSubMeshImpl
::GetElemName(vtkIdType theObjID) const
{
{
TStructured::CopyStructure( theStructured );
- if ( PMeshImpl aMesh = theStructured )
- myNamedPointCoords = aMesh->myNamedPointCoords;
+ if ( PMeshImpl aMesh = theStructured )
+ myNamedPointCoords = aMesh->myNamedPointCoords;
}
vtkIdType
return VISU::GetElemObjID(GetFilter()->GetOutput(), theID);
}
- std::string
+ std::string
TMeshOnEntityImpl
::GetNodeName(vtkIdType theObjID) const
{
return myNamedPointCoords->GetNodeName(theObjID);
}
- std::string
+ std::string
TMeshOnEntityImpl
::GetElemName(vtkIdType theObjID) const
{
return aSubMesh->GetElemName(anInputCellID.second);
}
- vtkUnstructuredGrid*
+ vtkUnstructuredGrid*
TMeshOnEntityImpl
::GetUnstructuredGridOutput()
{
else{
TID2ID::const_iterator anIter = myElemObj2VTKID.find(theID);
if(anIter != myElemObj2VTKID.end())
- return anIter->second;
+ return anIter->second;
}
return -1;
}
return myMeshID[theID];
}
- vtkIdType
+ vtkIdType
TFamilyImpl
- ::GetNodeObjID(vtkIdType theID) const
+ ::GetNodeObjID(vtkIdType theID) const
{
return myNamedPointCoords->GetObjID(theID);
}
vtkIdType
TFamilyImpl
- ::GetNodeVTKID(vtkIdType theID) const
+ ::GetNodeVTKID(vtkIdType theID) const
{
return myNamedPointCoords->GetVTKID(theID);
}
- vtkUnstructuredGrid*
+ vtkUnstructuredGrid*
TFamilyImpl
::GetUnstructuredGridOutput()
{
{
TStructured::CopyStructure( theStructured );
- if ( PMeshImpl aMesh = theStructured )
+ if ( PMeshImpl aMesh = theStructured )
myNamedPointCoords = aMesh->myNamedPointCoords;
}
- TNbASizeCells
+ TNbASizeCells
TGroupImpl
::GetNbASizeCells() const
{
vtkIdType aNbCells = 0, aCellsSize = 0;
TFamilySet::const_iterator anIter = myFamilySet.begin();
for(; anIter != myFamilySet.end(); anIter++){
- PFamilyImpl aFamily = *anIter;
+ PFamilyImpl aFamily = *anIter;
aNbCells += aFamily->myNbCells;
aCellsSize += aFamily->myCellsSize;
}
else{
TID2ID::const_iterator anIter = myElemObj2VTKID.find(theID);
if(anIter != myElemObj2VTKID.end())
- return anIter->second;
+ return anIter->second;
}
return -1;
}
return VISU::GetElemObjID(GetFilter()->GetOutput(), theID);
}
- vtkIdType
+ vtkIdType
TGroupImpl
- ::GetNodeObjID(vtkIdType theID) const
+ ::GetNodeObjID(vtkIdType theID) const
{
return myNamedPointCoords->GetObjID(theID);
}
vtkIdType
TGroupImpl
- ::GetNodeVTKID(vtkIdType theID) const
+ ::GetNodeVTKID(vtkIdType theID) const
{
return myNamedPointCoords->GetVTKID(theID);
}
- vtkUnstructuredGrid*
+ vtkUnstructuredGrid*
TGroupImpl
::GetUnstructuredGridOutput()
{
}
-
+
//---------------------------------------------------------------
TFieldImpl
::TFieldImpl()
, myDataType( 0 )
{}
- void
+ void
TFieldImpl
::Init(vtkIdType theNbComp,
- vtkIdType theDataType)
+ vtkIdType theDataType)
{
myNbComp = theNbComp;
myDataType = theDataType;
aComp2Group2MinMax.resize(theNbComp + 1);
aComp2Group2AverageMinMax.resize(theNbComp + 1);
for(vtkIdType iComp = 0; iComp <= theNbComp; iComp++){
- TMinMax& aMinMax = aComp2MinMax[iComp];
- aMinMax.first = VTK_LARGE_FLOAT;
- aMinMax.second = -VTK_LARGE_FLOAT;
- TMinMax& anAverageMinMax = aComp2AverageMinMax[iComp];
- anAverageMinMax.first = VTK_LARGE_FLOAT;
- anAverageMinMax.second = -VTK_LARGE_FLOAT;
+ TMinMax& aMinMax = aComp2MinMax[iComp];
+ aMinMax.first = VTK_LARGE_FLOAT;
+ aMinMax.second = -VTK_LARGE_FLOAT;
+ TMinMax& anAverageMinMax = aComp2AverageMinMax[iComp];
+ anAverageMinMax.first = VTK_LARGE_FLOAT;
+ anAverageMinMax.second = -VTK_LARGE_FLOAT;
}
}
}
- vtkIdType
+ vtkIdType
TFieldImpl
::GetDataType() const
{
return myDataType;
}
- TMinMax
+ TMinMax
TFieldImpl
::GetMinMax(vtkIdType theCompID, const TNames& theGroupNames, TGaussMetric theGaussMetric)
{
const TGroup2MinMax& aGroup2MinMax = myMetric2Comp2Group2MinMax[theGaussMetric][theCompID];
TNames::const_iterator aNameIter = theGroupNames.begin();
for( ; aNameIter != theGroupNames.end(); aNameIter++ ) {
- TGroup2MinMax::const_iterator aGroup2MinMaxIter = aGroup2MinMax.find( *aNameIter );
- if( aGroup2MinMaxIter != aGroup2MinMax.end() ) {
- const TMinMax& aGroupMinMax = aGroup2MinMaxIter->second;
- aMinMax.first = std::min( aMinMax.first, aGroupMinMax.first );
- aMinMax.second = std::max( aMinMax.second, aGroupMinMax.second );
- anIsMinMaxInitialized = true;
- }
+ TGroup2MinMax::const_iterator aGroup2MinMaxIter = aGroup2MinMax.find( *aNameIter );
+ if( aGroup2MinMaxIter != aGroup2MinMax.end() ) {
+ const TMinMax& aGroupMinMax = aGroup2MinMaxIter->second;
+ aMinMax.first = std::min( aMinMax.first, aGroupMinMax.first );
+ aMinMax.second = std::max( aMinMax.second, aGroupMinMax.second );
+ anIsMinMaxInitialized = true;
+ }
}
}
}
- TMinMax
+ TMinMax
TFieldImpl
::GetAverageMinMax(vtkIdType theCompID, const TNames& theGroupNames, TGaussMetric theGaussMetric)
{
const TGroup2MinMax& aGroup2MinMax = myMetric2Comp2Group2AverageMinMax[theGaussMetric][theCompID];
TNames::const_iterator aNameIter = theGroupNames.begin();
for( ; aNameIter != theGroupNames.end(); aNameIter++ ) {
- TGroup2MinMax::const_iterator aGroup2MinMaxIter = aGroup2MinMax.find( *aNameIter );
- if( aGroup2MinMaxIter != aGroup2MinMax.end() ) {
- const TMinMax& aGroupMinMax = aGroup2MinMaxIter->second;
- aMinMax.first = std::min( aMinMax.first, aGroupMinMax.first );
- aMinMax.second = std::max( aMinMax.second, aGroupMinMax.second );
- anIsMinMaxInitialized = true;
- }
+ TGroup2MinMax::const_iterator aGroup2MinMaxIter = aGroup2MinMax.find( *aNameIter );
+ if( aGroup2MinMaxIter != aGroup2MinMax.end() ) {
+ const TMinMax& aGroupMinMax = aGroup2MinMaxIter->second;
+ aMinMax.first = std::min( aMinMax.first, aGroupMinMax.first );
+ aMinMax.second = std::max( aMinMax.second, aGroupMinMax.second );
+ anIsMinMaxInitialized = true;
+ }
}
}
return aMinMax;
}
-
+
//----------------------------------------------------------------------------
- const PMeshValue&
+ const PMeshValue&
TGeom2Value
::GetMeshValue(EGeometry theGeom) const
{
EXCEPTION(std::runtime_error,"TGeom2Value::GetMeshValue - myGeom2MeshValue.find(theGeom) fails");
return anIter->second;
}
-
- PMeshValue&
+
+ PMeshValue&
TGeom2Value
::GetMeshValue(EGeometry theGeom)
{
//----------------------------------------------------------------------------
- TGeom2MeshValue&
+ TGeom2MeshValue&
TGeom2Value
::GetGeom2MeshValue()
{
return myGeom2MeshValue;
}
-
- const TGeom2MeshValue&
+
+ const TGeom2MeshValue&
TGeom2Value
::GetGeom2MeshValue() const
{
return myGeom2MeshValue;
}
- PMeshValue
+ PMeshValue
TGeom2Value
::GetFirstMeshValue() const
{
myUnstructuredGridIDMapper(new TUnstructuredGridIDMapperImpl())
{}
- const PMeshValue&
+ const PMeshValue&
TValForTimeImpl
::GetMeshValue(EGeometry theGeom) const
{
return myGeom2Value.GetMeshValue(theGeom);
}
-
- PMeshValue&
+
+ PMeshValue&
TValForTimeImpl
::GetMeshValue(EGeometry theGeom)
{
return myGeom2Value.GetMeshValue(theGeom);
}
- TGeom2MeshValue&
+ TGeom2MeshValue&
TValForTimeImpl
::GetGeom2MeshValue()
{
return myGeom2Value.GetGeom2MeshValue();
}
- const TGeom2MeshValue&
+ const TGeom2MeshValue&
TValForTimeImpl
::GetGeom2MeshValue() const
{
return myGeom2Value.GetGeom2MeshValue();
}
- PMeshValue
+ PMeshValue
TValForTimeImpl
::GetFirstMeshValue() const
{
}
return anIter->second;
}
-
+
int
TValForTimeImpl
::GetMaxNbGauss() const
}
return aNbGauss;
}
-
+
unsigned long int
TValForTimeImpl
::GetMemorySize()
return aSize;
}
-
//---------------------------------------------------------------
}
// VISU OBJECT : interactive object for VISU entities implementation
// File : VISU_Extractor.cxx
// Module : VISU
-//
+
#include "VISU_Extractor.hxx"
#include "VISU_PipeLineUtils.hxx"
#include "VISU_ConvertorUtils.hxx"
#include <vtkInformationVector.h>
-
//----------------------------------------------------------------------------
vtkStandardNewMacro(VISU_Extractor);
//----------------------------------------------------------------------------
-template<typename TValueType>
+template<typename TValueType>
void
Module2Scalars(vtkDataArray *theInputDataArray,
- TValueType* theOutputPtr,
- vtkIdType theNbOfTuples)
+ TValueType* theOutputPtr,
+ vtkIdType theNbOfTuples,
+ VISU::TGaussMetric theGaussMetric)
{
vtkIdType aNbComp = theInputDataArray->GetNumberOfComponents();
- std::vector<vtkFloatingPointType> anArray(aNbComp < 3? 3: aNbComp);
- for(vtkIdType aTupleId = 0; aTupleId < theNbOfTuples; aTupleId++){
+ if (aNbComp != 3) // Min, Max, Avg
+ return;
+ std::vector<vtkFloatingPointType> anArray (3);
+ for (vtkIdType aTupleId = 0; aTupleId < theNbOfTuples; aTupleId++) {
theInputDataArray->GetTuple(aTupleId, &anArray[0]);
- vtkFloatingPointType aVector[3] = {anArray[0], anArray[1], anArray[2]};
- vtkFloatingPointType aScalar = sqrt(aVector[0]*aVector[0] +
- aVector[1]*aVector[1] +
- aVector[2]*aVector[2]);
- *theOutputPtr = TValueType(aScalar);
+ switch (theGaussMetric) {
+ case VISU::MINIMUM_METRIC: *theOutputPtr = TValueType(anArray[0]); break;
+ case VISU::MAXIMUM_METRIC: *theOutputPtr = TValueType(anArray[1]); break;
+ case VISU::AVERAGE_METRIC: *theOutputPtr = TValueType(anArray[2]); break;
+ }
theOutputPtr++;
}
}
//----------------------------------------------------------------------------
-template<typename TValueType>
+template<typename TValueType>
void
Component2Scalars(vtkDataArray *theInputDataArray,
- TValueType* theInputPtr,
- TValueType* theOutputPtr,
- vtkIdType theNbOfTuples,
- vtkIdType theComponentId)
+ TValueType* theInputPtr,
+ TValueType* theOutputPtr,
+ vtkIdType theNbOfTuples,
+ vtkIdType theComponentId)
{
vtkIdType aNbComp = theInputDataArray->GetNumberOfComponents();
for(vtkIdType aTupleId = 0; aTupleId < theNbOfTuples; aTupleId++){
//----------------------------------------------------------------------------
template<typename TDataSetAttributesType> void
-ExecuteScalars(vtkIdType theNbOfTuples,
- vtkIdType theScalarMode,
- VISU::TGaussMetric theGaussMetric,
- TDataSetAttributesType* theInputData,
- TDataSetAttributesType* theOutputData)
+ExecuteScalars(vtkIdType theNbOfTuples,
+ vtkIdType theScalarMode,
+ VISU::TGaussMetric theGaussMetric,
+ TDataSetAttributesType* theInputData,
+ TDataSetAttributesType* theOutputData)
{
- if(theNbOfTuples < 1)
+ if (theNbOfTuples < 1)
return;
vtkDataArray* aFieldArray = NULL;
- switch( theGaussMetric ) {
+ switch (theGaussMetric) {
case VISU::AVERAGE_METRIC: aFieldArray = theInputData->GetArray("VISU_FIELD"); break;
case VISU::MINIMUM_METRIC: aFieldArray = theInputData->GetArray("VISU_FIELD_GAUSS_MIN"); break;
case VISU::MAXIMUM_METRIC: aFieldArray = theInputData->GetArray("VISU_FIELD_GAUSS_MAX"); break;
void *anInputPtr = aFieldArray->GetVoidPointer(0);
void *anOutputPtr = anOutputScalars->GetVoidPointer(0);
- if(theScalarMode == 0){
- switch(anInputDataType){
- vtkTemplateMacro3(Module2Scalars,
- aFieldArray,
- (VTK_TT *)(anOutputPtr),
- theNbOfTuples);
+ if (theScalarMode == 0) {
+ aFieldArray = theInputData->GetArray("VISU_FIELD_GAUSS_MOD");
+ if (!aFieldArray)
+ return;
+ switch (anInputDataType) {
+ vtkTemplateMacro4(Module2Scalars,
+ aFieldArray,
+ (VTK_TT *)(anOutputPtr),
+ theNbOfTuples,
+ theGaussMetric);
default:
break;
}
- }else{
- switch(anInputDataType){
+ } else {
+ switch (anInputDataType) {
vtkTemplateMacro5(Component2Scalars,
- aFieldArray,
- (VTK_TT *)(anInputPtr),
- (VTK_TT *)(anOutputPtr),
- theNbOfTuples,
- theScalarMode - 1);
+ aFieldArray,
+ (VTK_TT *)(anInputPtr),
+ (VTK_TT *)(anOutputPtr),
+ theNbOfTuples,
+ theScalarMode - 1);
default:
break;
}
}
-
+
theOutputData->SetScalars(anOutputScalars);
anOutputScalars->Delete();
}
int
VISU_Extractor
::RequestData(vtkInformation *theRequest,
- vtkInformationVector **theInputVector,
- vtkInformationVector *theOutputVector)
+ vtkInformationVector **theInputVector,
+ vtkInformationVector *theOutputVector)
{
vtkDataSet *anInput = VISU::GetInput( theInputVector, 0 );
vtkDataSet *anOutput = VISU::GetOutput( theOutputVector );
vtkPointData *anInputPointData = anInput->GetPointData();
vtkPointData *anOutputPointData = anOutput->GetPointData();
- anOutputPointData->PassData( anInputPointData );
+ anOutputPointData->PassData( anInputPointData );
if ( VISU::IsDataOnPoints( anInput ) ) {
int aNbElems = anInput->GetNumberOfPoints();
if ( anInputPointData->GetAttribute( vtkDataSetAttributes::VECTORS ) )
ExecuteScalars( aNbElems, myScalarMode, myGaussMetric, anInputPointData, anOutputPointData );
}
-
+
vtkCellData *anInputCellData = anInput->GetCellData();
vtkCellData *anOutputCellData = anOutput->GetCellData();
- anOutputCellData->PassData( anInputCellData );
+ anOutputCellData->PassData( anInputCellData );
if ( VISU::IsDataOnCells( anInput ) ) {
int aNbElems = anInput->GetNumberOfCells();
if ( anInputCellData->GetAttribute( vtkDataSetAttributes::VECTORS ) )