From 00875fa60be51b3f19ecd6bf9c0e7688f41c4e4b Mon Sep 17 00:00:00 2001 From: IvBu <ivan.buntic@iws.uni-stuttgart.de> Date: Fri, 7 Mar 2025 16:58:55 +0100 Subject: [PATCH] Update patches. --- .patches/exercise-model/exercise-model.patch | 22 +++++++++------- .../exercise-properties.patch | 26 +++++++++---------- 2 files changed, 25 insertions(+), 23 deletions(-) diff --git a/.patches/exercise-model/exercise-model.patch b/.patches/exercise-model/exercise-model.patch index a84dc582..d29bc612 100644 --- a/.patches/exercise-model/exercise-model.patch +++ b/.patches/exercise-model/exercise-model.patch @@ -1,6 +1,6 @@ diff -ruN exercises/exercise-model/CMakeLists.txt exercises/solution/exercise-model/CMakeLists.txt ---- exercises/exercise-model/CMakeLists.txt 2025-03-07 10:42:02.615882961 +0100 -+++ exercises/solution/exercise-model/CMakeLists.txt 2025-03-07 10:42:02.621882923 +0100 +--- exercises/exercise-model/CMakeLists.txt 2025-03-07 16:57:19.034997903 +0100 ++++ exercises/solution/exercise-model/CMakeLists.txt 2025-03-07 16:57:19.038998197 +0100 @@ -3,5 +3,5 @@ dune_symlink_to_source_files(FILES images params.input) @@ -9,8 +9,8 @@ diff -ruN exercises/exercise-model/CMakeLists.txt exercises/solution/exercise-mo +dumux_add_test(NAME exercise_nonlineardiffusion_sol SOURCES main.cc) diff -ruN exercises/exercise-model/main.cc exercises/solution/exercise-model/main.cc ---- exercises/exercise-model/main.cc 2025-03-07 11:30:34.876192021 +0100 -+++ exercises/solution/exercise-model/main.cc 2025-03-07 11:30:34.878192008 +0100 +--- exercises/exercise-model/main.cc 2025-03-07 16:57:19.034997903 +0100 ++++ exercises/solution/exercise-model/main.cc 2025-03-07 16:57:19.038998197 +0100 @@ -30,6 +30,7 @@ #include <dumux/assembly/fvassembler.hh> @@ -148,8 +148,8 @@ diff -ruN exercises/exercise-model/main.cc exercises/solution/exercise-model/mai }// end main diff -ruN exercises/exercise-model/model.hh exercises/solution/exercise-model/model.hh --- exercises/exercise-model/model.hh 1970-01-01 01:00:00.000000000 +0100 -+++ exercises/solution/exercise-model/model.hh 2025-03-07 10:42:02.622882916 +0100 -@@ -0,0 +1,210 @@ ++++ exercises/solution/exercise-model/model.hh 2025-03-07 16:57:19.047998860 +0100 +@@ -0,0 +1,212 @@ +// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- +// vi: set et ts=4 sw=4 sts=4: +// @@ -169,6 +169,7 @@ diff -ruN exercises/exercise-model/model.hh exercises/solution/exercise-model/mo +#include <dumux/common/numeqvector.hh> +#include <dumux/common/volumevariables.hh> +#include <dumux/discretization/method.hh> ++#include <dumux/discretization/defaultlocaloperator.hh> + +// The property tag is simply an empty struct with the name `NonlinearDiffusionModel` +namespace Dumux::Properties::TTag { @@ -227,9 +228,11 @@ diff -ruN exercises/exercise-model/model.hh exercises/solution/exercise-model/mo + */ +template<class TypeTag> +class NonlinearDiffusionModelLocalResidual -+: public GetPropType<TypeTag, Properties::BaseLocalResidual> ++: public DiscretizationDefaultLocalOperator<TypeTag> +{ -+ using ParentType = GetPropType<TypeTag, Properties::BaseLocalResidual>; ++ using GridGeometry = GetPropType<TypeTag, Properties::GridGeometry>; ++ using ParentType = DiscretizationDefaultLocalOperator<TypeTag>; ++ + using Scalar = GetPropType<TypeTag, Properties::Scalar>; + using Problem = GetPropType<TypeTag, Properties::Problem>; + using NumEqVector = Dumux::NumEqVector<GetPropType<TypeTag, Properties::PrimaryVariables>>; @@ -239,7 +242,6 @@ diff -ruN exercises/exercise-model/model.hh exercises/solution/exercise-model/mo + using ElementVolumeVariables = typename GridVariables::GridVolumeVariables::LocalView; + using ElementFluxVariablesCache = typename GridVariables::GridFluxVariablesCache::LocalView; + -+ using GridGeometry = GetPropType<TypeTag, Properties::GridGeometry>; + using FVElementGeometry = typename GridGeometry::LocalView; + using SubControlVolume = typename GridGeometry::SubControlVolume; + using SubControlVolumeFace = typename GridGeometry::SubControlVolumeFace; @@ -361,7 +363,7 @@ diff -ruN exercises/exercise-model/model.hh exercises/solution/exercise-model/mo + +#endif diff -ruN exercises/exercise-model/README.md exercises/solution/exercise-model/README.md ---- exercises/exercise-model/README.md 2025-03-07 11:30:34.876192021 +0100 +--- exercises/exercise-model/README.md 2025-03-07 16:57:19.034997903 +0100 +++ exercises/solution/exercise-model/README.md 1970-01-01 01:00:00.000000000 +0100 @@ -1,195 +0,0 @@ -# Exercise Model (DuMuX course) diff --git a/.patches/exercise-properties/exercise-properties.patch b/.patches/exercise-properties/exercise-properties.patch index 05a072c2..8f2fe126 100644 --- a/.patches/exercise-properties/exercise-properties.patch +++ b/.patches/exercise-properties/exercise-properties.patch @@ -1,6 +1,6 @@ diff -ruN exercises/exercise-properties/CMakeLists.txt exercises/solution/exercise-properties/CMakeLists.txt ---- exercises/exercise-properties/CMakeLists.txt 2025-03-07 10:42:02.615882961 +0100 -+++ exercises/solution/exercise-properties/CMakeLists.txt 2025-03-07 10:42:02.622882916 +0100 +--- exercises/exercise-properties/CMakeLists.txt 2025-03-07 16:57:19.034997903 +0100 ++++ exercises/solution/exercise-properties/CMakeLists.txt 2025-03-07 16:57:19.038998197 +0100 @@ -1,8 +1,8 @@ # SPDX-FileCopyrightText: Copyright © DuMux-Course contributors, see AUTHORS.md in root folder # SPDX-License-Identifier: GPL-3.0-or-later @@ -13,9 +13,9 @@ diff -ruN exercises/exercise-properties/CMakeLists.txt exercises/solution/exerci # add a symlink for each input file diff -ruN exercises/exercise-properties/mylocalresidual.hh exercises/solution/exercise-properties/mylocalresidual.hh ---- exercises/exercise-properties/mylocalresidual.hh 2025-03-07 11:30:34.876192021 +0100 -+++ exercises/solution/exercise-properties/mylocalresidual.hh 2025-03-07 10:42:02.622882916 +0100 -@@ -59,8 +59,6 @@ +--- exercises/exercise-properties/mylocalresidual.hh 2025-03-07 16:57:19.047998860 +0100 ++++ exercises/solution/exercise-properties/mylocalresidual.hh 2025-03-07 16:57:19.047998860 +0100 +@@ -61,8 +61,6 @@ * \note The volVars can be different to allow computing * the implicit euler time derivative here */ @@ -24,7 +24,7 @@ diff -ruN exercises/exercise-properties/mylocalresidual.hh exercises/solution/ex NumEqVector computeStorage(const Problem& problem, const SubControlVolume& scv, const VolumeVariables& volVars) const -@@ -71,7 +69,6 @@ +@@ -73,7 +71,6 @@ { auto eqIdx = conti0EqIdx + phaseIdx; storage[eqIdx] = volVars.porosity() @@ -32,7 +32,7 @@ diff -ruN exercises/exercise-properties/mylocalresidual.hh exercises/solution/ex * volVars.saturation(phaseIdx); //! The energy storage in the fluid phase with index phaseIdx -@@ -95,8 +92,6 @@ +@@ -97,8 +94,6 @@ * \param scvf The sub control volume face to compute the flux on * \param elemFluxVarsCache The cache related to flux computation */ @@ -41,7 +41,7 @@ diff -ruN exercises/exercise-properties/mylocalresidual.hh exercises/solution/ex NumEqVector computeFlux(const Problem& problem, const Element& element, const FVElementGeometry& fvGeometry, -@@ -112,7 +107,7 @@ +@@ -114,7 +109,7 @@ { // the physical quantities for which we perform upwinding auto upwindTerm = [phaseIdx](const auto& volVars) @@ -51,8 +51,8 @@ diff -ruN exercises/exercise-properties/mylocalresidual.hh exercises/solution/ex auto eqIdx = conti0EqIdx + phaseIdx; flux[eqIdx] = fluxVars.advectiveFlux(phaseIdx, upwindTerm); diff -ruN exercises/exercise-properties/problem.hh exercises/solution/exercise-properties/problem.hh ---- exercises/exercise-properties/problem.hh 2025-03-07 11:30:34.876192021 +0100 -+++ exercises/solution/exercise-properties/problem.hh 2025-03-07 10:42:02.622882916 +0100 +--- exercises/exercise-properties/problem.hh 2025-03-07 16:57:19.035997976 +0100 ++++ exercises/solution/exercise-properties/problem.hh 2025-03-07 16:57:19.039998271 +0100 @@ -11,6 +11,7 @@ #ifndef DUMUX_INCOMPRESSIBLE_TWOP_TEST_PROBLEM_HH #define DUMUX_INCOMPRESSIBLE_TWOP_TEST_PROBLEM_HH @@ -77,8 +77,8 @@ diff -ruN exercises/exercise-properties/problem.hh exercises/solution/exercise-p return values; } diff -ruN exercises/exercise-properties/properties.hh exercises/solution/exercise-properties/properties.hh ---- exercises/exercise-properties/properties.hh 2025-03-07 11:30:34.876192021 +0100 -+++ exercises/solution/exercise-properties/properties.hh 2025-03-07 10:42:02.622882916 +0100 +--- exercises/exercise-properties/properties.hh 2025-03-07 16:57:19.035997976 +0100 ++++ exercises/solution/exercise-properties/properties.hh 2025-03-07 16:57:19.039998271 +0100 @@ -27,9 +27,7 @@ #include "spatialparams.hh" @@ -103,7 +103,7 @@ diff -ruN exercises/exercise-properties/properties.hh exercises/solution/exercis // Set the fluid system template<class TypeTag> diff -ruN exercises/exercise-properties/README.md exercises/solution/exercise-properties/README.md ---- exercises/exercise-properties/README.md 2025-02-26 11:38:46.811817734 +0100 +--- exercises/exercise-properties/README.md 2025-02-28 14:22:14.796953365 +0100 +++ exercises/solution/exercise-properties/README.md 1970-01-01 01:00:00.000000000 +0100 @@ -1,75 +0,0 @@ -# Exercise Properties (DuMuX course) -- GitLab