mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Moved internal functions into anonymous namespace.
This commit is contained in:
parent
7c00c770b0
commit
7dcec8976b
@ -10,10 +10,10 @@
|
|||||||
namespace Opm
|
namespace Opm
|
||||||
{
|
{
|
||||||
|
|
||||||
WellsGroupInterface::WellsGroupInterface(const std::string& name,
|
WellsGroupInterface::WellsGroupInterface(const std::string& myname,
|
||||||
ProductionSpecification prod_spec,
|
ProductionSpecification prod_spec,
|
||||||
InjectionSpecification inje_spec)
|
InjectionSpecification inje_spec)
|
||||||
: name_(name),
|
: name_(myname),
|
||||||
production_specification_(prod_spec),
|
production_specification_(prod_spec),
|
||||||
injection_specification_(inje_spec)
|
injection_specification_(inje_spec)
|
||||||
{
|
{
|
||||||
@ -28,10 +28,10 @@ namespace Opm
|
|||||||
return name_;
|
return name_;
|
||||||
}
|
}
|
||||||
|
|
||||||
WellsGroup::WellsGroup(const std::string& name,
|
WellsGroup::WellsGroup(const std::string& myname,
|
||||||
ProductionSpecification prod_spec,
|
ProductionSpecification prod_spec,
|
||||||
InjectionSpecification inj_spec)
|
InjectionSpecification inj_spec)
|
||||||
: WellsGroupInterface(name, prod_spec, inj_spec)
|
: WellsGroupInterface(myname, prod_spec, inj_spec)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -62,10 +62,10 @@ namespace Opm
|
|||||||
children_.push_back(child);
|
children_.push_back(child);
|
||||||
}
|
}
|
||||||
|
|
||||||
WellNode::WellNode(const std::string& name,
|
WellNode::WellNode(const std::string& myname,
|
||||||
ProductionSpecification prod_spec,
|
ProductionSpecification prod_spec,
|
||||||
InjectionSpecification inj_spec)
|
InjectionSpecification inj_spec)
|
||||||
: WellsGroupInterface(name, prod_spec, inj_spec)
|
: WellsGroupInterface(myname, prod_spec, inj_spec)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -84,99 +84,103 @@ namespace Opm
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
surface_component toSurfaceComponent(std::string type)
|
namespace
|
||||||
{
|
{
|
||||||
if (type == "OIL") {
|
|
||||||
return OIL;
|
|
||||||
}
|
|
||||||
if (type == "WATER") {
|
|
||||||
return WATER;
|
|
||||||
}
|
|
||||||
if (type == "GAS") {
|
|
||||||
return GAS;
|
|
||||||
}
|
|
||||||
THROW("Unknown type " << type << ", could not convert to surface_component");
|
|
||||||
}
|
|
||||||
|
|
||||||
InjectionSpecification::ControlMode toInjectionControlMode(std::string type)
|
surface_component toSurfaceComponent(std::string type)
|
||||||
{
|
{
|
||||||
if (type == "NONE") {
|
if (type == "OIL") {
|
||||||
return InjectionSpecification::NONE;
|
return OIL;
|
||||||
|
}
|
||||||
|
if (type == "WATER") {
|
||||||
|
return WATER;
|
||||||
|
}
|
||||||
|
if (type == "GAS") {
|
||||||
|
return GAS;
|
||||||
|
}
|
||||||
|
THROW("Unknown type " << type << ", could not convert to surface_component");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type == "ORAT") {
|
InjectionSpecification::ControlMode toInjectionControlMode(std::string type)
|
||||||
return InjectionSpecification::ORAT;
|
{
|
||||||
}
|
if (type == "NONE") {
|
||||||
if (type == "REIN") {
|
return InjectionSpecification::NONE;
|
||||||
return InjectionSpecification::REIN;
|
}
|
||||||
}
|
|
||||||
if (type == "RESV") {
|
if (type == "ORAT") {
|
||||||
return InjectionSpecification::RESV;
|
return InjectionSpecification::ORAT;
|
||||||
}
|
}
|
||||||
if (type == "VREP") {
|
if (type == "REIN") {
|
||||||
return InjectionSpecification::VREP;
|
return InjectionSpecification::REIN;
|
||||||
}
|
}
|
||||||
if (type == "WGRA") {
|
if (type == "RESV") {
|
||||||
return InjectionSpecification::WGRA;
|
return InjectionSpecification::RESV;
|
||||||
}
|
}
|
||||||
if (type == "FLD") {
|
if (type == "VREP") {
|
||||||
return InjectionSpecification::FLD;
|
return InjectionSpecification::VREP;
|
||||||
}
|
}
|
||||||
if (type == "GRUP") {
|
if (type == "WGRA") {
|
||||||
return InjectionSpecification::GRUP;
|
return InjectionSpecification::WGRA;
|
||||||
}
|
}
|
||||||
|
if (type == "FLD") {
|
||||||
|
return InjectionSpecification::FLD;
|
||||||
|
}
|
||||||
|
if (type == "GRUP") {
|
||||||
|
return InjectionSpecification::GRUP;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
THROW("Unknown type " << type << ", could not convert to ControlMode.");
|
THROW("Unknown type " << type << ", could not convert to ControlMode.");
|
||||||
}
|
|
||||||
|
|
||||||
ProductionSpecification::ControlMode toProductionControlMode(std::string type)
|
|
||||||
{
|
|
||||||
if (type == "NONE") {
|
|
||||||
return ProductionSpecification::NONE_CM;
|
|
||||||
}
|
|
||||||
if (type == "ORAT") {
|
|
||||||
return ProductionSpecification::ORAT;
|
|
||||||
|
|
||||||
}
|
|
||||||
if (type == "REIN") {
|
|
||||||
return ProductionSpecification::REIN;
|
|
||||||
}
|
|
||||||
if (type == "RESV") {
|
|
||||||
return ProductionSpecification::RESV;
|
|
||||||
}
|
|
||||||
if (type == "VREP") {
|
|
||||||
return ProductionSpecification::VREP;
|
|
||||||
}
|
|
||||||
if (type == "WGRA") {
|
|
||||||
return ProductionSpecification::WGRA;
|
|
||||||
}
|
|
||||||
if (type == "FLD") {
|
|
||||||
return ProductionSpecification::FLD;
|
|
||||||
}
|
|
||||||
if (type == "GRUP") {
|
|
||||||
return ProductionSpecification::GRUP;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
THROW("Unknown type " << type << ", could not convert to ControlMode.");
|
ProductionSpecification::ControlMode toProductionControlMode(std::string type)
|
||||||
}
|
{
|
||||||
|
if (type == "NONE") {
|
||||||
|
return ProductionSpecification::NONE_CM;
|
||||||
|
}
|
||||||
|
if (type == "ORAT") {
|
||||||
|
return ProductionSpecification::ORAT;
|
||||||
|
|
||||||
|
}
|
||||||
|
if (type == "REIN") {
|
||||||
|
return ProductionSpecification::REIN;
|
||||||
|
}
|
||||||
|
if (type == "RESV") {
|
||||||
|
return ProductionSpecification::RESV;
|
||||||
|
}
|
||||||
|
if (type == "VREP") {
|
||||||
|
return ProductionSpecification::VREP;
|
||||||
|
}
|
||||||
|
if (type == "WGRA") {
|
||||||
|
return ProductionSpecification::WGRA;
|
||||||
|
}
|
||||||
|
if (type == "FLD") {
|
||||||
|
return ProductionSpecification::FLD;
|
||||||
|
}
|
||||||
|
if (type == "GRUP") {
|
||||||
|
return ProductionSpecification::GRUP;
|
||||||
|
}
|
||||||
|
|
||||||
|
THROW("Unknown type " << type << ", could not convert to ControlMode.");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
ProductionSpecification::Procedure toProductionProcedure(std::string type)
|
ProductionSpecification::Procedure toProductionProcedure(std::string type)
|
||||||
{
|
{
|
||||||
if (type == "NONE") {
|
if (type == "NONE") {
|
||||||
return ProductionSpecification::NONE_P;
|
return ProductionSpecification::NONE_P;
|
||||||
}
|
}
|
||||||
if (type == "RATE") {
|
if (type == "RATE") {
|
||||||
return ProductionSpecification::RATE;
|
return ProductionSpecification::RATE;
|
||||||
}
|
}
|
||||||
if (type == "WELL") {
|
if (type == "WELL") {
|
||||||
return ProductionSpecification::WELL;
|
return ProductionSpecification::WELL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
THROW("Unknown type " << type << ", could not convert to ControlMode.");
|
THROW("Unknown type " << type << ", could not convert to ControlMode.");
|
||||||
}
|
}
|
||||||
|
} // anonymous namespace
|
||||||
|
|
||||||
std::tr1::shared_ptr<WellsGroupInterface> createWellsGroup(std::string name, const EclipseGridParser& deck)
|
std::tr1::shared_ptr<WellsGroupInterface> createWellsGroup(std::string name, const EclipseGridParser& deck)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user