mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #3671 from joakim-hove/broadcast-mult-update
Broadcast mult update
This commit is contained in:
commit
c97447892e
@ -330,7 +330,7 @@ void EclGenericCpGridVanguard<ElementMapper,GridView,Scalar>::doFilterConnection
|
||||
{
|
||||
// Broadcast another time to remove inactive peforations on
|
||||
// slave processors.
|
||||
eclScheduleBroadcast(EclGenericVanguard::comm(), schedule);
|
||||
eclBroadcast(EclGenericVanguard::comm(), schedule);
|
||||
}
|
||||
catch(const std::exception& broadcast_error)
|
||||
{
|
||||
|
@ -69,6 +69,7 @@
|
||||
#include <opm/core/props/satfunc/RelpermDiagnostics.hpp>
|
||||
|
||||
#include <opm/simulators/utils/DeferredLoggingErrorHelpers.hpp>
|
||||
#include <opm/simulators/utils/ParallelSerialization.hpp>
|
||||
|
||||
#include <opm/models/utils/pffgridvector.hh>
|
||||
#include <opm/models/blackoil/blackoilmodel.hh>
|
||||
@ -1023,7 +1024,9 @@ public:
|
||||
// has changed, the grid may need be re-created which has some serious
|
||||
// implications on e.g., the solution of the simulation.)
|
||||
const auto& miniDeck = schedule[episodeIdx].geo_keywords();
|
||||
const auto& cc = simulator.vanguard().grid().comm();
|
||||
eclState.apply_schedule_keywords( miniDeck );
|
||||
eclBroadcast(cc, eclState.getTransMult() );
|
||||
|
||||
// re-compute all quantities which may possibly be affected.
|
||||
transmissibilities_.update(true);
|
||||
|
@ -34,6 +34,7 @@
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Well/WListManager.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Well/WellTestState.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/SummaryConfig/SummaryConfig.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Grid/TransMult.hpp>
|
||||
|
||||
#include <ebos/eclmpiserializer.hh>
|
||||
|
||||
@ -57,9 +58,15 @@ void eclStateBroadcast(Parallel::Communication comm, EclipseState& eclState, Sch
|
||||
ser.broadcast(wtestState);
|
||||
}
|
||||
|
||||
void eclScheduleBroadcast(Parallel::Communication comm, Schedule& schedule)
|
||||
template <class T>
|
||||
void eclBroadcast(Parallel::Communication comm, T& data)
|
||||
{
|
||||
Opm::EclMpiSerializer ser(comm);
|
||||
ser.broadcast(schedule);
|
||||
ser.broadcast(data);
|
||||
}
|
||||
|
||||
|
||||
template void eclBroadcast<TransMult>(Parallel::Communication, TransMult&);
|
||||
template void eclBroadcast<Schedule>(Parallel::Communication, Schedule&);
|
||||
|
||||
}
|
||||
|
@ -28,6 +28,7 @@ class Schedule;
|
||||
class SummaryConfig;
|
||||
class UDQState;
|
||||
class WellTestState;
|
||||
class TransMult;
|
||||
|
||||
namespace Action {
|
||||
class State;
|
||||
@ -45,8 +46,10 @@ void eclStateBroadcast(Parallel::Communication comm, EclipseState& eclState, Sc
|
||||
Action::State& actionState,
|
||||
WellTestState& wtestState);
|
||||
|
||||
/// \brief Broadcasts an schedule from root node in parallel runs.
|
||||
void eclScheduleBroadcast(Parallel::Communication comm, Schedule& schedule);
|
||||
|
||||
template <class T>
|
||||
void eclBroadcast(Parallel::Communication comm, T& );
|
||||
|
||||
|
||||
} // end namespace Opm
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user