static int MYDEBUGWITHFILES = 0;
#endif
-//#define ENABLE_QUADRATIC
-
namespace VISU
{
//---------------------------------------------------------------
VISUGeom2NbNodes(EGeometry theGeom)
{
switch(theGeom){
+#ifndef VISU_ENABLE_QUADRATIC
+ case VISU::eSEG3:
+ return 2;
+ case VISU::eTRIA6:
+ return 3;
+ case VISU::eQUAD8:
+ return 4;
+ case VISU::eTETRA10:
+ return 4;
+ case VISU::eHEXA20:
+ return 8;
+ case VISU::ePENTA15:
+ return 6;
+ case VISU::ePYRA13:
+ return 5;
+#endif
case VISU::ePOLYGONE:
case VISU::ePOLYEDRE:
return -1;
case VISU::ePOLYEDRE:
return VTK_CONVEX_POINT_SET;
-#ifndef ENABLE_QUADRATIC
+#ifndef VISU_ENABLE_QUADRATIC
case VISU::eSEG3:
return VTK_LINE;
case VISU::eTRIA6:
#else
case VISU::eSEG3:
-#ifdef VTK_QUADRATIC_EDGE
+#if defined(VTK_QUADRATIC_EDGE) && defined(VISU_USE_VTK_QUADRATIC)
return VTK_QUADRATIC_EDGE;
#else
return VTK_POLY_LINE;
#endif
case VISU::eTRIA6:
-#ifdef VTK_QUADRATIC_TRIANGLE
+#if defined(VTK_QUADRATIC_TRIANGLE) && defined(VISU_USE_VTK_QUADRATIC)
return VTK_QUADRATIC_TRIANGLE;
#else
return VTK_POLYGON;
#endif
case VISU::eQUAD8:
-#ifdef VTK_QUADRATIC_QUAD
+#if defined(VTK_QUADRATIC_QUAD) && defined(VISU_USE_VTK_QUADRATIC)
return VTK_QUADRATIC_QUAD;
#else
return VTK_POLYGON;
#endif
case VISU::eTETRA10:
-#ifdef VTK_QUADRATIC_TETRA
+#if defined(VTK_QUADRATIC_TETRA) && defined(VISU_USE_VTK_QUADRATIC)
return VTK_QUADRATIC_QUAD;
#else
return VTK_CONVEX_POINT_SET;
#endif
case VISU::eHEXA20:
-#ifdef VTK_QUADRATIC_HEXAHEDRON
+#if defined(VTK_QUADRATIC_HEXAHEDRON) && defined(VISU_USE_VTK_QUADRATIC)
return VTK_QUADRATIC_HEXAHEDRON;
#else
return VTK_CONVEX_POINT_SET;
#endif
case VISU::ePENTA15:
-#ifdef VTK_QUADRATIC_WEDGE
+#if defined(VTK_QUADRATIC_WEDGE) && defined(VISU_USE_VTK_QUADRATIC)
return VTK_QUADRATIC_WEDGE;
#else
return VTK_CONVEX_POINT_SET;
#endif
case VISU::ePYRA13:
-#ifdef VTK_QUADRATIC_PYRAMID
+#if defined(VTK_QUADRATIC_PYRAMID) && defined(VISU_USE_VTK_QUADRATIC)
return VTK_QUADRATIC_PYRAMID;
#else
return VTK_CONVEX_POINT_SET;
#endif
-#endif //ENABLE_QUADRATIC
+#endif //VISU_ENABLE_QUADRATIC
default:
return -1;
for(vtkIdType i = 0, j = 0; anIter != aGeom2SubMesh.end(); anIter++){
VISU::EGeometry aEGeom = anIter->first;
vtkIdType aVGeom = VISUGeom2VTK(aEGeom);
+
const VISU::TSubMeshImpl& aSubMesh = anIter->second;
const VISU::TCell2Connect& anArray = aSubMesh.myCell2Connect;
const VISU::TSubMeshID& aSubMeshID = aGeom2SubMeshIDIter->second;
- INITMSG(MYDEBUG,"aEGeom = "<<aEGeom<<
+ INITMSG(MYDEBUG,
+ " - aEGeom = "<<aEGeom<<
+ "; aVGeom = "<<aVGeom<<
"; aSubMeshID.size() = "<<aSubMeshID.size()<<
endl);
int aNbComp = theField->myNbComp;
vtkFloatArray *aFloatArray = vtkFloatArray::New();
+
switch(aNbComp) {
case 1:
aFloatArray->SetNumberOfComponents(1);
vtkFloatArray *aDataArray = vtkFloatArray::New();
aDataArray->SetNumberOfComponents(aNbComp);
aDataArray->SetNumberOfTuples(aNbTuples);
- aDataSetAttributes->AddArray(aDataArray);
aDataArray->SetName("VISU_FIELD");
+ aDataSetAttributes->AddArray(aDataArray);
TGeom2Value& aGeom2Value = theValForTime->myGeom2Value;
TGeom2Value::const_iterator anIter = aGeom2Value.begin();
- TVector<float> aDataValues(aNbComp);
+ TVector<float> aDataValues(aNbComp,0.0);
for(int aTupleId = 0; anIter != aGeom2Value.end(); anIter++){
EGeometry aEGeom = anIter->first;
const TMeshValue& aMeshValue = anIter->second;
endl);
int aNbComp2 = aNbComp;
- if(aNbComp == 2 || aNbComp == 4)
+ if(aNbComp == 4)
aNbComp2 = 2;
else if(aNbComp > 4)
aNbComp2 = 3;
vtkIdType aNbNodes = VISUGeom2NbNodes(aEGeom);
vtkIdType aVGeom = VISUGeom2VTK(aEGeom);
+ INITMSG(MYDEBUG,"GetCells - aVGeom = "<<aVGeom<<endl);
+
const TSubMeshID& aSubMeshID = theSubProfile->mySubMeshID;
const VISU::TGeom2SubMesh& aGeom2SubMesh = theMeshOnEntity->myGeom2SubMesh;
vtkFloatArray *aDataArray = vtkFloatArray::New();
aDataArray->SetNumberOfComponents(aNbComp);
aDataArray->SetNumberOfTuples(aNbTuples);
- aDataSetAttributes->AddArray(aDataArray);
aDataArray->SetName("VISU_FIELD");
+ aDataSetAttributes->AddArray(aDataArray);
const TGeom2Value& aGeom2Value = theValForTime->myGeom2Value;
PGaussMeshImpl aGaussMesh = theValForTime->myGaussMesh;
const TGeom2GaussSubMesh& aGeom2GaussSubMesh = aGaussMesh->myGeom2GaussSubMesh;
TGeom2GaussSubMesh::const_iterator anIter = aGeom2GaussSubMesh.begin();
- TVector<float> aDataValues(aNbComp);
+ TVector<float> aDataValues(aNbComp,0.0);
for(int aTupleId = 0; anIter != aGeom2GaussSubMesh.end(); anIter++){
EGeometry aEGeom = anIter->first;
- vtkIdType aVGeom = VISUGeom2VTK(aEGeom);
PGaussSubMeshImpl aGaussSubMesh = anIter->second;
if(!aGaussSubMesh->myIsDone)
endl);
int aNbComp2 = aNbComp;
- if(aNbComp == 2 || aNbComp == 4)
+ if(aNbComp == 4)
aNbComp2 = 2;
else if(aNbComp > 4)
aNbComp2 = 3;
#define _EDF_NODE_IDS_
#define _NAME_MAPPING_ 0
-//#define ENABLE_QUADRATIC
-
namespace
{
//---------------------------------------------------------------
}
switch(aMGeom){
-#ifndef VTK_QUADRATIC_EDGE && ENABLE_QUADRATIC
+#if !(defined(VTK_QUADRATIC_EDGE) && defined(VISU_USE_VTK_QUADRATIC)) && defined(VISU_ENABLE_QUADRATIC)
case MED::eSEG3:
anArray[0] = aConnect[0];
anArray[2] = aConnect[1];
anArray[1] = aConnect[2];
break;
#endif
-#ifndef VTK_QUADRATIC_TRIANGLE && ENABLE_QUADRATIC
+#if !(defined(VTK_QUADRATIC_TRIANGLE) && defined(VISU_USE_VTK_QUADRATIC)) && defined(VISU_ENABLE_QUADRATIC)
case MED::eTRIA6:
anArray[0] = aConnect[0];
anArray[2] = aConnect[1];
anArray[5] = aConnect[5];
break;
#endif
-#ifndef VTK_QUADRATIC_QUAD && ENABLE_QUADRATIC
+#if !(defined(VTK_QUADRATIC_QUAD) && defined(VISU_USE_VTK_QUADRATIC)) && defined(VISU_ENABLE_QUADRATIC)
case MED::eQUAD8:
anArray[0] = aConnect[0];
anArray[2] = aConnect[1];
anArray[7] = aConnect[7];
break;
#endif
-#ifdef VTK_QUADRATIC_TETRA && ENABLE_QUADRATIC
+#if (defined(VTK_QUADRATIC_TETRA) && defined(VISU_USE_VTK_QUADRATIC)) && defined(VISU_ENABLE_QUADRATIC)
case MED::eTETRA10:
#endif
case MED::eTETRA4:
anArray[2] = aConnect[3];
anArray[3] = aConnect[2];
break;
-#ifdef VTK_QUADRATIC_TETRA && ENABLE_QUADRATIC
+#if (defined(VTK_QUADRATIC_PYRAMID) && defined(VISU_USE_VTK_QUADRATIC)) && defined(VISU_ENABLE_QUADRATIC)
case MED::ePYRA13:
#endif
case MED::ePYRA5:
aConnect[k] = conn[kj+k] - 1;
switch(aMGeom){
+#if !(defined(VTK_QUADRATIC_EDGE) && defined(VISU_USE_VTK_QUADRATIC)) && defined(VISU_ENABLE_QUADRATIC)
case SALOME_MED::MED_SEG3:
anArray[0] = aConnect[0];
anArray[2] = aConnect[1];
anArray[1] = aConnect[2];
break;
+#endif
+#if !(defined(VTK_QUADRATIC_TRIANGLE) && defined(VISU_USE_VTK_QUADRATIC)) && defined(VISU_ENABLE_QUADRATIC)
case SALOME_MED::MED_TRIA6:
anArray[0] = aConnect[0];
anArray[2] = aConnect[1];
anArray[3] = aConnect[4];
anArray[5] = aConnect[5];
break;
+#endif
+#if !(defined(VTK_QUADRATIC_QUAD) && defined(VISU_USE_VTK_QUADRATIC)) && defined(VISU_ENABLE_QUADRATIC)
case SALOME_MED::MED_QUAD8:
anArray[0] = aConnect[0];
anArray[2] = aConnect[1];
anArray[5] = aConnect[6];
anArray[7] = aConnect[7];
break;
+#endif
+#if (defined(VTK_QUADRATIC_TETRA) && defined(VISU_USE_VTK_QUADRATIC)) && defined(VISU_ENABLE_QUADRATIC)
+ case SALOME_MED::MED_TETRA10 :
+#endif
case SALOME_MED::MED_TETRA4 :
anArray[0] = aConnect[0];
anArray[1] = aConnect[1];
anArray[2] = aConnect[3];
anArray[3] = aConnect[2];
break;
- case SALOME_MED::MED_PYRA13 :
+#if (defined(VTK_QUADRATIC_PYRAMID) && defined(VISU_USE_VTK_QUADRATIC)) && defined(VISU_ENABLE_QUADRATIC)
+ case SALOME_MED::MED_PYRA13:
+#endif
+ case SALOME_MED::MED_PYRA5 :
anArray[0] = aConnect[0];
anArray[1] = aConnect[3];
anArray[2] = aConnect[2];