Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
dumux-repositories
dumux
Commits
5692afc9
Commit
5692afc9
authored
Feb 27, 2020
by
Timo Koch
Browse files
[amg] Make it possible to reset first call
parent
477abe60
Changes
1
Hide whitespace changes
Inline
Side-by-side
dumux/linear/amgbackend.hh
View file @
5692afc9
...
...
@@ -64,10 +64,11 @@ public:
AMGBiCGSTABBackend
(
const
std
::
string
&
paramGroup
=
""
)
:
LinearSolver
(
paramGroup
)
,
isParallel_
(
Dune
::
MPIHelper
::
getCollectiveCommunication
().
size
()
>
1
)
,
firstCall_
(
true
)
{
if
(
isParallel_
)
DUNE_THROW
(
Dune
::
InvalidStateException
,
"Using sequential constructor for parallel run. Use signature with gridView and dofMapper!"
);
reset
();
}
/*!
...
...
@@ -83,8 +84,9 @@ public:
:
LinearSolver
(
paramGroup
)
,
phelper_
(
std
::
make_shared
<
ParallelISTLHelper
<
LinearSolverTraits
>>
(
gridView
,
dofMapper
))
,
isParallel_
(
Dune
::
MPIHelper
::
getCollectiveCommunication
().
size
()
>
1
)
,
firstCall_
(
true
)
{}
{
reset
();
}
/*!
* \brief Solve a linear system.
...
...
@@ -105,6 +107,12 @@ public:
return
result_
.
converged
;
}
//! reset the linear solver
void
reset
()
{
firstCall_
=
true
;
}
/*!
* \brief The name of the solver
*/
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment