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
5692afc9
Commit
5692afc9
authored
5 years ago
by
Timo Koch
Browse files
Options
Downloads
Patches
Plain Diff
[amg] Make it possible to reset first call
parent
477abe60
No related branches found
No related tags found
1 merge request
!1867
Feature/linear solver parallel firstcall
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dumux/linear/amgbackend.hh
+11
-3
11 additions, 3 deletions
dumux/linear/amgbackend.hh
with
11 additions
and
3 deletions
dumux/linear/amgbackend.hh
+
11
−
3
View file @
5692afc9
...
@@ -64,10 +64,11 @@ public:
...
@@ -64,10 +64,11 @@ public:
AMGBiCGSTABBackend
(
const
std
::
string
&
paramGroup
=
""
)
AMGBiCGSTABBackend
(
const
std
::
string
&
paramGroup
=
""
)
:
LinearSolver
(
paramGroup
)
:
LinearSolver
(
paramGroup
)
,
isParallel_
(
Dune
::
MPIHelper
::
getCollectiveCommunication
().
size
()
>
1
)
,
isParallel_
(
Dune
::
MPIHelper
::
getCollectiveCommunication
().
size
()
>
1
)
,
firstCall_
(
true
)
{
{
if
(
isParallel_
)
if
(
isParallel_
)
DUNE_THROW
(
Dune
::
InvalidStateException
,
"Using sequential constructor for parallel run. Use signature with gridView and dofMapper!"
);
DUNE_THROW
(
Dune
::
InvalidStateException
,
"Using sequential constructor for parallel run. Use signature with gridView and dofMapper!"
);
reset
();
}
}
/*!
/*!
...
@@ -83,8 +84,9 @@ public:
...
@@ -83,8 +84,9 @@ public:
:
LinearSolver
(
paramGroup
)
:
LinearSolver
(
paramGroup
)
,
phelper_
(
std
::
make_shared
<
ParallelISTLHelper
<
LinearSolverTraits
>>
(
gridView
,
dofMapper
))
,
phelper_
(
std
::
make_shared
<
ParallelISTLHelper
<
LinearSolverTraits
>>
(
gridView
,
dofMapper
))
,
isParallel_
(
Dune
::
MPIHelper
::
getCollectiveCommunication
().
size
()
>
1
)
,
isParallel_
(
Dune
::
MPIHelper
::
getCollectiveCommunication
().
size
()
>
1
)
,
firstCall_
(
true
)
{
{}
reset
();
}
/*!
/*!
* \brief Solve a linear system.
* \brief Solve a linear system.
...
@@ -105,6 +107,12 @@ public:
...
@@ -105,6 +107,12 @@ public:
return
result_
.
converged
;
return
result_
.
converged
;
}
}
//! reset the linear solver
void
reset
()
{
firstCall_
=
true
;
}
/*!
/*!
* \brief The name of the solver
* \brief The name of the solver
*/
*/
...
...
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