mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
clean up after rebase
This commit is contained in:
parent
932527d772
commit
76edfa7789
@ -25,6 +25,7 @@
|
|||||||
|
|
||||||
#include <opm/output/data/Cells.hpp>
|
#include <opm/output/data/Cells.hpp>
|
||||||
#include <opm/output/data/Solution.hpp>
|
#include <opm/output/data/Solution.hpp>
|
||||||
|
#include <opm/output/data/Wells.hpp>
|
||||||
|
|
||||||
//#if HAVE_OPM_GRID
|
//#if HAVE_OPM_GRID
|
||||||
#include <opm/grid/common/p2pcommunicator.hh>
|
#include <opm/grid/common/p2pcommunicator.hh>
|
||||||
@ -283,6 +284,9 @@ namespace Ewoms
|
|||||||
const std::map<std::pair<std::string, int>, double>& localBlockData_;
|
const std::map<std::pair<std::string, int>, double>& localBlockData_;
|
||||||
std::map<std::pair<std::string, int>, double>& globalBlockValues_;
|
std::map<std::pair<std::string, int>, double>& globalBlockValues_;
|
||||||
|
|
||||||
|
const Opm::data::Wells& localWellData_;
|
||||||
|
Opm::data::Wells& globalWellData_;
|
||||||
|
|
||||||
const IndexMapType& localIndexMap_;
|
const IndexMapType& localIndexMap_;
|
||||||
const IndexMapStorageType& indexMaps_;
|
const IndexMapStorageType& indexMaps_;
|
||||||
|
|
||||||
@ -291,6 +295,8 @@ namespace Ewoms
|
|||||||
Opm::data::Solution& globalCellData,
|
Opm::data::Solution& globalCellData,
|
||||||
const std::map<std::pair<std::string, int>, double>& localBlockData,
|
const std::map<std::pair<std::string, int>, double>& localBlockData,
|
||||||
std::map<std::pair<std::string, int>, double>& globalBlockValues,
|
std::map<std::pair<std::string, int>, double>& globalBlockValues,
|
||||||
|
const Opm::data::Wells& localWellData,
|
||||||
|
Opm::data::Wells& globalWellData,
|
||||||
const IndexMapType& localIndexMap,
|
const IndexMapType& localIndexMap,
|
||||||
const IndexMapStorageType& indexMaps,
|
const IndexMapStorageType& indexMaps,
|
||||||
const size_t globalSize,
|
const size_t globalSize,
|
||||||
@ -299,6 +305,8 @@ namespace Ewoms
|
|||||||
globalCellData_( globalCellData ),
|
globalCellData_( globalCellData ),
|
||||||
localBlockData_( localBlockData ),
|
localBlockData_( localBlockData ),
|
||||||
globalBlockValues_( globalBlockValues ),
|
globalBlockValues_( globalBlockValues ),
|
||||||
|
localWellData_( localWellData ),
|
||||||
|
globalWellData_( globalWellData ),
|
||||||
localIndexMap_( localIndexMap ),
|
localIndexMap_( localIndexMap ),
|
||||||
indexMaps_( indexMaps )
|
indexMaps_( indexMaps )
|
||||||
{
|
{
|
||||||
@ -338,6 +346,8 @@ namespace Ewoms
|
|||||||
write( buffer, localIndexMap_, data);
|
write( buffer, localIndexMap_, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
localWellData_.write(buffer);
|
||||||
|
|
||||||
// write all block data
|
// write all block data
|
||||||
unsigned int size = localBlockData_.size();
|
unsigned int size = localBlockData_.size();
|
||||||
buffer.write( size );
|
buffer.write( size );
|
||||||
@ -359,6 +369,7 @@ namespace Ewoms
|
|||||||
//write all data from local cell data to buffer
|
//write all data from local cell data to buffer
|
||||||
read( buffer, indexMap, data);
|
read( buffer, indexMap, data);
|
||||||
}
|
}
|
||||||
|
globalWellData_.read(buffer);
|
||||||
|
|
||||||
// read all block data
|
// read all block data
|
||||||
unsigned int size = 0;
|
unsigned int size = 0;
|
||||||
@ -420,10 +431,12 @@ namespace Ewoms
|
|||||||
};
|
};
|
||||||
|
|
||||||
// gather solution to rank 0 for EclipseWriter
|
// gather solution to rank 0 for EclipseWriter
|
||||||
void collect( const Opm::data::Solution& localCellData, const std::map<std::pair<std::string, int>, double>& localBlockValues)
|
void collect( const Opm::data::Solution& localCellData, const std::map<std::pair<std::string, int>, double>& localBlockValues, const Opm::data::Wells& localWellData)
|
||||||
{
|
{
|
||||||
globalCellData_ = {};
|
globalCellData_ = {};
|
||||||
globalBlockValues_.clear();
|
globalBlockValues_.clear();
|
||||||
|
globalWellData_.clear();
|
||||||
|
|
||||||
// index maps only have to be build when reordering is needed
|
// index maps only have to be build when reordering is needed
|
||||||
if( ! needsReordering && ! isParallel() )
|
if( ! needsReordering && ! isParallel() )
|
||||||
{
|
{
|
||||||
@ -436,6 +449,8 @@ namespace Ewoms
|
|||||||
globalCellData_,
|
globalCellData_,
|
||||||
localBlockValues,
|
localBlockValues,
|
||||||
globalBlockValues_,
|
globalBlockValues_,
|
||||||
|
localWellData,
|
||||||
|
globalWellData_,
|
||||||
localIndexMap_,
|
localIndexMap_,
|
||||||
indexMaps_,
|
indexMaps_,
|
||||||
numCells(),
|
numCells(),
|
||||||
@ -466,6 +481,11 @@ namespace Ewoms
|
|||||||
return globalCellData_;
|
return globalCellData_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const Opm::data::Wells& globalWellData() const
|
||||||
|
{
|
||||||
|
return globalWellData_;
|
||||||
|
}
|
||||||
|
|
||||||
bool isIORank() const
|
bool isIORank() const
|
||||||
{
|
{
|
||||||
return toIORankComm_.rank() == ioRank;
|
return toIORankComm_.rank() == ioRank;
|
||||||
@ -522,6 +542,7 @@ namespace Ewoms
|
|||||||
std::vector<int> globalRanks_;
|
std::vector<int> globalRanks_;
|
||||||
Opm::data::Solution globalCellData_;
|
Opm::data::Solution globalCellData_;
|
||||||
std::map<std::pair<std::string, int>, double> globalBlockValues_;
|
std::map<std::pair<std::string, int>, double> globalBlockValues_;
|
||||||
|
Opm::data::Wells globalWellData_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // end namespace Opm
|
} // end namespace Opm
|
||||||
|
@ -170,10 +170,10 @@ public:
|
|||||||
|
|
||||||
// Well RFT data
|
// Well RFT data
|
||||||
if (!substep) {
|
if (!substep) {
|
||||||
for ( const auto& well : simulator_.gridManager().schedule().getWells( reportStepNum )) {
|
for ( const auto& well : simulator_.vanguard().schedule().getWells( reportStepNum )) {
|
||||||
|
|
||||||
// don't bother with wells not on this process
|
// don't bother with wells not on this process
|
||||||
const auto& defunct_well_names = simulator_.gridManager().defunctWellNames();
|
const auto& defunct_well_names = simulator_.vanguard().defunctWellNames();
|
||||||
if ( defunct_well_names.find(well->name()) != defunct_well_names.end() ) {
|
if ( defunct_well_names.find(well->name()) != defunct_well_names.end() ) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -186,7 +186,7 @@ public:
|
|||||||
const size_t i = size_t( completion.getI() );
|
const size_t i = size_t( completion.getI() );
|
||||||
const size_t j = size_t( completion.getJ() );
|
const size_t j = size_t( completion.getJ() );
|
||||||
const size_t k = size_t( completion.getK() );
|
const size_t k = size_t( completion.getK() );
|
||||||
const size_t index = simulator_.gridManager().eclState().getInputGrid().getGlobalIndex( i, j, k );
|
const size_t index = simulator_.vanguard().eclState().getInputGrid().getGlobalIndex( i, j, k );
|
||||||
|
|
||||||
oilCompletionPressures_.emplace(std::make_pair(index, 0.0));
|
oilCompletionPressures_.emplace(std::make_pair(index, 0.0));
|
||||||
waterCompletionSaturations_.emplace(std::make_pair(index, 0.0));
|
waterCompletionSaturations_.emplace(std::make_pair(index, 0.0));
|
||||||
@ -644,10 +644,10 @@ public:
|
|||||||
|
|
||||||
void addRftDataToWells(Opm::data::Wells& wellDatas, size_t reportStepNum)
|
void addRftDataToWells(Opm::data::Wells& wellDatas, size_t reportStepNum)
|
||||||
{
|
{
|
||||||
for ( const auto& well : simulator_.gridManager().schedule().getWells( reportStepNum )) {
|
for ( const auto& well : simulator_.vanguard().schedule().getWells( reportStepNum )) {
|
||||||
|
|
||||||
// don't bother with wells not on this process
|
// don't bother with wells not on this process
|
||||||
const auto& defunct_well_names = simulator_.gridManager().defunctWellNames();
|
const auto& defunct_well_names = simulator_.vanguard().defunctWellNames();
|
||||||
if ( defunct_well_names.find(well->name()) != defunct_well_names.end() ) {
|
if ( defunct_well_names.find(well->name()) != defunct_well_names.end() ) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -667,7 +667,7 @@ public:
|
|||||||
const size_t j = size_t( completion.getJ() );
|
const size_t j = size_t( completion.getJ() );
|
||||||
const size_t k = size_t( completion.getK() );
|
const size_t k = size_t( completion.getK() );
|
||||||
|
|
||||||
const size_t index = simulator_.gridManager().eclState().getInputGrid().getGlobalIndex( i, j, k );
|
const size_t index = simulator_.vanguard().eclState().getInputGrid().getGlobalIndex( i, j, k );
|
||||||
auto& completionData = wellData.completions[ count ];
|
auto& completionData = wellData.completions[ count ];
|
||||||
completionData.index = index;
|
completionData.index = index;
|
||||||
count++;
|
count++;
|
||||||
|
Loading…
Reference in New Issue
Block a user