Commit bccc0fa6 authored by Dan Lipsa's avatar Dan Lipsa

Add Catalyst - Live test.

Change-Id: I44d46de149bfe1b39786e62f9ac8e1a17322ff93
parent ef916df5
......@@ -108,6 +108,47 @@ else()
${CMAKE_CURRENT_SOURCE_DIR}/VisItBridgeSamrai.xml)
endif()
# Catalyst-Live tests
# ----------------------------------------------------------------------
if(PARAVIEW_ENABLE_CATALYST AND PARAVIEW_ENABLE_PYTHON)
set (catalyst_live_tests
${CMAKE_CURRENT_SOURCE_DIR}/CatalystLiveSetBreakpoint.xml)
set (EXTRA_PVBATCH_SCRIPT CatalystWaveletDriver.py)
set (EXTRA_PVBATCH_SCRIPT_PARAMETERS CatalystWaveletCoprocessing 21)
foreach (tname ${catalyst_live_tests})
add_pv_test("pv" "_DISABLE_C"
COMMAND
--script $<TARGET_FILE:pvbatch> -sym
${CMAKE_CURRENT_SOURCE_DIR}/${EXTRA_PVBATCH_SCRIPT}
${EXTRA_PVBATCH_SCRIPT_PARAMETERS}
--client ${CLIENT_EXECUTABLE}
--enable-bt
-dr
--test-directory=${PARAVIEW_TEST_DIR}
BASELINE_DIR ${PARAVIEW_TEST_BASELINE_DIR}
TEST_SCRIPTS ${tname})
add_pv_test(pvcs "_DISABLE_CS"
COMMAND
--script-np 5
--script $<TARGET_FILE:pvbatch> -sym
${CMAKE_CURRENT_SOURCE_DIR}/${EXTRA_PVBATCH_SCRIPT}
${EXTRA_PVBATCH_SCRIPT_PARAMETERS}
--server $<TARGET_FILE:pvserver>
--enable-bt
--client ${CLIENT_EXECUTABLE}
--enable-bt
-dr
--test-directory=${PARAVIEW_TEST_DIR}
BASELINE_DIR ${PARAVIEW_TEST_BASELINE_DIR}
TEST_SCRIPTS ${tname})
endforeach()
endif()
SET (TESTS_WITH_BASELINES ${TESTS_WITH_BASELINES}
${CMAKE_CURRENT_SOURCE_DIR}/XdmfRead.xml
......
<?xml version="1.0" ?>
<pqevents>
<pqevent object="pqClientMainWindow/menubar" command="activate" arguments="menu_Catalyst" />
<pqevent object="pqClientMainWindow/menubar/menu_Catalyst" command="activate" arguments="actionCatalystConnect" />
<pqevent object="pqClientMainWindow/1QInputDialog0/1QDialogButtonBox0/1QPushButton0" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/1QMessageBox0/qt_msgbox_buttonbox/1QPushButton0" command="activate" arguments="" />
<!-- wait for Catalyst pipeline to show-up -->
<pqevent object="pqClientMainWindow" command="pqLiveInsituManager"
arguments="wait_timestep 5"/>
<pqevent object="pqClientMainWindow/pipelineBrowserDock/pipelineBrowser" command="mousePress" arguments="1,1,0,12,13,/1:0/0:0/0:1" />
<pqevent object="pqClientMainWindow/pipelineBrowserDock/pipelineBrowser" command="mouseRelease" arguments="1,0,0,12,13,/1:0/0:1" />
<!-- wait for extract to arrive on the Live server-->
<pqevent object="pqClientMainWindow" command="pqLiveInsituManager"
arguments="wait_timestep 10"/>
<pqevent object="pqClientMainWindow/pipelineBrowserDock/pipelineBrowser" command="mousePress" arguments="1,1,0,9,8,/0:0/0:1" />
<pqevent object="pqClientMainWindow/pipelineBrowserDock/pipelineBrowser" command="mouseRelease" arguments="1,0,0,9,8,/0:0/0:1" />
<!-- wait for splitter -->
<pqevent object="pqClientMainWindow" command="pqLiveInsituManager"
arguments="wait_timestep 12"/>
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Splitter.0/Frame.1/Close" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/menubar" command="activate" arguments="menu_Catalyst" />
<pqevent object="pqClientMainWindow/menubar/menu_Catalyst" command="activate" arguments="actionCatalystSetBreakpoint" />
<pqevent object="pqClientMainWindow/pqSetBreakpointDialog/BreakpointTime" command="set_string" arguments="2" />
<pqevent object="pqClientMainWindow/pqSetBreakpointDialog/BreakpointTime" command="set_string" arguments="20" />
<pqevent object="pqClientMainWindow/pqSetBreakpointDialog/ButtonBox/1QPushButton0" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/pipelineBrowserDock/pipelineBrowser" command="mousePress" arguments="1,1,0,88,11,/1:0/0:0/0:0" />
<pqevent object="pqClientMainWindow/pipelineBrowserDock/pipelineBrowser" command="mouseRelease" arguments="1,0,0,88,11,/1:0/0:0/0:0" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_vcontainer/1QScrollBar0" command="mousePress" arguments="1,1,0,11,50" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_vcontainer/1QScrollBar0" command="mouseMove" arguments="1,0,0,6,81" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_vcontainer/1QScrollBar0" command="mouseRelease" arguments="1,0,0,6,81" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/ContourValues/ScalarValueList/Add" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/ContourValues/ScalarValueList/Table/qt_scrollarea_viewport/1QExpandingLineEdit0" command="set_string" arguments="1" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/ContourValues/ScalarValueList/Table" command="keyEvent" arguments="7,49,0,1,0,1" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/ContourValues/ScalarValueList/Table" command="keyEvent" arguments="7,49,0,1,0,1" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/ContourValues/ScalarValueList/Table/qt_scrollarea_viewport/1QExpandingLineEdit0" command="set_string" arguments="18" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/ContourValues/ScalarValueList/Table" command="keyEvent" arguments="7,56,0,8,0,1" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/ContourValues/ScalarValueList/Table" command="keyEvent" arguments="7,56,0,8,0,1" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/ContourValues/ScalarValueList/Table/qt_scrollarea_viewport/1QExpandingLineEdit0" command="set_string" arguments="180" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/ContourValues/ScalarValueList/Add" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/ContourValues/ScalarValueList/Remove" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/Accept" command="activate" arguments="" />
<!-- set the active view -->
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/Viewport" command="mousePress" arguments="(0.287574,0.232601,1,1,0)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/Viewport" command="mouseMove" arguments="(0.287574,0.232601,1,0,0)" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Frame.0/Viewport" command="mouseRelease" arguments="(0.287574,0.232601,1,0,0)" />
<!-- wait for breakpoint to be hit -->
<pqevent object="pqClientMainWindow" command="pqLiveInsituManager"
arguments="wait_breakpoint_hit"/>
</pqevents>
try: paraview.simple
except: from paraview.simple import *
from paraview import coprocessing
#--------------------------------------------------------------
# Code generated from cpstate.py to create the CoProcessor.
# ----------------------- CoProcessor definition -----------------------
def CreateCoProcessor():
def _CreatePipeline(coprocessor, datadescription):
class Pipeline:
Wavelet1 = coprocessor.CreateProducer( datadescription, "input" )
Contour1 = Contour( guiName="Contour1", ContourBy=['POINTS', 'RTData'], Isosurfaces=[157.0909652709961], ComputeScalars=1, PointMergeMethod="Uniform Binning" )
SetActiveSource(Wavelet1)
Slice1 = Slice( guiName="Slice1", SliceOffsetValues=[-9.622499999999999, -5.773500000000001, -1.924500000000001, 1.924500000000001, 5.7734999999999985, 9.622499999999999], Triangulatetheslice=0, SliceType="Plane" )
return Pipeline()
class CoProcessor(coprocessing.CoProcessor):
def CreatePipeline(self, datadescription):
self.Pipeline = _CreatePipeline(self, datadescription)
coprocessor = CoProcessor()
freqs = {'input': [1]}
coprocessor.SetUpdateFrequencies(freqs)
return coprocessor
#--------------------------------------------------------------
# Global variables that will hold the pipeline for each timestep
# Creating the CoProcessor object, doesn't actually create the ParaView pipeline.
# It will be automatically setup when coprocessor.UpdateProducers() is called the
# first time.
coprocessor = CreateCoProcessor()
#--------------------------------------------------------------
# Enable Live-Visualizaton with ParaView
coprocessor.EnableLiveVisualization(True)
# ---------------------- Data Selection method ----------------------
def RequestDataDescription(datadescription):
"Callback to populate the request for current timestep"
global coprocessor
if datadescription.GetForceOutput() == True:
# We are just going to request all fields and meshes from the simulation
# code/adaptor.
for i in range(datadescription.GetNumberOfInputDescriptions()):
datadescription.GetInputDescription(i).AllFieldsOn()
datadescription.GetInputDescription(i).GenerateMeshOn()
return
# setup requests for all inputs based on the requirements of the
# pipeline.
coprocessor.LoadRequestedData(datadescription)
# ------------------------ Processing method ------------------------
def DoCoProcessing(datadescription):
"Callback to do co-processing for current timestep"
global coprocessor
# Update the coprocessor by providing it the newly generated simulation data.
# If the pipeline hasn't been setup yet, this will setup the pipeline.
coprocessor.UpdateProducers(datadescription)
# Write output data, if appropriate.
coprocessor.WriteData(datadescription);
# Write image capture (Last arg: rescale lookup table), if appropriate.
coprocessor.WriteImages(datadescription, rescale_lookuptable=False)
# Live Visualization, if enabled.
coprocessor.DoLiveVisualization(datadescription, "localhost", 22222)
import sys
if len(sys.argv) != 3:
print "command is 'python <python driver code> <script name> <number of time steps>'"
sys.exit(1)
import paraview
import paraview.vtk as vtk
import paraview.simple as pvsimple
import math
# initialize and read input parameters
paraview.options.batch = True
paraview.options.symmetric = True
def _refHolderMaker(obj):
def _refHolder(obj2, string):
tmp = obj
return _refHolder
def coProcess(grid, time, step, scriptname, wholeExtent):
import vtkPVCatalystPython
import os
scriptpath, scriptname = os.path.split(scriptname)
sys.path.append(scriptpath)
if scriptname.endswith(".py"):
print 'script name is ', scriptname
scriptname = scriptname[0:len(scriptname)-3]
try:
cpscript = __import__(scriptname)
except:
print sys.exc_info()
print 'Cannot find ', scriptname, ' -- no coprocessing will be performed.'
sys.exit(1)
return
datadescription = vtkPVCatalystPython.vtkCPDataDescription()
datadescription.SetTimeData(time, step)
datadescription.AddInput("input")
cpscript.RequestDataDescription(datadescription)
inputdescription = datadescription.GetInputDescriptionByName("input")
if inputdescription.GetIfGridIsNecessary() == False:
return
inputdescription.SetGrid(grid)
if grid.IsA("vtkImageData") == True or grid.IsA("vtkRectilinearGrid") == True \
or grid.IsA("vtkStructuredGrid") == True:
inputdescription.SetWholeExtent(wholeExtent)
cpscript.DoCoProcessing(datadescription)
try:
numsteps = int(sys.argv[2])
except ValueError:
print 'the last argument should be a number'
numsteps = 10
#imageData2 = vtk.vtkImageData()
for step in range(numsteps):
print "Timestep ", step
# assume simulation time starts at 0
time = step/float(numsteps)
# create the input to the coprocessing library. normally
# this will come from the adaptor
wavelet = pvsimple.Wavelet()
wholeExtent = wavelet.WholeExtent
# put in some variation in the point data that changes with time
wavelet.Maximum = 255+200*math.sin(step * math.pi / 100)
wavelet.UpdatePipeline()
imageData = pvsimple.servermanager.Fetch(wavelet)
# note that we delete wavelet now since. if not, it will
# get deleted automatically in the coprocessing script
pvsimple.Delete(wavelet)
wavelet = None
# "perform" coprocessing. results are outputted only if
# the passed in script says we should at time/step
coProcess(imageData, time, step, sys.argv[1], wholeExtent)
imageData = None
import time
time.sleep(1)
......@@ -91,7 +91,7 @@ namespace
int vtkNotUsed(remoteProcessId))
{
vtkLiveInsituLink* self = reinterpret_cast<vtkLiveInsituLink*>(localArg);
self->InsituProcessConnected(NULL);
self->InsituConnect(NULL);
}
void DropLiveInsituConnectionRMI(void *localArg,
......@@ -427,7 +427,7 @@ void vtkLiveInsituLink::InitializeLive()
// controller would generally be NULL, however due to magically timing,
// the insitu lib may indeed connect just as we setup the socket, so we
// handle that case.
this->InsituProcessConnected(controller);
this->InsituConnect(controller);
controller->Delete();
}
else
......@@ -498,7 +498,7 @@ void vtkLiveInsituLink::InitializeInsitu()
// controller would generally be NULL, however due to magically timing,
// the insitu lib may indeed connect just as we setup the socket, so we
// handle that case.
this->InsituProcessConnected(controller);
this->InsituConnect(controller);
controller->Delete();
}
// nothing to do, no server to connect to.
......@@ -509,7 +509,7 @@ void vtkLiveInsituLink::InitializeInsitu()
pm->GetGlobalController()->Broadcast(&connection_established, 1, 0);
if (connection_established)
{
this->InsituProcessConnected(NULL);
this->InsituConnect(NULL);
}
}
}
......@@ -525,7 +525,7 @@ void vtkLiveInsituLink::OnConnectionCreatedEvent()
vtkMultiProcessController* controller = nam->NewConnection(this->URL);
if (controller)
{
this->InsituProcessConnected(controller);
this->InsituConnect(controller);
controller->Delete();
}
}
......@@ -568,7 +568,7 @@ void vtkLiveInsituLink::DropLiveInsituConnection()
}
//----------------------------------------------------------------------------
void vtkLiveInsituLink::InsituProcessConnected(vtkMultiProcessController* controller)
void vtkLiveInsituLink::InsituConnect(vtkMultiProcessController* controller)
{
assert(this->Controller == NULL);
assert(this->ExtractsDeliveryHelper.GetPointer() == NULL);
......@@ -1094,7 +1094,7 @@ void vtkLiveInsituLink::OnInsituPostProcess(double time, vtkIdType timeStep)
// Obtains extracts from the simulations processes.
bool dataAvailable = this->ExtractsDeliveryHelper->Update();
// Retreive the vtkPVDataInformations
// Retrieve the vtkPVDataInformations
std::map<std::pair<vtkTypeUInt32,unsigned int>,std::string> dataInformation;
if (myId == 0 && this->Controller)
{
......
......@@ -157,7 +157,7 @@ public:
//BTX
// ***************************************************************
// Internal methods, public for callbacks.
void InsituProcessConnected(vtkMultiProcessController* controller);
void InsituConnect(vtkMultiProcessController* controller);
// Description:
// Called to drop the connection between Insitu and ParaView Live.
......
......@@ -31,8 +31,8 @@
#include "vtkSMSessionProxyManager.h"
#include "vtkSMSourceProxy.h"
#include "vtkSMStateLoader.h"
#include <vtksys/ios/sstream>
#define vtkSMLiveInsituLinkProxyDebugMacro(x) cerr << __LINE__ << " " x << endl;
//#define vtkSMLiveInsituLinkProxyDebugMacro(x)
......@@ -106,7 +106,7 @@ void vtkSMLiveInsituLinkProxy::LoadState(
break;
case vtkLiveInsituLink::NEXT_TIMESTEP_AVAILABLE:
this->NewTimestepAvailable(value.idtype(0));
this->NextTimestepAvailable(value.idtype(0));
break;
case vtkLiveInsituLink::DISCONNECTED:
......@@ -213,7 +213,7 @@ void vtkSMLiveInsituLinkProxy::InsituConnected(const char* state)
}
//----------------------------------------------------------------------------
void vtkSMLiveInsituLinkProxy::NewTimestepAvailable(vtkIdType timeStep)
void vtkSMLiveInsituLinkProxy::NextTimestepAvailable(vtkIdType timeStep)
{
this->TimeStep = timeStep;
// Mark all extract producer proxies as dirty.
......
......@@ -76,7 +76,7 @@ protected:
void PushUpdatedState();
void InsituConnected(const char* initialial_state);
void NewTimestepAvailable(vtkIdType timeStep);
void NextTimestepAvailable(vtkIdType timeStep);
vtkSmartPointer<vtkSMSessionProxyManager> InsituProxyManager;
vtkWeakPointer<vtkPVCatalystSessionCore> CatalystSessionCore;
......
......@@ -149,19 +149,6 @@
</PropertyGroup>
</Proxy>
<!-- ================================================================== -->
<!--
TODO: Address compatibility for the following XML Changes
- TitleFont to TitleFontFamily
TitleFontSize
TitleBold
TitleItalic
- Axis... to LeftAxis...
BottomAxis...
RightAxis...
TopAxis...
- AxisRange to AxisRangeMinimum
AxisRangeMaximum
-->
<ContextViewProxy base_proxygroup="internal_views"
base_proxyname="XYChartViewTitle"
class="vtkPVXYChartView"
......
......@@ -33,7 +33,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "pqActiveObjects.h"
#include "pqApplicationCore.h"
#include "pqInsituServer.h"
#include "pqLiveInsituManager.h"
#include "pqCoreUtilities.h"
#include "pqLiveInsituVisualizationManager.h"
#include "pqServer.h"
......@@ -61,13 +61,13 @@ pqCatalystConnectReaction::~pqCatalystConnectReaction()
//-----------------------------------------------------------------------------
bool pqCatalystConnectReaction::connect()
{
pqInsituServer* cs = pqInsituServer::instance();
pqLiveInsituManager* cs = pqLiveInsituManager::instance();
pqServer* server = pqActiveObjects::instance().activeServer();
pqLiveInsituVisualizationManager* mgr = cs->connect(server);
if (mgr)
{
this->updateEnableState();
QObject::connect(mgr, SIGNAL(catalystDisconnected()),
QObject::connect(mgr, SIGNAL(insituDisconnected()),
this, SLOT(updateEnableState()));
}
return mgr;
......@@ -79,9 +79,9 @@ void pqCatalystConnectReaction::updateEnableState()
{
pqServer* server = pqActiveObjects::instance().activeServer();
if (server &&
! pqInsituServer::isInsituServer(server) &&
! pqLiveInsituManager::isInsituServer(server) &&
! server->session()->IsMultiClients() &&
! pqInsituServer::instance()->isDisplayServer(server))
! pqLiveInsituManager::instance()->isDisplayServer(server))
{
this->parentAction()->setEnabled(true);
}
......
......@@ -33,7 +33,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "pqActiveObjects.h"
#include "pqApplicationCore.h"
#include "pqInsituServer.h"
#include "pqLiveInsituManager.h"
#include "pqCoreUtilities.h"
#include "pqLiveInsituVisualizationManager.h"
#include "pqServer.h"
......@@ -59,7 +59,7 @@ pqCatalystPauseSimulationReaction::pqCatalystPauseSimulationReaction(
//-----------------------------------------------------------------------------
void pqCatalystPauseSimulationReaction::setPauseSimulation(bool pause)
{
vtkSMLiveInsituLinkProxy* proxy = pqInsituServer::instance()->linkProxy();
vtkSMLiveInsituLinkProxy* proxy = pqLiveInsituManager::instance()->linkProxy();
if (proxy)
{
vtkSMPropertyHelper(proxy, "SimulationPaused").Set(pause);
......@@ -75,7 +75,7 @@ void pqCatalystPauseSimulationReaction::setPauseSimulation(bool pause)
void pqCatalystPauseSimulationReaction::updateEnableState(Type type)
{
bool enabled = false;
vtkSMLiveInsituLinkProxy* proxy = pqInsituServer::instance()->linkProxy();
vtkSMLiveInsituLinkProxy* proxy = pqLiveInsituManager::instance()->linkProxy();
if (proxy &&
((type == PAUSE) !=
(vtkSMPropertyHelper(proxy, "SimulationPaused").GetAs<int>() == 1)))
......
......@@ -33,7 +33,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "pqActiveObjects.h"
#include "pqApplicationCore.h"
#include "pqInsituServer.h"
#include "pqLiveInsituManager.h"
#include "pqCoreUtilities.h"
#include "pqLiveInsituVisualizationManager.h"
#include "pqServer.h"
......@@ -59,15 +59,15 @@ pqCatalystRemoveBreakpointReaction::pqCatalystRemoveBreakpointReaction(
//-----------------------------------------------------------------------------
void pqCatalystRemoveBreakpointReaction::onTriggered()
{
pqInsituServer::instance()->removeBreakpoint();
pqLiveInsituManager::instance()->removeBreakpoint();
}
//-----------------------------------------------------------------------------
void pqCatalystRemoveBreakpointReaction::updateEnableState()
{
pqInsituServer* server = pqInsituServer::instance();
pqLiveInsituManager* server = pqLiveInsituManager::instance();
this->parentAction()->setEnabled(
(server->linkProxy() &&
server->breakpointTime() != pqInsituServer::INVALID_TIME) ?
server->breakpointTime() != pqLiveInsituManager::INVALID_TIME) ?
true : false);
}
......@@ -33,7 +33,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "pqActiveObjects.h"
#include "pqApplicationCore.h"
#include "pqInsituServer.h"
#include "pqLiveInsituManager.h"
#include "pqCoreUtilities.h"
#include "pqLiveInsituVisualizationManager.h"
#include "pqServer.h"
......@@ -80,5 +80,5 @@ void pqCatalystSetBreakpointReaction::onTriggered()
void pqCatalystSetBreakpointReaction::updateEnableState()
{
this->parentAction()->setEnabled(
pqInsituServer::instance()->linkProxy() ? true : false);
pqLiveInsituManager::instance()->linkProxy() ? true : false);
}
......@@ -70,8 +70,6 @@ set (Module_SRCS
pqCameraDialog.h
pqCameraKeyFrameWidget.cxx
pqCameraKeyFrameWidget.h
pqInsituServer.h
pqInsituServer.cxx
pqChangeInputDialog.cxx
pqChangeInputDialog.h
pqChartPixelScale.cxx
......@@ -194,6 +192,8 @@ set (Module_SRCS
pqLinksEditor.h
pqLinksManager.cxx
pqLinksManager.h
pqLiveInsituManager.h
pqLiveInsituManager.cxx
pqLiveInsituVisualizationManager.cxx
pqLiveInsituVisualizationManager.h
pqLockViewSizeCustomDialog.cxx
......@@ -391,7 +391,6 @@ set (Module_MOC_HDRS
pqCalculatorWidget.h
pqCameraDialog.h
pqCameraKeyFrameWidget.h
pqInsituServer.h
pqChangeInputDialog.h
pqClipPanel.h
pqColorChooserButtonWithPalettes.h
......@@ -447,6 +446,7 @@ set (Module_MOC_HDRS
pqLineWidget.h
pqLinksEditor.h
pqLinksManager.h
pqLiveInsituManager.h
pqLiveInsituVisualizationManager.h
pqLockViewSizeCustomDialog.h
pqMemoryInspectorPanel.h
......
......@@ -30,7 +30,7 @@
<string>Time</string>
</property>
<property name="checked">
<bool>true</bool>
<bool>false</bool>
</property>
<attribute name="buttonGroup">
<string notr="true">buttonGroup</string>
......@@ -49,6 +49,9 @@
<property name="text">
<string>Time Step</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
<attribute name="buttonGroup">
<string notr="true">buttonGroup</string>
</attribute>
......
/*=========================================================================
Program: ParaView
Module: pqInsituServer.h
Module: pqLiveInsituManager.h
Copyright (c) 2005-2008 Sandia Corporation, Kitware Inc.
All rights reserved.
......@@ -29,8 +29,8 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
=========================================================================*/
#ifndef __pqInsituServer_h
#define __pqInsituServer_h
#ifndef __pqLiveInsituManager_h
#define __pqLiveInsituManager_h
#include <QPointer>
......@@ -46,23 +46,23 @@ class pqServer;
class vtkSMLiveInsituLinkProxy;
/// Singleton that provides access to Catalyst objects (pqServer,
/// Singleton that provides access to Insitu objects (pqServer,
/// pqLiveInsituVisualizationManager, vtkSMLiveInsituLinkProxy).
class PQCOMPONENTS_EXPORT pqInsituServer : public QObject
class PQCOMPONENTS_EXPORT pqLiveInsituManager : public QObject
{
Q_OBJECT
public:
static double INVALID_TIME;
static vtkIdType INVALID_TIME_STEP;
static pqInsituServer* instance();
static pqLiveInsituManager* instance();
/// Returns the link proxy to Catalyst or NULL if not connected or if not
/// a catalyst server
static vtkSMLiveInsituLinkProxy* linkProxy(pqServer* insituServer);
vtkSMLiveInsituLinkProxy* linkProxy()
{
return pqInsituServer::linkProxy(this->insituServer());
return pqLiveInsituManager::linkProxy(this->insituServer());
}
/// Is this the insitu server
static bool isInsituServer(pqServer* server);
......@@ -71,7 +71,7 @@ public:
vtkIdType* timeStep);
signals:
void catalystConnected(pqServer* displayServer);
void connectionInitiated(pqServer* displayServer);
void timeUpdated();
void breakpointAdded(pqServer* insituServer);
void breakpointRemoved(pqServer* insituServer);
......@@ -85,7 +85,7 @@ public:
pqServer* insituServer();
/// Is this the server where Catalyst displays its extracts
bool isDisplayServer(pqServer* server);
/// Returns the catalyst manager associated with
/// Returns the catalyst visualization manager associated with
/// 'displayServer' or 'insituServer'
pqLiveInsituVisualizationManager* managerFromDisplay(pqServer* displayServer);
static pqLiveInsituVisualizationManager* managerFromInsitu(
......@@ -118,6 +118,9 @@ public:
{
return this->TimeStep;
}
void waitTimestep(vtkIdType timeStep);
void waitBreakpointHit();
protected slots:
/// called when Catalyst disconnects. We clean up the Catalyst connection.
......@@ -127,7 +130,7 @@ protected slots:
void onDataUpdated(pqPipelineSource* source);
protected:
pqInsituServer();
pqLiveInsituManager();
bool isTimeBreakpointHit() const;
bool isTimeStepBreakpointHit() const;
......@@ -138,7 +141,7 @@ protected:
vtkIdType TimeStep;
private:
Q_DISABLE_COPY(pqInsituServer)
Q_DISABLE_COPY(pqLiveInsituManager)
typedef QMap<void*, QPointer<pqLiveInsituVisualizationManager> > ManagersType;
ManagersType Managers;
......
......@@ -97,9 +97,9 @@ pqLiveInsituVisualizationManager::pqLiveInsituVisualizationManager(
pqCoreUtilities::connect(adaptor, vtkCommand::UpdateEvent,
this, SLOT(timestepsUpdated()));
pqCoreUtilities::connect(adaptor, vtkCommand::ConnectionClosedEvent,
this, SIGNAL(catalystDisconnected()));
this, SIGNAL(insituDisconnected()));
pqCoreUtilities::connect(adaptor, vtkCommand::ConnectionCreatedEvent,
this, SIGNAL(catalystConnected()));
this, SIGNAL(insituConnected()));
this->Internals->CatalystSession = catalyst;
this->Internals->LiveInsituLinkProxy = adaptor;
......@@ -249,4 +249,5 @@ void pqLiveInsituVisualizationManager::timestepsUpdated()
}
}
this->Internals->ExtractSourceProxies.clear();
emit nextTimestepAvailable();
}
......@@ -69,8 +69,9 @@ public:
vtkSMLiveInsituLinkProxy* getProxy() const;
signals:
void catalystConnected();
void catalystDisconnected();
void insituConnected();
void insituDisconnected();
void nextTimestepAvailable();
protected slots:
void timestepsUpdated();
......
......@@ -33,7 +33,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "pqActiveObjects.h"
#include "pqApplicationCore.h"
#include "pqInsituServer.h"
#include "pqLiveInsituManager.h"
#include "pqLiveInsituVisualizationManager.h"
#include "pqOutputPort.h"
#include "pqPipelineAnnotationFilterModel.h"
......@@ -248,10 +248,10 @@ void pqPipelineBrowserWidget::setVisibility(bool visible,
BEGIN_UNDO_SET(QString("%1 Selected").arg(visible? "Show" : "Hide"));
}
}
if (pqInsituServer::isInsituServer(port->getServer()))
if (pqLiveInsituManager::isInsituServer(port->getServer()))
{
pqLiveInsituVisualizationManager* mgr =
pqInsituServer::managerFromInsitu(port->getServer());
pqLiveInsituManager::managerFromInsitu(port->getServer());
if (mgr && mgr->addExtract(port))
{
// refresh the pipeline browser icon.
......