Afivo  0.3
Data Types | Functions/Subroutines | Variables
m_af_types Module Reference

This module contains the basic types and constants that are used in the NDIM-dimensional version of Afivo, together with some basic routines. More...

Data Types

type  lvl_t
 Type which contains the indices of all boxes at a refinement level, as well as a list with all the "leaf" boxes and non-leaf (parent) boxes. More...
 
type  ref_lvl_t
 Type that contains the refinement changes in a level. More...
 
type  ref_info_t
 Type that contains the refinement changes in a tree. More...
 
type  af_cc_methods
 Collection of methods for a cell-centered variable. More...
 
type  stencil_t
 Type for storing a numerical stencil for a box. More...
 
type  box_t
 The basic building block of afivo: a box with cell-centered and face centered data, and information about its position, neighbors, children etc. More...
 
type  af_t
 Type which stores all the boxes and levels, as well as some information about the number of boxes, variables and levels. More...
 
type  af_loc_t
 Type specifying the location of a cell. More...
 
interface  af_subr_ref
 Subroutine for setting refinement flags. More...
 
interface  af_subr
 Subroutine that gets a box. More...
 
interface  af_subr_arg
 Subroutine that gets a box and an array of reals. More...
 
interface  af_subr_boxes
 Subroutine that gets a list of boxes and a box id. More...
 
interface  af_subr_boxes_arg
 Subroutine that gets a list of boxes, an id and an array of reals. More...
 
interface  af_subr_tree
 Subroutine that gets a tree and a box id. More...
 
interface  af_subr_tree_arg
 Subroutine that gets a tree, a box id and an array of reals. More...
 
interface  af_subr_rb
 To fill ghost cells near refinement boundaries. More...
 
interface  af_subr_bc
 To fill ghost cells near physical boundaries. More...
 
interface  af_subr_bc_custom
 To fill ghost cells near physical boundaries in a custom way. If the number of ghost cells to fill is greater than one (n_gc > 1), fill ghost cells in the optional argument cc. More...
 
interface  af_subr_funcval
 To set cell-centered variables based on a user-defined function. This can be useful to avoid recomputing values. The values should also be set in ghost cells. More...
 
interface  af_subr_prolong
 Subroutine for prolongation. More...
 
interface  af_subr_restrict
 Subroutine for restriction. More...
 
type  coarse_solve_t
 Generic type for the coarse grid solver. More...
 
type  mg_t
 Type to store multigrid options in. More...
 
interface  mg_box_op
 Subroutine that performs A * cc(..., i_in) = cc(..., i_out) More...
 
interface  mg_box_gsrb
 Subroutine that performs Gauss-Seidel relaxation. More...
 
interface  mg_box_corr
 
interface  mg_box_rstr
 
interface  mg_box_stencil
 
interface  mg_func_lsf
 Level set function. More...
 
interface  mg_lsf_distf
 Compute distance to boundary starting at point a going to point b, in the range from [0, 1], with 1 meaning there is no boundary. More...
 

Functions/Subroutines

integer function af_get_max_threads ()
 Get number of threads. More...
 
subroutine af_print_info (tree)
 Get tree info. More...
 
pure integer function af_box_bytes (n_cell, n_var_cell, n_var_face)
 
pure integer function af_num_boxes_used (tree)
 
pure integer function af_num_leaves_used (tree)
 
pure integer function af_num_cells_used (tree)
 
pure real(dp) function af_total_volume (tree)
 
elemental logical function af_has_children (box)
 Return .true. if a box has children. More...
 
pure logical function, dimension(size(nbs)) af_is_phys_boundary (boxes, id, nbs)
 Return .true. where there is a physical/periodic boundary. Detecting physical boundaries is straightforward (simply test whether neighbors(i) < af_no_box), but periodic boundaries require a comparison of their spatial index. More...
 
pure logical function af_is_ref_boundary (boxes, id, nb)
 Check whether a refinement boundary is present, either fine-to-coarse or coarse-to-fine. More...
 
pure integer function, dimension(ndim) af_get_child_offset (box, nb)
 Get the offset of a box with respect to its parent (e.g. in 2d, there can be a child at offset 0,0, one at n_cell/2,0, one at 0,n_cell/2 and one at n_cell/2, n_cell/2) More...
 
pure integer function, dimension(ndim) af_get_ix_on_parent (box, ix)
 Given a cell index on box, get index of the closest cell at its parent. More...
 
pure integer function, dimension(ndim) af_get_ix_on_neighb (box, ix, nb)
 Given a cell index on box, get index on a neighbor. More...
 
pure integer function, dimension(ndim) af_neighb_offset (nbs)
 Given a list of neighbor directions, compute the index offset. More...
 
subroutine af_get_index_bc_inside (nb, nc, n_gc, lo, hi)
 Get index range of boundary cells inside a box facing neighbor nb. More...
 
subroutine af_get_index_bc_outside (nb, nc, n_gc, lo, hi)
 Get index range of ghost cells facing neighbor nb. More...
 
subroutine af_get_index_bface_inside (nb, nc, n_gc, lo, hi)
 Get index range of boundary FACES inside a box facing neighbor nb. More...
 
pure integer function af_ix_to_ichild (ix)
 Compute the 'child index' for a box with spatial index ix. With 'child index' we mean the index in the children(:) array of its parent. More...
 
pure integer function, dimension(ndim) af_cc_ix (box, r)
 Get the cell index in which r lies. This routine does not check whether r is actually located inside the box. More...
 
pure real(dp) function, dimension(ndim) af_r_cc (box, cc_ix)
 Get the location of the cell center with index cc_ix. More...
 
pure real(dp) function, dimension(ndim) af_r_fc (box, dim, fc_ix)
 Get the location of the face parallel to dim with index fc_ix. More...
 
pure real(dp) function, dimension(ndim) af_rr_cc (box, cc_ix)
 Get a general location with index cc_ix (like af_r_cc but using reals) More...
 
pure real(dp) function, dimension(ndim) af_r_center (box)
 Return the coordinate of the center of a box. More...
 
pure real(dp) function af_min_dr (tree)
 Return finest dr that is used in the tree. More...
 
pure real(dp) function, dimension(ndim) af_lvl_dr (tree, lvl)
 Return dr at lvl. More...
 
subroutine af_set_box_gc (box, nb, iv, gc_scalar, gc_array)
 
pure real(dp) function af_cyl_radius_cc (box, i)
 Get the radius of the cell center with first index i. More...
 
pure real(dp) function af_cyl_volume_cc (box, i)
 Get the volume of the cell with first index i. More...
 
subroutine af_cyl_child_weights (box, i, inner, outer)
 Get the normalized weights of the 'inner' and 'outer' children of a cell with index ix. Note that the cell centers of the children are located at -/+ 0.25 dr compared to the parent. More...
 
subroutine af_cyl_flux_factors (box, flux_factors)
 Get the factors for the left and right flux in each cell. More...
 
subroutine af_get_face_coords (box, nb, coords)
 Get coordinates at the faces of a box boundary. More...
 

Variables

integer, parameter dp = kind(0.0d0)
 
integer, parameter af_max_lvl = 30
 Highest allowed refinement level. More...
 
integer, parameter af_min_lvl = 1
 Lowest allowed refinement level. More...
 
integer, parameter af_max_num_vars = 1024
 Maximum number of variables. More...
 
integer, parameter af_rm_ref = -1
 Value indicating you want to derefine a box. More...
 
integer, parameter af_keep_ref = 0
 Value indicating you want to keep a box's refinement. More...
 
integer, parameter af_do_ref = 1
 Value indicating you want to refine a box. More...
 
integer, parameter af_derefine = -2
 The children of a box are removed (for internal use) More...
 
integer, parameter af_refine = 2
 A box will be refined (for internal use) More...
 
integer, parameter af_no_box = 0
 Special value indicating there is no box. More...
 
integer, parameter af_phys_boundary = -1
 Special value indicating a physical (non-periodic) boundary. More...
 
integer, parameter af_init_tag = -huge(1)
 Each box contains a tag, for which bits can be set. This is the initial value, which should not be used by the user. More...
 
integer, parameter af_xyz = 1
 Default coordinate system. More...
 
integer, parameter af_cyl = 2
 Cylindrical coordinate system. More...
 
character(len= *), dimension(2), parameter af_coord_names = ["Cartesian ", "Cylindrical"]
 Names of coordinate systems. More...
 
integer, parameter af_bc_dirichlet = -10
 Value to indicate a Dirichlet boundary condition. More...
 
integer, parameter af_bc_neumann = -11
 Value to indicate a Neumann boundary condition. More...
 
integer, parameter af_bc_continuous = -12
 Value to indicate a continuous boundary condition. More...
 
integer, parameter af_bc_dirichlet_copy = -13
 Value to indicate a Dirichlet boundary condition in which a value is copied to the ghost cells, without any type of extrapolation. This can be useful for hyperbolic PDEs. More...
 
integer, parameter af_nlen = 20
 Maximum length of the names of variables. More...
 
integer, parameter af_num_children = 2
 Number of children. More...
 
integer, dimension(3, 8), parameter af_child_dix = reshape([0,1], [1,2])
 Index offset for each child. More...
 
integer, dimension(4, 6), parameter af_child_adj_nb = reshape([1,2], [1,2])
 Children adjacent to a neighbor. More...
 
logical, dimension(3, 8), parameter af_child_low = reshape([.true., .false.], [1, 2])
 Which children have a low index per dimension. More...
 
integer, parameter af_num_neighbors = 2
 Whether a child located in the 'upper' direction (1 or 0) More...
 
integer, parameter af_neighb_lowx = 1
 Lower-x neighbor. More...
 
integer, parameter af_neighb_highx = 2
 Upper-x neighbor. More...
 
integer, dimension(3, 6), parameter af_neighb_dix = reshape([-1,1], [1,2])
 Index offsets of neighbors. More...
 
logical, dimension(6), parameter af_neighb_low = [.true., .false.]
 Which neighbors have a lower index. More...
 
integer, dimension(3), parameter af_low_neighbs = [1]
 The low neighbors. More...
 
integer, dimension(3), parameter af_high_neighbs = [2]
 The high neighbors. More...
 
integer, dimension(6), parameter af_neighb_high_pm = [-1, 1]
 Opposite of nb_low, but now as -1,1 integers. More...
 
integer, dimension(6), parameter af_neighb_rev = [2, 1]
 Reverse neighbors. More...
 
integer, dimension(6), parameter af_neighb_dim = [1, 1]
 Direction (dimension) for a neighbor. More...
 
integer, parameter af_neighb_lowy = 3
 Lower-y neighbor. More...
 
integer, parameter af_neighb_highy = 4
 Upper-y neighbor. More...
 
integer, parameter af_neighb_lowz = 5
 Lower-z neighbor. More...
 
integer, parameter af_neighb_highz = 6
 Upper-z neighbor. More...
 
integer, parameter af_num_edges = 12
 Number of edgse. More...
 
integer, dimension(12), parameter af_edge_dim = [1,1,1,1, 2,2,2,2, 3,3,3,3]
 Coordinate parallel to edge. More...
 
integer, dimension(3, 12), parameter af_edge_dir = reshape( [0,-1,-1, 0,1,-1, 0,-1,1, 0,1,1, -1,0,-1, 1,0,-1, -1,0,1, 1,0,1, -1,-1,0, 1,-1,0, -1,1,0, 1,1,0], [3, 12])
 Direction of edge. More...
 
integer, dimension(2, 12), parameter af_nb_adj_edge = reshape( [3,5, 4,5, 3,6, 4,6, 1,5, 2,5, 1,6, 2,6, 1,3, 2,3, 1,4, 2,4], [2,12])
 Neighbors adjacent to edges. More...
 
integer, dimension(3, 12), parameter af_edge_min_ix = reshape( [0,0,0, 0,1,0, 0,0,1, 0,1,1, 0,0,0, 1,0,0, 0,0,1, 1,0,1, 0,0,0, 1,0,0, 0,1,0, 1,1,0], [3,12])
 Minimum index of edge (1 indicates n_cell + 1) More...
 
integer, parameter af_stencil_none = 0
 Value indicating the absence of a stencil. More...
 
integer, parameter mg_normal_operator = 1
 
integer, parameter mg_lsf_operator = 2
 
integer, parameter mg_eps_operator = 3
 
integer, parameter mg_auto_operator = 4
 
integer, parameter mg_normal_box = 0
 Normal box (no eps/lsf) More...
 
integer, parameter mg_lsf_box = 1
 Box has level set function. More...
 
integer, parameter mg_veps_box = 2
 Box has variable coefficient. More...
 
integer, parameter mg_ceps_box = 4
 Box has constant coefficient /= 1. More...
 
integer, parameter mg_prolong_linear = 17
 Linear prolongation. More...
 
integer, parameter mg_prolong_sparse = 18
 Sparse linear prolongation. More...
 
integer, parameter mg_prolong_auto = 19
 Automatic prolongation. More...
 
integer, parameter mg_lsf_distance_key = 31
 Stencil key for level set function distance. More...
 
integer, parameter mg_lsf_mask_key = 32
 Stencil key for level set function mask. More...
 
integer, parameter mg_cycle_down = 1
 
integer, parameter mg_cycle_up = 3
 

Detailed Description

This module contains the basic types and constants that are used in the NDIM-dimensional version of Afivo, together with some basic routines.

Function/Subroutine Documentation

◆ af_get_max_threads()

integer function m_af_types::af_get_max_threads

Get number of threads.

Definition at line 727 of file m_af_types.f90.

◆ af_print_info()

subroutine m_af_types::af_print_info ( type(af_t), intent(in)  tree)

Get tree info.

Parameters
[in]treeThe tree

Definition at line 733 of file m_af_types.f90.

◆ af_box_bytes()

pure integer function m_af_types::af_box_bytes ( integer, intent(in)  n_cell,
integer, intent(in)  n_var_cell,
integer, intent(in)  n_var_face 
)
Parameters
[in]n_cellnumber of cells per dimension
[in]n_var_cellnumber of cell-centered variables
[in]n_var_facenumber of face-centered variables

Definition at line 766 of file m_af_types.f90.

◆ af_num_boxes_used()

pure integer function m_af_types::af_num_boxes_used ( type(af_t), intent(in)  tree)

Definition at line 778 of file m_af_types.f90.

◆ af_num_leaves_used()

pure integer function m_af_types::af_num_leaves_used ( type(af_t), intent(in)  tree)

Definition at line 788 of file m_af_types.f90.

◆ af_num_cells_used()

pure integer function m_af_types::af_num_cells_used ( type(af_t), intent(in)  tree)

Definition at line 798 of file m_af_types.f90.

◆ af_total_volume()

pure real(dp) function m_af_types::af_total_volume ( type(af_t), intent(in)  tree)

Definition at line 805 of file m_af_types.f90.

◆ af_has_children()

elemental logical function m_af_types::af_has_children ( type(box_t), intent(in)  box)

Return .true. if a box has children.

Definition at line 828 of file m_af_types.f90.

◆ af_is_phys_boundary()

pure logical function, dimension(size(nbs)) m_af_types::af_is_phys_boundary ( type(box_t), dimension(:), intent(in)  boxes,
integer, intent(in)  id,
integer, dimension(:), intent(in)  nbs 
)

Return .true. where there is a physical/periodic boundary. Detecting physical boundaries is straightforward (simply test whether neighbors(i) < af_no_box), but periodic boundaries require a comparison of their spatial index.

Parameters
[in]boxesList of boxes
[in]idBox to inspect
[in]nbsNeighbor directions

Definition at line 840 of file m_af_types.f90.

◆ af_is_ref_boundary()

pure logical function m_af_types::af_is_ref_boundary ( type(box_t), dimension(:), intent(in)  boxes,
integer, intent(in)  id,
integer, intent(in)  nb 
)

Check whether a refinement boundary is present, either fine-to-coarse or coarse-to-fine.

Parameters
[in]boxesList of boxes
[in]idBox to inspect
[in]nbNeighbor direction

Definition at line 881 of file m_af_types.f90.

◆ af_get_child_offset()

pure integer function, dimension(ndim) m_af_types::af_get_child_offset ( type(box_t), intent(in)  box,
integer, intent(in), optional  nb 
)

Get the offset of a box with respect to its parent (e.g. in 2d, there can be a child at offset 0,0, one at n_cell/2,0, one at 0,n_cell/2 and one at n_cell/2, n_cell/2)

Parameters
[in]boxA child box
[in]nbOptional: get index on parent neighbor

Definition at line 903 of file m_af_types.f90.

◆ af_get_ix_on_parent()

pure integer function, dimension(ndim) m_af_types::af_get_ix_on_parent ( type(box_t), intent(in)  box,
integer, dimension(ndim), intent(in)  ix 
)

Given a cell index on box, get index of the closest cell at its parent.

Parameters
[in]boxA child box
[in]ixIndex on child box

Definition at line 913 of file m_af_types.f90.

◆ af_get_ix_on_neighb()

pure integer function, dimension(ndim) m_af_types::af_get_ix_on_neighb ( type(box_t), intent(in)  box,
integer, dimension(ndim), intent(in)  ix,
integer, intent(in)  nb 
)

Given a cell index on box, get index on a neighbor.

Parameters
[in]boxA box
[in]ixIndex on box
[in]nbNeighbor identifier

Definition at line 921 of file m_af_types.f90.

◆ af_neighb_offset()

pure integer function, dimension(ndim) m_af_types::af_neighb_offset ( integer, dimension(:), intent(in)  nbs)

Given a list of neighbor directions, compute the index offset.

Parameters
[in]nbsList of neighbor directions

Definition at line 933 of file m_af_types.f90.

◆ af_get_index_bc_inside()

subroutine m_af_types::af_get_index_bc_inside ( integer, intent(in)  nb,
integer, intent(in)  nc,
integer, intent(in)  n_gc,
integer, dimension(ndim), intent(out)  lo,
integer, dimension(ndim), intent(out)  hi 
)

Get index range of boundary cells inside a box facing neighbor nb.

Parameters
[in]nbNeighbor direction
[in]ncbox size
[in]n_gcNumber of ghost cells

Definition at line 945 of file m_af_types.f90.

◆ af_get_index_bc_outside()

subroutine m_af_types::af_get_index_bc_outside ( integer, intent(in)  nb,
integer, intent(in)  nc,
integer, intent(in)  n_gc,
integer, dimension(ndim), intent(out)  lo,
integer, dimension(ndim), intent(out)  hi 
)

Get index range of ghost cells facing neighbor nb.

Parameters
[in]nbNeighbor direction
[in]ncbox size
[in]n_gcNumber of ghost cells

Definition at line 967 of file m_af_types.f90.

◆ af_get_index_bface_inside()

subroutine m_af_types::af_get_index_bface_inside ( integer, intent(in)  nb,
integer, intent(in)  nc,
integer, intent(in)  n_gc,
integer, dimension(ndim), intent(out)  lo,
integer, dimension(ndim), intent(out)  hi 
)

Get index range of boundary FACES inside a box facing neighbor nb.

Parameters
[in]nbNeighbor direction
[in]ncbox size
[in]n_gcNumber of ghost cells

Definition at line 989 of file m_af_types.f90.

◆ af_ix_to_ichild()

pure integer function m_af_types::af_ix_to_ichild ( integer, dimension(ndim), intent(in)  ix)

Compute the 'child index' for a box with spatial index ix. With 'child index' we mean the index in the children(:) array of its parent.

Parameters
[in]ixSpatial index of the box

Definition at line 1012 of file m_af_types.f90.

◆ af_cc_ix()

pure integer function, dimension(ndim) m_af_types::af_cc_ix ( type(box_t), intent(in)  box,
real(dp), dimension(ndim), intent(in)  r 
)

Get the cell index in which r lies. This routine does not check whether r is actually located inside the box.

Definition at line 1027 of file m_af_types.f90.

◆ af_r_cc()

pure real(dp) function, dimension(ndim) m_af_types::af_r_cc ( type(box_t), intent(in)  box,
integer, dimension(ndim), intent(in)  cc_ix 
)

Get the location of the cell center with index cc_ix.

Definition at line 1035 of file m_af_types.f90.

◆ af_r_fc()

pure real(dp) function, dimension(ndim) m_af_types::af_r_fc ( type(box_t), intent(in)  box,
integer, intent(in)  dim,
integer, dimension(ndim), intent(in)  fc_ix 
)

Get the location of the face parallel to dim with index fc_ix.

Definition at line 1043 of file m_af_types.f90.

◆ af_rr_cc()

pure real(dp) function, dimension(ndim) m_af_types::af_rr_cc ( type(box_t), intent(in)  box,
real(dp), dimension(ndim), intent(in)  cc_ix 
)

Get a general location with index cc_ix (like af_r_cc but using reals)

Definition at line 1053 of file m_af_types.f90.

◆ af_r_center()

pure real(dp) function, dimension(ndim) m_af_types::af_r_center ( type(box_t), intent(in)  box)

Return the coordinate of the center of a box.

Definition at line 1061 of file m_af_types.f90.

◆ af_min_dr()

pure real(dp) function m_af_types::af_min_dr ( type(af_t), intent(in)  tree)

Return finest dr that is used in the tree.

Returns
Output: dr at the finest lvl of the tree

Definition at line 1068 of file m_af_types.f90.

◆ af_lvl_dr()

pure real(dp) function, dimension(ndim) m_af_types::af_lvl_dr ( type(af_t), intent(in)  tree,
integer, intent(in)  lvl 
)

Return dr at lvl.

Returns
Output: dr at the finest lvl of the tree

Definition at line 1075 of file m_af_types.f90.

◆ af_set_box_gc()

subroutine m_af_types::af_set_box_gc ( type(box_t), intent(inout)  box,
integer, intent(in)  nb,
integer, intent(in)  iv,
real(dp), intent(in), optional  gc_scalar,
real(dp), dimension(box%n_cell, box%n_cell), intent(in), optional  gc_array 
)
Parameters
[in,out]boxBox to operate on
[in]nbGhost cell direction
[in]ivGhost cell variable
[in]gc_scalarScalar value for ghost cells
[in]gc_arrayArray for ghost cells
[in]gc_arrayArray for ghost cells
[in]gc_arrayArray for ghost cells

Definition at line 1082 of file m_af_types.f90.

◆ af_cyl_radius_cc()

pure real(dp) function m_af_types::af_cyl_radius_cc ( type(box_t), intent(in)  box,
integer, intent(in)  i 
)

Get the radius of the cell center with first index i.

Definition at line 1168 of file m_af_types.f90.

◆ af_cyl_volume_cc()

pure real(dp) function m_af_types::af_cyl_volume_cc ( type(box_t), intent(in)  box,
integer, intent(in)  i 
)

Get the volume of the cell with first index i.

Definition at line 1176 of file m_af_types.f90.

◆ af_cyl_child_weights()

subroutine m_af_types::af_cyl_child_weights ( type(box_t), intent(in)  box,
integer, intent(in)  i,
real(dp), intent(out)  inner,
real(dp), intent(out)  outer 
)

Get the normalized weights of the 'inner' and 'outer' children of a cell with index ix. Note that the cell centers of the children are located at -/+ 0.25 dr compared to the parent.

Definition at line 1187 of file m_af_types.f90.

◆ af_cyl_flux_factors()

subroutine m_af_types::af_cyl_flux_factors ( type(box_t), intent(in)  box,
real(dp), dimension(2, box%n_cell), intent(out)  flux_factors 
)

Get the factors for the left and right flux in each cell.

Definition at line 1199 of file m_af_types.f90.

◆ af_get_face_coords()

subroutine m_af_types::af_get_face_coords ( type(box_t), intent(in)  box,
integer, intent(in)  nb,
real(dp), dimension(ndim, box%n_cell**(ndim-1)), intent(out)  coords 
)

Get coordinates at the faces of a box boundary.

Definition at line 1215 of file m_af_types.f90.

Variable Documentation

◆ dp

integer, parameter m_af_types::dp = kind(0.0d0)

Definition at line 11 of file m_af_types.f90.

◆ af_max_lvl

integer, parameter m_af_types::af_max_lvl = 30

Highest allowed refinement level.

Definition at line 14 of file m_af_types.f90.

◆ af_min_lvl

integer, parameter m_af_types::af_min_lvl = 1

Lowest allowed refinement level.

Definition at line 17 of file m_af_types.f90.

◆ af_max_num_vars

integer, parameter m_af_types::af_max_num_vars = 1024

Maximum number of variables.

Definition at line 20 of file m_af_types.f90.

◆ af_rm_ref

integer, parameter m_af_types::af_rm_ref = -1

Value indicating you want to derefine a box.

Definition at line 23 of file m_af_types.f90.

◆ af_keep_ref

integer, parameter m_af_types::af_keep_ref = 0

Value indicating you want to keep a box's refinement.

Definition at line 26 of file m_af_types.f90.

◆ af_do_ref

integer, parameter m_af_types::af_do_ref = 1

Value indicating you want to refine a box.

Definition at line 29 of file m_af_types.f90.

◆ af_derefine

integer, parameter m_af_types::af_derefine = -2

The children of a box are removed (for internal use)

Definition at line 32 of file m_af_types.f90.

◆ af_refine

integer, parameter m_af_types::af_refine = 2

A box will be refined (for internal use)

Definition at line 35 of file m_af_types.f90.

◆ af_no_box

integer, parameter m_af_types::af_no_box = 0

Special value indicating there is no box.

Definition at line 38 of file m_af_types.f90.

◆ af_phys_boundary

integer, parameter m_af_types::af_phys_boundary = -1

Special value indicating a physical (non-periodic) boundary.

Definition at line 41 of file m_af_types.f90.

◆ af_init_tag

integer, parameter m_af_types::af_init_tag = -huge(1)

Each box contains a tag, for which bits can be set. This is the initial value, which should not be used by the user.

Definition at line 45 of file m_af_types.f90.

◆ af_xyz

integer, parameter m_af_types::af_xyz = 1

Default coordinate system.

Definition at line 48 of file m_af_types.f90.

◆ af_cyl

integer, parameter m_af_types::af_cyl = 2

Cylindrical coordinate system.

Definition at line 51 of file m_af_types.f90.

◆ af_coord_names

character(len=*), dimension(2), parameter m_af_types::af_coord_names = ["Cartesian ", "Cylindrical"]

Names of coordinate systems.

Definition at line 54 of file m_af_types.f90.

◆ af_bc_dirichlet

integer, parameter m_af_types::af_bc_dirichlet = -10

Value to indicate a Dirichlet boundary condition.

Definition at line 58 of file m_af_types.f90.

◆ af_bc_neumann

integer, parameter m_af_types::af_bc_neumann = -11

Value to indicate a Neumann boundary condition.

Definition at line 61 of file m_af_types.f90.

◆ af_bc_continuous

integer, parameter m_af_types::af_bc_continuous = -12

Value to indicate a continuous boundary condition.

Definition at line 64 of file m_af_types.f90.

◆ af_bc_dirichlet_copy

integer, parameter m_af_types::af_bc_dirichlet_copy = -13

Value to indicate a Dirichlet boundary condition in which a value is copied to the ghost cells, without any type of extrapolation. This can be useful for hyperbolic PDEs.

Definition at line 69 of file m_af_types.f90.

◆ af_nlen

integer, parameter m_af_types::af_nlen = 20

Maximum length of the names of variables.

Definition at line 72 of file m_af_types.f90.

◆ af_num_children

integer parameter m_af_types::af_num_children = 2

Number of children.

Definition at line 97 of file m_af_types.f90.

◆ af_child_dix

integer, dimension(3, 8), parameter m_af_types::af_child_dix = reshape([0,1], [1,2])

Index offset for each child.

Definition at line 100 of file m_af_types.f90.

◆ af_child_adj_nb

integer, dimension(4, 6), parameter m_af_types::af_child_adj_nb = reshape([1,2], [1,2])

Children adjacent to a neighbor.

Definition at line 102 of file m_af_types.f90.

◆ af_child_low

logical, dimension(3, 8), parameter m_af_types::af_child_low = reshape([.true., .false.], [1, 2])

Which children have a low index per dimension.

Definition at line 104 of file m_af_types.f90.

◆ af_num_neighbors

integer parameter m_af_types::af_num_neighbors = 2

Whether a child located in the 'upper' direction (1 or 0)

Number of neighbors.

Number of neighbors

Definition at line 108 of file m_af_types.f90.

◆ af_neighb_lowx

integer parameter m_af_types::af_neighb_lowx = 1

Lower-x neighbor.

Definition at line 110 of file m_af_types.f90.

◆ af_neighb_highx

integer parameter m_af_types::af_neighb_highx = 2

Upper-x neighbor.

Definition at line 112 of file m_af_types.f90.

◆ af_neighb_dix

integer, dimension(3, 6), parameter m_af_types::af_neighb_dix = reshape([-1,1], [1,2])

Index offsets of neighbors.

Definition at line 115 of file m_af_types.f90.

◆ af_neighb_low

logical, dimension(6), parameter m_af_types::af_neighb_low = [.true., .false.]

Which neighbors have a lower index.

Definition at line 117 of file m_af_types.f90.

◆ af_low_neighbs

integer, dimension(3), parameter m_af_types::af_low_neighbs = [1]

The low neighbors.

Definition at line 119 of file m_af_types.f90.

◆ af_high_neighbs

integer, dimension(3), parameter m_af_types::af_high_neighbs = [2]

The high neighbors.

Definition at line 121 of file m_af_types.f90.

◆ af_neighb_high_pm

integer, dimension(6), parameter m_af_types::af_neighb_high_pm = [-1, 1]

Opposite of nb_low, but now as -1,1 integers.

Definition at line 123 of file m_af_types.f90.

◆ af_neighb_rev

integer, dimension(6), parameter m_af_types::af_neighb_rev = [2, 1]

Reverse neighbors.

Definition at line 126 of file m_af_types.f90.

◆ af_neighb_dim

integer, dimension(6), parameter m_af_types::af_neighb_dim = [1, 1]

Direction (dimension) for a neighbor.

Definition at line 128 of file m_af_types.f90.

◆ af_neighb_lowy

integer parameter m_af_types::af_neighb_lowy = 3

Lower-y neighbor.

Definition at line 148 of file m_af_types.f90.

◆ af_neighb_highy

integer parameter m_af_types::af_neighb_highy = 4

Upper-y neighbor.

Definition at line 150 of file m_af_types.f90.

◆ af_neighb_lowz

integer, parameter m_af_types::af_neighb_lowz = 5

Lower-z neighbor.

Definition at line 196 of file m_af_types.f90.

◆ af_neighb_highz

integer, parameter m_af_types::af_neighb_highz = 6

Upper-z neighbor.

Definition at line 198 of file m_af_types.f90.

◆ af_num_edges

integer, parameter m_af_types::af_num_edges = 12

Number of edgse.

Definition at line 217 of file m_af_types.f90.

◆ af_edge_dim

integer, dimension(12), parameter m_af_types::af_edge_dim = [1,1,1,1, 2,2,2,2, 3,3,3,3]

Coordinate parallel to edge.

Definition at line 219 of file m_af_types.f90.

◆ af_edge_dir

integer, dimension(3, 12), parameter m_af_types::af_edge_dir = reshape( [0,-1,-1, 0,1,-1, 0,-1,1, 0,1,1, -1,0,-1, 1,0,-1, -1,0,1, 1,0,1, -1,-1,0, 1,-1,0, -1,1,0, 1,1,0], [3, 12])

Direction of edge.

Definition at line 222 of file m_af_types.f90.

◆ af_nb_adj_edge

integer, dimension(2, 12), parameter m_af_types::af_nb_adj_edge = reshape( [3,5, 4,5, 3,6, 4,6, 1,5, 2,5, 1,6, 2,6, 1,3, 2,3, 1,4, 2,4], [2,12])

Neighbors adjacent to edges.

Definition at line 227 of file m_af_types.f90.

◆ af_edge_min_ix

integer, dimension(3, 12), parameter m_af_types::af_edge_min_ix = reshape( [0,0,0, 0,1,0, 0,0,1, 0,1,1, 0,0,0, 1,0,0, 0,0,1, 1,0,1, 0,0,0, 1,0,0, 0,1,0, 1,1,0], [3,12])

Minimum index of edge (1 indicates n_cell + 1)

Definition at line 232 of file m_af_types.f90.

◆ af_stencil_none

integer, parameter m_af_types::af_stencil_none = 0

Value indicating the absence of a stencil.

Definition at line 257 of file m_af_types.f90.

◆ mg_normal_operator

integer, parameter m_af_types::mg_normal_operator = 1

Definition at line 523 of file m_af_types.f90.

◆ mg_lsf_operator

integer, parameter m_af_types::mg_lsf_operator = 2

Definition at line 524 of file m_af_types.f90.

◆ mg_eps_operator

integer, parameter m_af_types::mg_eps_operator = 3

Definition at line 525 of file m_af_types.f90.

◆ mg_auto_operator

integer, parameter m_af_types::mg_auto_operator = 4

Definition at line 526 of file m_af_types.f90.

◆ mg_normal_box

integer, parameter m_af_types::mg_normal_box = 0

Normal box (no eps/lsf)

Definition at line 528 of file m_af_types.f90.

◆ mg_lsf_box

integer, parameter m_af_types::mg_lsf_box = 1

Box has level set function.

Definition at line 529 of file m_af_types.f90.

◆ mg_veps_box

integer, parameter m_af_types::mg_veps_box = 2

Box has variable coefficient.

Definition at line 530 of file m_af_types.f90.

◆ mg_ceps_box

integer, parameter m_af_types::mg_ceps_box = 4

Box has constant coefficient /= 1.

Definition at line 531 of file m_af_types.f90.

◆ mg_prolong_linear

integer, parameter m_af_types::mg_prolong_linear = 17

Linear prolongation.

Definition at line 533 of file m_af_types.f90.

◆ mg_prolong_sparse

integer, parameter m_af_types::mg_prolong_sparse = 18

Sparse linear prolongation.

Definition at line 534 of file m_af_types.f90.

◆ mg_prolong_auto

integer, parameter m_af_types::mg_prolong_auto = 19

Automatic prolongation.

Definition at line 535 of file m_af_types.f90.

◆ mg_lsf_distance_key

integer, parameter m_af_types::mg_lsf_distance_key = 31

Stencil key for level set function distance.

Definition at line 538 of file m_af_types.f90.

◆ mg_lsf_mask_key

integer, parameter m_af_types::mg_lsf_mask_key = 32

Stencil key for level set function mask.

Definition at line 540 of file m_af_types.f90.

◆ mg_cycle_down

integer, parameter m_af_types::mg_cycle_down = 1

Definition at line 543 of file m_af_types.f90.

◆ mg_cycle_up

integer, parameter m_af_types::mg_cycle_up = 3

Definition at line 544 of file m_af_types.f90.