Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VTK
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Kevin Griffin
VTK
Commits
871a8c9f
Commit
871a8c9f
authored
1 month ago
by
Louis Gombert
Browse files
Options
Downloads
Patches
Plain Diff
HTG GCG: support PartitionedDataSet input
parent
1a685845
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Filters/Parallel/vtkHyperTreeGridGhostCellsGenerator.cxx
+37
-12
37 additions, 12 deletions
Filters/Parallel/vtkHyperTreeGridGhostCellsGenerator.cxx
Filters/Parallel/vtkHyperTreeGridGhostCellsGenerator.h
+2
-2
2 additions, 2 deletions
Filters/Parallel/vtkHyperTreeGridGhostCellsGenerator.h
with
39 additions
and
14 deletions
Filters/Parallel/vtkHyperTreeGridGhostCellsGenerator.cxx
+
37
−
12
View file @
871a8c9f
...
...
@@ -11,6 +11,7 @@
#include
"vtkInformationVector.h"
#include
"vtkMultiProcessController.h"
#include
"vtkObjectFactory.h"
#include
"vtkPartitionedDataSet.h"
#include
"vtkSetGet.h"
#include
"vtkStreamingDemandDrivenPipeline.h"
...
...
@@ -30,10 +31,10 @@ void vtkHyperTreeGridGhostCellsGenerator::PrintSelf(ostream& os, vtkIndent inden
}
//------------------------------------------------------------------------------
int
vtkHyperTreeGridGhostCellsGenerator
::
Fill
Out
putPortInformation
(
int
,
vtkInformation
*
info
)
int
vtkHyperTreeGridGhostCellsGenerator
::
Fill
In
putPortInformation
(
int
,
vtkInformation
*
info
)
{
info
->
Set
(
vtk
DataObject
::
DATA_TYPE
_NAME
(),
"vtkHyperTreeGrid"
);
info
->
Set
(
vtkDataObject
::
DATA_TYPE
_NAME
(),
"vtkPartitionedDataSet"
);
info
->
Set
(
vtk
Algorithm
::
INPUT_REQUIRED_
DATA_TYPE
(),
"vtkHyperTreeGrid"
);
info
->
Append
(
vtkAlgorithm
::
INPUT_REQUIRED_
DATA_TYPE
(),
"vtkPartitionedDataSet"
);
return
1
;
}
...
...
@@ -43,13 +44,37 @@ int vtkHyperTreeGridGhostCellsGenerator::RequestData(vtkInformation* vtkNotUsed(
{
this
->
UpdateProgress
(
0.
);
// Retrieve input and output
vtkHyperTreeGrid
*
input
=
vtkHyperTreeGrid
::
GetData
(
inputVector
[
0
],
0
);
if
(
!
input
)
vtkHyperTreeGrid
*
inputHTG
=
vtkHyperTreeGrid
::
GetData
(
inputVector
[
0
],
0
);
vtkPartitionedDataSet
*
inputPDS
=
vtkPartitionedDataSet
::
GetData
(
inputVector
[
0
],
0
);
if
(
!
inputPDS
&&
!
inputHTG
)
{
vtkErrorMacro
(
"No input available. Cannot proceed with hyper tree grid algorithm."
);
vtkErrorMacro
(
"Input data is neither HTG or PartitionedDataSet. Cannot proceed with ghost cell "
"generation."
);
return
0
;
}
vtkInformation
*
info
=
outputVector
->
GetInformationObject
(
0
);
int
myRank
=
info
->
Get
(
vtkDataObject
::
DATA_PIECE_NUMBER
());
vtkWarningMacro
(
"REQUEST DATA FOR PIECE"
<<
myRank
);
if
(
inputPDS
)
{
for
(
unsigned
int
partId
=
0
;
partId
<
inputPDS
->
GetNumberOfPartitions
();
partId
++
)
{
auto
partHTG
=
vtkHyperTreeGrid
::
SafeDownCast
(
inputPDS
->
GetPartitionAsDataObject
(
partId
));
if
(
partHTG
)
{
if
(
inputHTG
)
{
vtkWarningMacro
(
"Found more than one non-null HTG in the partitioned dataset for piece "
<<
myRank
);
}
inputHTG
=
partHTG
;
}
}
}
vtkDataObject
*
outputDO
=
vtkDataObject
::
GetData
(
outputVector
,
0
);
if
(
!
outputDO
)
{
...
...
@@ -57,9 +82,9 @@ int vtkHyperTreeGridGhostCellsGenerator::RequestData(vtkInformation* vtkNotUsed(
return
0
;
}
int
correctExtent
=
input
->
GetExtent
()[
0
]
<=
input
->
GetExtent
()[
1
]
&&
input
->
GetExtent
()[
2
]
<=
input
->
GetExtent
()[
3
]
&&
input
->
GetExtent
()[
4
]
<=
input
->
GetExtent
()[
5
];
int
correctExtent
=
input
HTG
->
GetExtent
()[
0
]
<=
input
HTG
->
GetExtent
()[
1
]
&&
input
HTG
->
GetExtent
()[
2
]
<=
input
HTG
->
GetExtent
()[
3
]
&&
input
HTG
->
GetExtent
()[
4
]
<=
input
HTG
->
GetExtent
()[
5
];
// Make sure every HTG piece has a correct extent and can be processed.
// This way, we make sure the `ProcessTrees` function will either be executed by all ranks
...
...
@@ -73,10 +98,10 @@ int vtkHyperTreeGridGhostCellsGenerator::RequestData(vtkInformation* vtkNotUsed(
vtkWarningMacro
(
"Every individual distributed process does not have a valid HTG extent. No "
"ghost cells will be generated."
);
vtkHyperTreeGrid
*
output
=
vtkHyperTreeGrid
::
SafeDownCast
(
outputDO
);
output
->
ShallowCopy
(
input
);
output
->
ShallowCopy
(
input
HTG
);
return
1
;
}
else
if
(
!
this
->
ProcessTrees
(
input
,
outputDO
))
else
if
(
!
this
->
ProcessTrees
(
input
HTG
,
outputDO
))
{
return
0
;
}
...
...
This diff is collapsed.
Click to expand it.
Filters/Parallel/vtkHyperTreeGridGhostCellsGenerator.h
+
2
−
2
View file @
871a8c9f
...
...
@@ -49,9 +49,9 @@ protected:
struct
vtkInternals
;
/**
*
For this algorithm the output is a vtkHyperTreeGrid instance
*
Input must be either HTG or vtkPartitionnedDataSet composed of HTG partitions.
*/
int
Fill
Out
putPortInformation
(
int
,
vtkInformation
*
)
override
;
int
Fill
In
putPortInformation
(
int
,
vtkInformation
*
)
override
;
/**
* Override RequestData, to make sure every HTG piece can be processed, hence avoiding that one
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment