broadcast<T> with Schedule and TransMult specialization

This commit is contained in:
Joakim Hove 2021-11-08 12:02:04 +01:00
parent 8240bd9d76
commit 5f4efbde73
3 changed files with 13 additions and 5 deletions

View File

@ -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)
{

View File

@ -57,9 +57,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&);
}

View File

@ -45,8 +45,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