Update 3.1 Code basics authored by Udo Ziegler's avatar Udo Ziegler
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
CONTENTS: CONTENTS:
[Functionality overview](3.1-Code-basics#functionality-overview) [Functionality overview](3.1-Code-basics#functionality-overview)
[Dyanmic arrays](3.1-Code-basics#dynamic-arrays) [Dynamic arrays](3.1-Code-basics#dynamic-arrays)
## Functionality overview ## Functionality overview
...@@ -116,7 +116,7 @@ assumed edge-centered analog to the electric field. ...@@ -116,7 +116,7 @@ assumed edge-centered analog to the electric field.
*Note: The TESTFIELDS infrastructure does not implement any numerical *Note: The TESTFIELDS infrastructure does not implement any numerical
method to solve induction equations for testfield fluctuations.* method to solve induction equations for testfield fluctuations.*
### Dynamic arrays ## Dynamic arrays
The NIRVANA infrastructure implements its own proprietary routines for The NIRVANA infrastructure implements its own proprietary routines for
dynamic array allocation. The available array allocation- and dynamic array allocation. The available array allocation- and
...@@ -170,7 +170,7 @@ resources.* ...@@ -170,7 +170,7 @@ resources.*
*Note 3: The module `utilAF.c` only implements array functions of such *Note 3: The module `utilAF.c` only implements array functions of such
dimensionality and type as really needed so far in NIRVANA.* dimensionality and type as really needed so far in NIRVANA.*
### Mesh data structure ## Mesh data structure
Knowledge of the data structure representing the numerical mesh is Knowledge of the data structure representing the numerical mesh is
important for coding intial conditions (IC) and other user interfaces important for coding intial conditions (IC) and other user interfaces
...@@ -194,7 +194,7 @@ operator `->next`. The linked list ends if the next grid pointer gives ...@@ -194,7 +194,7 @@ operator `->next`. The linked list ends if the next grid pointer gives
the NULL pointer. The following image illustrates the linked list the NULL pointer. The following image illustrates the linked list
concept. concept.
![image](../pic/linked-list-concept.png) ![linked-list-concept](uploads/7e311eea207cfd20102f732360c219c5/linked-list-concept.png)
Denoting the variable for a superblock pointer as `g` looping over mesh Denoting the variable for a superblock pointer as `g` looping over mesh
refinement level *l* (index `il`) is as simple as refinement level *l* (index `il`) is as simple as
... ...
......