Afivo  0.3
Functions/Subroutines
m_a2_restrict Module Reference

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

Functions/Subroutines

subroutine, public a2_restrict_to_box (boxes, id, iv, iv_to)
 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 a2_restrict_to_boxes (boxes, ids, iv, iv_to)
 Restrict the children of boxes ids(:) to them. More...
 
subroutine, public a2_restrict_tree (tree, iv, iv_to)
 Restrict variables iv to all parent boxes, from the highest to the lowest level. More...
 
subroutine, public a2_restrict_box (box_c, box_p, iv, iv_to, use_geometry)
 Restriction of child box (box_c) to its parent (box_p) More...
 

Detailed Description

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

Function/Subroutine Documentation

§ a2_restrict_to_box()

subroutine, public m_a2_restrict::a2_restrict_to_box ( type(box2_t), dimension(:), intent(inout)  boxes,
integer, intent(in)  id,
integer, intent(in)  iv,
integer, intent(in), optional  iv_to 
)

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]ivVariable to restrict
[in]iv_toDestination (if /= iv)

Definition at line 22 of file m_a2_restrict.f90.

§ a2_restrict_to_boxes()

subroutine, public m_a2_restrict::a2_restrict_to_boxes ( type(box2_t), dimension(:), intent(inout)  boxes,
integer, dimension(:), intent(in)  ids,
integer, intent(in)  iv,
integer, intent(in), optional  iv_to 
)

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]ivVariable to restrict
[in]iv_toDestination (if /= iv)

Definition at line 38 of file m_a2_restrict.f90.

§ a2_restrict_tree()

subroutine, public m_a2_restrict::a2_restrict_tree ( type(a2_t), intent(inout)  tree,
integer, intent(in)  iv,
integer, intent(in), optional  iv_to 
)

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

Parameters
[in,out]treeTree to restrict on
[in]ivVariable to restrict
[in]iv_toDestination (if /= iv)

Definition at line 53 of file m_a2_restrict.f90.

§ a2_restrict_box()

subroutine, public m_a2_restrict::a2_restrict_box ( type(box2_t), intent(in)  box_c,
type(box2_t), intent(inout)  box_p,
integer, intent(in)  iv,
integer, intent(in), optional  iv_to,
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]ivVariable to restrict
[in]iv_toDestination (if /= iv)
[in]use_geometryIf set to false, don't use geometry

Definition at line 66 of file m_a2_restrict.f90.