remove use of hidden private defines for poly and alugrid

- fixed polygrid
- renamed executables to include blackoil in name
This commit is contained in:
hnil
2023-08-08 15:30:05 +02:00
committed by Arne Morten Kvarving
parent 63d37bd6f2
commit 66ff026008
9 changed files with 109 additions and 124 deletions
+17 -1
View File
@@ -18,7 +18,8 @@
*/
#include "config.h"
#include <opm/simulators/flow/Main.hpp>
#include <dune/alugrid/grid.hh>
#include <ebos/eclalugridvanguard.hh>
namespace Opm {
namespace Properties {
namespace TTag {
@@ -26,6 +27,21 @@ struct EclFlowProblemAlugrid {
using InheritsFrom = std::tuple<EclFlowProblem>;
};
}
template<class TypeTag>
struct Grid<TypeTag, TTag::EclFlowProblemAlugrid> {
static const int dim = 3;
using type = Dune::ALUGrid<dim, dim, Dune::cube, Dune::nonconforming,Dune::ALUGridMPIComm>;
};
// alugrid need cp grid as equilgrid
template<class TypeTag>
struct EquilGrid<TypeTag, TTag::EclFlowProblemAlugrid> {
using type = Dune::CpGrid;
};
template<class TypeTag>
struct Vanguard<TypeTag, TTag::EclFlowProblemAlugrid> {
using type = Opm::EclAluGridVanguard<TypeTag>;
};
template<class TypeTag>
struct EclEnableAquifers<TypeTag, TTag::EclFlowProblemAlugrid> {
static constexpr bool value = false;
-25
View File
@@ -1,25 +0,0 @@
/*
Copyright 2020, NORCE AS
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_poly.hpp>
int main(int argc, char** argv)
{
return Opm::flowEbosBlackoilPolyMain(argc, argv);
}
@@ -18,6 +18,11 @@
*/
#include "config.h"
#include <opm/simulators/flow/Main.hpp>
#include <opm/grid/polyhedralgrid.hh>
#include <ebos/eclpolyhedralgridvanguard.hh>
#include <ebos/equil/initstateequil_impl.hh>
#include <opm/models/blackoil/blackoillocalresidualtpfa.hh>
#include <opm/models/discretization/common/tpfalinearizer.hh>
namespace Opm {
namespace Properties {
@@ -26,9 +31,33 @@ namespace Properties {
using InheritsFrom = std::tuple<EclFlowProblem>;
};
}
}
int flowEbosBlackoilPolyMain(int argc, char** argv)
template<class TypeTag>
struct Linearizer<TypeTag, TTag::EclFlowProblemPoly> { using type = TpfaLinearizer<TypeTag>; };
template<class TypeTag>
struct LocalResidual<TypeTag, TTag::EclFlowProblemPoly> { using type = BlackOilLocalResidualTPFA<TypeTag>; };
template<class TypeTag>
struct EnableDiffusion<TypeTag, TTag::EclFlowProblemPoly> { static constexpr bool value = false; };
template<class TypeTag>
struct Grid<TypeTag, TTag::EclFlowProblemPoly> {
using type = Dune::PolyhedralGrid<3, 3>;
};
template<class TypeTag>
struct EquilGrid<TypeTag, TTag::EclFlowProblemPoly> {
//using type = Dune::CpGrid;
using type = GetPropType<TypeTag, Properties::Grid>;
};
template<class TypeTag>
struct Vanguard<TypeTag, TTag::EclFlowProblemPoly> {
using type = Opm::EclPolyhedralGridVanguard<TypeTag>;
};
}
}
int main(int argc, char** argv)
{
using TypeTag = Opm::Properties::TTag::EclFlowProblemPoly;
auto mainObject = std::make_unique<Opm::Main>(argc, argv);
@@ -37,5 +66,3 @@ int flowEbosBlackoilPolyMain(int argc, char** argv)
mainObject.reset();
return ret;
}
}
-29
View File
@@ -1,29 +0,0 @@
/*
Copyright 2013, 2014, 2015 SINTEF ICT, Applied Mathematics.
Copyright 2014 Dr. Blatt - HPC-Simulation-Software & Services
Copyright 2015, 2017 IRIS AS
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 FLOW_BLACKOIL_POLY_HPP
#define FLOW_BLACKOIL_POLY_HPP
namespace Opm {
int flowEbosBlackoilPolyMain(int argc, char** argv);
}
#endif