Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pugs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
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
code
pugs
Commits
7eeb2104
Commit
7eeb2104
authored
1 year ago
by
Stéphane Del Pino
Browse files
Options
Downloads
Patches
Plain Diff
Fills the vtkGhostType field to fix parallel rendering
parent
7aab4b0a
No related branches found
No related tags found
1 merge request
!186
Fills the vtkGhostType field to fix parallel rendering
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/output/VTKWriter.cpp
+13
-1
13 additions, 1 deletion
src/output/VTKWriter.cpp
with
13 additions
and
1 deletion
src/output/VTKWriter.cpp
+
13
−
1
View file @
7eeb2104
...
@@ -431,6 +431,9 @@ VTKWriter::_write(const MeshType& mesh,
...
@@ -431,6 +431,9 @@ VTKWriter::_write(const MeshType& mesh,
std
::
visit
([
&
,
name
=
name
](
auto
&&
item_value
)
{
return
this
->
_write_cell_pvtu
(
fout
,
name
,
item_value
);
},
std
::
visit
([
&
,
name
=
name
](
auto
&&
item_value
)
{
return
this
->
_write_cell_pvtu
(
fout
,
name
,
item_value
);
},
item_value_variant
);
item_value_variant
);
}
}
if
(
parallel
::
size
()
>
1
)
{
fout
<<
"<PDataArray type=
\"
UInt8
\"
Name=
\"
vtkGhostType
\"
NumberOfComponents=
\"
1
\"
/>
\n
"
;
}
fout
<<
"</PCellData>
\n
"
;
fout
<<
"</PCellData>
\n
"
;
for
(
size_t
i_rank
=
0
;
i_rank
<
parallel
::
size
();
++
i_rank
)
{
for
(
size_t
i_rank
=
0
;
i_rank
<
parallel
::
size
();
++
i_rank
)
{
...
@@ -470,6 +473,15 @@ VTKWriter::_write(const MeshType& mesh,
...
@@ -470,6 +473,15 @@ VTKWriter::_write(const MeshType& mesh,
auto
&&
item_value
)
{
return
this
->
_write_cell_data
(
fout
,
name
,
item_value
,
serialize_data_list
);
},
auto
&&
item_value
)
{
return
this
->
_write_cell_data
(
fout
,
name
,
item_value
,
serialize_data_list
);
},
item_value_variant
);
item_value_variant
);
}
}
if
(
parallel
::
size
()
>
1
)
{
CellValue
<
uint8_t
>
vtk_ghost_type
{
mesh
.
connectivity
()};
auto
cell_is_owned
=
mesh
.
connectivity
().
cellIsOwned
();
parallel_for
(
mesh
.
numberOfCells
(),
PUGS_LAMBDA
(
const
CellId
cell_id
)
{
vtk_ghost_type
[
cell_id
]
=
cell_is_owned
[
cell_id
]
?
0
:
1
;
});
_write_array
(
fout
,
"vtkGhostType"
,
vtk_ghost_type
.
arrayView
(),
serialize_data_list
);
}
fout
<<
"</CellData>
\n
"
;
fout
<<
"</CellData>
\n
"
;
fout
<<
"<PointData>
\n
"
;
fout
<<
"<PointData>
\n
"
;
for
(
const
auto
&
[
name
,
item_value_variant
]
:
output_named_item_data_set
)
{
for
(
const
auto
&
[
name
,
item_value_variant
]
:
output_named_item_data_set
)
{
...
@@ -659,7 +671,7 @@ VTKWriter::_write(const MeshType& mesh,
...
@@ -659,7 +671,7 @@ VTKWriter::_write(const MeshType& mesh,
fout
<<
"<?xml version=
\"
1.0
\"
?>
\n
"
;
fout
<<
"<?xml version=
\"
1.0
\"
?>
\n
"
;
fout
<<
_getDateAndVersionComment
();
fout
<<
_getDateAndVersionComment
();
fout
<<
"<VTKFile type=
\"
Collection
\"
version=
\"
0.1
\"
>
\n
"
;
fout
<<
"<VTKFile type=
\"
Collection
\"
version=
\"
2.0
\"
>
\n
"
;
fout
<<
"<Collection>
\n
"
;
fout
<<
"<Collection>
\n
"
;
if
(
time
.
has_value
())
{
if
(
time
.
has_value
())
{
...
...
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