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
b7a881cb
Commit
b7a881cb
authored
2 years ago
by
Robert K
Browse files
Options
Downloads
Plain Diff
Merge branch 'cherry-pick-
9a72de2d
' into 'releases/2.9'
Merge branch 'fix-lsq-bug' into 'master' See merge request
!495
parents
6f07b5a3
d8705234
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!495
Merge branch 'fix-lsq-bug' into 'master'
Pipeline
#54253
passed
2 years ago
Stage: .pre
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.md
+3
-0
3 additions, 0 deletions
CHANGELOG.md
dune/istl/spqr.hh
+10
-5
10 additions, 5 deletions
dune/istl/spqr.hh
with
13 additions
and
5 deletions
CHANGELOG.md
+
3
−
0
View file @
b7a881cb
...
...
@@ -35,6 +35,9 @@ SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
-
You can now use
`std::tuple_element`
to get the types of
`MultiTypeBlockVector`
entries
and
`MultiTypeBlockMatrix`
rows.
-
The SPQR solver can now work with non-square matrices (a bug which caused a segfault when previously
attempting to do it was found and resolved).
## Deprecations and removals
-
The deprecated ILU functions
`bilu_backsolve`
,
`bilu0_decomposition`
,
`bilu_backsolve`
,
...
...
This diff is collapsed.
Click to expand it.
dune/istl/spqr.hh
+
10
−
5
View file @
b7a881cb
...
...
@@ -286,20 +286,25 @@ namespace Dune {
/** @brief Computes the QR decomposition. */
void
decompose
()
{
const
std
::
size_t
dimMat
(
spqrMatrix_
.
N
());
const
std
::
size_t
nnz
(
spqrMatrix_
.
getColStart
()[
dimMat
]);
const
std
::
size_t
nrows
(
spqrMatrix_
.
N
());
const
std
::
size_t
ncols
(
spqrMatrix_
.
M
());
const
std
::
size_t
nnz
(
spqrMatrix_
.
getColStart
()[
ncols
]);
// initialise the matrix A (sorted, packed, unsymmetric, real entries)
A_
=
cholmod_l_allocate_sparse
(
dimMat
,
dimMat
,
nnz
,
1
,
1
,
0
,
1
,
cc_
);
A_
=
cholmod_l_allocate_sparse
(
nrows
,
ncols
,
nnz
,
1
,
1
,
0
,
1
,
cc_
);
// copy all the entries of Ap, Ai, Ax
for
(
std
::
size_t
k
=
0
;
k
!=
(
dimMat
+
1
);
++
k
)
for
(
std
::
size_t
k
=
0
;
k
!=
(
ncols
+
1
);
++
k
)
(
static_cast
<
long
int
*>
(
A_
->
p
))[
k
]
=
spqrMatrix_
.
getColStart
()[
k
];
for
(
std
::
size_t
k
=
0
;
k
!=
nnz
;
++
k
)
{
(
static_cast
<
long
int
*>
(
A_
->
i
))[
k
]
=
spqrMatrix_
.
getRowIndex
()[
k
];
(
static_cast
<
T
*>
(
A_
->
x
))[
k
]
=
spqrMatrix_
.
getValues
()[
k
];
}
// initialise the vector B
B_
=
cholmod_l_allocate_dense
(
dimMat
,
1
,
dimMat
,
A_
->
xtype
,
cc_
);
B_
=
cholmod_l_allocate_dense
(
nrows
,
1
,
nrows
,
A_
->
xtype
,
cc_
);
// compute factorization of A
spqrfactorization_
=
SuiteSparseQR_factorize
<
T
>
(
SPQR_ORDERING_DEFAULT
,
SPQR_DEFAULT_TOL
,
A_
,
cc_
);
}
...
...
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