mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-10-31 17:47:45 -05:00
ParallelRestart: add method for loading only solution from restart
This commit is contained in:
1 parent
9512ff1d2d
commit
970754ef91
2 files changed
+29
No files matched your search
@@ -58,4 +58,27 @@ RestartValue loadParallelRestart(const EclipseIO* eclIO,
|
||||
#endif
|
||||
}
|
||||
|
||||
data::Solution loadParallelRestartSolution(const EclipseIO* eclIO,
|
||||
const std::vector<Opm::RestartKey>& solutionKeys,
|
||||
[[maybe_unused]] Parallel::Communication comm,
|
||||
const int step)
|
||||
{
|
||||
#if HAVE_MPI
|
||||
data::Solution sol{};
|
||||
|
||||
if (eclIO)
|
||||
{
|
||||
assert(comm.rank() == 0);
|
||||
sol = eclIO->loadRestartSolution(solutionKeys, step);
|
||||
}
|
||||
|
||||
Parallel::MpiSerializer ser(comm);
|
||||
ser.broadcast(0, sol);
|
||||
return sol;
|
||||
#else
|
||||
return eclIO->loadRestartSolution(solutionKeys, step);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
} // end namespace Opm
|
||||
@@ -26,6 +26,7 @@
|
||||
namespace Opm {
|
||||
|
||||
class EclipseIO;
|
||||
namespace data { class Solution; }
|
||||
class SummaryState;
|
||||
class RestartKey;
|
||||
class RestartValue;
|
||||
@@ -42,6 +43,11 @@ RestartValue loadParallelRestart(const EclipseIO* eclIO,
|
||||
const std::vector<RestartKey>& extraKeys,
|
||||
Parallel::Communication comm);
|
||||
|
||||
data::Solution loadParallelRestartSolution(const EclipseIO* eclIO,
|
||||
const std::vector<RestartKey>& solutionKeys,
|
||||
Parallel::Communication comm,
|
||||
const int step);
|
||||
|
||||
} // end namespace Opm
|
||||
|
||||
#endif // PARALLEL_RESTART_HPP
|
||||
Reference in new issue
Block a user