Commit 1b2d4baa authored by Utkarsh Ayachit's avatar Utkarsh Ayachit

support restarts when extracting temporal global data.

fixes #17851.
parent 20a60471
60ca1d01b9f29afe95fd7406fcc241cd685bad547e93a5c67d2b8b2c929a3d29bf06b832872a1ecde4f0b263ca48c390898c9185dfd778984eae3c9a4e0c159f
...@@ -11,6 +11,7 @@ ExternalData_Expand_Arguments(ParaViewData _ ...@@ -11,6 +11,7 @@ ExternalData_Expand_Arguments(ParaViewData _
"DATA{${paraview_test_data_directory_input}/Data/AMReX-MFIX/plt00005/Level_0/,REGEX:.*}" "DATA{${paraview_test_data_directory_input}/Data/AMReX-MFIX/plt00005/Level_0/,REGEX:.*}"
"DATA{${paraview_test_data_directory_input}/Data/AMReX-MFIX/plt00005/particles/,REGEX:.*}" "DATA{${paraview_test_data_directory_input}/Data/AMReX-MFIX/plt00005/particles/,REGEX:.*}"
"DATA{${paraview_test_data_directory_input}/Data/AMReX-MFIX/plt00005/particles/Level_0/,REGEX:.*}" "DATA{${paraview_test_data_directory_input}/Data/AMReX-MFIX/plt00005/particles/Level_0/,REGEX:.*}"
"DATA{${paraview_test_data_directory_input}/Data/can-restarts/,REGEX:.*}"
"DATA{${paraview_test_data_directory_input}/Data/CompositeGlyphInput.vtp}" "DATA{${paraview_test_data_directory_input}/Data/CompositeGlyphInput.vtp}"
"DATA{${paraview_test_data_directory_input}/Data/CompositeGlyphTree.vtm}" "DATA{${paraview_test_data_directory_input}/Data/CompositeGlyphTree.vtm}"
"DATA{${paraview_test_data_directory_input}/Data/CompositeGlyphTree/,REGEX:.*}" "DATA{${paraview_test_data_directory_input}/Data/CompositeGlyphTree/,REGEX:.*}"
...@@ -683,6 +684,7 @@ list(APPEND TESTS_WITH_BASELINES ...@@ -683,6 +684,7 @@ list(APPEND TESTS_WITH_BASELINES
EnSightTensorInversion.xml EnSightTensorInversion.xml
EnSightTensorInversionBin.xml EnSightTensorInversionBin.xml
ExodusXML.xml ExodusXML.xml
ExodusGlobalDataWithRestarts.xml
ExportLinePlotToCSV.xml ExportLinePlotToCSV.xml
ExportLinePlotToTSV.xml ExportLinePlotToTSV.xml
ExportSceneSpreadSheetView2.xml ExportSceneSpreadSheetView2.xml
......
<?xml version="1.0" ?>
<pqevents>
<pqevent object="pqClientMainWindow/MainControlsToolbar/actionOpenData" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/FileOpenDialog" command="filesSelected" arguments="$PARAVIEW_DATA_ROOT/Testing/Data/can-restarts/canRS.e" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/ArrayStatus/SelectionWidget/1QHeaderView0" command="mousePress" arguments="1,1,0,0,0,0" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/scrollArea/qt_scrollarea_viewport/scrollAreaWidgetContents/PropertiesFrame/ProxyPanel/ArrayStatus/SelectionWidget/1QHeaderView0" command="mouseRelease" arguments="1,0,0,0,0,0" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/Accept" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/centralwidget/MultiViewWidget/CoreWidget/qt_tabwidget_stackedwidget/MultiViewWidget1/Container/Frame.0/Close" command="activate" arguments="" />
<pqevent object="pqClientMainWindow/menubar" command="activate" arguments="menuFilters" />
<pqevent object="pqClientMainWindow/menubar/menuFilters/DataAnalysis" command="activate" arguments="ExtractFieldDataOverTime" />
<pqevent object="pqClientMainWindow/propertiesDock/propertiesPanel/Accept" command="activate" arguments="" />
</pqevents>
...@@ -834,7 +834,7 @@ ...@@ -834,7 +834,7 @@
<!-- End of ExtractSelectionOverTime --> <!-- End of ExtractSelectionOverTime -->
</SourceProxy> </SourceProxy>
<!-- ==================================================================== --> <!-- ==================================================================== -->
<SourceProxy class="vtkPExtractTemporalFieldData" <SourceProxy class="vtkPExtractExodusGlobalTemporalVariables"
label="Plot Global Variables Over Time" label="Plot Global Variables Over Time"
name="ExtractFieldDataOverTime"> name="ExtractFieldDataOverTime">
<Documentation long_help="Extracts and plots data in field data over time." <Documentation long_help="Extracts and plots data in field data over time."
...@@ -855,18 +855,6 @@ ...@@ -855,18 +855,6 @@
<Documentation>The input from which the selection is <Documentation>The input from which the selection is
extracted.</Documentation> extracted.</Documentation>
</InputProperty> </InputProperty>
<IntVectorProperty name="HandleBlocksIndividually"
command="SetHandleCompositeDataBlocksIndividually"
number_of_elements="1"
default_values="0"
panel_visibility="never">
<BooleanDomain name="bool" />
<Documentation>
When checked, if the input is a composite-dataset, then
each block in the input dataset is processed. If unchecked,
then the first non-empty FieldData is considered.
</Documentation>
</IntVectorProperty>
<Hints> <Hints>
<!-- View can be used to specify the preferred view for the proxy --> <!-- View can be used to specify the preferred view for the proxy -->
<View type="XYChartView" /> <View type="XYChartView" />
......
...@@ -76,7 +76,6 @@ set(classes ...@@ -76,7 +76,6 @@ set(classes
vtkPEnSightGoldReader vtkPEnSightGoldReader
vtkPEnSightReader vtkPEnSightReader
vtkPEquivalenceSet vtkPEquivalenceSet
vtkPExtractTemporalFieldData
vtkPGenericEnSightReader vtkPGenericEnSightReader
vtkPPhastaReader vtkPPhastaReader
vtkPSciVizContingencyStats vtkPSciVizContingencyStats
......
/*=========================================================================
Program: ParaView
Module: vtkPExtractTemporalFieldData.cxx
Copyright (c) Kitware, Inc.
All rights reserved.
See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#include "vtkPExtractTemporalFieldData.h"
#include "vtkCompositeDataSet.h"
#include "vtkMultiProcessController.h"
#include "vtkObjectFactory.h"
vtkStandardNewMacro(vtkPExtractTemporalFieldData);
vtkCxxSetObjectMacro(vtkPExtractTemporalFieldData, Controller, vtkMultiProcessController);
//----------------------------------------------------------------------------
vtkPExtractTemporalFieldData::vtkPExtractTemporalFieldData()
: Controller(NULL)
{
this->SetController(vtkMultiProcessController::GetGlobalController());
}
//----------------------------------------------------------------------------
vtkPExtractTemporalFieldData::~vtkPExtractTemporalFieldData()
{
this->SetController(NULL);
}
//----------------------------------------------------------------------------
int vtkPExtractTemporalFieldData::RequestData(
vtkInformation* request, vtkInformationVector** inputVector, vtkInformationVector* outputVector)
{
if (this->Controller == NULL || this->Controller->GetLocalProcessId() == 0)
{
return this->Superclass::RequestData(request, inputVector, outputVector);
}
// On all other ranks, we do nothing, except it both input & output are
// composite datasets. In that case, we copy structure to avoid composite data
// structure mismatch between ranks.
vtkCompositeDataSet* input = vtkCompositeDataSet::GetData(inputVector[0], 0);
vtkCompositeDataSet* output = vtkCompositeDataSet::GetData(outputVector, 0);
if (input && output)
{
output->CopyStructure(input);
}
return 1;
}
//----------------------------------------------------------------------------
void vtkPExtractTemporalFieldData::PrintSelf(ostream& os, vtkIndent indent)
{
this->Superclass::PrintSelf(os, indent);
os << indent << "Controller: " << this->Controller << endl;
}
/*=========================================================================
Program: ParaView
Module: vtkPExtractTemporalFieldData.h
Copyright (c) Kitware, Inc.
All rights reserved.
See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
/**
* @class vtkPExtractTemporalFieldData
* @brief parallel version of
* vtkExtractTemporalFieldData.
*
* vtkPExtractTemporalFieldData adds logic to reduce the output from
* vtkExtractTemporalFieldData so it can plotted correctly in ParaView.
* We simply pass data on the root node since that is sufficient for the
* use-cases we have encountered. If needed, we can reduce to root node to only
* get the one of the non-empty leaf nodes for all ranks.
*/
#ifndef vtkPExtractTemporalFieldData_h
#define vtkPExtractTemporalFieldData_h
#include "vtkExtractTemporalFieldData.h"
#include "vtkPVVTKExtensionsDefaultModule.h" //needed for exports
class vtkMultiProcessController;
class VTKPVVTKEXTENSIONSDEFAULT_EXPORT vtkPExtractTemporalFieldData
: public vtkExtractTemporalFieldData
{
public:
static vtkPExtractTemporalFieldData* New();
vtkTypeMacro(vtkPExtractTemporalFieldData, vtkExtractTemporalFieldData);
void PrintSelf(ostream& os, vtkIndent indent) override;
//@{
/**
* Get/Set the multiprocess controller. If no controller is set,
* single process is assumed. By default set to
* vtkMultiProcessController::GlobalController in the constructor.
*/
virtual void SetController(vtkMultiProcessController*);
vtkGetObjectMacro(Controller, vtkMultiProcessController);
//@}
protected:
vtkPExtractTemporalFieldData();
~vtkPExtractTemporalFieldData() override;
int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
vtkInformationVector* outputVector) override;
vtkMultiProcessController* Controller;
private:
vtkPExtractTemporalFieldData(const vtkPExtractTemporalFieldData&) = delete;
void operator=(const vtkPExtractTemporalFieldData&) = delete;
};
#endif
ace6bf38c1213f631b206651c2270e56b81e2192843e0cf8ff86c875f2e5648ba4c1025f0d2c8b747013b11109233172e39c63dfb888ce656a0d3e7625cc1559
0e27aa2011fd512fcf146f9ac44178520b0e4454263fe650e5955acdf797bf8ef5eb9e3dfe751e2e8390b366db032ea401eb33c828f3c398f89b5ff708f23ff4
06382d101e636d52547cbca3f8ce65ba69a20678dc7d725dea4688704d5233f0b09182387b4f45df090b04cf0fdf7281c3714021d5b719c8d6418cbcdf6396d1
0e36a3612cf205461caad58775795482502adab88c34d6bfe81fbd28268bf0ae8d9031e063b67ec03c4763809cfa9f81b01ad99516aac6d4d295d0a31342db47
Subproject commit e7df0aa7334a9ed1c35ae06011bb5d518e29a253 Subproject commit 35985ff5eb1409bdaa7bf4187e3417134d7607fb
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment