@@ -9,47 +9,51 @@ Example code is in [`04_documentation/examples/technical_writing`](https://githu
99
1010- Add short description:
1111
12- ``` diff
13- + """2D diffusion equation solved with finite differences
14- + """
12+ ``` python
13+ class SolveDiffusion2D :
14+ """ 2D diffusion equation solved with finite differences.
15+ """
1516 ```
1617
1718- Add long description, example usage:
1819
19- ```diff
20- + See `main()` for example usage
20+ ```python
21+ """ 2D diffusion equation solved with finite differences
22+
23+ See `main()` for example usage
24+ """
2125 ```
2226
2327# # Method Documentation
2428
2529- Constructor:
2630
27- ```diff
28- + """Constructs an uninitialized 2D diffusion solver
29- +
30- + After construction, initialize domain with `initialize_domain` and
31- + initialize the physical parameters with `initialize_physical_parameters`.
32- + """
31+ ```python
32+ """ Constructs an uninitialized 2D diffusion solver
33+
34+ After construction, initialize domain with `initialize_domain` and
35+ initialize the physical parameters with `initialize_physical_parameters`.
36+ """
3337 ```
3438
3539- `initialize_domain` :
3640
37- ```diff
38- + """Initializes domain and mesh of the domain
39- +
40- + - Sets width and height of the domain.
41- + - Also sets mesh width in x and in y direction.
42- + - Using these four values, the method computes the number of mesh elements in x and in y direction.
43- """
41+ ```python
42+ """ Initializes domain and mesh of the domain
43+
44+ - Sets width and height of the domain.
45+ - Also sets mesh width in x and in y direction.
46+ - Using these four values, the method computes the number of mesh elements in x and in y direction.
47+ """
4448 ```
4549
4650- `initialize_physical_parameters` :
4751
48- ```diff
49- + """Initializes physical parameters and computes time step size
50- +
51- + You need to call `initialize_domain` before this method.
52- + """
52+ ```python
53+ """ Initializes physical parameters and computes time step size
54+
55+ You need to call `initialize_domain` before this method.
56+ """
5357 ```
5458
5559- Ideally, we also add a link to source of time step size computation here.
@@ -58,15 +62,17 @@ Example code is in [`04_documentation/examples/technical_writing`](https://githu
5862
5963- Add to `initialize_domain` :
6064
61- ```diff
62- + Parameters
63- + ----------
64- + w : float, default: 10.0
65- + width of the domain
66- + h : float, default: 10.0
67- + height of the domain
68- + dx : float, default: 0.1
69- + mesh width in x direction
70- + dy : float, default: 0.1
71- + mesh width in y direction
65+ ```python
66+ """
67+ Parameters
68+ ----------
69+ w : float, default: 10.0
70+ width of the domain
71+ h : float, default: 10.0
72+ height of the domain
73+ dx : float, default: 0.1
74+ mesh width in x direction
75+ dy : float, default: 0.1
76+ mesh width in y direction
77+ """
7278 ```
0 commit comments