Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-xt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
ag-ohlberger
dune-community
dune-xt
Commits
95c06094
Commit
95c06094
authored
7 years ago
by
Dr. Felix Tobias Schindler
Browse files
Options
Downloads
Patches
Plain Diff
[algorithms...] use Lapacke:: wrapper from dune-xt-common
parent
1aac5a6d
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/xt/la/algorithms/solve_sym_tridiag_posdef.cc
+4
-19
4 additions, 19 deletions
dune/xt/la/algorithms/solve_sym_tridiag_posdef.cc
with
4 additions
and
19 deletions
dune/xt/la/algorithms/solve_sym_tridiag_posdef.cc
+
4
−
19
View file @
95c06094
...
...
@@ -46,12 +46,10 @@ void prepare_sym_tridiag_posdef(
}
// void prepare_sym_triadiag_posdef(...)
#if HAVE_LAPACKE
double
solve_sym_tridiag_posdef
(
size_t
dimRange
,
double
*
diagonal_elements
,
double
*
sub_diagonal_elements
,
double
anorm
,
double
*
b
)
{
auto
info
=
LAPACKE_
dpttrf
(
dimRange
,
diagonal_elements
,
sub_diagonal_elements
);
auto
info
=
Common
::
Lapacke
::
dpttrf
(
dimRange
,
diagonal_elements
,
sub_diagonal_elements
);
if
(
info
)
{
std
::
cout
<<
"factorization failed"
<<
std
::
endl
;
DUNE_THROW
(
Dune
::
MathError
,
"factorization failed"
);
...
...
@@ -59,7 +57,7 @@ double solve_sym_tridiag_posdef(
// estimate condition of H_k
double
inverse_condition
;
info
=
LAPACKE_
dptcon
(
dimRange
,
diagonal_elements
,
sub_diagonal_elements
,
anorm
,
&
inverse_condition
);
info
=
Common
::
Lapacke
::
dptcon
(
dimRange
,
diagonal_elements
,
sub_diagonal_elements
,
anorm
,
&
inverse_condition
);
if
(
info
)
DUNE_THROW
(
Dune
::
MathError
,
"condition estimation failed"
);
if
(
inverse_condition
<
1e-20
)
{
...
...
@@ -68,7 +66,8 @@ double solve_sym_tridiag_posdef(
}
// solve system
info
=
LAPACKE_dpttrs
(
LAPACK_ROW_MAJOR
,
dimRange
,
1
,
diagonal_elements
,
sub_diagonal_elements
,
b
,
1
);
info
=
Common
::
Lapacke
::
dpttrs
(
Common
::
Lapacke
::
row_major
(),
dimRange
,
1
,
diagonal_elements
,
sub_diagonal_elements
,
b
,
1
);
if
(
info
)
{
std
::
cout
<<
"solving system failed"
<<
std
::
endl
;
DUNE_THROW
(
Dune
::
MathError
,
"solving system failed"
);
...
...
@@ -76,20 +75,6 @@ double solve_sym_tridiag_posdef(
return
inverse_condition
;
}
#else // HAVE_LAPACKE
double
solve_sym_tridiag_posdef
(
size_t
/*dimRange*/
,
double
*
/*diagonal_elements*/
,
double
*
/*sub_diagonal_elements*/
,
double
/*anorm*/
,
double
*
/*d_k*/
)
{
DUNE_THROW
(
Dune
::
NotImplemented
,
"This function requires LAPACKE which has not been found on your system."
);
return
1.
;
}
#endif // HAVE_LAPACKE
}
// namespace LA
}
// namespace GDT
...
...
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