Afivo  0.3
Functions/Subroutines
m_af_restrict Module Reference

This module contains routines for restriction: going from fine to coarse variables. More...

Functions/Subroutines

subroutine, public af_restrict_to_box (boxes, id, ivs)
 Restrict the children of a box to the box (e.g., in 2D, average the values at the four children to get the value for the parent) More...
 
subroutine, public af_restrict_to_boxes (boxes, ids, ivs)
 Restrict the children of boxes ids(:) to them. More...
 
subroutine, public af_restrict_tree (tree, ivs)
 Restrict variables iv to all parent boxes, from the highest to the lowest level. More...
 
subroutine, public af_restrict_box (box_c, box_p, ivs, use_geometry)
 Restriction of child box (box_c) to its parent (box_p) More...
 
subroutine, public af_restrict_ref_boundary (tree, ivs)
 Restrict only next to refinement boundaries, which which can be required for filling coarse-grid ghost cells. More...
 

Detailed Description

This module contains routines for restriction: going from fine to coarse variables.

Function/Subroutine Documentation

◆ af_restrict_to_box()

subroutine, public m_af_restrict::af_restrict_to_box ( type(box_t), dimension(:), intent(inout)  boxes,
integer, intent(in)  id,
integer, dimension(:), intent(in)  ivs 
)

Restrict the children of a box to the box (e.g., in 2D, average the values at the four children to get the value for the parent)

Parameters
[in,out]boxesList of all the boxes
[in]idBox whose children will be restricted to it
[in]ivsVariable to restrict

Definition at line 22 of file m_af_restrict.f90.

◆ af_restrict_to_boxes()

subroutine, public m_af_restrict::af_restrict_to_boxes ( type(box_t), dimension(:), intent(inout)  boxes,
integer, dimension(:), intent(in)  ids,
integer, dimension(:), intent(in)  ivs 
)

Restrict the children of boxes ids(:) to them.

Parameters
[in,out]boxesList of all the boxes
[in]idsBoxes whose children will be restricted to it
[in]ivsVariables to restrict

Definition at line 37 of file m_af_restrict.f90.

◆ af_restrict_tree()

subroutine, public m_af_restrict::af_restrict_tree ( type(af_t), intent(inout)  tree,
integer, dimension(:), intent(in)  ivs 
)

Restrict variables iv to all parent boxes, from the highest to the lowest level.

Parameters
[in,out]treeTree to restrict on
[in]ivsVariables to restrict

Definition at line 51 of file m_af_restrict.f90.

◆ af_restrict_box()

subroutine, public m_af_restrict::af_restrict_box ( type(box_t), intent(in)  box_c,
type(box_t), intent(inout)  box_p,
integer, dimension(:), intent(in)  ivs,
logical, intent(in), optional  use_geometry 
)

Restriction of child box (box_c) to its parent (box_p)

Parameters
[in]box_cChild box to restrict
[in,out]box_pParent box to restrict to
[in]ivsVariable to restrict
[in]use_geometryIf set to false, don't use geometry

Definition at line 63 of file m_af_restrict.f90.

◆ af_restrict_ref_boundary()

subroutine, public m_af_restrict::af_restrict_ref_boundary ( type(af_t), intent(inout)  tree,
integer, dimension(:), intent(in)  ivs 
)

Restrict only next to refinement boundaries, which which can be required for filling coarse-grid ghost cells.

Definition at line 141 of file m_af_restrict.f90.