Loading...
Searching...
No Matches
AggregateAquiferData.hpp
/*
Copyright (c) 2021 Equinor ASA
This file is part of the Open Porous Media project (OPM).
OPM is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OPM is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OPM. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPM_AGGREGATE_AQUIFER_DATA_HPP
#define OPM_AGGREGATE_AQUIFER_DATA_HPP
#include <opm/output/eclipse/InteHEAD.hpp>
#include <opm/output/eclipse/WindowedArray.hpp>
#include <opm/output/data/Aquifer.hpp>
#include <vector>
namespace Opm {
class AquiferConfig;
class EclipseGrid;
class ScheduleState;
class SummaryState;
class UnitSystem;
} // Opm
namespace Opm { namespace RestartIO { namespace Helpers {
class AggregateAquiferData
{
public:
explicit AggregateAquiferData(const InteHEAD::AquiferDims& aqDims,
const AquiferConfig& aqConfig,
const EclipseGrid& grid);
void captureDynamicAquiferData(const InteHEAD::AquiferDims& aqDims,
const AquiferConfig& aqConfig,
const ScheduleState& sched,
const data::Aquifers& aquData,
const SummaryState& summaryState,
const UnitSystem& usys);
int maximumActiveAnalyticAquiferID() const
{
return this->maxActiveAnalyticAquiferID_;
}
const std::vector<int>& getIntegerAquiferData() const
{
return this->integerAnalyticAq_.data();
}
const std::vector<float>& getSinglePrecAquiferData() const
{
return this->singleprecAnalyticAq_.data();
}
const std::vector<double>& getDoublePrecAquiferData() const
{
return this->doubleprecAnalyticAq_.data();
}
const std::vector<int>& getNumericAquiferIntegerData() const
{
return this->integerNumericAq_.data();
}
const std::vector<double>& getNumericAquiferDoublePrecData() const
{
return this->doubleprecNumericAq_.data();
}
const std::vector<int>& getIntegerAquiferConnectionData(const int aquiferID) const
{
return this->integerAnalyticAquiferConn_[aquiferID - 1].data();
}
const std::vector<float>& getSinglePrecAquiferConnectionData(const int aquiferID) const
{
return this->singleprecAnalyticAquiferConn_[aquiferID - 1].data();
}
const std::vector<double>& getDoublePrecAquiferConnectionData(const int aquiferID) const
{
return this->doubleprecAnalyticAquiferConn_[aquiferID - 1].data();
}
private:
int maxActiveAnalyticAquiferID_{0};
std::vector<int> numActiveConn_{};
std::vector<double> totalInflux_{};
WindowedArray<int> integerAnalyticAq_;
WindowedArray<float> singleprecAnalyticAq_;
WindowedArray<double> doubleprecAnalyticAq_;
WindowedArray<int> integerNumericAq_;
WindowedArray<double> doubleprecNumericAq_;
std::vector<WindowedArray<int>> integerAnalyticAquiferConn_;
std::vector<WindowedArray<float>> singleprecAnalyticAquiferConn_;
std::vector<WindowedArray<double>> doubleprecAnalyticAquiferConn_;
void allocateDynamicBackingStorage(const InteHEAD::AquiferDims& aqDims);
void handleCarterTracy(const AquiferConfig& aqConfig,
const data::Aquifers& aquData,
const SummaryState& summaryState,
const UnitSystem& usys);
void handleConstantFlux(const AquiferConfig& aqConfig,
const ScheduleState& sched,
const SummaryState& summaryState,
const UnitSystem& usys);
void handleFetkovich(const AquiferConfig& aqConfig,
const data::Aquifers& aquData,
const SummaryState& summaryState,
const UnitSystem& usys);
void handleNumeric(const AquiferConfig& aqConfig,
const data::Aquifers& aquData,
const SummaryState& summaryState,
const UnitSystem& usys);
};
}}} // Opm::RestartIO::Helpers
#endif // OPM_AGGREGATE_WELL_DATA_HPP
WindowedArray.hpp
Provide facilities to simplify constructing restart vectors such as IWEL or RSEG.
Opm::AquiferConfig
Definition AquiferConfig.hpp:46
Opm::EclipseGrid
About cell information and dimension: The actual grid information is held in a pointer to an ERT ecl_...
Definition EclipseGrid.hpp:55
Opm::RestartIO::Helpers::AggregateAquiferData
Definition AggregateAquiferData.hpp:41
Opm::RestartIO::Helpers::AggregateAquiferData::getDoublePrecAquiferData
const std::vector< double > & getDoublePrecAquiferData() const
Retrieve Floating-Point (Double Precision) Aquifer Data Array.
Definition AggregateAquiferData.hpp:118
Opm::RestartIO::Helpers::AggregateAquiferData::getSinglePrecAquiferConnectionData
const std::vector< float > & getSinglePrecAquiferConnectionData(const int aquiferID) const
Retrieve Floating-Point (Real) Aquifer Connection Data Array (analytic aquifers)
Definition AggregateAquiferData.hpp:151
Opm::RestartIO::Helpers::AggregateAquiferData::getSinglePrecAquiferData
const std::vector< float > & getSinglePrecAquiferData() const
Retrieve Floating-Point (Real) Aquifer Data Array.
Definition AggregateAquiferData.hpp:112
Opm::RestartIO::Helpers::AggregateAquiferData::getIntegerAquiferData
const std::vector< int > & getIntegerAquiferData() const
Retrieve Integer Aquifer Data Array.
Definition AggregateAquiferData.hpp:106
Opm::RestartIO::Helpers::AggregateAquiferData::getNumericAquiferIntegerData
const std::vector< int > & getNumericAquiferIntegerData() const
Retrieve Integer Aquifer Data Array for Numeric Aquifers.
Definition AggregateAquiferData.hpp:124
Opm::RestartIO::Helpers::AggregateAquiferData::getIntegerAquiferConnectionData
const std::vector< int > & getIntegerAquiferConnectionData(const int aquiferID) const
Retrieve Integer Aquifer Connection Data Array (analytic aquifers)
Definition AggregateAquiferData.hpp:140
Opm::RestartIO::Helpers::AggregateAquiferData::getNumericAquiferDoublePrecData
const std::vector< double > & getNumericAquiferDoublePrecData() const
Retrieve Double Precision Aquifer Data Array for Numeric Aquifers.
Definition AggregateAquiferData.hpp:130
Opm::RestartIO::Helpers::AggregateAquiferData::captureDynamicAquiferData
void captureDynamicAquiferData(const InteHEAD::AquiferDims &aqDims, const AquiferConfig &aqConfig, const ScheduleState &sched, const data::Aquifers &aquData, const SummaryState &summaryState, const UnitSystem &usys)
Linearise dynamic information pertinent to analytic aquifers into internal arrays.
Definition AggregateAquiferData.cpp:648
Opm::RestartIO::Helpers::AggregateAquiferData::maximumActiveAnalyticAquiferID
int maximumActiveAnalyticAquiferID() const
Retrieve the maximum active aquifer ID over all analytic aquifers.
Definition AggregateAquiferData.hpp:100
Opm::RestartIO::Helpers::AggregateAquiferData::getDoublePrecAquiferConnectionData
const std::vector< double > & getDoublePrecAquiferConnectionData(const int aquiferID) const
Retrieve Floating-Point (Double Precision) Aquifer Connection Data Array (analytic aquifers)
Definition AggregateAquiferData.hpp:163
Opm::RestartIO::Helpers::WindowedArray::data
const std::vector< T > & data() const
Get read-only access to full, linearised data items for all windows.
Definition WindowedArray.hpp:131
Opm::ScheduleState
Definition ScheduleState.hpp:94
Opm::SummaryState
Definition SummaryState.hpp:72
Opm::UnitSystem
Definition UnitSystem.hpp:34
Opm
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30
Opm::RestartIO::InteHEAD::AquiferDims
Definition InteHEAD.hpp:173