From 51d551830f3a7b3f6c2c84a7ae2a311a4ff98b27 Mon Sep 17 00:00:00 2001
From: Timo Koch <timo.koch@iws.uni-stuttgart.de>
Date: Thu, 2 Apr 2020 17:32:43 +0200
Subject: [PATCH] [examples][tracer] Add optional initially open source code
 folds

---
 examples/1ptracer/doc/1pmodel.md          | 22 +++++++++++++++++++++-
 examples/1ptracer/doc/main.md             |  8 ++++++++
 examples/1ptracer/doc/tracermodel.md      | 21 +++++++++++++++++++++
 examples/1ptracer/main.cc                 |  4 ++++
 examples/1ptracer/problem_1p.hh           |  4 +++-
 examples/1ptracer/problem_tracer.hh       |  4 +++-
 examples/1ptracer/properties_1p.hh        |  4 +++-
 examples/1ptracer/properties_tracer.hh    |  4 +++-
 examples/1ptracer/spatialparams_1p.hh     |  4 +++-
 examples/1ptracer/spatialparams_tracer.hh |  4 +++-
 10 files changed, 72 insertions(+), 7 deletions(-)

diff --git a/examples/1ptracer/doc/1pmodel.md b/examples/1ptracer/doc/1pmodel.md
index 62e42912b4..c2a6499bfb 100644
--- a/examples/1ptracer/doc/1pmodel.md
+++ b/examples/1ptracer/doc/1pmodel.md
@@ -26,6 +26,11 @@ The documentation provided in the sequel is structured as follows:
 In this file, the type tag used for the single-phase flow simulation is defined,
 for which we then specialize `properties` to the needs of the desired setup.
 
+
+<details open>
+<summary><b>Click to hide/show the file documentation</b> (or inspect the [source code](../properties_1p.hh))</summary>
+
+
 ### Includes
 <details><summary> Click to show includes</summary>
 
@@ -174,6 +179,8 @@ struct EnableGridGeometryCache<TypeTag, TTag::IncompressibleTest> { static const
 
 </details>
 
+</details>
+
 
 
 ## Initial and boundary conditions (`problem_1p.hh`)
@@ -181,6 +188,11 @@ struct EnableGridGeometryCache<TypeTag, TTag::IncompressibleTest> { static const
 This file contains the __problem class__ which defines the initial and boundary
 conditions for the single-phase flow simulation.
 
+
+<details open>
+<summary><b>Click to hide/show the file documentation</b> (or inspect the [source code](../problem_1p.hh))</summary>
+
+
 ### Include files
 
 The only include we need here is the `PorousMediumFlowProblem` class, the base
@@ -277,15 +289,21 @@ Fluid properties that depend on temperature will be calculated with this value.
 ```
 
 
+</details>
 
 
-## Parameter distributions (`spatialparams_1p.hh`)
 
+## Parameter distributions (`spatialparams_1p.hh`)
 
 This file contains the __spatial parameters class__ which defines the
 distributions for the porous medium parameters permeability and porosity
 over the computational grid
 
+
+<details open>
+<summary><b>Click to hide/show the file documentation</b> (or inspect the [source code](../spatialparams_1p.hh))</summary>
+
+
 ### Include files
 In this example, we use a randomly generated and element-wise distributed
 permeability field. For this, we use the random number generation facilities
@@ -440,6 +458,8 @@ private:
 
 </details>
 
+</details>
+
 
 | [:arrow_left: Back to the main documentation](../README.md) | [:arrow_right: Continue with part 2](tracermodel.md) |
 |---|---:|
diff --git a/examples/1ptracer/doc/main.md b/examples/1ptracer/doc/main.md
index e5981888b3..ab4ce550f9 100644
--- a/examples/1ptracer/doc/main.md
+++ b/examples/1ptracer/doc/main.md
@@ -14,6 +14,12 @@ This file contains the main program flow. In this example, we solve a single-pha
 to obtain a pressure distribution in the domain. Subsequently, the distribution of volume fluxes
 is computed from that pressure distribution, which is then passed to a tracer problem to solve
 the transport of an initial contamination through the model domain.
+
+
+<details open>
+<summary><b>Click to hide/show the file documentation</b> (or inspect the [source code](../main.cc))</summary>
+
+
 ## Included header files
 <details>
 These are DUNE helper classes related to parallel computations, time measurements and file I/O
@@ -412,6 +418,8 @@ catch (...)
 
 </details>
 
+</details>
+
 
 | [:arrow_left: Back to the main documentation](../README.md) | [:arrow_left: Go back to part 2](tracermodel.md) |
 |---|---:|
diff --git a/examples/1ptracer/doc/tracermodel.md b/examples/1ptracer/doc/tracermodel.md
index d6b67a1f7e..12255a59d1 100644
--- a/examples/1ptracer/doc/tracermodel.md
+++ b/examples/1ptracer/doc/tracermodel.md
@@ -26,6 +26,11 @@ The documentation provided in the sequel is structured as follows:
 This file defines the type tag used for the tracer transport simulation, for
 which we then specialize `properties` to the needs of the desired setup.
 
+
+<details open>
+<summary><b>Click to hide/show the file documentation</b> (or inspect the [source code](../properties_tracer.hh))</summary>
+
+
 ### Include files
 <details>
 As for the single-phase problem, atype tag is defined also for this simulation.
@@ -213,6 +218,8 @@ struct SolutionDependentMolecularDiffusion<TypeTag, TTag::TracerTest>
 
 </details>
 
+</details>
+
 
 
 ## Initial and boundary conditions (`problem_tracer.hh`)
@@ -220,6 +227,11 @@ struct SolutionDependentMolecularDiffusion<TypeTag, TTag::TracerTest>
 This file contains the __problem class__ which defines the initial and boundary
 conditions for the tracer transport simulation.
 
+
+<details open>
+<summary><b>Click to hide/show the file documentation</b> (or inspect the [source code](../problem_tracer.hh))</summary>
+
+
 ### Include files
 The only include we need here is the `PorousMediumFlowProblem` class, the base
 class for Problems from which we will derive.
@@ -364,6 +376,8 @@ private:
 ```
 
 
+</details>
+
 
 
 ## Parameter distributions (`spatialparams_tracer.hh`)
@@ -374,6 +388,11 @@ and porosity in various functions for the tracer problem. Furthermore, spatially
 properties of the tracer fluid system are defined as well as functions related to setting
 and retrieving the volume fluxes calculated from the solution of the 1p problem.
 
+
+<details open>
+<summary><b>Click to hide/show the file documentation</b> (or inspect the [source code](../spatialparams_tracer.hh))</summary>
+
+
 ### Include files
 We include the spatial parameters class for single-phase models discretized by
 finite volume schemes, from which the spatial parameters defined for this example will inherit.
@@ -499,6 +518,8 @@ private:
 ```
 
 
+</details>
+
 
 | [:arrow_left: Back to the main documentation](../README.md) | [:arrow_left: Go back to part 1](1pmodel.md) | [:arrow_right: Continue with part 3](main.md) |
 |---|---|---:|
diff --git a/examples/1ptracer/main.cc b/examples/1ptracer/main.cc
index 0123a8c875..6cfb1c741b 100644
--- a/examples/1ptracer/main.cc
+++ b/examples/1ptracer/main.cc
@@ -24,6 +24,9 @@
 // to obtain a pressure distribution in the domain. Subsequently, the distribution of volume fluxes
 // is computed from that pressure distribution, which is then passed to a tracer problem to solve
 // the transport of an initial contamination through the model domain.
+//
+// [[content]]
+//
 // ## Included header files
 // <details>
 // [[exclude]]
@@ -369,3 +372,4 @@ catch (...)
 }
 // [[/codeblock]]
 // </details>
+// [[/content]]
diff --git a/examples/1ptracer/problem_1p.hh b/examples/1ptracer/problem_1p.hh
index e472c418c9..858d768c20 100644
--- a/examples/1ptracer/problem_1p.hh
+++ b/examples/1ptracer/problem_1p.hh
@@ -25,6 +25,8 @@
 // This file contains the __problem class__ which defines the initial and boundary
 // conditions for the single-phase flow simulation.
 //
+// [[content]]
+//
 // ### Include files
 //
 // The only include we need here is the `PorousMediumFlowProblem` class, the base
@@ -112,5 +114,5 @@ public:
 }; // end class definition of OnePTestProblem
 } // end namespace Dumux
 // [[/codeblock]]
-
+// [[/content]]
 #endif
diff --git a/examples/1ptracer/problem_tracer.hh b/examples/1ptracer/problem_tracer.hh
index ae6efb07b0..0329500f90 100644
--- a/examples/1ptracer/problem_tracer.hh
+++ b/examples/1ptracer/problem_tracer.hh
@@ -25,6 +25,8 @@
 // This file contains the __problem class__ which defines the initial and boundary
 // conditions for the tracer transport simulation.
 //
+// [[content]]
+//
 // ### Include files
 // The only include we need here is the `PorousMediumFlowProblem` class, the base
 // class for Problems from which we will derive.
@@ -158,5 +160,5 @@ private:
 }; // end class definition TracerTestProblem
 } // end namespace Dumux
 // [[/codeblock]]
-
+// [[/content]]
 #endif
diff --git a/examples/1ptracer/properties_1p.hh b/examples/1ptracer/properties_1p.hh
index 0cbbe1993a..50dffaa884 100644
--- a/examples/1ptracer/properties_1p.hh
+++ b/examples/1ptracer/properties_1p.hh
@@ -25,6 +25,8 @@
 // In this file, the type tag used for the single-phase flow simulation is defined,
 // for which we then specialize `properties` to the needs of the desired setup.
 //
+// [[content]]
+//
 // ### Includes
 // [[details]] includes
 //
@@ -143,5 +145,5 @@ struct EnableGridGeometryCache<TypeTag, TTag::IncompressibleTest> { static const
 } // end namespace Dumux::Properties
 // [[/codeblock]]
 // </details>
-
+// [[/content]]
 #endif
diff --git a/examples/1ptracer/properties_tracer.hh b/examples/1ptracer/properties_tracer.hh
index 1cdc157553..6b3b09fe2e 100644
--- a/examples/1ptracer/properties_tracer.hh
+++ b/examples/1ptracer/properties_tracer.hh
@@ -25,6 +25,8 @@
 // This file defines the type tag used for the tracer transport simulation, for
 // which we then specialize `properties` to the needs of the desired setup.
 //
+// [[content]]
+//
 // ### Include files
 // <details>
 // As for the single-phase problem, atype tag is defined also for this simulation.
@@ -182,5 +184,5 @@ struct SolutionDependentMolecularDiffusion<TypeTag, TTag::TracerTest>
 } // end namespace Dumux
 // [[/codeblock]]
 // </details>
-
+// [[/content]]
 #endif
diff --git a/examples/1ptracer/spatialparams_1p.hh b/examples/1ptracer/spatialparams_1p.hh
index 07d8f57ba3..62d6208a3d 100644
--- a/examples/1ptracer/spatialparams_1p.hh
+++ b/examples/1ptracer/spatialparams_1p.hh
@@ -22,11 +22,12 @@
 
 // ## Parameter distributions (`spatialparams_1p.hh`)
 //
-//
 // This file contains the __spatial parameters class__ which defines the
 // distributions for the porous medium parameters permeability and porosity
 // over the computational grid
 //
+// [[content]]
+//
 // ### Include files
 // In this example, we use a randomly generated and element-wise distributed
 // permeability field. For this, we use the random number generation facilities
@@ -159,4 +160,5 @@ private:
 } // end namespace Dumux
 // [[/codeblock]]
 // </details>
+// [[/content]]
 #endif
diff --git a/examples/1ptracer/spatialparams_tracer.hh b/examples/1ptracer/spatialparams_tracer.hh
index 710acb59b8..103ebda4eb 100644
--- a/examples/1ptracer/spatialparams_tracer.hh
+++ b/examples/1ptracer/spatialparams_tracer.hh
@@ -28,6 +28,8 @@
 // properties of the tracer fluid system are defined as well as functions related to setting
 // and retrieving the volume fluxes calculated from the solution of the 1p problem.
 //
+// [[content]]
+//
 // ### Include files
 // We include the spatial parameters class for single-phase models discretized by
 // finite volume schemes, from which the spatial parameters defined for this example will inherit.
@@ -128,5 +130,5 @@ private:
 }; // end class definition TracerTestSpatialParams
 } // end namespace Dumux
 // [[/codeblock]]
-
+// [[/content]]
 #endif
-- 
GitLab