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
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
Patrick Jaap
dune-istl
Commits
5cfa8569
Commit
5cfa8569
authored
2 years ago
by
Simon Praetorius
Committed by
Oliver Sander
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Use the correct type for number of rows/columns/nonzeros
parent
81455070
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dune/istl/cholmod.hh
+7
-7
7 additions, 7 deletions
dune/istl/cholmod.hh
with
7 additions
and
7 deletions
dune/istl/cholmod.hh
+
7
−
7
View file @
5cfa8569
...
...
@@ -341,8 +341,8 @@ public:
void
setMatrix
(
const
Matrix
&
matrix
,
const
Ignore
*
ignore
)
{
// count the number of entries and diagonal entries
in
t
nonZeros
=
0
;
in
t
numberOfIgnoredDofs
=
0
;
size_
t
nonZeros
=
0
;
size_
t
numberOfIgnoredDofs
=
0
;
auto
[
flatRows
,
flatCols
]
=
flatMatrixForEach
(
matrix
,
[
&
](
auto
&&
/*entry*/
,
auto
&&
flatRowIndex
,
auto
&&
flatColIndex
){
...
...
@@ -358,16 +358,16 @@ public:
numberOfIgnoredDofs
=
std
::
count
(
flatIgnore
.
begin
(),
flatIgnore
.
end
(),
true
);
}
// Total number of rows
int
N
=
flatRows
-
numberOfIgnoredDofs
;
nIsZero_
=
(
N
<=
0
);
nIsZero_
=
(
size_t
(
flatRows
)
<=
numberOfIgnoredDofs
);
if
(
nIsZero_
)
{
return
;
}
// Total number of rows
size_t
N
=
flatRows
-
numberOfIgnoredDofs
;
/*
* CHOLMOD uses compressed-column sparse matrices, but for symmetric
* matrices this is the same as the compressed-row sparse matrix used
...
...
@@ -429,7 +429,7 @@ public:
// now accumulate
Ap
[
0
]
=
0
;
for
(
in
t
i
=
0
;
i
<
N
;
i
++
)
for
(
size_
t
i
=
0
;
i
<
N
;
i
++
)
{
Ap
[
i
+
1
]
+=
Ap
[
i
];
}
...
...
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