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
9cb74375
Commit
9cb74375
authored
1 year ago
by
Christoph Grüninger
Browse files
Options
Downloads
Plain Diff
Merge branch 'cherry-pick-
2f45f8d0
-2' into 'releases/2.9'
Merge branch 'bugfix/suitesparse' into 'master' See merge request
!537
parents
3228b1ce
eb1822be
No related branches found
No related tags found
1 merge request
!537
Merge branch 'bugfix/suitesparse' into 'master'
Pipeline
#63867
passed
1 year ago
Stage: .pre
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dune/istl/umfpack.hh
+13
-9
13 additions, 9 deletions
dune/istl/umfpack.hh
with
13 additions
and
9 deletions
dune/istl/umfpack.hh
+
13
−
9
View file @
9cb74375
...
...
@@ -111,6 +111,7 @@ namespace Dune {
struct
UMFPackMethodChooser
<
std
::
complex
<
double
>
>
{
static
constexpr
bool
valid
=
true
;
using
size_type
=
SuiteSparse_long
;
template
<
typename
...
A
>
static
void
defaults
(
A
...
args
)
...
...
@@ -133,7 +134,7 @@ namespace Dune {
return
umfpack_zl_load_numeric
(
args
...);
}
template
<
typename
...
A
>
static
void
numeric
(
const
long
int
*
cs
,
const
long
int
*
ri
,
const
double
*
val
,
A
...
args
)
static
void
numeric
(
const
size_type
*
cs
,
const
size_type
*
ri
,
const
double
*
val
,
A
...
args
)
{
umfpack_zl_numeric
(
cs
,
ri
,
val
,
NULL
,
args
...);
}
...
...
@@ -153,13 +154,13 @@ namespace Dune {
return
umfpack_zl_save_numeric
(
args
...);
}
template
<
typename
...
A
>
static
void
solve
(
long
int
m
,
const
long
int
*
cs
,
const
long
int
*
ri
,
std
::
complex
<
double
>*
val
,
double
*
x
,
const
double
*
b
,
A
...
args
)
static
void
solve
(
size_type
m
,
const
size_type
*
cs
,
const
size_type
*
ri
,
std
::
complex
<
double
>*
val
,
double
*
x
,
const
double
*
b
,
A
...
args
)
{
const
double
*
cval
=
reinterpret_cast
<
const
double
*>
(
val
);
umfpack_zl_solve
(
m
,
cs
,
ri
,
cval
,
NULL
,
x
,
NULL
,
b
,
NULL
,
args
...);
}
template
<
typename
...
A
>
static
void
symbolic
(
long
int
m
,
long
int
n
,
const
long
int
*
cs
,
const
long
int
*
ri
,
const
double
*
val
,
A
...
args
)
static
void
symbolic
(
size_type
m
,
size_type
n
,
const
size_type
*
cs
,
const
size_type
*
ri
,
const
double
*
val
,
A
...
args
)
{
umfpack_zl_symbolic
(
m
,
n
,
cs
,
ri
,
val
,
NULL
,
args
...);
}
...
...
@@ -215,14 +216,17 @@ namespace Dune {
{
using
T
=
typename
M
::
field_type
;
public:
using
size_type
=
SuiteSparse_long
;
/** @brief The matrix type. */
using
Matrix
=
M
;
using
matrix_type
=
M
;
/** @brief The corresponding UMFPack matrix type.*/
typedef
ISTL
::
Impl
::
BCCSMatrix
<
typename
Matrix
::
field_type
,
long
int
>
UMFPackMatrix
;
using
UMFPackMatrix
=
ISTL
::
Impl
::
BCCSMatrix
<
typename
Matrix
::
field_type
,
size_type
>
;
/** @brief Type of an associated initializer class. */
typedef
ISTL
::
Impl
::
BCCSMatrixInitializer
<
M
,
long
int
>
MatrixInitializer
;
using
MatrixInitializer
=
ISTL
::
Impl
::
BCCSMatrixInitializer
<
M
,
size_type
>
;
/** @brief The type of the domain of the solver. */
using
domain_type
=
typename
Impl
::
UMFPackVectorChooser
<
M
>::
domain_type
;
/** @brief The type of the range of the solver. */
...
...
@@ -452,7 +456,7 @@ namespace Dune {
umfpackMatrix_
.
free
();
umfpackMatrix_
.
setSize
(
MatrixDimension
<
Matrix
>::
rowdim
(
matrix
),
MatrixDimension
<
Matrix
>::
coldim
(
matrix
));
ISTL
::
Impl
::
BCCSMatrixInitializer
<
Matrix
,
long
int
>
initializer
(
umfpackMatrix_
);
ISTL
::
Impl
::
BCCSMatrixInitializer
<
Matrix
,
size_type
>
initializer
(
umfpackMatrix_
);
copyToBCCSMatrix
(
initializer
,
matrix
);
...
...
@@ -470,7 +474,7 @@ namespace Dune {
umfpackMatrix_
.
setSize
(
rowIndexSet
.
size
()
*
MatrixDimension
<
Matrix
>::
rowdim
(
_mat
)
/
_mat
.
N
(),
rowIndexSet
.
size
()
*
MatrixDimension
<
Matrix
>::
coldim
(
_mat
)
/
_mat
.
M
());
ISTL
::
Impl
::
BCCSMatrixInitializer
<
Matrix
,
long
int
>
initializer
(
umfpackMatrix_
);
ISTL
::
Impl
::
BCCSMatrixInitializer
<
Matrix
,
SuiteSparse_
long
>
initializer
(
umfpackMatrix_
);
copyToBCCSMatrix
(
initializer
,
ISTL
::
Impl
::
MatrixRowSubset
<
Matrix
,
std
::
set
<
std
::
size_t
>
>
(
_mat
,
rowIndexSet
));
...
...
@@ -542,8 +546,8 @@ namespace Dune {
void
decompose
()
{
double
UMF_Decomposition_Info
[
UMFPACK_INFO
];
Caller
::
symbolic
(
static_cast
<
int
>
(
umfpackMatrix_
.
N
()),
static_cast
<
int
>
(
umfpackMatrix_
.
N
()),
Caller
::
symbolic
(
static_cast
<
SuiteSparse_long
>
(
umfpackMatrix_
.
N
()),
static_cast
<
SuiteSparse_long
>
(
umfpackMatrix_
.
N
()),
umfpackMatrix_
.
getColStart
(),
umfpackMatrix_
.
getRowIndex
(),
reinterpret_cast
<
double
*>
(
umfpackMatrix_
.
getValues
()),
...
...
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