mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
changed: build polygrid simulator as a object library
allows for building in parallel with the main library
This commit is contained in:
parent
46087f8f00
commit
c05f67a382
@ -354,6 +354,13 @@ if(BUILD_FLOW_VARIANTS)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(BUILD_FLOW_POLY_GRID)
|
||||||
|
add_library(flow_libblackoil_poly OBJECT flow/flow_ebos_blackoil_poly.cpp)
|
||||||
|
if(TARGET fmt::fmt)
|
||||||
|
target_link_libraries(flow_libblackoil_poly fmt::fmt)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
# the production oriented general-purpose ECL simulator
|
# the production oriented general-purpose ECL simulator
|
||||||
opm_add_test(flow
|
opm_add_test(flow
|
||||||
ONLY_COMPILE
|
ONLY_COMPILE
|
||||||
@ -402,6 +409,7 @@ opm_add_test(flow_poly
|
|||||||
LIBRARIES opmsimulators
|
LIBRARIES opmsimulators
|
||||||
SOURCES
|
SOURCES
|
||||||
flow/flow_blackoil_poly.cpp
|
flow/flow_blackoil_poly.cpp
|
||||||
|
$<TARGET_OBJECTS:flow_libblackoil_poly>
|
||||||
$<TARGET_OBJECTS:moduleVersion>)
|
$<TARGET_OBJECTS:moduleVersion>)
|
||||||
target_compile_definitions(flow_poly PRIVATE USE_POLYHEDRALGRID)
|
target_compile_definitions(flow_poly PRIVATE USE_POLYHEDRALGRID)
|
||||||
|
|
||||||
|
@ -17,19 +17,9 @@
|
|||||||
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include <opm/simulators/flow/Main.hpp>
|
#include <flow/flow_ebos_blackoil_poly.hpp>
|
||||||
|
|
||||||
namespace Opm::Properties {
|
|
||||||
namespace TTag {
|
|
||||||
struct EclFlowProblemPoly {
|
|
||||||
using InheritsFrom = std::tuple<EclFlowProblem>;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int main(int argc, char** argv)
|
int main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
using TypeTag = Opm::Properties::TTag::EclFlowProblemPoly;
|
return Opm::flowEbosBlackoilPolyMain(argc, argv);
|
||||||
auto mainObject = Opm::Main(argc, argv);
|
|
||||||
return mainObject.runStatic<TypeTag>();
|
|
||||||
}
|
}
|
||||||
|
38
flow/flow_ebos_blackoil_poly.cpp
Normal file
38
flow/flow_ebos_blackoil_poly.cpp
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
/*
|
||||||
|
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 <opm/simulators/flow/Main.hpp>
|
||||||
|
|
||||||
|
namespace Opm {
|
||||||
|
namespace Properties {
|
||||||
|
namespace TTag {
|
||||||
|
struct EclFlowProblemPoly {
|
||||||
|
using InheritsFrom = std::tuple<EclFlowProblem>;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int flowEbosBlackoilPolyMain(int argc, char** argv)
|
||||||
|
{
|
||||||
|
using TypeTag = Opm::Properties::TTag::EclFlowProblemPoly;
|
||||||
|
auto mainObject = Opm::Main(argc, argv);
|
||||||
|
return mainObject.runStatic<TypeTag>();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
29
flow/flow_ebos_blackoil_poly.hpp
Normal file
29
flow/flow_ebos_blackoil_poly.hpp
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
/*
|
||||||
|
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
|
Loading…
Reference in New Issue
Block a user