Afivo
0.3
|
Afivo supports cell-centered and face-centered variables. When calling m_a2_core::a2_init()
a user selects how many of these variables to include. Users can modify these variables in different ways, as explained below.
A single box contains an array cc
with cell-centered variables and an array fc
with face centered variables, see the definition in m_a2_types::box2_t
. These variables can be modified as shown below:
If a user has written a routine as shown above, then this routine can be passed to m_a2_utils::a2_loop_box
:
call a2_loop_box(tree, change_values)
The routine will then be called on all the boxes of the tree. See m_a2_utils
for alternatives to a2_loop_box
.
A user can also manually loop over all the boxes in a tree to perform some operations. A user can for example loop over all the leaves (boxes without children) like this:
For simplicity, OpenMP commands for parallelization have been omitted in this example.