Merge pull request #3362 from akva2/trancalculator.hpp_reduce_hotness

FieldPropsManager.hpp: forward TranCalculator
This commit is contained in:
Bård Skaflestad 2023-01-16 22:54:53 +01:00 committed by GitHub
commit a476068dbd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 8 deletions

View File

@ -509,7 +509,7 @@ public:
bool operator==(const FieldProps& other) const; bool operator==(const FieldProps& other) const;
static bool rst_cmp(const FieldProps& full_arg, const FieldProps& rst_arg); static bool rst_cmp(const FieldProps& full_arg, const FieldProps& rst_arg);
const Fieldprops::TranMap& getTran() const const std::unordered_map<std::string,Fieldprops::TranCalculator>& getTran() const
{ {
return tran; return tran;
} }
@ -574,7 +574,7 @@ private:
std::unordered_map<std::string, Fieldprops::FieldData<int>> int_data; std::unordered_map<std::string, Fieldprops::FieldData<int>> int_data;
std::unordered_map<std::string, Fieldprops::FieldData<double>> double_data; std::unordered_map<std::string, Fieldprops::FieldData<double>> double_data;
Fieldprops::TranMap tran; std::unordered_map<std::string,Fieldprops::TranCalculator> tran;
}; };
} }

View File

@ -22,7 +22,6 @@
#include <memory> #include <memory>
#include <string> #include <string>
#include <unordered_map> #include <unordered_map>
#include <opm/input/eclipse/EclipseState/Grid/TranCalculator.hpp>
#include <vector> #include <vector>
namespace Opm { namespace Opm {
@ -31,6 +30,7 @@ class EclipseGrid;
class Deck; class Deck;
class DeckKeyword; class DeckKeyword;
namespace Fieldprops { namespace Fieldprops {
class TranCalculator;
template<typename T> struct FieldData; template<typename T> struct FieldData;
} }
class FieldProps; class FieldProps;
@ -233,7 +233,7 @@ public:
void apply_numerical_aquifers(const NumericalAquifers& aquifers); void apply_numerical_aquifers(const NumericalAquifers& aquifers);
const Fieldprops::TranMap& getTran() const; const std::unordered_map<std::string,Fieldprops::TranCalculator>& getTran() const;
private: private:
/* /*

View File

@ -117,8 +117,6 @@ private:
std::vector<TranAction> actions; std::vector<TranAction> actions;
}; };
using TranMap = std::unordered_map<std::string, TranCalculator>;
} // namespace Fieldprops } // namespace Fieldprops
} // end namespace Opm } // end namespace Opm
#endif // TRAN_CALCULATOR_HPP #endif // TRAN_CALCULATOR_HPP

View File

@ -154,8 +154,8 @@ void FieldPropsManager::apply_numerical_aquifers(const NumericalAquifers& aquife
return this->fp->apply_numerical_aquifers(aquifers); return this->fp->apply_numerical_aquifers(aquifers);
} }
const std::unordered_map<std::string,Fieldprops::TranCalculator>&
const Fieldprops::TranMap& FieldPropsManager::getTran() const FieldPropsManager::getTran() const
{ {
return this->fp->getTran(); return this->fp->getTran();
} }