Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
dumux
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
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
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
dumux-repositories
dumux
Commits
e6de7ff5
Commit
e6de7ff5
authored
5 years ago
by
Timo Koch
Browse files
Options
Downloads
Patches
Plain Diff
Add multidomain gmres solver backend
parent
e55b50fa
No related branches found
No related tags found
1 merge request
!2173
WIP: Coupling concepts 1d3d (old)
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dumux/linear/seqsolverbackend.hh
+40
-0
40 additions, 0 deletions
dumux/linear/seqsolverbackend.hh
with
40 additions
and
0 deletions
dumux/linear/seqsolverbackend.hh
+
40
−
0
View file @
e6de7ff5
...
...
@@ -944,6 +944,46 @@ private:
Dune
::
InverseOperatorResult
result_
;
};
/*!
* \ingroup Linear
* \brief A simple ilu0 block diagonal preconditioned RestartedGMResSolver
* \note expects a system as a multi-type block-matrix
* | A B |
* | C D |
*/
class
BlockDiagILU0RestartedGMResSolver
:
public
LinearSolver
{
public:
using
LinearSolver
::
LinearSolver
;
// Solve saddle-point problem using a Schur complement based preconditioner
template
<
int
precondBlockLevel
=
2
,
class
Matrix
,
class
Vector
>
bool
solve
(
const
Matrix
&
M
,
Vector
&
x
,
const
Vector
&
b
)
{
BlockDiagILU0Preconditioner
<
Matrix
,
Vector
,
Vector
>
preconditioner
(
M
);
Dune
::
MatrixAdapter
<
Matrix
,
Vector
,
Vector
>
op
(
M
);
static
const
int
restartGMRes
=
getParamFromGroup
<
double
>
(
this
->
paramGroup
(),
"LinearSolver.GMResRestart"
);
Dune
::
RestartedGMResSolver
<
Vector
>
solver
(
op
,
preconditioner
,
this
->
residReduction
(),
restartGMRes
,
this
->
maxIter
(),
this
->
verbosity
());
auto
bTmp
(
b
);
solver
.
apply
(
x
,
bTmp
,
result_
);
return
result_
.
converged
;
}
const
Dune
::
InverseOperatorResult
&
result
()
const
{
return
result_
;
}
std
::
string
name
()
const
{
return
"block-diagonal ILU0 preconditioned restarted GMRes solver"
;
}
private
:
Dune
::
InverseOperatorResult
result_
;
};
/*!
* \ingroup Linear
* \brief A simple ilu0 block diagonal preconditioner
...
...
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