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
83592bda
Commit
83592bda
authored
6 years ago
by
Carsten Gräser
Browse files
Options
Downloads
Patches
Plain Diff
Simplify loops using range based for
parent
1f6ace51
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!289
Simplify code using asMatrix()
,
!288
[WIP] Simplify code using asMatrix()
Pipeline
#17835
passed
6 years ago
Stage: test
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dune/istl/matrixutils.hh
+3
-5
3 additions, 5 deletions
dune/istl/matrixutils.hh
with
3 additions
and
5 deletions
dune/istl/matrixutils.hh
+
3
−
5
View file @
83592bda
...
...
@@ -122,11 +122,9 @@ namespace Dune
inline
auto
countNonZeros
(
const
M
&
matrix
,
typename
std
::
enable_if_t
<!
Dune
::
IsNumber
<
M
>::
value
>*
sfinae
=
nullptr
)
{
typename
M
::
size_type
nonZeros
=
0
;
for
(
auto
row
=
matrix
.
begin
();
row
!=
matrix
.
end
();
++
row
)
for
(
auto
entry
=
row
->
begin
();
entry
!=
row
->
end
();
++
entry
)
nonZeros
+=
countNonZeros
(
*
entry
);
for
(
auto
&&
row
:
matrix
)
for
(
auto
&&
entry
:
row
)
nonZeros
+=
countNonZeros
(
entry
);
return
nonZeros
;
}
...
...
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