Afivo  0.3
Functions/Subroutines
m_af_utils Module Reference

This module contains all kinds of different 'helper' routines for Afivo. If the number of routines for a particular topic becomes large, they should probably be put in a separate module. More...

Functions/Subroutines

subroutine, public af_loop_box (tree, my_procedure, leaves_only)
 Call procedure for each box in tree. More...
 
subroutine, public af_loop_box_arg (tree, my_procedure, rarg, leaves_only)
 Call procedure for each box in tree, with argument rarg. More...
 
subroutine, public af_loop_boxes (tree, my_procedure, leaves_only)
 Call procedure for each id in tree, giving the list of boxes. More...
 
subroutine, public af_loop_boxes_arg (tree, my_procedure, rarg, leaves_only)
 Call procedure for each id in tree, giving the list of boxes. More...
 
subroutine, public af_loop_tree (tree, my_procedure, leaves_only)
 Call procedure for each id in tree, passing the tree as first argument. More...
 
subroutine, public af_loop_tree_arg (tree, my_procedure, rarg, leaves_only)
 Call procedure for each id in tree, passing the tree as first argument. More...
 
pure logical function, public af_r_inside (box, r, d)
 Returns whether r is inside or within a distance d from box. More...
 
pure integer function, public af_get_id_at (tree, rr, highest_lvl, guess)
 Get the id of the finest box containing rr. If highest_lvl is present, do not go to a finer level than highest_lvl. If there is no box containing rr, return a location of -1. More...
 
pure type(af_loc_t) function, public af_get_loc (tree, rr, highest_lvl, guess)
 Get the location of the finest cell containing rr. If highest_lvl is present, do not go to a finer level than highest_lvl. If there is no box containing rr, return a location of -1. More...
 
pure integer function child_that_contains (box, rr)
 For a box with children that contains rr, find in which child rr lies. More...
 
pure real(dp) function, dimension(ndim), public af_r_loc (tree, loc)
 Get the coordinate of the cell-center at loc. More...
 
subroutine, public af_tree_clear_cc (tree, iv)
 
subroutine, public af_box_clear_cc (box, iv)
 Set cc(..., iv) = 0. More...
 
subroutine, public af_tree_clear_ghostcells (tree, iv)
 
subroutine, public af_box_clear_ghostcells (box, iv)
 Set cc(..., iv) = 0. More...
 
subroutine, public af_box_add_cc (box, iv_from, iv_to)
 Add cc(..., iv_from) to boxcc(..., iv_to) More...
 
subroutine, public af_box_sub_cc (box, iv_from, iv_to)
 Subtract cc(..., iv_from) from boxcc(..., iv_to) More...
 
subroutine, public af_tree_apply (tree, iv_a, iv_b, op, eps)
 Perform cc(..., iv_a) = cc(..., iv_a) 'op' cc(..., iv_b), where 'op' can be '+', '*' or '/'. More...
 
subroutine, public af_tree_times_cc (tree, ivs, facs)
 
subroutine, public af_box_times_cc (box, a, iv)
 Multipy cc(..., iv) with a. More...
 
subroutine, public af_box_lincomb_cc (box, a, iv_a, b, iv_b)
 Set cc(..., iv_b) = a * cc(..., iv_a) + b * cc(..., iv_b) More...
 
subroutine, public af_box_copy_cc_to (box_from, iv_from, box_to, iv_to)
 Copy cc(..., iv_from) from box_in to cc(..., iv_to) on box_out. More...
 
subroutine, public af_box_copy_cc (box, iv_from, iv_to)
 Copy cc(..., iv_from) to boxcc(..., iv_to) More...
 
subroutine, public af_box_copy_ccs (box, iv_from, iv_to)
 Copy cc(..., iv_from) to boxcc(..., iv_to) More...
 
subroutine, public af_boxes_copy_cc (boxes, ids, iv_from, iv_to)
 Copy cc(..., iv_from) to boxcc(..., iv_to) for all ids. More...
 
subroutine, public af_boxes_copy_ccs (boxes, ids, iv_from, iv_to)
 Copy cc(..., iv_from) to boxcc(..., iv_to) for all ids. More...
 
subroutine, public af_tree_copy_cc (tree, iv_from, iv_to)
 Copy cc(..., iv_from) to boxcc(..., iv_to) for full tree. More...
 
subroutine, public af_tree_copy_ccs (tree, iv_from, iv_to)
 Copy cc(..., iv_from) to boxcc(..., iv_to) for full tree. More...
 
subroutine, public af_reduction (tree, box_func, reduction, init_val, out_val)
 A general scalar reduction method. More...
 
subroutine, public af_reduction_vec (tree, box_func, reduction, init_val, out_val, n_vals)
 A general vector reduction method. More...
 
subroutine, public af_reduction_loc (tree, iv, box_subr, reduction, init_val, out_val, out_loc)
 A general scalar reduction method, that returns the location of the minimum/maximum value found. More...
 
subroutine, public af_tree_max_cc (tree, iv, cc_max, loc)
 Find maximum value of cc(..., iv). By default, only loop over leaves, and ghost cells are not used. More...
 
subroutine, public af_tree_maxabs_cc (tree, iv, cc_max, loc)
 Find maximum value of abs(cc(..., iv)). By default, only loop over leaves, and ghost cells are not used. More...
 
subroutine, public af_tree_min_cc (tree, iv, cc_min, loc)
 Find minimum value of cc(..., iv). By default, only loop over leaves, and ghost cells are not used. More...
 
subroutine, public af_tree_max_fc (tree, dim, iv, fc_max, loc)
 Find maximum value of fc(..., dim, iv). By default, only loop over leaves. More...
 
subroutine, public af_tree_min_fc (tree, dim, iv, fc_min, loc)
 Find maximum value of fc(..., dim, iv). By default, only loop over leaves. More...
 
subroutine box_max_cc (box, iv, val, ix)
 
subroutine box_maxabs_cc (box, iv, val, ix)
 
subroutine box_min_cc (box, iv, val, ix)
 
subroutine box_max_fc (box, dim_iv, val, ix)
 
subroutine box_min_fc (box, dim_iv, val, ix)
 
real(dp) function reduce_max (a, b)
 
real(dp) function reduce_min (a, b)
 
subroutine, public af_tree_sum_cc (tree, iv, cc_sum, power)
 Find weighted sum of cc(..., iv). Only loop over leaves, and ghost cells are not used. More...
 
subroutine, public af_box_copy_fc (box, iv_from, iv_to)
 Copy fx/fy/fz(..., iv_from) to fx/fy/fz(..., iv_to) More...
 
subroutine, public af_boxes_copy_fc (boxes, ids, iv_from, iv_to)
 Copy fx/fy/fz(..., iv_from) to fx/fy/fz(..., iv_to) for all ids. More...
 
subroutine, public af_tree_copy_fc (tree, iv_from, iv_to)
 Copy fx/fy/fz(..., iv_from) to fx/fy/fz(..., iv_to) for full tree. More...
 

Detailed Description

This module contains all kinds of different 'helper' routines for Afivo. If the number of routines for a particular topic becomes large, they should probably be put in a separate module.

Function/Subroutine Documentation

◆ af_loop_box()

subroutine, public m_af_utils::af_loop_box ( type(af_t), intent(inout)  tree,
procedure(af_subr my_procedure,
logical, intent(in), optional  leaves_only 
)

Call procedure for each box in tree.

Definition at line 57 of file m_af_utils.f90.

◆ af_loop_box_arg()

subroutine, public m_af_utils::af_loop_box_arg ( type(af_t), intent(inout)  tree,
procedure(af_subr_arg my_procedure,
real(dp), dimension(:), intent(in)  rarg,
logical, intent(in), optional  leaves_only 
)

Call procedure for each box in tree, with argument rarg.

Definition at line 89 of file m_af_utils.f90.

◆ af_loop_boxes()

subroutine, public m_af_utils::af_loop_boxes ( type(af_t), intent(inout)  tree,
procedure(af_subr_boxes my_procedure,
logical, intent(in), optional  leaves_only 
)

Call procedure for each id in tree, giving the list of boxes.

Definition at line 122 of file m_af_utils.f90.

◆ af_loop_boxes_arg()

subroutine, public m_af_utils::af_loop_boxes_arg ( type(af_t), intent(inout)  tree,
procedure(af_subr_boxes_arg my_procedure,
real(dp), dimension(:), intent(in)  rarg,
logical, intent(in), optional  leaves_only 
)

Call procedure for each id in tree, giving the list of boxes.

Definition at line 154 of file m_af_utils.f90.

◆ af_loop_tree()

subroutine, public m_af_utils::af_loop_tree ( type(af_t), intent(inout)  tree,
procedure(af_subr_tree my_procedure,
logical, intent(in), optional  leaves_only 
)

Call procedure for each id in tree, passing the tree as first argument.

Definition at line 187 of file m_af_utils.f90.

◆ af_loop_tree_arg()

subroutine, public m_af_utils::af_loop_tree_arg ( type(af_t), intent(inout)  tree,
procedure(af_subr_tree_arg my_procedure,
real(dp), dimension(:), intent(in)  rarg,
logical, intent(in), optional  leaves_only 
)

Call procedure for each id in tree, passing the tree as first argument.

Definition at line 217 of file m_af_utils.f90.

◆ af_r_inside()

pure logical function, public m_af_utils::af_r_inside ( type(box_t), intent(in)  box,
real(dp), dimension(ndim), intent(in)  r,
real(dp), intent(in), optional  d 
)

Returns whether r is inside or within a distance d from box.

Definition at line 248 of file m_af_utils.f90.

◆ af_get_id_at()

pure integer function, public m_af_utils::af_get_id_at ( type(af_t), intent(in)  tree,
real(dp), dimension(ndim), intent(in)  rr,
integer, intent(in), optional  highest_lvl,
integer, intent(in), optional  guess 
)

Get the id of the finest box containing rr. If highest_lvl is present, do not go to a finer level than highest_lvl. If there is no box containing rr, return a location of -1.

Parameters
[in]treeFull grid
[in]rrCoordinate
[in]highest_lvlMaximum level of box
[in]guessGuess of box id, cannot be used with highest_lvl
Returns
Id of finest box containing rr

Definition at line 266 of file m_af_utils.f90.

◆ af_get_loc()

pure type(af_loc_t) function, public m_af_utils::af_get_loc ( type(af_t), intent(in)  tree,
real(dp), dimension(ndim), intent(in)  rr,
integer, intent(in), optional  highest_lvl,
integer, intent(in), optional  guess 
)

Get the location of the finest cell containing rr. If highest_lvl is present, do not go to a finer level than highest_lvl. If there is no box containing rr, return a location of -1.

Parameters
[in]treeFull grid
[in]rrCoordinate
[in]highest_lvlMaximum level of box
[in]guessGuess of box id, cannot be used with highest_lvl
Returns
Location of cell

Definition at line 317 of file m_af_utils.f90.

◆ child_that_contains()

pure integer function m_af_utils::child_that_contains ( type(box_t), intent(in)  box,
real(dp), dimension(ndim), intent(in)  rr 
)
private

For a box with children that contains rr, find in which child rr lies.

Parameters
[in]boxA box with children
[in]rrLocation inside the box
Returns
Index of child containing rr

Definition at line 340 of file m_af_utils.f90.

◆ af_r_loc()

pure real(dp) function, dimension(ndim), public m_af_utils::af_r_loc ( type(af_t), intent(in)  tree,
type(af_loc_t), intent(in)  loc 
)

Get the coordinate of the cell-center at loc.

Parameters
[in]treeFull grid
[in]locLocation object
Returns
Coordinate at cell center

Definition at line 359 of file m_af_utils.f90.

◆ af_tree_clear_cc()

subroutine, public m_af_utils::af_tree_clear_cc ( type(af_t), intent(inout)  tree,
integer, intent(in)  iv 
)
Parameters
[in]ivVariable to clear

Definition at line 367 of file m_af_utils.f90.

◆ af_box_clear_cc()

subroutine, public m_af_utils::af_box_clear_cc ( type(box_t), intent(inout)  box,
integer, intent(in)  iv 
)

Set cc(..., iv) = 0.

Parameters
[in]ivVariable to clear

Definition at line 385 of file m_af_utils.f90.

◆ af_tree_clear_ghostcells()

subroutine, public m_af_utils::af_tree_clear_ghostcells ( type(af_t), intent(inout)  tree,
integer, intent(in)  iv 
)
Parameters
[in]ivVariable to clear

Definition at line 391 of file m_af_utils.f90.

◆ af_box_clear_ghostcells()

subroutine, public m_af_utils::af_box_clear_ghostcells ( type(box_t), intent(inout)  box,
integer, intent(in)  iv 
)

Set cc(..., iv) = 0.

Parameters
[in]ivVariable to clear

Definition at line 409 of file m_af_utils.f90.

◆ af_box_add_cc()

subroutine, public m_af_utils::af_box_add_cc ( type(box_t), intent(inout)  box,
integer, intent(in)  iv_from,
integer, intent(in)  iv_to 
)

Add cc(..., iv_from) to boxcc(..., iv_to)

Definition at line 435 of file m_af_utils.f90.

◆ af_box_sub_cc()

subroutine, public m_af_utils::af_box_sub_cc ( type(box_t), intent(inout)  box,
integer, intent(in)  iv_from,
integer, intent(in)  iv_to 
)

Subtract cc(..., iv_from) from boxcc(..., iv_to)

Definition at line 443 of file m_af_utils.f90.

◆ af_tree_apply()

subroutine, public m_af_utils::af_tree_apply ( type(af_t), intent(inout)  tree,
integer, intent(in)  iv_a,
integer, intent(in)  iv_b,
character(len=*), intent(in)  op,
real(dp), intent(in), optional  eps 
)

Perform cc(..., iv_a) = cc(..., iv_a) 'op' cc(..., iv_b), where 'op' can be '+', '*' or '/'.

Parameters
[in]epsMin value for division

Definition at line 452 of file m_af_utils.f90.

◆ af_tree_times_cc()

subroutine, public m_af_utils::af_tree_times_cc ( type(af_t), intent(inout)  tree,
integer, dimension(:), intent(in)  ivs,
real(dp), dimension(:), intent(in)  facs 
)

Definition at line 490 of file m_af_utils.f90.

◆ af_box_times_cc()

subroutine, public m_af_utils::af_box_times_cc ( type(box_t), intent(inout)  box,
real(dp), intent(in)  a,
integer, intent(in)  iv 
)

Multipy cc(..., iv) with a.

Definition at line 514 of file m_af_utils.f90.

◆ af_box_lincomb_cc()

subroutine, public m_af_utils::af_box_lincomb_cc ( type(box_t), intent(inout)  box,
real(dp), intent(in)  a,
integer, intent(in)  iv_a,
real(dp), intent(in)  b,
integer, intent(in)  iv_b 
)

Set cc(..., iv_b) = a * cc(..., iv_a) + b * cc(..., iv_b)

Definition at line 522 of file m_af_utils.f90.

◆ af_box_copy_cc_to()

subroutine, public m_af_utils::af_box_copy_cc_to ( type(box_t), intent(in)  box_from,
integer, intent(in)  iv_from,
type(box_t), intent(inout)  box_to,
integer, intent(in)  iv_to 
)

Copy cc(..., iv_from) from box_in to cc(..., iv_to) on box_out.

Definition at line 531 of file m_af_utils.f90.

◆ af_box_copy_cc()

subroutine, public m_af_utils::af_box_copy_cc ( type(box_t), intent(inout)  box,
integer, intent(in)  iv_from,
integer, intent(in)  iv_to 
)

Copy cc(..., iv_from) to boxcc(..., iv_to)

Definition at line 539 of file m_af_utils.f90.

◆ af_box_copy_ccs()

subroutine, public m_af_utils::af_box_copy_ccs ( type(box_t), intent(inout)  box,
integer, dimension(:), intent(in)  iv_from,
integer, dimension(:), intent(in)  iv_to 
)

Copy cc(..., iv_from) to boxcc(..., iv_to)

Definition at line 546 of file m_af_utils.f90.

◆ af_boxes_copy_cc()

subroutine, public m_af_utils::af_boxes_copy_cc ( type(box_t), dimension(:), intent(inout)  boxes,
integer, dimension(:), intent(in)  ids,
integer, intent(in)  iv_from,
integer, intent(in)  iv_to 
)

Copy cc(..., iv_from) to boxcc(..., iv_to) for all ids.

Definition at line 553 of file m_af_utils.f90.

◆ af_boxes_copy_ccs()

subroutine, public m_af_utils::af_boxes_copy_ccs ( type(box_t), dimension(:), intent(inout)  boxes,
integer, dimension(:), intent(in)  ids,
integer, dimension(:), intent(in)  iv_from,
integer, dimension(:), intent(in)  iv_to 
)

Copy cc(..., iv_from) to boxcc(..., iv_to) for all ids.

Definition at line 566 of file m_af_utils.f90.

◆ af_tree_copy_cc()

subroutine, public m_af_utils::af_tree_copy_cc ( type(af_t), intent(inout)  tree,
integer, intent(in)  iv_from,
integer, intent(in)  iv_to 
)

Copy cc(..., iv_from) to boxcc(..., iv_to) for full tree.

Definition at line 579 of file m_af_utils.f90.

◆ af_tree_copy_ccs()

subroutine, public m_af_utils::af_tree_copy_ccs ( type(af_t), intent(inout)  tree,
integer, dimension(:), intent(in)  iv_from,
integer, dimension(:), intent(in)  iv_to 
)

Copy cc(..., iv_from) to boxcc(..., iv_to) for full tree.

Definition at line 590 of file m_af_utils.f90.

◆ af_reduction()

subroutine, public m_af_utils::af_reduction ( type(af_t), intent(in)  tree,
  box_func,
  reduction,
real(dp), intent(in)  init_val,
real(dp), intent(out)  out_val 
)

A general scalar reduction method.

Parameters
[in]treeTree to do the reduction on
[in]init_valInitial value for the reduction
[out]out_valResult of the reduction

Definition at line 601 of file m_af_utils.f90.

◆ af_reduction_vec()

subroutine, public m_af_utils::af_reduction_vec ( type(af_t), intent(in)  tree,
  box_func,
  reduction,
real(dp), dimension(n_vals), intent(in)  init_val,
real(dp), dimension(n_vals), intent(out)  out_val,
integer, intent(in)  n_vals 
)

A general vector reduction method.

Parameters
[in]treeTree to do the reduction on
[in]n_valsSize of vector
[in]init_valInitial value for the reduction
[out]out_valResult of the reduction

Definition at line 644 of file m_af_utils.f90.

◆ af_reduction_loc()

subroutine, public m_af_utils::af_reduction_loc ( type(af_t), intent(in)  tree,
integer, intent(in)  iv,
  box_subr,
  reduction,
real(dp), intent(in)  init_val,
real(dp), intent(out)  out_val,
type(af_loc_t), intent(out)  out_loc 
)

A general scalar reduction method, that returns the location of the minimum/maximum value found.

Parameters
[in]treeTree to do the reduction on
[in]ivVariable to operate on (can be ignored)
[in]init_valInitial value for the reduction
[out]out_valResult of the reduction
[out]out_locLocation

Definition at line 694 of file m_af_utils.f90.

◆ af_tree_max_cc()

subroutine, public m_af_utils::af_tree_max_cc ( type(af_t), intent(in)  tree,
integer, intent(in)  iv,
real(dp), intent(out)  cc_max,
type(af_loc_t), intent(out), optional  loc 
)

Find maximum value of cc(..., iv). By default, only loop over leaves, and ghost cells are not used.

Parameters
[in]treeFull grid
[in]ivIndex of variable
[out]cc_maxMaximum value
[out]locLocation of maximum

Definition at line 758 of file m_af_utils.f90.

◆ af_tree_maxabs_cc()

subroutine, public m_af_utils::af_tree_maxabs_cc ( type(af_t), intent(in)  tree,
integer, intent(in)  iv,
real(dp), intent(out)  cc_max,
type(af_loc_t), intent(out), optional  loc 
)

Find maximum value of abs(cc(..., iv)). By default, only loop over leaves, and ghost cells are not used.

Parameters
[in]treeFull grid
[in]ivIndex of variable
[out]cc_maxMaximum value
[out]locLocation of maximum

Definition at line 773 of file m_af_utils.f90.

◆ af_tree_min_cc()

subroutine, public m_af_utils::af_tree_min_cc ( type(af_t), intent(in)  tree,
integer, intent(in)  iv,
real(dp), intent(out)  cc_min,
type(af_loc_t), intent(out), optional  loc 
)

Find minimum value of cc(..., iv). By default, only loop over leaves, and ghost cells are not used.

Parameters
[in]treeFull grid
[in]ivIndex of variable
[out]cc_minMinimum value
[out]locLocation of minimum

Definition at line 788 of file m_af_utils.f90.

◆ af_tree_max_fc()

subroutine, public m_af_utils::af_tree_max_fc ( type(af_t), intent(in)  tree,
integer, intent(in)  dim,
integer, intent(in)  iv,
real(dp), intent(out)  fc_max,
type(af_loc_t), intent(out), optional  loc 
)

Find maximum value of fc(..., dim, iv). By default, only loop over leaves.

Parameters
[in]treeFull grid
[in]dimFlux dimension
[in]ivIndex of face variable
[out]fc_maxMaximum value
[out]locLocation of maximum

Definition at line 803 of file m_af_utils.f90.

◆ af_tree_min_fc()

subroutine, public m_af_utils::af_tree_min_fc ( type(af_t), intent(in)  tree,
integer, intent(in)  dim,
integer, intent(in)  iv,
real(dp), intent(out)  fc_min,
type(af_loc_t), intent(out), optional  loc 
)

Find maximum value of fc(..., dim, iv). By default, only loop over leaves.

Parameters
[in]treeFull grid
[in]dimFlux dimension
[in]ivIndex of face variable
[out]fc_minMinimum value
[out]locLocation of minimum

Definition at line 822 of file m_af_utils.f90.

◆ box_max_cc()

subroutine m_af_utils::box_max_cc ( type(box_t), intent(in)  box,
integer, intent(in)  iv,
real(dp), intent(out)  val,
integer, dimension(ndim), intent(out)  ix 
)
private

Definition at line 840 of file m_af_utils.f90.

◆ box_maxabs_cc()

subroutine m_af_utils::box_maxabs_cc ( type(box_t), intent(in)  box,
integer, intent(in)  iv,
real(dp), intent(out)  val,
integer, dimension(ndim), intent(out)  ix 
)
private

Definition at line 852 of file m_af_utils.f90.

◆ box_min_cc()

subroutine m_af_utils::box_min_cc ( type(box_t), intent(in)  box,
integer, intent(in)  iv,
real(dp), intent(out)  val,
integer, dimension(ndim), intent(out)  ix 
)
private

Definition at line 864 of file m_af_utils.f90.

◆ box_max_fc()

subroutine m_af_utils::box_max_fc ( type(box_t), intent(in)  box,
integer, intent(in)  dim_iv,
real(dp), intent(out)  val,
integer, dimension(ndim), intent(out)  ix 
)
private

Definition at line 876 of file m_af_utils.f90.

◆ box_min_fc()

subroutine m_af_utils::box_min_fc ( type(box_t), intent(in)  box,
integer, intent(in)  dim_iv,
real(dp), intent(out)  val,
integer, dimension(ndim), intent(out)  ix 
)
private

Definition at line 915 of file m_af_utils.f90.

◆ reduce_max()

real(dp) function m_af_utils::reduce_max ( real(dp), intent(in)  a,
real(dp), intent(in)  b 
)
private

Definition at line 954 of file m_af_utils.f90.

◆ reduce_min()

real(dp) function m_af_utils::reduce_min ( real(dp), intent(in)  a,
real(dp), intent(in)  b 
)
private

Definition at line 959 of file m_af_utils.f90.

◆ af_tree_sum_cc()

subroutine, public m_af_utils::af_tree_sum_cc ( type(af_t), intent(in)  tree,
integer, intent(in)  iv,
real(dp), intent(out)  cc_sum,
integer, intent(in), optional  power 
)

Find weighted sum of cc(..., iv). Only loop over leaves, and ghost cells are not used.

Parameters
[in]treeFull grid
[in]ivIndex of variable
[out]cc_sumVolume-integrated sum of variable
[in]powerSum of values**power (default: 1)

Definition at line 966 of file m_af_utils.f90.

◆ af_box_copy_fc()

subroutine, public m_af_utils::af_box_copy_fc ( type(box_t), intent(inout)  box,
integer, intent(in)  iv_from,
integer, intent(in)  iv_to 
)

Copy fx/fy/fz(..., iv_from) to fx/fy/fz(..., iv_to)

Parameters
[in,out]boxOperate on this box
[in]iv_fromFrom this variable
[in]iv_toTo this variable

Definition at line 1029 of file m_af_utils.f90.

◆ af_boxes_copy_fc()

subroutine, public m_af_utils::af_boxes_copy_fc ( type(box_t), dimension(:), intent(inout)  boxes,
integer, dimension(:), intent(in)  ids,
integer, intent(in)  iv_from,
integer, intent(in)  iv_to 
)

Copy fx/fy/fz(..., iv_from) to fx/fy/fz(..., iv_to) for all ids.

Parameters
[in,out]boxesList of all boxes
[in]idsOperate on these boxes
[in]iv_fromFrom this variable
[in]iv_toTo this variable

Definition at line 1037 of file m_af_utils.f90.

◆ af_tree_copy_fc()

subroutine, public m_af_utils::af_tree_copy_fc ( type(af_t), intent(inout)  tree,
integer, intent(in)  iv_from,
integer, intent(in)  iv_to 
)

Copy fx/fy/fz(..., iv_from) to fx/fy/fz(..., iv_to) for full tree.

Parameters
[in,out]treeFull grid
[in]iv_fromFrom this variable
[in]iv_toTo this variable

Definition at line 1052 of file m_af_utils.f90.