simplify collection

This commit is contained in:
goncalvesmachadoc
2023-06-15 18:15:26 +02:00
parent 22c5965fb5
commit 4e7fde0c64
4 changed files with 20 additions and 81 deletions

View File

@@ -96,7 +96,7 @@ namespace Opm {
const EclipseConfig& cfg() const;
const GridDims& gridDims() const;
virtual const CarfinManager& getInputGLgr() const;
const LgrCollection& getLgrs() const;
bool hasInputLGR() const;
// the unit system used by the deck. note that it is rarely needed
@@ -170,7 +170,7 @@ namespace Opm {
EclipseGrid m_inputGrid;
NNC m_inputNnc;
GridDims m_gridDims;
LgrCollection m_inputLgr;
LgrCollection m_lgrs;
FieldPropsManager field_props;
SimulationConfig m_simulationConfig;
AquiferConfig aquifer_config;

View File

@@ -16,12 +16,11 @@
#ifndef OPM_PARSER_LGR_COLLECTION_HPP
#define OPM_PARSER_LGR_COLLECTION_HPP
#include <cstddef>
#include <string>
#include <opm/input/eclipse/EclipseState/Util/OrderedMap.hpp>
#include <opm/input/eclipse/EclipseState/Grid/Carfin.hpp>
#include <opm/input/eclipse/EclipseState/Grid/CarfinManager.hpp>
#include <opm/input/eclipse/EclipseState/Grid/Carfin.hpp>
namespace Opm {
@@ -33,21 +32,13 @@ namespace Opm {
class LgrCollection {
public:
LgrCollection();
LgrCollection(const GRIDSection& gridSection, const GridDims& grid);
LgrCollection(const GRIDSection& gridSection, const GridDims& gridDims);
static LgrCollection serializationTestObject();
size_t size() const;
bool hasLgr(const std::string& lgrName) const;
Carfin& getLgr(const std::string& lgrName);
const Carfin& getLgr(const std::string& lgrName) const;
Carfin& getLgr(size_t lgrIndex);
const Carfin& getLgr(size_t lgrIndex) const;
void addLgr(const std::string& lgrName);
bool operator==(const LgrCollection& data) const;
template<class Serializer>
void serializeOp(Serializer& serializer)
@@ -56,8 +47,8 @@ public:
}
private:
OrderedMap<Carfin, 8> m_lgrs;
OrderedMap<Carfin, 8> m_lgrs;
};
}