flow_ebos: do no longer use the generic FlowMain class

this will allow to boil the code down.
This commit is contained in:
Andreas Lauser 2016-07-12 19:01:14 +02:00
parent 50ebb66041
commit 3027e1f39d
3 changed files with 66 additions and 7 deletions

View File

@ -164,6 +164,7 @@ list (APPEND PUBLIC_HEADER_FILES
opm/autodiff/DuneMatrix.hpp
opm/autodiff/ExtractParallelGridInformationToISTL.hpp
opm/autodiff/FlowMain.hpp
opm/autodiff/FlowMainEbos.hpp
opm/autodiff/FlowMainPolymer.hpp
opm/autodiff/FlowMainSequential.hpp
opm/autodiff/FlowMainSolvent.hpp

View File

@ -27,16 +27,12 @@
#include <dune/grid/CpGrid.hpp>
#include <opm/autodiff/SimulatorFullyImplicitBlackoilEbos.hpp>
#include <opm/autodiff/FlowMain.hpp>
#include <opm/autodiff/FlowMainEbos.hpp>
// ----------------- Main program -----------------
int
main(int argc, char** argv)
int main(int argc, char** argv)
{
typedef Dune::CpGrid Grid;
typedef Opm::SimulatorFullyImplicitBlackoilEbos<Grid> Simulator;
Opm::FlowMain<Grid, Simulator> mainfunc;
Opm::FlowMainEbos mainfunc;
return mainfunc.execute(argc, argv);
}

View File

@ -0,0 +1,62 @@
/*
Copyright 2013, 2014, 2015 SINTEF ICT, Applied Mathematics.
Copyright 2014 Dr. Blatt - HPC-Simulation-Software & Services
Copyright 2015 IRIS AS
Copyright 2014 STATOIL ASA.
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 OPM_FLOW_MAIN_EBOS_HEADER_INCLUDED
#define OPM_FLOW_MAIN_EBOS_HEADER_INCLUDED
#include <opm/autodiff/FlowMain.hpp>
#include <opm/autodiff/BlackoilModelEbos.hpp>
namespace Opm
{
// The FlowMain class is the ebos based black-oil simulator.
class FlowMainEbos : public FlowMainBase<FlowMainEbos, Dune::CpGrid, Opm::SimulatorFullyImplicitBlackoilEbos<Dune::CpGrid> >
{
protected:
typedef Opm::SimulatorFullyImplicitBlackoilEbos<Dune::CpGrid> Simulator;
typedef FlowMainBase<FlowMainEbos, Dune::CpGrid, Simulator> Base;
friend Base;
// Create simulator instance.
// Writes to:
// simulator_
void createSimulator()
{
// Create the simulator instance.
Base::simulator_.reset(new Simulator(Base::param_,
Base::grid_init_->grid(),
*Base::geoprops_,
*Base::fluidprops_,
Base::rock_comp_->isActive() ? Base::rock_comp_.get() : nullptr,
*Base::fis_solver_,
Base::gravity_.data(),
Base::deck_->hasKeyword("DISGAS"),
Base::deck_->hasKeyword("VAPOIL"),
Base::eclipse_state_,
*Base::output_writer_,
Base::threshold_pressures_));
}
};
} // namespace Opm
#endif // OPM_FLOW_MAIN_EBOS_HEADER_INCLUDED