changed: build polygrid simulator as a object library

allows for building in parallel with the main library
This commit is contained in:
Arne Morten Kvarving 2021-08-16 12:40:41 +02:00
parent 46087f8f00
commit c05f67a382
4 changed files with 77 additions and 12 deletions

View File

@ -354,6 +354,13 @@ if(BUILD_FLOW_VARIANTS)
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
opm_add_test(flow
ONLY_COMPILE
@ -402,6 +409,7 @@ opm_add_test(flow_poly
LIBRARIES opmsimulators
SOURCES
flow/flow_blackoil_poly.cpp
$<TARGET_OBJECTS:flow_libblackoil_poly>
$<TARGET_OBJECTS:moduleVersion>)
target_compile_definitions(flow_poly PRIVATE USE_POLYHEDRALGRID)

View File

@ -17,19 +17,9 @@
along with OPM. If not, see <http://www.gnu.org/licenses/>.
*/
#include "config.h"
#include <opm/simulators/flow/Main.hpp>
namespace Opm::Properties {
namespace TTag {
struct EclFlowProblemPoly {
using InheritsFrom = std::tuple<EclFlowProblem>;
};
}
}
#include <flow/flow_ebos_blackoil_poly.hpp>
int main(int argc, char** argv)
{
using TypeTag = Opm::Properties::TTag::EclFlowProblemPoly;
auto mainObject = Opm::Main(argc, argv);
return mainObject.runStatic<TypeTag>();
return Opm::flowEbosBlackoilPolyMain(argc, argv);
}

View 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>();
}
}

View 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