Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Christian Butz
VTK
Commits
50b777ce
Commit
50b777ce
authored
Nov 13, 2017
by
Allison Vacanti
Browse files
Add a minimum ghost level option to D3.
parent
5b514bdd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Filters/Parallel/Testing/Cxx/DistributedData.cxx
View file @
50b777ce
...
...
@@ -200,6 +200,35 @@ void MyProcess::Execute()
prm
->
InitializeOffScreen
();
// Mesa GL only
// Test the minimum ghost cell settings:
bool
ghostCellSuccess
=
true
;
{
dd
->
UseMinimalMemoryOn
();
dd
->
SetBoundaryModeToAssignToOneRegion
();
dd
->
SetMinimumGhostLevel
(
0
);
dd
->
Update
();
int
ncells
=
static_cast
<
vtkUnstructuredGrid
*>
(
dd
->
GetOutput
())
->
GetNumberOfCells
();
if
(
me
==
0
&&
ncells
!=
79
)
{
std
::
cerr
<<
"Invalid number of cells for ghost level 0: "
<<
ncells
<<
"
\n
"
;
ghostCellSuccess
=
false
;
}
dd
->
SetMinimumGhostLevel
(
2
);
dd
->
Update
();
ncells
=
static_cast
<
vtkUnstructuredGrid
*>
(
dd
->
GetOutput
())
->
GetNumberOfCells
();
if
(
me
==
0
&&
ncells
!=
160
)
{
std
::
cerr
<<
"Invalid number of cells for ghost level 2: "
<<
ncells
<<
"
\n
"
;
ghostCellSuccess
=
false
;
}
dd
->
SetMinimumGhostLevel
(
0
);
dd
->
UseMinimalMemoryOff
();
dd
->
SetBoundaryModeToSplitBoundaryCells
();
// clipping
}
// We must update the whole pipeline here, otherwise node 0
// goes into GetActiveCamera which updates the pipeline, putting
// it into vtkDistributedDataFilter::Execute() which then hangs.
...
...
@@ -236,6 +265,11 @@ void MyProcess::Execute()
this
->
ReturnValue
=
vtkRegressionTester
::
Test
(
this
->
Argc
,
this
->
Argv
,
renWin
,
10
);
if
(
this
->
ReturnValue
==
vtkTesting
::
PASSED
&&
!
ghostCellSuccess
)
{
this
->
ReturnValue
=
vtkTesting
::
FAILED
;
}
if
(
ncells
!=
152
)
{
this
->
ReturnValue
=
vtkTesting
::
FAILED
;
...
...
Filters/ParallelMPI/vtkDistributedDataFilter.cxx
View file @
50b777ce
...
...
@@ -170,6 +170,7 @@ vtkDistributedDataFilter::vtkDistributedDataFilter()
this
->
NumConvexSubRegions
=
0
;
this
->
ConvexSubRegionBounds
=
nullptr
;
this
->
MinimumGhostLevel
=
0
;
this
->
GhostLevel
=
0
;
this
->
RetainKdtree
=
1
;
...
...
@@ -497,6 +498,7 @@ int vtkDistributedDataFilter::RequestData(
this
->
GhostLevel
=
outInfo
->
Get
(
vtkStreamingDemandDrivenPipeline
::
UPDATE_NUMBER_OF_GHOST_LEVELS
());
this
->
GhostLevel
=
std
::
max
(
this
->
GhostLevel
,
this
->
MinimumGhostLevel
);
// get the input and output
vtkDataSet
*
inputDS
=
vtkDataSet
::
GetData
(
inputVector
[
0
],
0
);
...
...
Filters/ParallelMPI/vtkDistributedDataFilter.h
View file @
50b777ce
...
...
@@ -220,6 +220,12 @@ public:
vtkGetMacro
(
UseMinimalMemory
,
int
);
vtkSetMacro
(
UseMinimalMemory
,
int
);
/**
* The minimum number of ghost levels to add to each processor's output. If
* the pipeline also requests ghost levels, the larger value will be used.
*/
vtkGetMacro
(
MinimumGhostLevel
,
int
)
vtkSetMacro
(
MinimumGhostLevel
,
int
)
/**
* Turn on collection of timing data
...
...
@@ -610,6 +616,10 @@ private:
int
NumConvexSubRegions
;
double
*
ConvexSubRegionBounds
;
// User-adjustable minimum number of ghost levels.
int
MinimumGhostLevel
;
// Actual number of ghost levels used during execution.
int
GhostLevel
;
int
RetainKdtree
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment