Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-grid
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
Core Modules
dune-grid
Commits
e328ca21
Commit
e328ca21
authored
1 month ago
by
Simon Praetorius
Browse files
Options
Downloads
Patches
Plain Diff
dd an overload of printGrid that does not need an MPIHelper
parent
c938c245
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!768
Add an overload of printGrid that does not need an MPIHelper
Pipeline
#76961
canceled
1 month ago
Stage: .pre
Stage: test
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dune/grid/io/file/printgrid.hh
+22
-4
22 additions, 4 deletions
dune/grid/io/file/printgrid.hh
with
22 additions
and
4 deletions
dune/grid/io/file/printgrid.hh
+
22
−
4
View file @
e328ca21
...
...
@@ -59,7 +59,6 @@ namespace Dune {
/** \brief Print a grid as a gnuplot for testing and development
* \tparam GridType the type of grid to work with
* \param grid the grid to print
* \param helper an MPIHelper to create unique output file names in parallel case
* \param output_file the base of the output filename
* \param size size of the plot in pixels; increase if plot is too cramped
* \param execute_plot whether to execute gnuplot automatically
...
...
@@ -70,13 +69,11 @@ namespace Dune {
* Creates a gnuplot (one per process if parallel) showing the grid structure with indices, intersection types etc.
*/
template
<
typename
GridType
>
void
printGrid
(
const
GridType
&
grid
,
const
Dune
::
MPIHelper
&
helper
,
std
::
string
output_file
=
"printgrid"
,
void
printGrid
(
const
GridType
&
grid
,
std
::
string
output_file
,
int
size
=
2000
,
bool
execute_plot
=
true
,
bool
png
=
true
,
bool
local_corner_indices
=
true
,
bool
local_intersection_indices
=
true
,
bool
outer_normals
=
true
)
{
// Create output file
output_file
=
output_file
+
"_"
+
std
::
to_string
(
helper
.
rank
());
std
::
string
plot_file_name
=
output_file
+
".gnuplot"
;
std
::
ofstream
plotfile
(
plot_file_name
,
std
::
ios
::
out
|
std
::
ios
::
trunc
);
if
(
!
plotfile
.
is_open
())
{
...
...
@@ -201,6 +198,27 @@ namespace Dune {
}
}
/** \brief Print a grid as a gnuplot for testing and development
* \tparam GridType the type of grid to work with
* \param grid the grid to print
* \param helper an MPIHelper to create unique output file names in parallel case
* \param output_file the base of the output filename
* \param size size of the plot in pixels; increase if plot is too cramped
* \param execute_plot whether to execute gnuplot automatically
* \param png whether to use PNG or SVG as the output format
* \param local_corner_indices whether to show local corner indices
* \param local_intersection_indices whether to show local intersection indices
* \param outer_normals whether to show outer normals of intersections
* Creates a gnuplot (one per process if parallel) showing the grid structure with indices, intersection types etc.
*/
template
<
typename
GridType
>
void
printGrid
(
const
GridType
&
grid
,
const
Dune
::
MPIHelper
&
helper
,
std
::
string
output_file
=
"printgrid"
,
int
size
=
2000
,
bool
execute_plot
=
true
,
bool
png
=
true
,
bool
local_corner_indices
=
true
,
bool
local_intersection_indices
=
true
,
bool
outer_normals
=
true
)
{
printGrid
(
grid
,
output_file
+
"_"
+
std
::
to_string
(
helper
.
rank
()),
size
,
execute_plot
,
png
,
local_corner_indices
,
local_intersection_indices
,
outer_normals
);
}
}
#endif // #ifndef DUNE_PRINTGRID_HH
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