mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
EclOutputBlackoilModule: move code using SummaryConfig to compile unit
This commit is contained in:
parent
f4ea11cfba
commit
dbcbb15449
@ -1809,6 +1809,22 @@ updateSummaryRegionValues(const Inplace& inplace,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<class FluidSystem,class Scalar>
|
||||||
|
void EclGenericOutputBlackoilModule<FluidSystem,Scalar>::
|
||||||
|
setupBlockData(std::function<bool(int)> isCartIdxOnThisRank)
|
||||||
|
{
|
||||||
|
for (const auto& node : summaryConfig_) {
|
||||||
|
if ((node.category() == SummaryConfigNode::Category::Block) &&
|
||||||
|
isCartIdxOnThisRank(node.number() - 1))
|
||||||
|
{
|
||||||
|
this->blockData_.emplace(std::piecewise_construct,
|
||||||
|
std::forward_as_tuple(node.keyword(),
|
||||||
|
node.number()),
|
||||||
|
std::forward_as_tuple(0.0));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
template class EclGenericOutputBlackoilModule<BlackOilFluidSystem<double,BlackOilDefaultIndexTraits>,double>;
|
template class EclGenericOutputBlackoilModule<BlackOilFluidSystem<double,BlackOilDefaultIndexTraits>,double>;
|
||||||
|
|
||||||
} // namespace Opm
|
} // namespace Opm
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#define EWOMS_ECL_GENERIC_OUTPUT_BLACK_OIL_MODULE_HH
|
#define EWOMS_ECL_GENERIC_OUTPUT_BLACK_OIL_MODULE_HH
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
|
#include <functional>
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <numeric>
|
#include <numeric>
|
||||||
#include <optional>
|
#include <optional>
|
||||||
@ -373,6 +374,8 @@ protected:
|
|||||||
|
|
||||||
static Scalar sum(const ScalarBuffer& v);
|
static Scalar sum(const ScalarBuffer& v);
|
||||||
|
|
||||||
|
void setupBlockData(std::function<bool(int)> isCartIdxOnThisRank);
|
||||||
|
|
||||||
virtual bool isDefunctParallelWell(std::string wname) const = 0;
|
virtual bool isDefunctParallelWell(std::string wname) const = 0;
|
||||||
|
|
||||||
const EclipseState& eclState_;
|
const EclipseState& eclState_;
|
||||||
|
@ -152,14 +152,12 @@ public:
|
|||||||
this->createLocalRegion_(region_pair.second);
|
this->createLocalRegion_(region_pair.second);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const auto& node : this->simulator_.vanguard().summaryConfig()) {
|
auto isCartIdxOnThisRank = [&collectToIORank](int idx)
|
||||||
if ((node.category() == SummaryConfigNode::Category::Block)
|
{
|
||||||
&& collectToIORank.isCartIdxOnThisRank(node.number() - 1)) {
|
return collectToIORank.isCartIdxOnThisRank(idx);
|
||||||
this->blockData_.emplace(std::piecewise_construct,
|
};
|
||||||
std::forward_as_tuple(node.keyword(), node.number()),
|
|
||||||
std::forward_as_tuple(0.0));
|
this->setupBlockData(isCartIdxOnThisRank);
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (const auto& global_index : wbp_index_list) {
|
for (const auto& global_index : wbp_index_list) {
|
||||||
if (collectToIORank.isCartIdxOnThisRank(global_index - 1)) {
|
if (collectToIORank.isCartIdxOnThisRank(global_index - 1)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user