From 08fb4d5833bbc472399617dcfb8fc2d13232ccc9 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Fri, 9 Oct 2009 19:46:08 +0200 Subject: [PATCH 01/85] avoid spurious warnings on rm log.* --- tutorials/incompressible/simpleFoam/airFoil2D/Allclean | 2 +- tutorials/multiphase/settlingFoam/ras/tank3D/Allclean | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tutorials/incompressible/simpleFoam/airFoil2D/Allclean b/tutorials/incompressible/simpleFoam/airFoil2D/Allclean index f73c44df8a..35e38c65c5 100755 --- a/tutorials/incompressible/simpleFoam/airFoil2D/Allclean +++ b/tutorials/incompressible/simpleFoam/airFoil2D/Allclean @@ -3,4 +3,4 @@ # Clean time folders only rm -rf *[1-9]* -rm log.* +rm -f log.* 2>/dev/null diff --git a/tutorials/multiphase/settlingFoam/ras/tank3D/Allclean b/tutorials/multiphase/settlingFoam/ras/tank3D/Allclean index f73c44df8a..35e38c65c5 100755 --- a/tutorials/multiphase/settlingFoam/ras/tank3D/Allclean +++ b/tutorials/multiphase/settlingFoam/ras/tank3D/Allclean @@ -3,4 +3,4 @@ # Clean time folders only rm -rf *[1-9]* -rm log.* +rm -f log.* 2>/dev/null From c57262c2a0780252f78eca21cff3fa7a51263a9d Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Sun, 18 Oct 2009 16:23:41 +0200 Subject: [PATCH 02/85] Cleanup/fixup paraview readers - remove patch/point text labels upon deletion - combined client/server plugin instead of separate .so files first experiment with adding panel decorations - directory reorganization --- .../{ => PV2Readers}/PVFoamReader/Allwmake | 0 .../PVFoamReader/PVFoamReader/CMakeLists.txt | 0 .../PVFoamReader/Make/PVFoamReader.pvsm | 0 .../PVFoamReader/Make/PVFoamReader.xml | 0 .../PVFoamReader/PVFoamReader.pvsm.in | 0 .../PVFoamReader/PVFoamReader.xml.in | 0 .../PVFoamReader/PVFoamReaderConfigure.h.in | 0 .../PVFoamReader/PVFoamReader/vtkFoamData.cxx | 0 .../PVFoamReader/PVFoamReader/vtkFoamData.h | 0 .../PVFoamReader/vtkFoamReader.cxx | 0 .../PVFoamReader/PVFoamReader/vtkFoamReader.h | 0 .../PVFoamReader/vtkPVFoamSelectTimeSet.cxx | 0 .../PVFoamReader/vtkPVFoamSelectTimeSet.h | 0 .../vtkPVFoamServerSelectTimeSet.cxx | 0 .../vtkPVFoamServerSelectTimeSet.h | 0 .../PVFoamReader/vtkFoam/Make/files | 0 .../PVFoamReader/vtkFoam/Make/options | 0 .../vtkFoam}/vtkDataArrayTemplateImplicit.txx | 0 .../PVFoamReader/vtkFoam/vtkFoam.C | 0 .../PVFoamReader/vtkFoam/vtkFoam.H | 0 .../PVFoamReader/vtkFoam/vtkFoamAddFields.H | 0 .../vtkFoam/vtkFoamAddInternalMesh.C | 0 .../PVFoamReader/vtkFoam/vtkFoamAddPatch.C | 0 .../vtkFoam/vtkFoamConvertFields.H | 0 .../vtkFoam/vtkFoamConvertPatchFaceField.H | 0 .../vtkFoam/vtkFoamConvertPatchPointField.H | 0 .../vtkFoam/vtkFoamConvertPointField.H | 0 .../vtkFoam/vtkFoamConvertVolField.H | 0 .../vtkFoam/vtkFoamInsertNextPoint.H | 0 .../{ => PV3Readers}/PV3FoamReader/Allwclean | 3 ++ .../{ => PV3Readers}/PV3FoamReader/Allwmake | 0 .../PV3FoamReader/CMakeLists.txt | 42 +++++++++++++++---- .../PV3FoamReader/PV3FoamReader.qrc | 0 .../PV3FoamReader/PV3FoamReader.xml | 0 .../PV3FoamReader/PV3FoamReader_SM.xml | 0 .../PV3FoamReader/pqPV3FoamReaderPanel.h | 34 +++++++++++++++ .../PV3FoamReader/vtkPV3FoamReader.cxx | 7 +++- .../PV3FoamReader/vtkPV3FoamReader.h | 0 .../PV3FoamReader/vtkPV3Foam/Make/files | 0 .../PV3FoamReader/vtkPV3Foam/Make/options | 0 .../vtkDataArrayTemplateImplicit.txx | 0 .../vtkPV3Foam/vtkOpenFOAMPoints.H | 0 .../PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C | 0 .../PV3FoamReader/vtkPV3Foam/vtkPV3Foam.H | 0 .../vtkPV3Foam/vtkPV3FoamAddToSelection.H | 0 .../vtkPV3Foam/vtkPV3FoamFaceField.H | 0 .../vtkPV3Foam/vtkPV3FoamFields.C | 0 .../vtkPV3Foam/vtkPV3FoamLagrangianFields.H | 0 .../PV3FoamReader/vtkPV3Foam/vtkPV3FoamMesh.C | 0 .../vtkPV3Foam/vtkPV3FoamMeshLagrangian.C | 0 .../vtkPV3Foam/vtkPV3FoamMeshPatch.C | 0 .../vtkPV3Foam/vtkPV3FoamMeshSet.C | 0 .../vtkPV3Foam/vtkPV3FoamMeshVolume.C | 0 .../vtkPV3Foam/vtkPV3FoamMeshZone.C | 0 .../vtkPV3Foam/vtkPV3FoamPatchField.H | 0 .../vtkPV3Foam/vtkPV3FoamPointFields.H | 0 .../vtkPV3Foam/vtkPV3FoamUpdateInfo.C | 0 .../vtkPV3Foam/vtkPV3FoamUpdateInfoFields.H | 0 .../vtkPV3Foam/vtkPV3FoamUtils.C | 0 .../vtkPV3Foam/vtkPV3FoamVolFields.H | 0 .../PV3blockMeshReader/Allwclean | 3 ++ .../PV3blockMeshReader/Allwmake | 0 .../PV3blockMeshReader/CMakeLists.txt | 40 ++++++++++++++---- .../PV3blockMeshReader/PV3blockMeshReader.qrc | 0 .../PV3blockMeshReader/PV3blockMeshReader.xml | 0 .../PV3blockMeshReader_SM.xml | 0 .../pqPV3blockMeshReaderPanel.h | 34 +++++++++++++++ .../vtkPV3blockMeshReader.cxx | 7 +++- .../vtkPV3blockMeshReader.h | 0 .../vtkPV3blockMesh/Make/files | 0 .../vtkPV3blockMesh/Make/options | 0 .../vtkDataArrayTemplateImplicit.txx | 0 .../vtkPV3blockMesh/vtkOpenFOAMPoints.H | 0 .../vtkPV3blockMesh/vtkPV3blockMesh.C | 8 ++++ .../vtkPV3blockMesh/vtkPV3blockMesh.H | 0 .../vtkPV3blockMesh/vtkPV3blockMeshConvert.C | 0 .../vtkPV3blockMesh/vtkPV3blockMeshUtils.C | 0 77 files changed, 161 insertions(+), 17 deletions(-) rename applications/utilities/postProcessing/graphics/{ => PV2Readers}/PVFoamReader/Allwmake (100%) rename applications/utilities/postProcessing/graphics/{ => PV2Readers}/PVFoamReader/PVFoamReader/CMakeLists.txt (100%) rename applications/utilities/postProcessing/graphics/{ => PV2Readers}/PVFoamReader/PVFoamReader/Make/PVFoamReader.pvsm (100%) rename applications/utilities/postProcessing/graphics/{ => PV2Readers}/PVFoamReader/PVFoamReader/Make/PVFoamReader.xml (100%) rename applications/utilities/postProcessing/graphics/{ => PV2Readers}/PVFoamReader/PVFoamReader/PVFoamReader.pvsm.in (100%) rename applications/utilities/postProcessing/graphics/{ => PV2Readers}/PVFoamReader/PVFoamReader/PVFoamReader.xml.in (100%) rename applications/utilities/postProcessing/graphics/{ => PV2Readers}/PVFoamReader/PVFoamReader/PVFoamReaderConfigure.h.in (100%) rename applications/utilities/postProcessing/graphics/{ => PV2Readers}/PVFoamReader/PVFoamReader/vtkFoamData.cxx (100%) rename applications/utilities/postProcessing/graphics/{ => PV2Readers}/PVFoamReader/PVFoamReader/vtkFoamData.h (100%) rename applications/utilities/postProcessing/graphics/{ => PV2Readers}/PVFoamReader/PVFoamReader/vtkFoamReader.cxx (100%) rename applications/utilities/postProcessing/graphics/{ => PV2Readers}/PVFoamReader/PVFoamReader/vtkFoamReader.h (100%) rename applications/utilities/postProcessing/graphics/{ => PV2Readers}/PVFoamReader/PVFoamReader/vtkPVFoamSelectTimeSet.cxx (100%) rename applications/utilities/postProcessing/graphics/{ => PV2Readers}/PVFoamReader/PVFoamReader/vtkPVFoamSelectTimeSet.h (100%) rename applications/utilities/postProcessing/graphics/{ => PV2Readers}/PVFoamReader/PVFoamReader/vtkPVFoamServerSelectTimeSet.cxx (100%) rename applications/utilities/postProcessing/graphics/{ => PV2Readers}/PVFoamReader/PVFoamReader/vtkPVFoamServerSelectTimeSet.h (100%) rename applications/utilities/postProcessing/graphics/{ => PV2Readers}/PVFoamReader/vtkFoam/Make/files (100%) rename applications/utilities/postProcessing/graphics/{ => PV2Readers}/PVFoamReader/vtkFoam/Make/options (100%) rename applications/utilities/postProcessing/graphics/{PV3FoamReader/vtkPV3Foam => PV2Readers/PVFoamReader/vtkFoam}/vtkDataArrayTemplateImplicit.txx (100%) rename applications/utilities/postProcessing/graphics/{ => PV2Readers}/PVFoamReader/vtkFoam/vtkFoam.C (100%) rename applications/utilities/postProcessing/graphics/{ => PV2Readers}/PVFoamReader/vtkFoam/vtkFoam.H (100%) rename applications/utilities/postProcessing/graphics/{ => PV2Readers}/PVFoamReader/vtkFoam/vtkFoamAddFields.H (100%) rename applications/utilities/postProcessing/graphics/{ => PV2Readers}/PVFoamReader/vtkFoam/vtkFoamAddInternalMesh.C (100%) rename applications/utilities/postProcessing/graphics/{ => PV2Readers}/PVFoamReader/vtkFoam/vtkFoamAddPatch.C (100%) rename applications/utilities/postProcessing/graphics/{ => PV2Readers}/PVFoamReader/vtkFoam/vtkFoamConvertFields.H (100%) rename applications/utilities/postProcessing/graphics/{ => PV2Readers}/PVFoamReader/vtkFoam/vtkFoamConvertPatchFaceField.H (100%) rename applications/utilities/postProcessing/graphics/{ => PV2Readers}/PVFoamReader/vtkFoam/vtkFoamConvertPatchPointField.H (100%) rename applications/utilities/postProcessing/graphics/{ => PV2Readers}/PVFoamReader/vtkFoam/vtkFoamConvertPointField.H (100%) rename applications/utilities/postProcessing/graphics/{ => PV2Readers}/PVFoamReader/vtkFoam/vtkFoamConvertVolField.H (100%) rename applications/utilities/postProcessing/graphics/{ => PV2Readers}/PVFoamReader/vtkFoam/vtkFoamInsertNextPoint.H (100%) rename applications/utilities/postProcessing/graphics/{ => PV3Readers}/PV3FoamReader/Allwclean (67%) rename applications/utilities/postProcessing/graphics/{ => PV3Readers}/PV3FoamReader/Allwmake (100%) rename applications/utilities/postProcessing/graphics/{ => PV3Readers}/PV3FoamReader/PV3FoamReader/CMakeLists.txt (60%) rename applications/utilities/postProcessing/graphics/{ => PV3Readers}/PV3FoamReader/PV3FoamReader/PV3FoamReader.qrc (100%) rename applications/utilities/postProcessing/graphics/{ => PV3Readers}/PV3FoamReader/PV3FoamReader/PV3FoamReader.xml (100%) rename applications/utilities/postProcessing/graphics/{ => PV3Readers}/PV3FoamReader/PV3FoamReader/PV3FoamReader_SM.xml (100%) create mode 100644 applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/pqPV3FoamReaderPanel.h rename applications/utilities/postProcessing/graphics/{ => PV3Readers}/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.cxx (99%) rename applications/utilities/postProcessing/graphics/{ => PV3Readers}/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.h (100%) rename applications/utilities/postProcessing/graphics/{ => PV3Readers}/PV3FoamReader/vtkPV3Foam/Make/files (100%) rename applications/utilities/postProcessing/graphics/{ => PV3Readers}/PV3FoamReader/vtkPV3Foam/Make/options (100%) rename applications/utilities/postProcessing/graphics/{PV3blockMeshReader/vtkPV3blockMesh => PV3Readers/PV3FoamReader/vtkPV3Foam}/vtkDataArrayTemplateImplicit.txx (100%) rename applications/utilities/postProcessing/graphics/{ => PV3Readers}/PV3FoamReader/vtkPV3Foam/vtkOpenFOAMPoints.H (100%) rename applications/utilities/postProcessing/graphics/{ => PV3Readers}/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C (100%) rename applications/utilities/postProcessing/graphics/{ => PV3Readers}/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.H (100%) rename applications/utilities/postProcessing/graphics/{ => PV3Readers}/PV3FoamReader/vtkPV3Foam/vtkPV3FoamAddToSelection.H (100%) rename applications/utilities/postProcessing/graphics/{ => PV3Readers}/PV3FoamReader/vtkPV3Foam/vtkPV3FoamFaceField.H (100%) rename applications/utilities/postProcessing/graphics/{ => PV3Readers}/PV3FoamReader/vtkPV3Foam/vtkPV3FoamFields.C (100%) rename applications/utilities/postProcessing/graphics/{ => PV3Readers}/PV3FoamReader/vtkPV3Foam/vtkPV3FoamLagrangianFields.H (100%) rename applications/utilities/postProcessing/graphics/{ => PV3Readers}/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMesh.C (100%) rename applications/utilities/postProcessing/graphics/{ => PV3Readers}/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshLagrangian.C (100%) rename applications/utilities/postProcessing/graphics/{ => PV3Readers}/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshPatch.C (100%) rename applications/utilities/postProcessing/graphics/{ => PV3Readers}/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshSet.C (100%) rename applications/utilities/postProcessing/graphics/{ => PV3Readers}/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshVolume.C (100%) rename applications/utilities/postProcessing/graphics/{ => PV3Readers}/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshZone.C (100%) rename applications/utilities/postProcessing/graphics/{ => PV3Readers}/PV3FoamReader/vtkPV3Foam/vtkPV3FoamPatchField.H (100%) rename applications/utilities/postProcessing/graphics/{ => PV3Readers}/PV3FoamReader/vtkPV3Foam/vtkPV3FoamPointFields.H (100%) rename applications/utilities/postProcessing/graphics/{ => PV3Readers}/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUpdateInfo.C (100%) rename applications/utilities/postProcessing/graphics/{ => PV3Readers}/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUpdateInfoFields.H (100%) rename applications/utilities/postProcessing/graphics/{ => PV3Readers}/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUtils.C (100%) rename applications/utilities/postProcessing/graphics/{ => PV3Readers}/PV3FoamReader/vtkPV3Foam/vtkPV3FoamVolFields.H (100%) rename applications/utilities/postProcessing/graphics/{ => PV3Readers}/PV3blockMeshReader/Allwclean (67%) rename applications/utilities/postProcessing/graphics/{ => PV3Readers}/PV3blockMeshReader/Allwmake (100%) rename applications/utilities/postProcessing/graphics/{ => PV3Readers}/PV3blockMeshReader/PV3blockMeshReader/CMakeLists.txt (60%) rename applications/utilities/postProcessing/graphics/{ => PV3Readers}/PV3blockMeshReader/PV3blockMeshReader/PV3blockMeshReader.qrc (100%) rename applications/utilities/postProcessing/graphics/{ => PV3Readers}/PV3blockMeshReader/PV3blockMeshReader/PV3blockMeshReader.xml (100%) rename applications/utilities/postProcessing/graphics/{ => PV3Readers}/PV3blockMeshReader/PV3blockMeshReader/PV3blockMeshReader_SM.xml (100%) create mode 100644 applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/PV3blockMeshReader/pqPV3blockMeshReaderPanel.h rename applications/utilities/postProcessing/graphics/{ => PV3Readers}/PV3blockMeshReader/PV3blockMeshReader/vtkPV3blockMeshReader.cxx (98%) rename applications/utilities/postProcessing/graphics/{ => PV3Readers}/PV3blockMeshReader/PV3blockMeshReader/vtkPV3blockMeshReader.h (100%) rename applications/utilities/postProcessing/graphics/{ => PV3Readers}/PV3blockMeshReader/vtkPV3blockMesh/Make/files (100%) rename applications/utilities/postProcessing/graphics/{ => PV3Readers}/PV3blockMeshReader/vtkPV3blockMesh/Make/options (100%) rename applications/utilities/postProcessing/graphics/{PVFoamReader/vtkFoam => PV3Readers/PV3blockMeshReader/vtkPV3blockMesh}/vtkDataArrayTemplateImplicit.txx (100%) rename applications/utilities/postProcessing/graphics/{ => PV3Readers}/PV3blockMeshReader/vtkPV3blockMesh/vtkOpenFOAMPoints.H (100%) rename applications/utilities/postProcessing/graphics/{ => PV3Readers}/PV3blockMeshReader/vtkPV3blockMesh/vtkPV3blockMesh.C (98%) rename applications/utilities/postProcessing/graphics/{ => PV3Readers}/PV3blockMeshReader/vtkPV3blockMesh/vtkPV3blockMesh.H (100%) rename applications/utilities/postProcessing/graphics/{ => PV3Readers}/PV3blockMeshReader/vtkPV3blockMesh/vtkPV3blockMeshConvert.C (100%) rename applications/utilities/postProcessing/graphics/{ => PV3Readers}/PV3blockMeshReader/vtkPV3blockMesh/vtkPV3blockMeshUtils.C (100%) diff --git a/applications/utilities/postProcessing/graphics/PVFoamReader/Allwmake b/applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/Allwmake similarity index 100% rename from applications/utilities/postProcessing/graphics/PVFoamReader/Allwmake rename to applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/Allwmake diff --git a/applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/CMakeLists.txt b/applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/PVFoamReader/CMakeLists.txt similarity index 100% rename from applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/CMakeLists.txt rename to applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/PVFoamReader/CMakeLists.txt diff --git a/applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/Make/PVFoamReader.pvsm b/applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/PVFoamReader/Make/PVFoamReader.pvsm similarity index 100% rename from applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/Make/PVFoamReader.pvsm rename to applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/PVFoamReader/Make/PVFoamReader.pvsm diff --git a/applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/Make/PVFoamReader.xml b/applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/PVFoamReader/Make/PVFoamReader.xml similarity index 100% rename from applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/Make/PVFoamReader.xml rename to applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/PVFoamReader/Make/PVFoamReader.xml diff --git a/applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/PVFoamReader.pvsm.in b/applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/PVFoamReader/PVFoamReader.pvsm.in similarity index 100% rename from applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/PVFoamReader.pvsm.in rename to applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/PVFoamReader/PVFoamReader.pvsm.in diff --git a/applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/PVFoamReader.xml.in b/applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/PVFoamReader/PVFoamReader.xml.in similarity index 100% rename from applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/PVFoamReader.xml.in rename to applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/PVFoamReader/PVFoamReader.xml.in diff --git a/applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/PVFoamReaderConfigure.h.in b/applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/PVFoamReader/PVFoamReaderConfigure.h.in similarity index 100% rename from applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/PVFoamReaderConfigure.h.in rename to applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/PVFoamReader/PVFoamReaderConfigure.h.in diff --git a/applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/vtkFoamData.cxx b/applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/PVFoamReader/vtkFoamData.cxx similarity index 100% rename from applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/vtkFoamData.cxx rename to applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/PVFoamReader/vtkFoamData.cxx diff --git a/applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/vtkFoamData.h b/applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/PVFoamReader/vtkFoamData.h similarity index 100% rename from applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/vtkFoamData.h rename to applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/PVFoamReader/vtkFoamData.h diff --git a/applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/vtkFoamReader.cxx b/applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/PVFoamReader/vtkFoamReader.cxx similarity index 100% rename from applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/vtkFoamReader.cxx rename to applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/PVFoamReader/vtkFoamReader.cxx diff --git a/applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/vtkFoamReader.h b/applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/PVFoamReader/vtkFoamReader.h similarity index 100% rename from applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/vtkFoamReader.h rename to applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/PVFoamReader/vtkFoamReader.h diff --git a/applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/vtkPVFoamSelectTimeSet.cxx b/applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/PVFoamReader/vtkPVFoamSelectTimeSet.cxx similarity index 100% rename from applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/vtkPVFoamSelectTimeSet.cxx rename to applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/PVFoamReader/vtkPVFoamSelectTimeSet.cxx diff --git a/applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/vtkPVFoamSelectTimeSet.h b/applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/PVFoamReader/vtkPVFoamSelectTimeSet.h similarity index 100% rename from applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/vtkPVFoamSelectTimeSet.h rename to applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/PVFoamReader/vtkPVFoamSelectTimeSet.h diff --git a/applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/vtkPVFoamServerSelectTimeSet.cxx b/applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/PVFoamReader/vtkPVFoamServerSelectTimeSet.cxx similarity index 100% rename from applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/vtkPVFoamServerSelectTimeSet.cxx rename to applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/PVFoamReader/vtkPVFoamServerSelectTimeSet.cxx diff --git a/applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/vtkPVFoamServerSelectTimeSet.h b/applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/PVFoamReader/vtkPVFoamServerSelectTimeSet.h similarity index 100% rename from applications/utilities/postProcessing/graphics/PVFoamReader/PVFoamReader/vtkPVFoamServerSelectTimeSet.h rename to applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/PVFoamReader/vtkPVFoamServerSelectTimeSet.h diff --git a/applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/Make/files b/applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/vtkFoam/Make/files similarity index 100% rename from applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/Make/files rename to applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/vtkFoam/Make/files diff --git a/applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/Make/options b/applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/vtkFoam/Make/options similarity index 100% rename from applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/Make/options rename to applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/vtkFoam/Make/options diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkDataArrayTemplateImplicit.txx b/applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/vtkFoam/vtkDataArrayTemplateImplicit.txx similarity index 100% rename from applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkDataArrayTemplateImplicit.txx rename to applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/vtkFoam/vtkDataArrayTemplateImplicit.txx diff --git a/applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/vtkFoam.C b/applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/vtkFoam/vtkFoam.C similarity index 100% rename from applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/vtkFoam.C rename to applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/vtkFoam/vtkFoam.C diff --git a/applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/vtkFoam.H b/applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/vtkFoam/vtkFoam.H similarity index 100% rename from applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/vtkFoam.H rename to applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/vtkFoam/vtkFoam.H diff --git a/applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/vtkFoamAddFields.H b/applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/vtkFoam/vtkFoamAddFields.H similarity index 100% rename from applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/vtkFoamAddFields.H rename to applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/vtkFoam/vtkFoamAddFields.H diff --git a/applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/vtkFoamAddInternalMesh.C b/applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/vtkFoam/vtkFoamAddInternalMesh.C similarity index 100% rename from applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/vtkFoamAddInternalMesh.C rename to applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/vtkFoam/vtkFoamAddInternalMesh.C diff --git a/applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/vtkFoamAddPatch.C b/applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/vtkFoam/vtkFoamAddPatch.C similarity index 100% rename from applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/vtkFoamAddPatch.C rename to applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/vtkFoam/vtkFoamAddPatch.C diff --git a/applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/vtkFoamConvertFields.H b/applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/vtkFoam/vtkFoamConvertFields.H similarity index 100% rename from applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/vtkFoamConvertFields.H rename to applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/vtkFoam/vtkFoamConvertFields.H diff --git a/applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/vtkFoamConvertPatchFaceField.H b/applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/vtkFoam/vtkFoamConvertPatchFaceField.H similarity index 100% rename from applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/vtkFoamConvertPatchFaceField.H rename to applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/vtkFoam/vtkFoamConvertPatchFaceField.H diff --git a/applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/vtkFoamConvertPatchPointField.H b/applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/vtkFoam/vtkFoamConvertPatchPointField.H similarity index 100% rename from applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/vtkFoamConvertPatchPointField.H rename to applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/vtkFoam/vtkFoamConvertPatchPointField.H diff --git a/applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/vtkFoamConvertPointField.H b/applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/vtkFoam/vtkFoamConvertPointField.H similarity index 100% rename from applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/vtkFoamConvertPointField.H rename to applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/vtkFoam/vtkFoamConvertPointField.H diff --git a/applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/vtkFoamConvertVolField.H b/applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/vtkFoam/vtkFoamConvertVolField.H similarity index 100% rename from applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/vtkFoamConvertVolField.H rename to applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/vtkFoam/vtkFoamConvertVolField.H diff --git a/applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/vtkFoamInsertNextPoint.H b/applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/vtkFoam/vtkFoamInsertNextPoint.H similarity index 100% rename from applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/vtkFoamInsertNextPoint.H rename to applications/utilities/postProcessing/graphics/PV2Readers/PVFoamReader/vtkFoam/vtkFoamInsertNextPoint.H diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/Allwclean b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/Allwclean similarity index 67% rename from applications/utilities/postProcessing/graphics/PV3FoamReader/Allwclean rename to applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/Allwclean index 3fdbeae44c..c5f41ab9da 100755 --- a/applications/utilities/postProcessing/graphics/PV3FoamReader/Allwclean +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/Allwclean @@ -2,6 +2,9 @@ cd ${0%/*} || exit 1 # run from this directory set -x +# deal with client/server vs combined plugins +rm -f $FOAM_LIBBIN/libPV3FoamReader* 2>/dev/null + rm -rf PV3FoamReader/Make wclean libso vtkPV3Foam diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/Allwmake b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/Allwmake similarity index 100% rename from applications/utilities/postProcessing/graphics/PV3FoamReader/Allwmake rename to applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/Allwmake diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/PV3FoamReader/CMakeLists.txt b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/CMakeLists.txt similarity index 60% rename from applications/utilities/postProcessing/graphics/PV3FoamReader/PV3FoamReader/CMakeLists.txt rename to applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/CMakeLists.txt index 670b78c33d..7702f58039 100644 --- a/applications/utilities/postProcessing/graphics/PV3FoamReader/PV3FoamReader/CMakeLists.txt +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/CMakeLists.txt @@ -7,7 +7,7 @@ # the pqReader.xml file contains xml defining readers with their # file extensions and descriptions. -cmake_minimum_required(VERSION 2.4) +CMAKE_MINIMUM_REQUIRED(VERSION 2.6) FIND_PACKAGE(ParaView REQUIRED) INCLUDE(${PARAVIEW_USE_FILE}) @@ -33,19 +33,45 @@ SET( "Single output directory for building all libraries." ) -# Build the server-side plugin + +# +# Defined combined plugin +# + +# Extend the auto-generated panel +QT4_WRAP_CPP(MOC_SRCS pqPV3FoamReaderPanel.h) + +ADD_PARAVIEW_OBJECT_PANEL(IFACES IFACE_SRCS + CLASS_NAME pqPV3FoamReaderPanel + XML_NAME PV3FoamReader # name of SourceProxy in *SM.xml + XML_GROUP sources +) + ADD_PARAVIEW_PLUGIN( PV3FoamReader_SM "1.0" SERVER_MANAGER_XML PV3FoamReader_SM.xml SERVER_MANAGER_SOURCES vtkPV3FoamReader.cxx + GUI_INTERFACES ${IFACES} + GUI_SOURCES ${MOC_SRCS} ${UI_SRCS} ${IFACE_SRCS} + GUI_RESOURCE_FILES PV3FoamReader.xml ) -# Build the client-side plugin -ADD_PARAVIEW_PLUGIN( - PV3FoamReader - "1.0" - GUI_RESOURCES PV3FoamReader.qrc -) +# # +# # Define the server-side portion of the reader plugin +# # +# ADD_PARAVIEW_PLUGIN( +# PV3FoamReader_SM "1.0" +# SERVER_MANAGER_XML PV3FoamReader_SM.xml +# SERVER_MANAGER_SOURCES vtkPV3FoamReader.cxx +# ) +# # +# # Define the client-side portion of the reader plugin +# # +# ADD_PARAVIEW_PLUGIN( +# PV3FoamReader "1.0" +# GUI_RESOURCES PV3FoamReader.qrc +# ) +# TARGET_LINK_LIBRARIES( PV3FoamReader_SM diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/PV3FoamReader/PV3FoamReader.qrc b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/PV3FoamReader.qrc similarity index 100% rename from applications/utilities/postProcessing/graphics/PV3FoamReader/PV3FoamReader/PV3FoamReader.qrc rename to applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/PV3FoamReader.qrc diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/PV3FoamReader/PV3FoamReader.xml b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/PV3FoamReader.xml similarity index 100% rename from applications/utilities/postProcessing/graphics/PV3FoamReader/PV3FoamReader/PV3FoamReader.xml rename to applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/PV3FoamReader.xml diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/PV3FoamReader/PV3FoamReader_SM.xml b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/PV3FoamReader_SM.xml similarity index 100% rename from applications/utilities/postProcessing/graphics/PV3FoamReader/PV3FoamReader/PV3FoamReader_SM.xml rename to applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/PV3FoamReader_SM.xml diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/pqPV3FoamReaderPanel.h b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/pqPV3FoamReaderPanel.h new file mode 100644 index 0000000000..3c97b52dfd --- /dev/null +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/pqPV3FoamReaderPanel.h @@ -0,0 +1,34 @@ +#ifndef __pqPV3FoamReaderPanel_h +#define __pqPV3FoamReaderPanel_h + +#include "pqAutoGeneratedObjectPanel.h" +#include +#include + +// +// Custom panel for PV3FoamReader source. +// +class pqPV3FoamReaderPanel +: + public pqAutoGeneratedObjectPanel +{ + Q_OBJECT; + typedef pqAutoGeneratedObjectPanel Superclass; + +public: + pqPV3FoamReaderPanel(pqProxy *proxy, QWidget *p) + : + pqAutoGeneratedObjectPanel(proxy, p) + { + this->layout()->addWidget + ( + new QLabel("Plugin for reading OpenFOAM meshes/results", this) + ); + } + + //virtual ~pqPV3FoamReaderPanel(); + +protected: +}; + +#endif //__pqPV3FoamReaderPanel_h diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.cxx b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.cxx similarity index 99% rename from applications/utilities/postProcessing/graphics/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.cxx rename to applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.cxx index 55964e9540..28b9a2bc6f 100644 --- a/applications/utilities/postProcessing/graphics/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.cxx +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.cxx @@ -113,7 +113,12 @@ vtkPV3FoamReader::~vtkPV3FoamReader() { vtkDebugMacro(<<"Deconstructor"); - delete foamData_; + if (foamData_) + { + // remove patch names + updatePatchNamesView(false); + delete foamData_; + } if (FileName) { diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.h b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.h similarity index 100% rename from applications/utilities/postProcessing/graphics/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.h rename to applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.h diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/Make/files b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/Make/files similarity index 100% rename from applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/Make/files rename to applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/Make/files diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/Make/options b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/Make/options similarity index 100% rename from applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/Make/options rename to applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/Make/options diff --git a/applications/utilities/postProcessing/graphics/PV3blockMeshReader/vtkPV3blockMesh/vtkDataArrayTemplateImplicit.txx b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkDataArrayTemplateImplicit.txx similarity index 100% rename from applications/utilities/postProcessing/graphics/PV3blockMeshReader/vtkPV3blockMesh/vtkDataArrayTemplateImplicit.txx rename to applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkDataArrayTemplateImplicit.txx diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkOpenFOAMPoints.H b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkOpenFOAMPoints.H similarity index 100% rename from applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkOpenFOAMPoints.H rename to applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkOpenFOAMPoints.H diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C similarity index 100% rename from applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C rename to applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.H b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.H similarity index 100% rename from applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.H rename to applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.H diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamAddToSelection.H b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamAddToSelection.H similarity index 100% rename from applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamAddToSelection.H rename to applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamAddToSelection.H diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamFaceField.H b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamFaceField.H similarity index 100% rename from applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamFaceField.H rename to applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamFaceField.H diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamFields.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamFields.C similarity index 100% rename from applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamFields.C rename to applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamFields.C diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamLagrangianFields.H b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamLagrangianFields.H similarity index 100% rename from applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamLagrangianFields.H rename to applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamLagrangianFields.H diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMesh.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMesh.C similarity index 100% rename from applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMesh.C rename to applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMesh.C diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshLagrangian.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshLagrangian.C similarity index 100% rename from applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshLagrangian.C rename to applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshLagrangian.C diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshPatch.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshPatch.C similarity index 100% rename from applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshPatch.C rename to applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshPatch.C diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshSet.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshSet.C similarity index 100% rename from applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshSet.C rename to applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshSet.C diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshVolume.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshVolume.C similarity index 100% rename from applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshVolume.C rename to applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshVolume.C diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshZone.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshZone.C similarity index 100% rename from applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshZone.C rename to applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshZone.C diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamPatchField.H b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamPatchField.H similarity index 100% rename from applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamPatchField.H rename to applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamPatchField.H diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamPointFields.H b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamPointFields.H similarity index 100% rename from applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamPointFields.H rename to applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamPointFields.H diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUpdateInfo.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUpdateInfo.C similarity index 100% rename from applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUpdateInfo.C rename to applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUpdateInfo.C diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUpdateInfoFields.H b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUpdateInfoFields.H similarity index 100% rename from applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUpdateInfoFields.H rename to applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUpdateInfoFields.H diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUtils.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUtils.C similarity index 100% rename from applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUtils.C rename to applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUtils.C diff --git a/applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamVolFields.H b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamVolFields.H similarity index 100% rename from applications/utilities/postProcessing/graphics/PV3FoamReader/vtkPV3Foam/vtkPV3FoamVolFields.H rename to applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamVolFields.H diff --git a/applications/utilities/postProcessing/graphics/PV3blockMeshReader/Allwclean b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/Allwclean similarity index 67% rename from applications/utilities/postProcessing/graphics/PV3blockMeshReader/Allwclean rename to applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/Allwclean index 30ee40ddae..d2c85df001 100755 --- a/applications/utilities/postProcessing/graphics/PV3blockMeshReader/Allwclean +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/Allwclean @@ -2,6 +2,9 @@ cd ${0%/*} || exit 1 # run from this directory set -x +# deal with client/server vs combined plugins +rm -f $FOAM_LIBBIN/libPV3blockMeshReader* 2>/dev/null + rm -rf PV3blockMeshReader/Make wclean libso vtkPV3blockMesh diff --git a/applications/utilities/postProcessing/graphics/PV3blockMeshReader/Allwmake b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/Allwmake similarity index 100% rename from applications/utilities/postProcessing/graphics/PV3blockMeshReader/Allwmake rename to applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/Allwmake diff --git a/applications/utilities/postProcessing/graphics/PV3blockMeshReader/PV3blockMeshReader/CMakeLists.txt b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/PV3blockMeshReader/CMakeLists.txt similarity index 60% rename from applications/utilities/postProcessing/graphics/PV3blockMeshReader/PV3blockMeshReader/CMakeLists.txt rename to applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/PV3blockMeshReader/CMakeLists.txt index fc645367f4..c5b911f615 100644 --- a/applications/utilities/postProcessing/graphics/PV3blockMeshReader/PV3blockMeshReader/CMakeLists.txt +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/PV3blockMeshReader/CMakeLists.txt @@ -7,7 +7,7 @@ # the pqReader.xml file contains xml defining readers with their # file extensions and descriptions. -cmake_minimum_required(VERSION 2.4) +CMAKE_MINIMUM_REQUIRED(VERSION 2.6) FIND_PACKAGE(ParaView REQUIRED) INCLUDE(${PARAVIEW_USE_FILE}) @@ -33,19 +33,45 @@ SET( "Single output directory for building all libraries." ) -# Build the server-side plugin +# +# Define combined plugin +# +# Try to extend the auto-generated panel +QT4_WRAP_CPP(MOC_SRCS pqPV3blockMeshReaderPanel.h) + +ADD_PARAVIEW_OBJECT_PANEL(IFACES IFACE_SRCS + CLASS_NAME pqPV3blockMeshReaderPanel + XML_NAME PV3blockMeshReader # name of SourceProxy in *SM.xml + XML_GROUP sources +) + ADD_PARAVIEW_PLUGIN( PV3blockMeshReader_SM "1.0" SERVER_MANAGER_XML PV3blockMeshReader_SM.xml SERVER_MANAGER_SOURCES vtkPV3blockMeshReader.cxx + GUI_INTERFACES ${IFACES} + GUI_SOURCES ${MOC_SRCS} ${UI_SRCS} ${IFACE_SRCS} + GUI_RESOURCE_FILES PV3blockMeshReader.xml ) + +# # +# # Define the server-side portion of the reader plugin +# # +# ADD_PARAVIEW_PLUGIN(PV3blockMeshReader_SM "1.0" +# SERVER_MANAGER_XML PV3blockMeshReader_SM.xml +# SERVER_MANAGER_SOURCES vtkPV3blockMeshReader.cxx +# ) +# # +# # Define the client-side portion of the reader plugin +# # +# ADD_PARAVIEW_PLUGIN( +# PV3blockMeshReader "1.0" +# GUI_RESOURCES PV3blockMeshReader.qrc +# ) + + # Build the client-side plugin -ADD_PARAVIEW_PLUGIN( - PV3blockMeshReader - "1.0" - GUI_RESOURCES PV3blockMeshReader.qrc -) TARGET_LINK_LIBRARIES( PV3blockMeshReader_SM diff --git a/applications/utilities/postProcessing/graphics/PV3blockMeshReader/PV3blockMeshReader/PV3blockMeshReader.qrc b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/PV3blockMeshReader/PV3blockMeshReader.qrc similarity index 100% rename from applications/utilities/postProcessing/graphics/PV3blockMeshReader/PV3blockMeshReader/PV3blockMeshReader.qrc rename to applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/PV3blockMeshReader/PV3blockMeshReader.qrc diff --git a/applications/utilities/postProcessing/graphics/PV3blockMeshReader/PV3blockMeshReader/PV3blockMeshReader.xml b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/PV3blockMeshReader/PV3blockMeshReader.xml similarity index 100% rename from applications/utilities/postProcessing/graphics/PV3blockMeshReader/PV3blockMeshReader/PV3blockMeshReader.xml rename to applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/PV3blockMeshReader/PV3blockMeshReader.xml diff --git a/applications/utilities/postProcessing/graphics/PV3blockMeshReader/PV3blockMeshReader/PV3blockMeshReader_SM.xml b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/PV3blockMeshReader/PV3blockMeshReader_SM.xml similarity index 100% rename from applications/utilities/postProcessing/graphics/PV3blockMeshReader/PV3blockMeshReader/PV3blockMeshReader_SM.xml rename to applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/PV3blockMeshReader/PV3blockMeshReader_SM.xml diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/PV3blockMeshReader/pqPV3blockMeshReaderPanel.h b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/PV3blockMeshReader/pqPV3blockMeshReaderPanel.h new file mode 100644 index 0000000000..1f3c2ba9b2 --- /dev/null +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/PV3blockMeshReader/pqPV3blockMeshReaderPanel.h @@ -0,0 +1,34 @@ +#ifndef __pqPV3blockMeshReaderPanel_h +#define __pqPV3blockMeshReaderPanel_h + +#include "pqAutoGeneratedObjectPanel.h" +#include +#include + +// +// Custom panel for PV3blockMeshReader source. +// +class pqPV3blockMeshReaderPanel +: + public pqAutoGeneratedObjectPanel +{ + Q_OBJECT; + typedef pqAutoGeneratedObjectPanel Superclass; + +public: + pqPV3blockMeshReaderPanel(pqProxy *proxy, QWidget *p) + : + pqAutoGeneratedObjectPanel(proxy, p) + { + this->layout()->addWidget + ( + new QLabel("Plugin for reading OpenFOAM blockMesh files", this) + ); + } + + //virtual ~pqPV3blockMeshReaderPanel(); + +protected: +}; + +#endif //__pqPV3blockMeshReaderPanel_h diff --git a/applications/utilities/postProcessing/graphics/PV3blockMeshReader/PV3blockMeshReader/vtkPV3blockMeshReader.cxx b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/PV3blockMeshReader/vtkPV3blockMeshReader.cxx similarity index 98% rename from applications/utilities/postProcessing/graphics/PV3blockMeshReader/PV3blockMeshReader/vtkPV3blockMeshReader.cxx rename to applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/PV3blockMeshReader/vtkPV3blockMeshReader.cxx index 451c8b5855..155fc83f57 100644 --- a/applications/utilities/postProcessing/graphics/PV3blockMeshReader/PV3blockMeshReader/vtkPV3blockMeshReader.cxx +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/PV3blockMeshReader/vtkPV3blockMeshReader.cxx @@ -80,7 +80,12 @@ vtkPV3blockMeshReader::~vtkPV3blockMeshReader() { vtkDebugMacro(<<"Deconstructor"); - delete foamData_; + if (foamData_) + { + // remove point numbers + updatePointNumbersView(false); + delete foamData_; + } if (FileName) { diff --git a/applications/utilities/postProcessing/graphics/PV3blockMeshReader/PV3blockMeshReader/vtkPV3blockMeshReader.h b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/PV3blockMeshReader/vtkPV3blockMeshReader.h similarity index 100% rename from applications/utilities/postProcessing/graphics/PV3blockMeshReader/PV3blockMeshReader/vtkPV3blockMeshReader.h rename to applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/PV3blockMeshReader/vtkPV3blockMeshReader.h diff --git a/applications/utilities/postProcessing/graphics/PV3blockMeshReader/vtkPV3blockMesh/Make/files b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/Make/files similarity index 100% rename from applications/utilities/postProcessing/graphics/PV3blockMeshReader/vtkPV3blockMesh/Make/files rename to applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/Make/files diff --git a/applications/utilities/postProcessing/graphics/PV3blockMeshReader/vtkPV3blockMesh/Make/options b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/Make/options similarity index 100% rename from applications/utilities/postProcessing/graphics/PV3blockMeshReader/vtkPV3blockMesh/Make/options rename to applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/Make/options diff --git a/applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/vtkDataArrayTemplateImplicit.txx b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/vtkDataArrayTemplateImplicit.txx similarity index 100% rename from applications/utilities/postProcessing/graphics/PVFoamReader/vtkFoam/vtkDataArrayTemplateImplicit.txx rename to applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/vtkDataArrayTemplateImplicit.txx diff --git a/applications/utilities/postProcessing/graphics/PV3blockMeshReader/vtkPV3blockMesh/vtkOpenFOAMPoints.H b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/vtkOpenFOAMPoints.H similarity index 100% rename from applications/utilities/postProcessing/graphics/PV3blockMeshReader/vtkPV3blockMesh/vtkOpenFOAMPoints.H rename to applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/vtkOpenFOAMPoints.H diff --git a/applications/utilities/postProcessing/graphics/PV3blockMeshReader/vtkPV3blockMesh/vtkPV3blockMesh.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/vtkPV3blockMesh.C similarity index 98% rename from applications/utilities/postProcessing/graphics/PV3blockMeshReader/vtkPV3blockMesh/vtkPV3blockMesh.C rename to applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/vtkPV3blockMesh.C index 2dc5bc32e3..66da31d620 100644 --- a/applications/utilities/postProcessing/graphics/PV3blockMeshReader/vtkPV3blockMesh/vtkPV3blockMesh.C +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/vtkPV3blockMesh.C @@ -219,6 +219,14 @@ Foam::vtkPV3blockMesh::~vtkPV3blockMesh() Info<< " Foam::vtkPV3blockMesh::~vtkPV3blockMesh" << endl; } + // Hmm. pointNumberTextActors are not getting removed + // + forAll(pointNumberTextActorsPtrs_, pointI) + { + pointNumberTextActorsPtrs_[pointI]->Delete(); + } + pointNumberTextActorsPtrs_.clear(); + delete meshPtr_; } diff --git a/applications/utilities/postProcessing/graphics/PV3blockMeshReader/vtkPV3blockMesh/vtkPV3blockMesh.H b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/vtkPV3blockMesh.H similarity index 100% rename from applications/utilities/postProcessing/graphics/PV3blockMeshReader/vtkPV3blockMesh/vtkPV3blockMesh.H rename to applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/vtkPV3blockMesh.H diff --git a/applications/utilities/postProcessing/graphics/PV3blockMeshReader/vtkPV3blockMesh/vtkPV3blockMeshConvert.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/vtkPV3blockMeshConvert.C similarity index 100% rename from applications/utilities/postProcessing/graphics/PV3blockMeshReader/vtkPV3blockMesh/vtkPV3blockMeshConvert.C rename to applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/vtkPV3blockMeshConvert.C diff --git a/applications/utilities/postProcessing/graphics/PV3blockMeshReader/vtkPV3blockMesh/vtkPV3blockMeshUtils.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/vtkPV3blockMeshUtils.C similarity index 100% rename from applications/utilities/postProcessing/graphics/PV3blockMeshReader/vtkPV3blockMesh/vtkPV3blockMeshUtils.C rename to applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/vtkPV3blockMeshUtils.C From 1ef88a2aefbec4a1fb6e0f87b9774fb199830d62 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Sun, 18 Oct 2009 17:50:41 +0200 Subject: [PATCH 03/85] blockMesh reader fix, start refactoring of PV3Readers - apply scaleFactor (eg, mm->m) in PV3 reader - this looks better when overlaying with other objects - stop segfault when paraview exits without deleting readers first --- .../graphics/PV3Readers/Allwmake | 16 + .../PV3Readers/PV3FoamReader/Allwmake | 24 +- .../PV3FoamReader/vtkPV3FoamReader.cxx | 11 + .../PV3FoamReader/vtkPV3Foam/Make/options | 6 +- .../PV3Readers/PV3blockMeshReader/Allwmake | 24 +- .../vtkPV3blockMeshReader.cxx | 10 + .../vtkPV3blockMesh/Make/options | 2 + .../vtkPV3blockMesh/vtkOpenFOAMPoints.H | 15 + .../vtkPV3blockMesh/vtkPV3blockMesh.C | 7 +- .../vtkPV3blockMesh/vtkPV3blockMeshConvert.C | 20 +- .../PV3Readers/vtkPV3Readers/Make/files | 3 + .../PV3Readers/vtkPV3Readers/Make/options | 10 + .../PV3Readers/vtkPV3Readers/vtkPV3Readers.C | 330 ++++++++++++++++++ .../PV3Readers/vtkPV3Readers/vtkPV3Readers.H | 229 ++++++++++++ src/mesh/blockMesh/blockMesh/blockMesh.C | 6 + src/mesh/blockMesh/blockMesh/blockMesh.H | 6 + 16 files changed, 687 insertions(+), 32 deletions(-) create mode 100755 applications/utilities/postProcessing/graphics/PV3Readers/Allwmake create mode 100644 applications/utilities/postProcessing/graphics/PV3Readers/vtkPV3Readers/Make/files create mode 100644 applications/utilities/postProcessing/graphics/PV3Readers/vtkPV3Readers/Make/options create mode 100644 applications/utilities/postProcessing/graphics/PV3Readers/vtkPV3Readers/vtkPV3Readers.C create mode 100644 applications/utilities/postProcessing/graphics/PV3Readers/vtkPV3Readers/vtkPV3Readers.H diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/Allwmake b/applications/utilities/postProcessing/graphics/PV3Readers/Allwmake new file mode 100755 index 0000000000..94a47b132b --- /dev/null +++ b/applications/utilities/postProcessing/graphics/PV3Readers/Allwmake @@ -0,0 +1,16 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory +set -x + +if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ] +then + case "$ParaView_VERSION" in + 3*) + wmake libso vtkPV3Readers + PV3blockMeshReader/Allwmake + PV3FoamReader/Allwmake + ;; + esac +fi + +# ----------------------------------------------------------------- end-of-file diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/Allwmake b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/Allwmake index c7a80fc7fb..ef7b571102 100755 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/Allwmake +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/Allwmake @@ -4,18 +4,18 @@ set -x if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ] then - case "$ParaView_VERSION" in - 3*) - wmake libso vtkPV3Foam - ( - cd PV3FoamReader - mkdir -p Make/$WM_OPTIONS > /dev/null 2>&1 - cd Make/$WM_OPTIONS - cmake ../.. - make - ) - ;; - esac + case "$ParaView_VERSION" in + 3*) + wmake libso vtkPV3Foam + ( + cd PV3FoamReader + mkdir -p Make/$WM_OPTIONS > /dev/null 2>&1 + cd Make/$WM_OPTIONS + cmake ../.. + make + ) + ;; + esac fi # ----------------------------------------------------------------- end-of-file diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.cxx b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.cxx index 28b9a2bc6f..0b5c65dc78 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.cxx +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.cxx @@ -405,9 +405,20 @@ void vtkPV3FoamReader::updatePatchNamesView(const bool show) { pqApplicationCore* appCore = pqApplicationCore::instance(); + // need to check this, since our destructor calls this + if (!appCore) + { + return; + } + // Server manager model for querying items in the server manager pqServerManagerModel* smModel = appCore->getServerManagerModel(); + if (!smModel) + { + return; + } + // Get all the pqRenderView instances QList renderViews = smModel->findItems(); diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/Make/options b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/Make/options index 1e936c1d5d..d58afde30b 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/Make/options +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/Make/options @@ -1,18 +1,20 @@ EXE_INC = \ + -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude \ -I$(ParaView_DIR)/VTK \ -I$(ParaView_INST_DIR) \ -I$(ParaView_INST_DIR)/VTK \ -I$(ParaView_INST_DIR)/VTK/Common \ -I$(ParaView_INST_DIR)/VTK/Filtering \ -I$(ParaView_INST_DIR)/VTK/Rendering \ + -I../../vtkPV3Readers/lnInclude \ -I../PV3FoamReader LIB_LIBS = \ + -lvtkPV3Readers \ + -lmeshTools \ -lfiniteVolume \ -lgenericPatchFields \ -llagrangian \ - -lmeshTools \ $(GLIBS) diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/Allwmake b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/Allwmake index 3e2c407e6e..443100d381 100755 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/Allwmake +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/Allwmake @@ -4,18 +4,18 @@ set -x if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ] then - case "$ParaView_VERSION" in - 3*) - wmake libso vtkPV3blockMesh - ( - cd PV3blockMeshReader - mkdir -p Make/$WM_OPTIONS > /dev/null 2>&1 - cd Make/$WM_OPTIONS - cmake ../.. - make - ) - ;; - esac + case "$ParaView_VERSION" in + 3*) + wmake libso vtkPV3blockMesh + ( + cd PV3blockMeshReader + mkdir -p Make/$WM_OPTIONS > /dev/null 2>&1 + cd Make/$WM_OPTIONS + cmake ../.. + make + ) + ;; + esac fi # ----------------------------------------------------------------- end-of-file diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/PV3blockMeshReader/vtkPV3blockMeshReader.cxx b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/PV3blockMeshReader/vtkPV3blockMeshReader.cxx index 155fc83f57..383deeeccc 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/PV3blockMeshReader/vtkPV3blockMeshReader.cxx +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/PV3blockMeshReader/vtkPV3blockMeshReader.cxx @@ -220,8 +220,18 @@ void vtkPV3blockMeshReader::updatePointNumbersView(const bool show) { pqApplicationCore* appCore = pqApplicationCore::instance(); + // need to check this, since our destructor calls this + if (!appCore) + { + return; + } + // Server manager model for querying items in the server manager pqServerManagerModel* smModel = appCore->getServerManagerModel(); + if (!smModel) + { + return; + } // Get all the pqRenderView instances QList renderViews = smModel->findItems(); diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/Make/options b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/Make/options index 2e5727ba77..5d19916934 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/Make/options +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/Make/options @@ -7,9 +7,11 @@ EXE_INC = \ -I$(ParaView_INST_DIR)/VTK/Common \ -I$(ParaView_INST_DIR)/VTK/Filtering \ -I$(ParaView_INST_DIR)/VTK/Rendering \ + -I../../vtkPV3Readers/lnInclude \ -I../PV3blockMeshReader LIB_LIBS = \ + -lvtkPV3Readers \ -lmeshTools \ -lblockMesh \ $(GLIBS) diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/vtkOpenFOAMPoints.H b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/vtkOpenFOAMPoints.H index b6fa0c83b0..a8ce36e144 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/vtkOpenFOAMPoints.H +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/vtkOpenFOAMPoints.H @@ -44,6 +44,21 @@ inline void vtkInsertNextOpenFOAMPoint points->InsertNextPoint(p.x(), p.y(), p.z()); } +inline void vtkInsertNextOpenFOAMPoint +( + vtkPoints *points, + const Foam::point& p, + const Foam::scalar scaleFactor +) +{ + points->InsertNextPoint + ( + p.x()*scaleFactor, + p.y()*scaleFactor, + p.z()*scaleFactor + ); +} + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #endif diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/vtkPV3blockMesh.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/vtkPV3blockMesh.C index 66da31d620..91424d3b57 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/vtkPV3blockMesh.C +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/vtkPV3blockMesh.C @@ -384,6 +384,7 @@ void Foam::vtkPV3blockMesh::renderPointNumbers if (show && meshPtr_) { const pointField& cornerPts = meshPtr_->blockPointField(); + const scalar scaleFactor = meshPtr_->scaleFactor(); pointNumberTextActorsPtrs_.setSize(cornerPts.size()); forAll(cornerPts, pointI) @@ -407,9 +408,9 @@ void Foam::vtkPV3blockMesh::renderPointNumbers txt->GetPositionCoordinate()->SetValue ( - cornerPts[pointI].x(), - cornerPts[pointI].y(), - cornerPts[pointI].z() + cornerPts[pointI].x()*scaleFactor, + cornerPts[pointI].y()*scaleFactor, + cornerPts[pointI].z()*scaleFactor ); // Add text to each renderer diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/vtkPV3blockMeshConvert.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/vtkPV3blockMeshConvert.C index c163ba14ed..5ad588bb30 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/vtkPV3blockMeshConvert.C +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/vtkPV3blockMeshConvert.C @@ -66,6 +66,7 @@ void Foam::vtkPV3blockMesh::convertMeshBlocks } int blockI = 0; + const scalar scaleFactor = blkMesh.scaleFactor(); for ( @@ -103,7 +104,8 @@ void Foam::vtkPV3blockMesh::convertMeshBlocks vtkInsertNextOpenFOAMPoint ( vtkpoints, - blockPoints[blockLabels[ptI]] + blockPoints[blockLabels[ptI]], + scaleFactor ); nodeIds[ptI] = ptI; @@ -159,6 +161,7 @@ void Foam::vtkPV3blockMesh::convertMeshEdges const curvedEdgeList& edges = blkMesh.edges(); int edgeI = 0; + const scalar scaleFactor = blkMesh.scaleFactor(); for ( @@ -212,7 +215,12 @@ void Foam::vtkPV3blockMesh::convertMeshEdges vtkIdType pointIds[edgePoints.size()]; forAll(edgePoints, ptI) { - vtkInsertNextOpenFOAMPoint(vtkpoints, edgePoints[ptI]); + vtkInsertNextOpenFOAMPoint + ( + vtkpoints, + edgePoints[ptI], + scaleFactor + ); pointIds[ptI] = ptI; } @@ -266,6 +274,7 @@ void Foam::vtkPV3blockMesh::convertMeshCorners label datasetNo = 0; // restart at dataset 0 const pointField& blockPoints = meshPtr_->blockPointField(); + const scalar& scaleFactor = meshPtr_->scaleFactor(); if (debug) { @@ -284,7 +293,12 @@ void Foam::vtkPV3blockMesh::convertMeshCorners vtkIdType pointId = 0; forAll(blockPoints, ptI) { - vtkInsertNextOpenFOAMPoint(vtkpoints, blockPoints[ptI]); + vtkInsertNextOpenFOAMPoint + ( + vtkpoints, + blockPoints[ptI], + scaleFactor + ); vtkcells->InsertNextCell(1, &pointId); pointId++; diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/vtkPV3Readers/Make/files b/applications/utilities/postProcessing/graphics/PV3Readers/vtkPV3Readers/Make/files new file mode 100644 index 0000000000..134b8de963 --- /dev/null +++ b/applications/utilities/postProcessing/graphics/PV3Readers/vtkPV3Readers/Make/files @@ -0,0 +1,3 @@ +vtkPV3Readers.C + +LIB = $(FOAM_LIBBIN)/libvtkPV3Readers diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/vtkPV3Readers/Make/options b/applications/utilities/postProcessing/graphics/PV3Readers/vtkPV3Readers/Make/options new file mode 100644 index 0000000000..876a3e334e --- /dev/null +++ b/applications/utilities/postProcessing/graphics/PV3Readers/vtkPV3Readers/Make/options @@ -0,0 +1,10 @@ +EXE_INC = \ + -I$(ParaView_DIR)/VTK \ + -I$(ParaView_INST_DIR) \ + -I$(ParaView_INST_DIR)/VTK \ + -I$(ParaView_INST_DIR)/VTK/Common \ + -I$(ParaView_INST_DIR)/VTK/Filtering \ + -I$(ParaView_INST_DIR)/VTK/Rendering + +LIB_LIBS = \ + $(GLIBS) diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/vtkPV3Readers/vtkPV3Readers.C b/applications/utilities/postProcessing/graphics/PV3Readers/vtkPV3Readers/vtkPV3Readers.C new file mode 100644 index 0000000000..ed10463f91 --- /dev/null +++ b/applications/utilities/postProcessing/graphics/PV3Readers/vtkPV3Readers/vtkPV3Readers.C @@ -0,0 +1,330 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2 of the License, or (at your + option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM; if not, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Description + Misc helper methods and utilities + +\*---------------------------------------------------------------------------*/ + +#include "vtkPV3Readers.H" + +// Foam includes +#include "IFstream.H" + +// VTK includes +#include "vtkDataArraySelection.h" +#include "vtkDataSet.h" +#include "vtkMultiBlockDataSet.h" +#include "vtkInformation.h" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +defineTypeNameAndDebug(Foam::vtkPV3Readers, 0); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + //! @cond fileScope + // Extract up to the first non-word characters + inline word getFirstWord(const char* str) + { + if (str) + { + label n = 0; + while (str[n] && word::valid(str[n])) + { + ++n; + } + return word(str, n, true); + } + else + { + return word::null; + } + + } + //! @endcond fileScope + +} // End namespace Foam + + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +void Foam::vtkPV3Readers::AddToBlock +( + vtkMultiBlockDataSet* output, + vtkDataSet* dataset, + const partInfo& selector, + const label datasetNo, + const std::string& datasetName +) +{ + const int blockNo = selector.block(); + + vtkDataObject* blockDO = output->GetBlock(blockNo); + vtkMultiBlockDataSet* block = vtkMultiBlockDataSet::SafeDownCast(blockDO); + + if (!block) + { + if (blockDO) + { + FatalErrorIn("Foam::vtkPV3Readers::AddToBlock") + << "Block already has a vtkDataSet assigned to it" + << endl; + return; + } + + block = vtkMultiBlockDataSet::New(); + output->SetBlock(blockNo, block); + block->Delete(); + } + + if (debug) + { + Info<< "block[" << blockNo << "] has " + << block->GetNumberOfBlocks() + << " datasets prior to adding set " << datasetNo + << " with name: " << datasetName << endl; + } + + block->SetBlock(datasetNo, dataset); + + // name the block when assigning dataset 0 + if (datasetNo == 0) + { + output->GetMetaData(blockNo)->Set + ( + vtkCompositeDataSet::NAME(), + selector.name() + ); + } + + if (datasetName.size()) + { + block->GetMetaData(datasetNo)->Set + ( + vtkCompositeDataSet::NAME(), + datasetName.c_str() + ); + } +} + + +vtkDataSet* Foam::vtkPV3Readers::GetDataSetFromBlock +( + vtkMultiBlockDataSet* output, + const partInfo& selector, + const label datasetNo +) +{ + const int blockNo = selector.block(); + + vtkDataObject* blockDO = output->GetBlock(blockNo); + vtkMultiBlockDataSet* block = vtkMultiBlockDataSet::SafeDownCast(blockDO); + + if (block) + { + return vtkDataSet::SafeDownCast(block->GetBlock(datasetNo)); + } + + return 0; +} + + +// ununsed at the moment +Foam::label Foam::vtkPV3Readers::GetNumberOfDataSets +( + vtkMultiBlockDataSet* output, + const partInfo& selector +) +{ + const int blockNo = selector.block(); + + vtkDataObject* blockDO = output->GetBlock(blockNo); + vtkMultiBlockDataSet* block = vtkMultiBlockDataSet::SafeDownCast(blockDO); + if (block) + { + return block->GetNumberOfBlocks(); + } + + return 0; +} + + +// Foam::word Foam::vtkPV3Readers::getPartName(int partId) +// { +// return getFirstWord(reader_->GetPartArrayName(partId)); +// } + + +Foam::wordHashSet Foam::vtkPV3Readers::getSelected +( + vtkDataArraySelection* select +) +{ + int nElem = select->GetNumberOfArrays(); + wordHashSet selections(2*nElem); + + for (int elemI=0; elemI < nElem; ++elemI) + { + if (select->GetArraySetting(elemI)) + { + selections.insert(getFirstWord(select->GetArrayName(elemI))); + } + } + + return selections; +} + + +Foam::wordHashSet Foam::vtkPV3Readers::getSelected +( + vtkDataArraySelection* select, + const partInfo& selector +) +{ + int nElem = select->GetNumberOfArrays(); + wordHashSet selections(2*nElem); + + for (int elemI = selector.start(); elemI < selector.end(); ++elemI) + { + if (select->GetArraySetting(elemI)) + { + selections.insert(getFirstWord(select->GetArrayName(elemI))); + } + } + + return selections; +} + + +Foam::stringList Foam::vtkPV3Readers::getSelectedArrayEntries +( + vtkDataArraySelection* select +) +{ + stringList selections(select->GetNumberOfArrays()); + label nElem = 0; + + forAll(selections, elemI) + { + if (select->GetArraySetting(elemI)) + { + selections[nElem++] = select->GetArrayName(elemI); + } + } + selections.setSize(nElem); + + + if (debug) + { + label nElem = select->GetNumberOfArrays(); + Info<< "available("; + for (int elemI = 0; elemI < nElem; ++elemI) + { + Info<< " \"" << select->GetArrayName(elemI) << "\""; + } + Info<< " )\nselected("; + + forAll(selections, elemI) + { + Info<< " " << selections[elemI]; + } + Info<< " )\n"; + } + + return selections; +} + + +Foam::stringList Foam::vtkPV3Readers::getSelectedArrayEntries +( + vtkDataArraySelection* select, + const partInfo& selector +) +{ + stringList selections(selector.size()); + label nElem = 0; + + for (int elemI = selector.start(); elemI < selector.end(); ++elemI) + { + if (select->GetArraySetting(elemI)) + { + selections[nElem++] = select->GetArrayName(elemI); + } + } + selections.setSize(nElem); + + + if (debug) + { + Info<< "available("; + for (int elemI = selector.start(); elemI < selector.end(); ++elemI) + { + Info<< " \"" << select->GetArrayName(elemI) << "\""; + } + Info<< " )\nselected("; + + forAll(selections, elemI) + { + Info<< " " << selections[elemI]; + } + Info<< " )\n"; + } + + return selections; +} + + +void Foam::vtkPV3Readers::setSelectedArrayEntries +( + vtkDataArraySelection* select, + const stringList& selections +) +{ + const int nElem = select->GetNumberOfArrays(); + select->DisableAllArrays(); + + // Loop through entries, setting values from selectedEntries + for (int elemI=0; elemI < nElem; ++elemI) + { + string arrayName(select->GetArrayName(elemI)); + + forAll(selections, elemI) + { + if (selections[elemI] == arrayName) + { + select->EnableArray(arrayName.c_str()); + break; + } + } + } +} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + + +// ************************************************************************* // diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/vtkPV3Readers/vtkPV3Readers.H b/applications/utilities/postProcessing/graphics/PV3Readers/vtkPV3Readers/vtkPV3Readers.H new file mode 100644 index 0000000000..fba4da5d94 --- /dev/null +++ b/applications/utilities/postProcessing/graphics/PV3Readers/vtkPV3Readers/vtkPV3Readers.H @@ -0,0 +1,229 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2 of the License, or (at your + option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM; if not, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Namespace + Foam::vtkPV3Readers + +Description + A collection of helper functions when building a reader interface in + ParaView3. + +SourceFiles + vtkPV3Readers.C + +\*---------------------------------------------------------------------------*/ + +#ifndef vtkPV3Readers_H +#define vtkPV3Readers_H + +// do not include legacy strstream headers +#ifndef VTK_EXCLUDE_STRSTREAM_HEADERS +# define VTK_EXCLUDE_STRSTREAM_HEADERS +#endif + +#include "className.H" +#include "fileName.H" +#include "stringList.H" +#include "wordList.H" +#include "HashSet.H" + + +// * * * * * * * * * * * * * Forward Declarations * * * * * * * * * * * * * // + +class vtkDataArraySelection; +class vtkDataSet; +class vtkPoints; +class vtkPV3FoamReader; +class vtkRenderer; +class vtkTextActor; +class vtkMultiBlockDataSet; +class vtkPolyData; +class vtkUnstructuredGrid; +class vtkIndent; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace vtkPV3Readers +{ + //- Declare name of the class and its debug switch + NamespaceName("vtkPV3Readers"); + + //- Bookkeeping for GUI checklists and the multi-block organization + class partInfo + { + const char *name_; + int block_; + int start_; + int size_; + + public: + + partInfo(const char *name, const int blockNo=0) + : + name_(name), + block_(blockNo), + start_(-1), + size_(0) + {} + + //- Return the block holding these datasets + int block() const + { + return block_; + } + + //- Assign block number, return previous value + int block(int blockNo) + { + int prev = block_; + block_ = blockNo; + return prev; + } + + const char* name() const + { + return name_; + } + + int start() const + { + return start_; + } + + int end() const + { + return start_ + size_; + } + + int size() const + { + return size_; + } + + bool empty() const + { + return !size_; + } + + void reset() + { + start_ = -1; + size_ = 0; + } + + //- Assign new start and reset the size + void operator=(const int i) + { + start_ = i; + size_ = 0; + } + + //- Increment the size + void operator+=(const int n) + { + size_ += n; + } + }; + + + //- Convenience method use to convert the readers from VTK 5 + // multiblock API to the current composite data infrastructure + void AddToBlock + ( + vtkMultiBlockDataSet* output, + vtkDataSet* dataset, + const partInfo& selector, + const label datasetNo, + const std::string& datasetName + ); + + + //- Convenience method use to convert the readers from VTK 5 + // multiblock API to the current composite data infrastructure + vtkDataSet* GetDataSetFromBlock + ( + vtkMultiBlockDataSet* output, + const partInfo& selector, + const label datasetNo + ); + + //- Convenience method use to convert the readers from VTK 5 + // multiblock API to the current composite data infrastructure + // ununsed at the moment + label GetNumberOfDataSets + ( + vtkMultiBlockDataSet* output, + const partInfo& selector + ); + + + //- Retrieve the current selections as a wordHashSet + wordHashSet getSelected + ( + vtkDataArraySelection* select + ); + + + //- Retrieve a sub-list of the current selections + wordHashSet getSelected + ( + vtkDataArraySelection*, + const partInfo& + ); + + + //- Retrieve the current selections + stringList getSelectedArrayEntries(vtkDataArraySelection*); + + //- Retrieve a sub-list of the current selections + stringList getSelectedArrayEntries + ( + vtkDataArraySelection* select, + const partInfo& selector + ); + + + //- Set selection(s) + void setSelectedArrayEntries + ( + vtkDataArraySelection*, + const stringList& + ); + + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace vtkPV3 + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/mesh/blockMesh/blockMesh/blockMesh.C b/src/mesh/blockMesh/blockMesh/blockMesh.C index 4d499ea943..1ed0d44a7e 100644 --- a/src/mesh/blockMesh/blockMesh/blockMesh.C +++ b/src/mesh/blockMesh/blockMesh/blockMesh.C @@ -78,6 +78,12 @@ const Foam::polyMesh& Foam::blockMesh::topology() const } +Foam::scalar Foam::blockMesh::scaleFactor() const +{ + return scaleFactor_; +} + + const Foam::pointField& Foam::blockMesh::points() const { if (points_.empty()) diff --git a/src/mesh/blockMesh/blockMesh/blockMesh.H b/src/mesh/blockMesh/blockMesh/blockMesh.H index 6e67506a79..0c423a9b83 100644 --- a/src/mesh/blockMesh/blockMesh/blockMesh.H +++ b/src/mesh/blockMesh/blockMesh/blockMesh.H @@ -144,6 +144,7 @@ public: // Access //- Reference to point field defining the block mesh + // these points have not been scaled by scaleFactor const pointField& blockPointField() const; const polyMesh& topology() const; @@ -153,6 +154,11 @@ public: return edges_; } + //- The scaling factor used to convert to meters + scalar scaleFactor() const; + + //- The points for the entire mesh + // these points have been scaled by scaleFactor const pointField& points() const; const cellShapeList& cells() const; From 61ad54ec039c9633b640743ebb598cd2e725190a Mon Sep 17 00:00:00 2001 From: mattijs Date: Sun, 18 Oct 2009 21:14:15 +0100 Subject: [PATCH 04/85] skip group type 7 (nodes) as output by salome --- .../ideasUnvToFoam/ideasUnvToFoam.C | 53 ++- .../conversion/ideasUnvToFoam/unv/mesh.unv | 394 ++++++++++++++++++ 2 files changed, 424 insertions(+), 23 deletions(-) create mode 100644 applications/utilities/mesh/conversion/ideasUnvToFoam/unv/mesh.unv diff --git a/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C b/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C index 6a9d85ba30..1776285e46 100644 --- a/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C +++ b/applications/utilities/mesh/conversion/ideasUnvToFoam/ideasUnvToFoam.C @@ -208,12 +208,13 @@ void readPoints { hasWarned = true; - WarningIn + IOWarningIn ( "readPoints(IFstream&, label&, DynamicList" - ", DynamicList