Commit 05153345 authored by andy's avatar andy

ENH: Updated paraview 3.98->4

parent d82b69e0
vtkPV398Foam.C
vtkPV398FoamFields.C
vtkPV398FoamMesh.C
vtkPV398FoamMeshLagrangian.C
vtkPV398FoamMeshSet.C
vtkPV398FoamMeshVolume.C
vtkPV398FoamMeshZone.C
vtkPV398FoamUpdateInfo.C
vtkPV398FoamUtils.C
LIB = $(FOAM_LIBBIN)/libvtkPV398Foam
vtkPV398blockMesh.C
vtkPV398blockMeshConvert.C
vtkPV398blockMeshUtils.C
LIB = $(FOAM_LIBBIN)/libvtkPV398blockMesh
vtkPV398Readers.C
LIB = $(FOAM_LIBBIN)/libvtkPV398Readers
......@@ -2,7 +2,7 @@
cd ${0%/*} || exit 1 # run from this directory
#set -x
if [ "$ParaView_VERSION" != "3.98.1" ]
if [ "$ParaView_VERSION" != "4.0.1" ]
then
if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
then
......
......@@ -2,8 +2,8 @@
cd ${0%/*} || exit 1 # run from this directory
set -x
wclean libso vtkPV398Readers
PV398blockMeshReader/Allwclean
PV398FoamReader/Allwclean
wclean libso vtkPV4Readers
PV4blockMeshReader/Allwclean
PV4FoamReader/Allwclean
# ----------------------------------------------------------------- end-of-file
......@@ -2,7 +2,7 @@
cd ${0%/*} || exit 1 # run from this directory
#set -x
if [ "$ParaView_VERSION" == "3.98.1" ]
if [ "$ParaView_VERSION" == "4.0.1" ]
then
if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
then
......@@ -14,14 +14,14 @@ if [ "$ParaView_VERSION" == "3.98.1" ]
# ensure CMake gets the correct C++ compiler
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
wmake libso vtkPV398Readers
PV398blockMeshReader/Allwmake
PV398FoamReader/Allwmake
wmake libso vtkPV4Readers
PV4blockMeshReader/Allwmake
PV4FoamReader/Allwmake
else
echo "ERROR: ParaView not found in $ParaView_DIR"
fi
else
echo "WARN: PV398 readers not building: ParaView_VERSION=$ParaView_VERSION"
echo "WARN: PV4 readers not building: ParaView_VERSION=$ParaView_VERSION"
fi
# ----------------------------------------------------------------- end-of-file
......@@ -3,9 +3,9 @@ cd ${0%/*} || exit 1 # run from this directory
set -x
# deal with client/server vs combined plugins
rm -f $FOAM_LIBBIN/libPV398FoamReader* 2>/dev/null
rm -f $FOAM_LIBBIN/libPV4FoamReader* 2>/dev/null
rm -rf PV398FoamReader/Make
wclean libso vtkPV398Foam
rm -rf PV4FoamReader/Make
wclean libso vtkPV4Foam
# ----------------------------------------------------------------- end-of-file
......@@ -4,9 +4,9 @@ set -x
if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ]
then
wmake libso vtkPV398Foam
wmake libso vtkPV4Foam
(
cd PV398FoamReader
cd PV4FoamReader
mkdir -p Make/$WM_OPTIONS > /dev/null 2>&1
cd Make/$WM_OPTIONS
cmake ../..
......
......@@ -21,7 +21,7 @@ INCLUDE_DIRECTORIES(
$ENV{WM_PROJECT_DIR}/src/OpenFOAM/lnInclude
$ENV{WM_PROJECT_DIR}/src/OSspecific/$ENV{WM_OSTYPE}/lnInclude
$ENV{WM_PROJECT_DIR}/src/finiteVolume/lnInclude
${PROJECT_SOURCE_DIR}/../vtkPV398Foam
${PROJECT_SOURCE_DIR}/../vtkPV4Foam
)
ADD_DEFINITIONS(
......@@ -41,45 +41,45 @@ SET(
#
# Extend the auto-generated panel
QT4_WRAP_CPP(MOC_SRCS pqPV398FoamReaderPanel.h)
QT4_WRAP_CPP(MOC_SRCS pqPV4FoamReaderPanel.h)
ADD_PARAVIEW_OBJECT_PANEL(IFACES IFACE_SRCS
CLASS_NAME pqPV398FoamReaderPanel
XML_NAME PV398FoamReader # name of SourceProxy in *SM.xml
CLASS_NAME pqPV4FoamReaderPanel
XML_NAME PV4FoamReader # name of SourceProxy in *SM.xml
XML_GROUP sources
)
ADD_PARAVIEW_PLUGIN(
PV398FoamReader_SM "1.0"
SERVER_MANAGER_XML PV398FoamReader_SM.xml
SERVER_MANAGER_SOURCES vtkPV398FoamReader.cxx
PV4FoamReader_SM "1.0"
SERVER_MANAGER_XML PV4FoamReader_SM.xml
SERVER_MANAGER_SOURCES vtkPV4FoamReader.cxx
GUI_INTERFACES ${IFACES}
GUI_SOURCES pqPV398FoamReaderPanel.cxx
GUI_SOURCES pqPV4FoamReaderPanel.cxx
${MOC_SRCS} ${UI_SRCS} ${IFACE_SRCS}
GUI_RESOURCE_FILES PV398FoamReader.xml
GUI_RESOURCE_FILES PV4FoamReader.xml
)
# #
# # Define the server-side portion of the reader plugin
# #
# ADD_PARAVIEW_PLUGIN(
# PV398FoamReader_SM "1.0"
# SERVER_MANAGER_XML PV398FoamReader_SM.xml
# SERVER_MANAGER_SOURCES vtkPV398FoamReader.cxx
# PV4FoamReader_SM "1.0"
# SERVER_MANAGER_XML PV4FoamReader_SM.xml
# SERVER_MANAGER_SOURCES vtkPV4FoamReader.cxx
# )
# #
# # Define the client-side portion of the reader plugin
# #
# ADD_PARAVIEW_PLUGIN(
# PV398FoamReader "1.0"
# PV4FoamReader "1.0"
# GUI_RESOURCES PV3FoamReader.qrc
# )
#
TARGET_LINK_LIBRARIES(
PV398FoamReader_SM
PV4FoamReader_SM
OpenFOAM
finiteVolume
vtkPV398Foam
vtkPV4Foam
)
#-----------------------------------------------------------------------------
<RCC>
<qresource prefix="/ParaViewResources" >
<file>PV398FoamReader.xml</file>
<file>PV4FoamReader.xml</file>
</qresource>
</RCC>
<ParaViewReaders>
<Reader name="PV398FoamReader"
<Reader name="PV4FoamReader"
extensions="OpenFOAM"
file_description="OpenFOAM Reader">
</Reader>
......
<ServerManagerConfiguration>
<ProxyGroup name="sources">
<SourceProxy
name="PV398FoamReader"
class="vtkPV398FoamReader">
name="PV4FoamReader"
class="vtkPV4FoamReader">
<!-- File name - compulsory -->
<StringVectorProperty
......
......@@ -23,7 +23,7 @@ License
\*---------------------------------------------------------------------------*/
#include "pqPV398FoamReaderPanel.h"
#include "pqPV4FoamReaderPanel.h"
// QT
#include <QGridLayout>
......@@ -50,7 +50,7 @@ License
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
pqPV398FoamReaderPanel::pqPV398FoamReaderPanel
pqPV4FoamReaderPanel::pqPV4FoamReaderPanel
(
pqProxy *proxy,
QWidget *p
......@@ -339,7 +339,7 @@ pqPV398FoamReaderPanel::pqPV398FoamReaderPanel
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
void pqPV398FoamReaderPanel::CacheMeshToggled()
void pqPV4FoamReaderPanel::CacheMeshToggled()
{
vtkSMIntVectorProperty::SafeDownCast
(
......@@ -348,7 +348,7 @@ void pqPV398FoamReaderPanel::CacheMeshToggled()
}
void pqPV398FoamReaderPanel::RefreshPressed()
void pqPV4FoamReaderPanel::RefreshPressed()
{
// update everything
vtkSMIntVectorProperty::SafeDownCast
......@@ -363,7 +363,7 @@ void pqPV398FoamReaderPanel::RefreshPressed()
}
void pqPV398FoamReaderPanel::ZeroTimeToggled()
void pqPV4FoamReaderPanel::ZeroTimeToggled()
{
vtkSMIntVectorProperty::SafeDownCast
(
......@@ -374,7 +374,7 @@ void pqPV398FoamReaderPanel::ZeroTimeToggled()
}
void pqPV398FoamReaderPanel::ShowPatchNamesToggled()
void pqPV4FoamReaderPanel::ShowPatchNamesToggled()
{
vtkSMIntVectorProperty::SafeDownCast
(
......@@ -391,7 +391,7 @@ void pqPV398FoamReaderPanel::ShowPatchNamesToggled()
}
void pqPV398FoamReaderPanel::ShowGroupsOnlyToggled()
void pqPV4FoamReaderPanel::ShowGroupsOnlyToggled()
{
vtkSMProperty* prop;
......@@ -407,7 +407,7 @@ void pqPV398FoamReaderPanel::ShowGroupsOnlyToggled()
}
void pqPV398FoamReaderPanel::IncludeSetsToggled()
void pqPV4FoamReaderPanel::IncludeSetsToggled()
{
vtkSMProperty* prop;
......@@ -423,7 +423,7 @@ void pqPV398FoamReaderPanel::IncludeSetsToggled()
}
void pqPV398FoamReaderPanel::IncludeZonesToggled()
void pqPV4FoamReaderPanel::IncludeZonesToggled()
{
vtkSMProperty* prop;
......@@ -439,7 +439,7 @@ void pqPV398FoamReaderPanel::IncludeZonesToggled()
}
void pqPV398FoamReaderPanel::ExtrapolatePatchesToggled()
void pqPV4FoamReaderPanel::ExtrapolatePatchesToggled()
{
vtkSMProperty* prop;
......@@ -452,7 +452,7 @@ void pqPV398FoamReaderPanel::ExtrapolatePatchesToggled()
}
void pqPV398FoamReaderPanel::InterpolateVolFieldsToggled()
void pqPV4FoamReaderPanel::InterpolateVolFieldsToggled()
{
vtkSMProperty* prop;
......
......@@ -22,19 +22,19 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
pqPV398FoamReaderPanel
pqPV4FoamReaderPanel
Description
GUI modifications for the ParaView reader panel
A custom panel for the PV398FoamReader.
A custom panel for the PV4FoamReader.
SourceFiles
pqPV398FoamReaderPanel.cxx
pqPV4FoamReaderPanel.cxx
\*---------------------------------------------------------------------------*/
#ifndef pqPV398FoamReaderPanel_h
#define pqPV398FoamReaderPanel_h
#ifndef pqPV4FoamReaderPanel_h
#define pqPV4FoamReaderPanel_h
#include "pqAutoGeneratedObjectPanel.h"
......@@ -51,10 +51,10 @@ class vtkSMSourceProxy;
/*---------------------------------------------------------------------------*\
Class pqPV398FoamReaderPanel Declaration
Class pqPV4FoamReaderPanel Declaration
\*---------------------------------------------------------------------------*/
class pqPV398FoamReaderPanel
class pqPV4FoamReaderPanel
:
public pqAutoGeneratedObjectPanel
{
......@@ -105,11 +105,11 @@ public:
// Constructors
//- Construct from components
pqPV398FoamReaderPanel(pqProxy*, QWidget*);
pqPV4FoamReaderPanel(pqProxy*, QWidget*);
//- Destructor
// virtual ~pqPV398FoamReaderPanel();
// virtual ~pqPV4FoamReaderPanel();
};
......
......@@ -22,7 +22,7 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "vtkPV398FoamReader.h"
#include "vtkPV4FoamReader.h"
#include "pqApplicationCore.h"
#include "pqRenderView.h"
......@@ -40,18 +40,18 @@ License
#include "vtkStringArray.h"
// OpenFOAM includes
#include "vtkPV398Foam.H"
#include "vtkPV4Foam.H"
#undef EXPERIMENTAL_TIME_CACHING
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
vtkStandardNewMacro(vtkPV398FoamReader);
vtkStandardNewMacro(vtkPV4FoamReader);
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
vtkPV398FoamReader::vtkPV398FoamReader()
vtkPV4FoamReader::vtkPV4FoamReader()
{
Debug = 0;
vtkDebugMacro(<<"Constructor");
......@@ -63,7 +63,7 @@ vtkPV398FoamReader::vtkPV398FoamReader()
output0_ = NULL;
#ifdef VTKPV398FOAM_DUALPORT
#ifdef VTKPV4FOAM_DUALPORT
// Add second output for the Lagrangian
this->SetNumberOfOutputPorts(2);
vtkMultiBlockDataSet *lagrangian = vtkMultiBlockDataSet::New();
......@@ -100,7 +100,7 @@ vtkPV398FoamReader::vtkPV398FoamReader()
SelectionObserver = vtkCallbackCommand::New();
SelectionObserver->SetCallback
(
&vtkPV398FoamReader::SelectionModifiedCallback
&vtkPV4FoamReader::SelectionModifiedCallback
);
SelectionObserver->SetClientData(this);
......@@ -129,7 +129,7 @@ vtkPV398FoamReader::vtkPV398FoamReader()
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
vtkPV398FoamReader::~vtkPV398FoamReader()
vtkPV4FoamReader::~vtkPV4FoamReader()
{
vtkDebugMacro(<<"Deconstructor");
......@@ -168,7 +168,7 @@ vtkPV398FoamReader::~vtkPV398FoamReader()
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
// Do everything except set the output info
int vtkPV398FoamReader::RequestInformation
int vtkPV4FoamReader::RequestInformation
(
vtkInformation* vtkNotUsed(request),
vtkInformationVector** vtkNotUsed(inputVector),
......@@ -177,7 +177,7 @@ int vtkPV398FoamReader::RequestInformation
{
vtkDebugMacro(<<"RequestInformation");
if (Foam::vtkPV398Foam::debug)
if (Foam::vtkPV4Foam::debug)
{
cout<<"REQUEST_INFORMATION\n";
}
......@@ -190,7 +190,7 @@ int vtkPV398FoamReader::RequestInformation
int nInfo = outputVector->GetNumberOfInformationObjects();
if (Foam::vtkPV398Foam::debug)
if (Foam::vtkPV4Foam::debug)
{
cout<<"RequestInformation with " << nInfo << " item(s)\n";
for (int infoI = 0; infoI < nInfo; ++infoI)
......@@ -201,7 +201,7 @@ int vtkPV398FoamReader::RequestInformation
if (!foamData_)
{
foamData_ = new Foam::vtkPV398Foam(FileName, this);
foamData_ = new Foam::vtkPV4Foam(FileName, this);
}
else
{
......@@ -238,7 +238,7 @@ int vtkPV398FoamReader::RequestInformation
timeRange[0] = timeSteps[0];
timeRange[1] = timeSteps[nTimeSteps-1];
if (Foam::vtkPV398Foam::debug > 1)
if (Foam::vtkPV4Foam::debug > 1)
{
cout<<"nTimeSteps " << nTimeSteps << "\n"
<<"timeRange " << timeRange[0] << " to " << timeRange[1]
......@@ -268,7 +268,7 @@ int vtkPV398FoamReader::RequestInformation
// Set the output info
int vtkPV398FoamReader::RequestData
int vtkPV4FoamReader::RequestData
(
vtkInformation* vtkNotUsed(request),
vtkInformationVector** vtkNotUsed(inputVector),
......@@ -292,7 +292,7 @@ int vtkPV398FoamReader::RequestData
int nInfo = outputVector->GetNumberOfInformationObjects();
if (Foam::vtkPV398Foam::debug)
if (Foam::vtkPV4Foam::debug)
{
cout<<"RequestData with " << nInfo << " item(s)\n";
for (int infoI = 0; infoI < nInfo; ++infoI)
......@@ -310,7 +310,7 @@ int vtkPV398FoamReader::RequestData
// taking port0 as the lead for other outputs would be nice, but fails when
// a filter is added - we need to check everything
// but since PREVIOUS_UPDATE_TIME_STEPS() is protected, relay the logic
// to the vtkPV398Foam::setTime() method
// to the vtkPV4Foam::setTime() method
for (int infoI = 0; infoI < nInfo; ++infoI)
{
vtkInformation *outInfo = outputVector->GetInformationObject(infoI);
......@@ -342,7 +342,7 @@ int vtkPV398FoamReader::RequestData
)
);
if (Foam::vtkPV398Foam::debug)
if (Foam::vtkPV4Foam::debug)
{
cout<< "update output with "
<< output->GetNumberOfBlocks() << " blocks\n";
......@@ -370,7 +370,7 @@ int vtkPV398FoamReader::RequestData
output->ShallowCopy(output0_);
}
if (Foam::vtkPV398Foam::debug)
if (Foam::vtkPV4Foam::debug)
{
if (needsUpdate)
{
......@@ -390,7 +390,7 @@ int vtkPV398FoamReader::RequestData
#else
#ifdef VTKPV398FOAM_DUALPORT
#ifdef VTKPV4FOAM_DUALPORT
foamData_->Update
(
output,
......@@ -417,13 +417,13 @@ int vtkPV398FoamReader::RequestData
}
void vtkPV398FoamReader::SetRefresh(int val)
void vtkPV4FoamReader::SetRefresh(int val)
{
Modified();
}
void vtkPV398FoamReader::SetIncludeSets(int val)
void vtkPV4FoamReader::SetIncludeSets(int val)
{
if (IncludeSets != val)
{
......@@ -436,7 +436,7 @@ void vtkPV398FoamReader::SetIncludeSets(int val)
}
void vtkPV398FoamReader::SetIncludeZones(int val)
void vtkPV4FoamReader::SetIncludeZones(int val)
{
if (IncludeZones != val)
{
......@@ -449,7 +449,7 @@ void vtkPV398FoamReader::SetIncludeZones(int val)
}
void vtkPV398FoamReader::SetShowPatchNames(int val)
void vtkPV4FoamReader::SetShowPatchNames(int val)
{
if (ShowPatchNames != val)
{
......@@ -459,7 +459,7 @@ void vtkPV398FoamReader::SetShowPatchNames(int val)
}
void vtkPV398FoamReader::SetShowGroupsOnly(int val)
void vtkPV4FoamReader::SetShowGroupsOnly(int val)
{
if (ShowGroupsOnly != val)
{
......@@ -472,7 +472,7 @@ void vtkPV398FoamReader::SetShowGroupsOnly(int val)
}
void vtkPV398FoamReader::updatePatchNamesView(const bool show)
void vtkPV4FoamReader::updatePatchNamesView(const bool show)
{
pqApplicationCore* appCore = pqApplicationCore::instance();
......@@ -506,7 +506,7 @@ void vtkPV398FoamReader::updatePatchNamesView(const bool show)
}
void vtkPV398FoamReader::PrintSelf(ostream& os, vtkIndent indent)
void vtkPV4FoamReader::PrintSelf(ostream& os, vtkIndent indent)
{
vtkDebugMacro(<<"PrintSelf");
......@@ -522,7 +522,7 @@ void vtkPV398FoamReader::PrintSelf(ostream& os, vtkIndent indent)
}
int vtkPV398FoamReader::GetTimeStep()
int vtkPV4FoamReader::GetTimeStep()
{
return foamData_ ? foamData_->timeIndex() : -1;
}
......@@ -531,35 +531,35 @@ int vtkPV398FoamReader::GetTimeStep()
// ----------------------------------------------------------------------
// Parts selection list control
vtkDataArraySelection* vtkPV398FoamReader::GetPartSelection()
vtkDataArraySelection* vtkPV4FoamReader::GetPartSelection()
{
vtkDebugMacro(<<"GetPartSelection");
return PartSelection;
}
int vtkPV398FoamReader::GetNumberOfPartArrays()
int vtkPV4FoamReader::GetNumberOfPartArrays()
{
vtkDebugMacro(<<"GetNumberOfPartArrays");
return PartSelection->GetNumberOfArrays();
}
const char* vtkPV398FoamReader::GetPartArrayName(int index)
const char* vtkPV4FoamReader::GetPartArrayName(int index)
{
vtkDebugMacro(<<"GetPartArrayName");
return PartSelection->GetArrayName(index);
}
int vtkPV398FoamReader::GetPartArrayStatus(const char* name)
int vtkPV4FoamReader::GetPartArrayStatus(const char* name)
{
vtkDebugMacro(<<"GetPartArrayStatus");
return PartSelection->ArrayIsEnabled(name);
}
void vtkPV398FoamReader::SetPartArrayStatus(const char* name, int status)
void vtkPV4FoamReader::SetPartArrayStatus(const char* name, int status)
{
vtkDebugMacro("Set mesh part \"" << name << "\" status to: " << status);
......@@ -577,35 +577,35 @@ void vtkPV398FoamReader::SetPartArrayStatus(const char* name, int status)
// ----------------------------------------------------------------------
// volField selection list control
vtkDataArraySelection* vtkPV398FoamReader::GetVolFieldSelection()