Rename so that flow_blackoil_tpfa becomes flow_blackoil.

This commit is contained in:
Atgeirr Flø Rasmussen 2022-10-03 14:10:18 +02:00
parent dacb77425a
commit d7ba860bf1
9 changed files with 126 additions and 126 deletions

View File

@ -424,7 +424,7 @@ set(FLOW_MODELS blackoil brine energy extbo foam gasoil gaswater
oilwater_polymer_injectivity micp polymer solvent
gasoil_energy brine_saltprecipitation
gaswater_saltprec_vapwat brine_precsalt_vapwat
blackoil_tpfa gasoildiffuse)
blackoil_legacyassembly gasoildiffuse)
set(FLOW_VARIANT_MODELS brine_energy onephase onephase_energy)
set(FLOW_TGTS)

View File

@ -14,11 +14,12 @@
You should have received a copy of the GNU General Public License
along with OPM. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include <flow/flow_ebos_blackoil.hpp>
#include "config.h"
#include <flow/flow_ebos_blackoil.hpp>
int main(int argc, char** argv)
{
return Opm::flowEbosBlackoilMainStandalone(argc, argv);
return Opm::flowEbosBlackoilTpfaMainStandalone(argc, argv);
}

View File

@ -14,12 +14,11 @@
You should have received a copy of the GNU General Public License
along with OPM. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include <flow/flow_ebos_blackoil_legacyassembly.hpp>
#include <flow/flow_ebos_blackoil_tpfa.hpp>
int main(int argc, char** argv)
{
return Opm::flowEbosBlackoilTpfaMainStandalone(argc, argv);
return Opm::flowEbosBlackoilMainStandalone(argc, argv);
}

View File

@ -19,34 +19,59 @@
#include <flow/flow_ebos_blackoil.hpp>
#include <opm/material/common/ResetLocale.hpp>
#include <opm/grid/CpGrid.hpp>
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp>
#include <opm/simulators/flow/Main.hpp>
namespace Opm {
#include <opm/models/blackoil/blackoillocalresidualtpfa.hh>
#include <opm/models/discretization/common/tpfalinearizer.hh>
std::unique_ptr<FlowMainEbos<Properties::TTag::EclFlowProblem>>
flowEbosBlackoilMainInit(int argc, char** argv, bool outputCout, bool outputFiles)
namespace Opm {
namespace Properties {
namespace TTag {
struct EclFlowProblemTPFA {
using InheritsFrom = std::tuple<EclFlowProblem>;
};
}
}
}
namespace Opm {
namespace Properties {
template<class TypeTag>
struct Linearizer<TypeTag, TTag::EclFlowProblemTPFA> { using type = TpfaLinearizer<TypeTag>; };
template<class TypeTag>
struct LocalResidual<TypeTag, TTag::EclFlowProblemTPFA> { using type = BlackOilLocalResidualTPFA<TypeTag>; };
template<class TypeTag>
struct EnableDiffusion<TypeTag, TTag::EclFlowProblemTPFA> { static constexpr bool value = false; };
}
}
namespace Opm
{
// ----------------- Main program -----------------
int flowEbosBlackoilTpfaMain(int argc, char** argv, bool outputCout, bool outputFiles)
{
// we always want to use the default locale, and thus spare us the trouble
// with incorrect locale settings.
resetLocale();
return std::make_unique<FlowMainEbos<Properties::TTag::EclFlowProblem>>(
argc, argv, outputCout, outputFiles);
FlowMainEbos<Properties::TTag::EclFlowProblemTPFA>
mainfunc {argc, argv, outputCout, outputFiles};
return mainfunc.execute();
}
// ----------------- Main program -----------------
int flowEbosBlackoilMain(int argc, char** argv, bool outputCout, bool outputFiles)
int flowEbosBlackoilTpfaMainStandalone(int argc, char** argv)
{
auto mainfunc = flowEbosBlackoilMainInit(argc, argv, outputCout, outputFiles);
return mainfunc->execute();
}
int flowEbosBlackoilMainStandalone(int argc, char** argv)
{
using TypeTag = Properties::TTag::EclFlowProblem;
using TypeTag = Properties::TTag::EclFlowProblemTPFA;
auto mainObject = Opm::Main(argc, argv);
return mainObject.runStatic<TypeTag>();
}
}
} // namespace Opm

View File

@ -14,30 +14,17 @@
You should have received a copy of the GNU General Public License
along with OPM. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef FLOW_EBOS_BLACKOIL_HPP
#define FLOW_EBOS_BLACKOIL_HPP
#include <memory>
#ifndef FLOW_EBOS_BLACKOIL_TPFA_HPP
#define FLOW_EBOS_BLACKOIL_TPFA_HPP
namespace Opm {
template<class TypeTag> class FlowMainEbos;
namespace Action {
class State;
}
namespace Properties { namespace TTag { struct EclFlowProblem; } }
//! \brief Main function used in flow binary.
int flowEbosBlackoilMain(int argc, char** argv, bool outputCout, bool outputFiles);
int flowEbosBlackoilTpfaMain(int argc, char** argv, bool outputCout, bool outputFiles);
//! \brief Initialization function used in flow binary and python simulator.
std::unique_ptr<FlowMainEbos<Properties::TTag::EclFlowProblem>>
flowEbosBlackoilMainInit(int argc, char** argv, bool outputCout, bool outputFiles);
//! \brief Main function used in flow_blackoil binary.
int flowEbosBlackoilMainStandalone(int argc, char** argv);
//! \brief Main function used in flow_brine binary.
int flowEbosBlackoilTpfaMainStandalone(int argc, char** argv);
}
#endif // FLOW_EBOS_BLACKOIL_HPP
#endif // FLOW_EBOS_BLACKOIL_TPFA_HPP

View File

@ -0,0 +1,52 @@
/*
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/>.
*/
#include "config.h"
#include <flow/flow_ebos_blackoil_legacyassembly.hpp>
#include <opm/material/common/ResetLocale.hpp>
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp>
#include <opm/simulators/flow/Main.hpp>
namespace Opm {
std::unique_ptr<FlowMainEbos<Properties::TTag::EclFlowProblem>>
flowEbosBlackoilMainInit(int argc, char** argv, bool outputCout, bool outputFiles)
{
// we always want to use the default locale, and thus spare us the trouble
// with incorrect locale settings.
resetLocale();
return std::make_unique<FlowMainEbos<Properties::TTag::EclFlowProblem>>(
argc, argv, outputCout, outputFiles);
}
// ----------------- Main program -----------------
int flowEbosBlackoilMain(int argc, char** argv, bool outputCout, bool outputFiles)
{
auto mainfunc = flowEbosBlackoilMainInit(argc, argv, outputCout, outputFiles);
return mainfunc->execute();
}
int flowEbosBlackoilMainStandalone(int argc, char** argv)
{
using TypeTag = Properties::TTag::EclFlowProblem;
auto mainObject = Opm::Main(argc, argv);
return mainObject.runStatic<TypeTag>();
}
}

View File

@ -14,17 +14,30 @@
You should have received a copy of the GNU General Public License
along with OPM. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef FLOW_EBOS_BLACKOIL_TPFA_HPP
#define FLOW_EBOS_BLACKOIL_TPFA_HPP
#ifndef FLOW_EBOS_BLACKOIL_HPP
#define FLOW_EBOS_BLACKOIL_HPP
#include <memory>
namespace Opm {
//! \brief Main function used in flow binary.
int flowEbosBlackoilTpfaMain(int argc, char** argv, bool outputCout, bool outputFiles);
template<class TypeTag> class FlowMainEbos;
//! \brief Main function used in flow_brine binary.
int flowEbosBlackoilTpfaMainStandalone(int argc, char** argv);
namespace Action {
class State;
}
namespace Properties { namespace TTag { struct EclFlowProblem; } }
//! \brief Main function used in flow binary.
int flowEbosBlackoilMain(int argc, char** argv, bool outputCout, bool outputFiles);
//! \brief Initialization function used in flow binary and python simulator.
std::unique_ptr<FlowMainEbos<Properties::TTag::EclFlowProblem>>
flowEbosBlackoilMainInit(int argc, char** argv, bool outputCout, bool outputFiles);
//! \brief Main function used in flow_blackoil binary.
int flowEbosBlackoilMainStandalone(int argc, char** argv);
}
#endif // FLOW_EBOS_BLACKOIL_TPFA_HPP
#endif // FLOW_EBOS_BLACKOIL_HPP

View File

@ -1,77 +0,0 @@
/*
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/>.
*/
#include "config.h"
#include <flow/flow_ebos_blackoil_tpfa.hpp>
#include <opm/material/common/ResetLocale.hpp>
#include <opm/grid/CpGrid.hpp>
#include <opm/simulators/flow/SimulatorFullyImplicitBlackoilEbos.hpp>
#include <opm/simulators/flow/Main.hpp>
#include <opm/models/blackoil/blackoillocalresidualtpfa.hh>
#include <opm/models/discretization/common/tpfalinearizer.hh>
namespace Opm {
namespace Properties {
namespace TTag {
struct EclFlowProblemTPFA {
using InheritsFrom = std::tuple<EclFlowProblem>;
};
}
}
}
namespace Opm {
namespace Properties {
template<class TypeTag>
struct Linearizer<TypeTag, TTag::EclFlowProblemTPFA> { using type = TpfaLinearizer<TypeTag>; };
template<class TypeTag>
struct LocalResidual<TypeTag, TTag::EclFlowProblemTPFA> { using type = BlackOilLocalResidualTPFA<TypeTag>; };
template<class TypeTag>
struct EnableDiffusion<TypeTag, TTag::EclFlowProblemTPFA> { static constexpr bool value = false; };
}
}
namespace Opm
{
// ----------------- Main program -----------------
int flowEbosBlackoilTpfaMain(int argc, char** argv, bool outputCout, bool outputFiles)
{
// we always want to use the default locale, and thus spare us the trouble
// with incorrect locale settings.
resetLocale();
FlowMainEbos<Properties::TTag::EclFlowProblemTPFA>
mainfunc {argc, argv, outputCout, outputFiles};
return mainfunc.execute();
}
int flowEbosBlackoilTpfaMainStandalone(int argc, char** argv)
{
using TypeTag = Properties::TTag::EclFlowProblemTPFA;
auto mainObject = Opm::Main(argc, argv);
return mainObject.runStatic<TypeTag>();
}
} // namespace Opm

View File

@ -23,7 +23,7 @@
#define OPM_MAIN_HEADER_INCLUDED
#include <flow/flow_ebos_blackoil.hpp>
#include <flow/flow_ebos_blackoil_tpfa.hpp>
#include <flow/flow_ebos_blackoil_legacyassembly.hpp>
#include <flow/flow_ebos_gasoil.hpp>
#include <flow/flow_ebos_gasoildiffuse.hpp>