Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-istl
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-istl
Commits
e67cf7ab
Commit
e67cf7ab
authored
3 years ago
by
Santiago Ospina De Los Ríos
Browse files
Options
Downloads
Patches
Plain Diff
Simplify recursion flag
parent
8b60e992
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!444
Add SVG writer for matrices
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dune/istl/io.hh
+2
-8
2 additions, 8 deletions
dune/istl/io.hh
with
2 additions
and
8 deletions
dune/istl/io.hh
+
2
−
8
View file @
e67cf7ab
...
...
@@ -551,13 +551,6 @@ namespace Dune {
const
std
::
size_t
rows
=
mat
.
N
();
const
std
::
size_t
cols
=
mat
.
M
();
// do we need to write nested matrix blocks?
using
T
=
typename
Mat
::
block_type
;
using
FieldType
=
typename
FieldTraits
<
T
>::
field_type
;
using
UnitMat
=
FieldMatrix
<
FieldType
,
1
,
1
>
;
const
bool
is_unit_mat
=
std
::
is_same_v
<
T
,
UnitMat
>
;
const
bool
end_recursion
=
is_unit_mat
or
(
Dune
::
blockLevel
<
T
>
()
<
1
);
// counter of offsets for every block
std
::
size_t
row_offset
=
interspace
;
std
::
size_t
col_offset
=
interspace
;
...
...
@@ -578,7 +571,8 @@ namespace Dune {
row_prefix
.
push_back
(
0
);
col_prefix
.
push_back
(
0
);
if
constexpr
(
end_recursion
)
{
// do we need to write nested matrix blocks?
if
constexpr
(
Dune
::
blockLevel
<
typename
Mat
::
block_type
>
()
==
0
)
{
// simple case: write svg block content to stream for each value
for_each_entry
([
&
](
const
auto
&
row
,
const
auto
&
col
,
const
auto
&
val
)
{
std
::
size_t
x_off
=
interspace
+
col
*
(
interspace
+
block_size
);
...
...
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