From eb9d68a5c6f6c247c86a6d8ff615a64dd59c799a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dennis=20Gl=C3=A4ser?= <dennis.glaeser@iws.uni-stuttgart.de>
Date: Thu, 19 Oct 2023 09:34:11 +0200
Subject: [PATCH] [examples][cahn-hilliard] minor improvements related to code
 docs

---
 examples/cahn_hilliard/main.cc  |  4 ++--
 examples/cahn_hilliard/model.hh | 11 +++++------
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/examples/cahn_hilliard/main.cc b/examples/cahn_hilliard/main.cc
index 3357cd4d65..6ddde40f8b 100644
--- a/examples/cahn_hilliard/main.cc
+++ b/examples/cahn_hilliard/main.cc
@@ -85,7 +85,7 @@ public:
 
     // In the `source` function, we implement the derivative of the free energy.
     // This demonstrates how parts of the local residual can be split into model specific
-    // parts and parts that might change from scenario to scenario.
+    // parts (see `CahnHilliardModelLocalResidual`) and parts that might change from scenario to scenario.
     template<class ElementVolumeVariables>
     NumEqVector source(const Element &element,
                        const FVElementGeometry& fvGeometry,
@@ -114,7 +114,7 @@ public:
 
     // The parameters interfaces are used in the local residual (see Part 1).
     // We can name this interface however we want as long as we adapt the calling site
-    // in the `LocalResidual` class in `model.hh`.
+    // in the `CahnHilliardModelLocalResidual` class in `model.hh`.
     // [[codeblock]]
     Scalar mobility() const
     { return mobility_; }
diff --git a/examples/cahn_hilliard/model.hh b/examples/cahn_hilliard/model.hh
index e8e62cf606..8fdc727902 100644
--- a/examples/cahn_hilliard/model.hh
+++ b/examples/cahn_hilliard/model.hh
@@ -181,14 +181,13 @@ public:
     }
     // [[/codeblock]]
 
-    // **Flux term:** The function `computeFlux` computes the fluxes
-    // over a sub control volume faces, including the integration over
-    // the area of the face.
+    // **Flux term:** The function `computeFlux` computes the integrated
+    // fluxes over a sub control volume face.
     //
     // ```math
     // \begin{aligned}
-    // F_{K,\sigma,0} &= -M \sum_{B \in \mathcal{B}_K} \mu_{h,B} \nabla N_B \cdot\boldsymbol{n} \vert \sigma \vert \cr
-    // F_{K,\sigma,1} &= -\gamma \sum_{B \in \mathcal{B}_K} c_{h,B} \nabla N_B \cdot\boldsymbol{n} \vert \sigma \vert
+    // F_{K,\sigma,0} &= -M \vert \sigma \vert \sum_{B \in \mathcal{B}_K} \mu_{h,B} \nabla N_B \cdot\boldsymbol{n} \cr
+    // F_{K,\sigma,1} &= -\gamma \vert \sigma \vert \sum_{B \in \mathcal{B}_K} c_{h,B} \nabla N_B \cdot\boldsymbol{n}
     // \end{aligned}
     // ````
     //
@@ -209,7 +208,7 @@ public:
         for (const auto& scv : scvs(fvGeometry))
         {
             const auto& volVars = elemVolVars[scv];
-            // v.axpy(a, w) means v <- v + a*w
+            // v.axpy(a, w) means v += a*w
             gradConcentration.axpy(
                 volVars.concentration(),
                 fluxVarCache.gradN(scv.indexInElement())
-- 
GitLab