From 5164f6f220b446a83870a4e83f4718445a4167e6 Mon Sep 17 00:00:00 2001
From: Timo Koch <timokoch@math.uio.no>
Date: Fri, 24 Mar 2023 10:42:13 +0100
Subject: [PATCH] [example][diffusion] Document the BaseResidual property

---
 examples/diffusion/doc/model.md | 10 ++++++++++
 examples/diffusion/model.hh     | 10 ++++++++++
 2 files changed, 20 insertions(+)

diff --git a/examples/diffusion/doc/model.md b/examples/diffusion/doc/model.md
index e4ee1e8600..145552f4ad 100644
--- a/examples/diffusion/doc/model.md
+++ b/examples/diffusion/doc/model.md
@@ -58,11 +58,21 @@ exactly one sub control volume (`scv`) per element and several ($2$ in $\mathbb{
 sub control volume faces (`scvf`). In the local residual, we can implement the
 constribution for one `scv` (storage and source terms) or one `scvf` (flux terms).
 
+Let's have a look at the class implementation.
+
 
 <details open>
 <summary><b>Click to hide/show the file documentation</b> (or inspect the [source code](../model.hh))</summary>
 
 
+The class `DiffusionModelLocalResidual` inherits from something called `BaseLocalResidual`.
+This base class differs depending on the chosen discretization scheme. For the box method
+(which is a control-volume finite element scheme) used in this example, the property
+`BaseLocalResidual` is specialized to `CVFELocalResidual<TypeTag>`
+in [dumux/discretization/box.hh](https://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/blob/master/dumux/discretization/box.hh).
+Since this local residual only works with control-volume finite element schemes due to
+the flux implementation, we could have also chosen to inherit from `public CVFELocalResidual<TypeTag>`.
+
 ```cpp
 namespace Dumux {
 template<class TypeTag>
diff --git a/examples/diffusion/model.hh b/examples/diffusion/model.hh
index faa06b3654..c2c9b67dd3 100644
--- a/examples/diffusion/model.hh
+++ b/examples/diffusion/model.hh
@@ -60,7 +60,17 @@ struct DiffusionModel {};
 // sub control volume faces (`scvf`). In the local residual, we can implement the
 // constribution for one `scv` (storage and source terms) or one `scvf` (flux terms).
 //
+// Let's have a look at the class implementation.
+//
 // [[content]]
+//
+// The class `DiffusionModelLocalResidual` inherits from something called `BaseLocalResidual`.
+// This base class differs depending on the chosen discretization scheme. For the box method
+// (which is a control-volume finite element scheme) used in this example, the property
+// `BaseLocalResidual` is specialized to `CVFELocalResidual<TypeTag>`
+// in [dumux/discretization/box.hh](https://git.iws.uni-stuttgart.de/dumux-repositories/dumux/-/blob/master/dumux/discretization/box.hh).
+// Since this local residual only works with control-volume finite element schemes due to
+// the flux implementation, we could have also chosen to inherit from `public CVFELocalResidual<TypeTag>`.
 namespace Dumux {
 template<class TypeTag>
 class DiffusionModelLocalResidual
-- 
GitLab