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
39d83533
Commit
39d83533
authored
7 years ago
by
Dr. Felix Tobias Schindler
Browse files
Options
Downloads
Patches
Plain Diff
[eigen-solver] allow to specify "matrix-inverter" options
parent
29b1e461
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dune/xt/la/eigen-solver.hh
+1
-1
1 addition, 1 deletion
dune/xt/la/eigen-solver.hh
dune/xt/la/eigen-solver/internal/base.hh
+14
-2
14 additions, 2 deletions
dune/xt/la/eigen-solver/internal/base.hh
with
15 additions
and
3 deletions
dune/xt/la/eigen-solver.hh
+
1
−
1
View file @
39d83533
...
@@ -29,7 +29,7 @@ namespace LA {
...
@@ -29,7 +29,7 @@ namespace LA {
/**
/**
* \brief A means to obtain available options at compile time.
* \brief A means to obtain available options at compile time.
* \note This class needs to bespecialized for each MatrixType, the purpose of this
class
is merely to document the
* \note This class needs to be
specialized for each MatrixType, the purpose of this
variant
is merely to document the
* expected functionality.
* expected functionality.
*/
*/
template
<
class
MatrixType
>
template
<
class
MatrixType
>
...
...
This diff is collapsed.
Click to expand it.
dune/xt/la/eigen-solver/internal/base.hh
+
14
−
2
View file @
39d83533
...
@@ -64,6 +64,10 @@ static Common::Configuration default_eigen_solver_options()
...
@@ -64,6 +64,10 @@ static Common::Configuration default_eigen_solver_options()
}
// ... default_eigen_solver_options(...)
}
// ... default_eigen_solver_options(...)
/**
* \sa default_eigen_solver_options()
* \note If the provided options contain a subtree "matrix-inverter" that one is forwarded on eigenvector inversion.
*/
template
<
class
MatrixImp
,
class
FieldImp
,
class
RealMatrixImp
,
class
ComplexMatrixImp
>
template
<
class
MatrixImp
,
class
FieldImp
,
class
RealMatrixImp
,
class
ComplexMatrixImp
>
class
EigenSolverBase
class
EigenSolverBase
{
{
...
@@ -511,7 +515,11 @@ protected:
...
@@ -511,7 +515,11 @@ protected:
{
{
assert
(
eigenvectors_
&&
"This must not happen when you call this function!"
);
assert
(
eigenvectors_
&&
"This must not happen when you call this function!"
);
try
{
try
{
eigenvectors_inverse_
=
std
::
make_unique
<
ComplexMatrixType
>
(
invert_matrix
(
*
eigenvectors_
));
if
(
options_
.
has_sub
(
"matrix-inverter"
))
{
eigenvectors_inverse_
=
std
::
make_unique
<
ComplexMatrixType
>
(
invert_matrix
(
*
eigenvectors_
,
options_
.
sub
(
"matrix-inverter"
)));
}
else
eigenvectors_inverse_
=
std
::
make_unique
<
ComplexMatrixType
>
(
invert_matrix
(
*
eigenvectors_
));
}
catch
(
const
Exceptions
::
matrix_invert_failed
&
ee
)
{
}
catch
(
const
Exceptions
::
matrix_invert_failed
&
ee
)
{
DUNE_THROW
(
Exceptions
::
eigen_solver_failed
,
DUNE_THROW
(
Exceptions
::
eigen_solver_failed
,
"The computed matrix of eigenvectors is not invertible!"
"The computed matrix of eigenvectors is not invertible!"
...
@@ -532,7 +540,11 @@ protected:
...
@@ -532,7 +540,11 @@ protected:
{
{
assert
(
real_eigenvectors_
&&
"This must not happen when you call this function!"
);
assert
(
real_eigenvectors_
&&
"This must not happen when you call this function!"
);
try
{
try
{
real_eigenvectors_inverse_
=
std
::
make_unique
<
MatrixType
>
(
invert_matrix
(
*
real_eigenvectors_
));
if
(
options_
.
has_sub
(
"matrix-inverter"
))
{
real_eigenvectors_inverse_
=
std
::
make_unique
<
MatrixType
>
(
invert_matrix
(
*
real_eigenvectors_
,
options_
.
sub
(
"matrix-inverter"
)));
}
else
real_eigenvectors_inverse_
=
std
::
make_unique
<
MatrixType
>
(
invert_matrix
(
*
real_eigenvectors_
));
}
catch
(
const
Exceptions
::
matrix_invert_failed
&
ee
)
{
}
catch
(
const
Exceptions
::
matrix_invert_failed
&
ee
)
{
DUNE_THROW
(
Exceptions
::
eigen_solver_failed
,
DUNE_THROW
(
Exceptions
::
eigen_solver_failed
,
"The computed matrix of eigenvectors is not invertible!"
"The computed matrix of eigenvectors is not invertible!"
...
...
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