...
 
Commits (2)
......@@ -14,12 +14,6 @@ endif()
# add extra flags to debug compiler flags
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall")
# option to change DG scheme via config file
option(EXPERIMENTAL_DG_FEATURES
"Enable experimental DG settings through the config file"
OFF
)
#
if(NOT (dune-common_DIR OR dune-common_ROOT OR
"${CMAKE_PREFIX_PATH}" MATCHES ".*dune-common.*"))
......
......@@ -334,13 +334,14 @@ adding an empty line, make text **bold** or ``monospaced``.
**NIPG:** Non-Symmetric Interior Penalty
**OOB:** Oden, Babuska, Baumann: no penalty term
**OBB:** Oden, Babuska, Baumann: no penalty term
**IIP:** Incomplete Interior Penalty: no symmetry term
</definition>
<values> SIPG, NIPG, OOB, IIP </values>
<values> SIPG, NIPG, OBB, IIP </values>
<suggestion> SIPG </suggestion>
<comment> Experimental settings are enabled by the appropriate CMake flag.
<comment> Only change these settings if you are sure about what you
are doing!
</comment>
</parameter>
......
......@@ -15,8 +15,3 @@ target_link_libraries(transport
dorie-richards dorie-transport spdlog muparser::muparser hdf5 yaml-cpp)
add_custom_target("dorie" DEPENDS richards transport)
# enable setting operator scheme from config file
if(EXPERIMENTAL_DG_FEATURES)
target_compile_definitions("dorie" PUBLIC -DEXPERIMENTAL_DG_FEATURES)
endif()
......@@ -70,7 +70,7 @@ namespace Dune {
penalty_factor(config.get<RF>("numerics.penaltyFactor")),
time(0.0)
{
if (method_ == RichardsDGMethod::OOB)
if (method_ == RichardsDGMethod::OBB)
penalty_factor = 0.0;
}
......@@ -310,4 +310,4 @@ namespace Dune {
} // namespace Dorie
} // namespace Dune
#endif // DUNE_DORIE_ERROR_INDICATOR_HH
\ No newline at end of file
#endif // DUNE_DORIE_ERROR_INDICATOR_HH
......@@ -32,7 +32,7 @@ struct RichardsDGMethod
{
enum Type { NIPG, //!< Non-symmetric interior penalty
SIPG, //!< Symmetric interior penalty (default)
OOB, //!< Oden, Babuska, Baumann (no penalty term)
OBB, //!< Oden, Babuska, Baumann (no penalty term)
IIP //!< Incomplete interior penalty (no symmetry)
};
};
......@@ -88,8 +88,8 @@ inline auto read_experimental_operator_settings(
method = RichardsDGMethod::SIPG;
else if (method_str == "NIPG")
method = RichardsDGMethod::NIPG;
else if (method_str == "OOB")
method = RichardsDGMethod::OOB;
else if (method_str == "OBB")
method = RichardsDGMethod::OBB;
else if (method_str == "IIP")
method = RichardsDGMethod::IIP;
else {
......@@ -230,12 +230,12 @@ public:
cache(20)
{
theta = 0.; // IIP
if (method == RichardsDGMethod::NIPG || method == RichardsDGMethod::OOB)
if (method == RichardsDGMethod::NIPG || method == RichardsDGMethod::OBB)
theta = 1.;
else if (method == RichardsDGMethod::SIPG)
theta = -1.;
if (method == RichardsDGMethod::OOB)
if (method == RichardsDGMethod::OBB)
penalty_factor = 0.;
}
......
......@@ -56,19 +56,14 @@ RichardsSimulation<Traits>::RichardsSimulation (
finitial = FlowInitialFactory::create(inifile, gv, this->_log);
// --- Local Operators ---
#ifdef EXPERIMENTAL_DG_FEATURES
// read experimental settings from inifile
namespace OP = Dune::Dorie::Operator;
const auto settings = OP::read_experimental_operator_settings(inifile);
const auto method = std::get<OP::RichardsDGMethod::Type>(settings);
const auto upwinding = std::get<OP::RichardsDGUpwinding::Type>(settings);
const auto weights = std::get<OP::RichardsDGWeights::Type>(settings);
slop = std::make_unique<SLOP>(inifile, fparam, fboundary, fsource,
method, upwinding, weights);
#else
slop = std::make_unique<SLOP>(inifile, fparam, fboundary, fsource);
#endif // EXPERIMENTAL_DG_FEATURES
tlop = std::make_unique<TLOP>(inifile, fparam);
controller = std::make_unique<CalculationController>(
......