Afivo
0.3
|
Afivo supports cell-centered and face-centered variables, which can be added with m_af_core::af_add_cc_variable()
and m_af_core::af_add_fc_variable()
.
A single box contains an array cc
with cell-centered variables and an array fc
with face centered variables, see the definition in m_af_types::box_t
. These variables can for example be modified as shown below:
If a user has written a routine as shown above, then this routine can be passed to m_af_utils::af_loop_box
:
call af_loop_box(tree, change_values)
The routine will then be called on all the boxes of the tree. See m_af_utils
for alternatives to af_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.