MPI-AMRVAC
3.1
The MPI - Adaptive Mesh Refinement - Versatile Advection Code (development version)
|
Module to couple the octree-mg library to AMRVAC. This file uses the VACPP preprocessor, but its use is kept to a minimum. More...
Data Types | |
interface | after_new_tree |
Functions/Subroutines | |
subroutine | mg_setup_multigrid () |
Setup multigrid for usage. More... | |
subroutine | mg_copy_boundary_conditions (mg, iw) |
Set multigrid boundary conditions for the solution according to variable iw. More... | |
subroutine | mg_update_refinement (n_coarsen, n_refine) |
If the grid has changed, rebuild the full multigrid tree. More... | |
subroutine | mg_copy_to_tree (iw_from, iw_to, restrict, restrict_gc, factor, state_from) |
Copy a variable to the multigrid tree, including a layer of ghost cells. More... | |
subroutine | mg_copy_from_tree (iw_from, iw_to, state_to) |
Copy a variable from the multigrid tree. More... | |
subroutine | mg_copy_from_tree_gc (iw_from, iw_to, state_to) |
Copy from multigrid tree with one layer of ghost cells. Corner ghost cells are not used/set. More... | |
subroutine | mg_tree_from_amrvac (mg) |
Generate a multigrid tree that includes the amrvac tree, but also contains coarser grid levels. A number of checks has already been performed in mg_setup_multigrid, so we don't repeat these checks here. More... | |
Variables | |
type(mg_t) | mg |
Data structure containing the multigrid tree. More... | |
procedure(after_new_tree), pointer | mg_after_new_tree => null() |
If defined, this routine is called after a new multigrid tree is constructed. More... | |
Module to couple the octree-mg library to AMRVAC. This file uses the VACPP preprocessor, but its use is kept to a minimum.
subroutine mod_multigrid_coupling::mg_copy_boundary_conditions | ( | type(mg_t), intent(inout) | mg, |
integer, intent(in) | iw | ||
) |
Set multigrid boundary conditions for the solution according to variable iw.
Definition at line 59 of file mod_multigrid_coupling.t.
subroutine mod_multigrid_coupling::mg_copy_from_tree | ( | integer, intent(in) | iw_from, |
integer, intent(in) | iw_to, | ||
type(state), dimension(max_blocks), intent(inout), optional, target | state_to | ||
) |
Copy a variable from the multigrid tree.
[in] | iw_from | Variable to use as right-hand side |
[in] | iw_to | Copy to this variable |
[in,out] | state_to | If present, use this as the output state |
Definition at line 153 of file mod_multigrid_coupling.t.
subroutine mod_multigrid_coupling::mg_copy_from_tree_gc | ( | integer, intent(in) | iw_from, |
integer, intent(in) | iw_to, | ||
type(state), dimension(max_blocks), intent(inout), optional, target | state_to | ||
) |
Copy from multigrid tree with one layer of ghost cells. Corner ghost cells are not used/set.
[in] | iw_from | Variable to use as right-hand side |
[in] | iw_to | Copy to this variable |
[in,out] | state_to | If present, use this as the output state |
Definition at line 184 of file mod_multigrid_coupling.t.
subroutine mod_multigrid_coupling::mg_copy_to_tree | ( | integer, intent(in) | iw_from, |
integer, intent(in) | iw_to, | ||
logical, intent(in), optional | restrict, | ||
logical, intent(in), optional | restrict_gc, | ||
real(dp), intent(in), optional | factor, | ||
type(state), dimension(max_blocks), intent(in), optional, target | state_from | ||
) |
Copy a variable to the multigrid tree, including a layer of ghost cells.
[in] | iw_from | Variable to use as right-hand side |
[in] | iw_to | Copy to this variable |
[in] | restrict | Restrict variable on multigrid tree |
[in] | restrict_gc | Fill ghost cells after restrict |
[in] | factor | out = factor * in |
[in] | state_from | If present, use this as the input state |
Definition at line 103 of file mod_multigrid_coupling.t.
subroutine mod_multigrid_coupling::mg_setup_multigrid |
Setup multigrid for usage.
Definition at line 33 of file mod_multigrid_coupling.t.
subroutine mod_multigrid_coupling::mg_tree_from_amrvac | ( | type(mg_t), intent(inout) | mg | ) |
Generate a multigrid tree that includes the amrvac tree, but also contains coarser grid levels. A number of checks has already been performed in mg_setup_multigrid, so we don't repeat these checks here.
Definition at line 219 of file mod_multigrid_coupling.t.
subroutine mod_multigrid_coupling::mg_update_refinement | ( | integer, intent(in) | n_coarsen, |
integer, intent(in) | n_refine | ||
) |
If the grid has changed, rebuild the full multigrid tree.
Definition at line 86 of file mod_multigrid_coupling.t.
type(mg_t) mod_multigrid_coupling::mg |
Data structure containing the multigrid tree.
Definition at line 19 of file mod_multigrid_coupling.t.
procedure(after_new_tree), pointer mod_multigrid_coupling::mg_after_new_tree => null() |
If defined, this routine is called after a new multigrid tree is constructed.
Definition at line 23 of file mod_multigrid_coupling.t.