mod_amr_fct Module


Uses

  • module~~mod_amr_fct~~UsesGraph module~mod_amr_fct mod_amr_fct module~mod_mpi_wrapper mod_mpi_wrapper module~mod_amr_fct->module~mod_mpi_wrapper mpi mpi module~mod_mpi_wrapper->mpi

Used by

  • module~~mod_amr_fct~~UsedByGraph module~mod_amr_fct mod_amr_fct proc~amr_coarsen_refine amr_coarsen_refine proc~amr_coarsen_refine->module~mod_amr_fct proc~initialize_vars initialize_vars proc~initialize_vars->module~mod_amr_fct proc~prolong_2nd prolong_2nd proc~prolong_2nd->module~mod_amr_fct proc~prolong_grid prolong_grid proc~prolong_grid->module~mod_amr_fct proc~resettree resettree proc~resettree->module~mod_amr_fct

Variables

Type Visibility Attributes Name Initial
type(fake_neighbors), public, dimension(:,:,:,:,:), allocatable :: fine_neighbors
integer, public, dimension(:,:,:,:,:), allocatable :: old_neighbor
type(facealloc), public, dimension(:,:,:), allocatable :: pface
integer, private :: ibuf_recv
integer, private :: ibuf_send
integer, private :: ibuf_send_next
integer, private :: irecv
integer, private :: isend
integer, private, dimension(3) :: isize
integer, private :: itag
integer, private :: nrecv
integer, private :: nsend
double precision, private, allocatable :: recvbuffer(:)
integer, private, dimension(:), allocatable :: recvrequest
integer, private, dimension(:,:), allocatable :: recvstatus
double precision, private, allocatable :: sendbuffer(:)
integer, private, dimension(:), allocatable :: sendrequest
integer, private, dimension(:,:), allocatable :: sendstatus

Derived Types

type, private ::  facealloc

Components

Type Visibility Attributes Name Initial
double precision, public, dimension(:,:,:), pointer :: face

type, private ::  fake_neighbors

Components

Type Visibility Attributes Name Initial
integer, public :: igrid
integer, public :: ipe

Subroutines

public subroutine already_fine(sFi, ichild, fine_min1, fine_min2, fine_min3, fine_max1, fine_max2, fine_max3)

This routine fills the fine faces before prolonging. It is the face equivalent of fix_conserve

Arguments

Type IntentOptional Attributes Name
type(state) :: sFi
integer, intent(in) :: ichild
logical :: fine_min1
logical :: fine_min2
logical :: fine_min3
logical :: fine_max1
logical :: fine_max2
logical :: fine_max3

public subroutine comm_faces()

When refining a coarse block with fine neighbours, it is necessary prolong consistently with the already fine faces. This routine takes care of the communication of such faces.

Arguments

None

public subroutine deallocateBfaces()

Arguments

None

public subroutine end_comm_faces()

Arguments

None

public subroutine old_neighbors(child_igrid, child_ipe, igrid, ipe)

Arguments

Type IntentOptional Attributes Name
integer, intent(in), dimension(2,2,2) :: child_igrid
integer, intent(in), dimension(2,2,2) :: child_ipe
integer, intent(in) :: igrid
integer, intent(in) :: ipe

public subroutine prolong_2nd_stg(sCo, sFi, ixComin1in, ixComin2in, ixComin3in, ixComax1in, ixComax2in, ixComax3in, ixFimin1in, ixFimin2in, ixFimin3in, ixFimax1in, ixFimax2in, ixFimax3in, dxCo1, dxCo2, dxCo3, xComin1, xComin2, xComin3, dxFi1, dxFi2, dxFi3, xFimin1, xFimin2, xFimin3, ghost, fine_min1in, fine_min2in, fine_min3in, fine_max1in, fine_max2in, fine_max3in)

This subroutine performs a 2nd order prolongation for a staggered field F, preserving the divergence of the coarse cell. This is useful for preserving DivF=0. If DivF=f(x), a different algorithm must be used.

Arguments

Type IntentOptional Attributes Name
type(state), intent(in) :: sCo
type(state), intent(inout) :: sFi
integer, intent(in) :: ixComin1in
integer, intent(in) :: ixComin2in
integer, intent(in) :: ixComin3in
integer, intent(in) :: ixComax1in
integer, intent(in) :: ixComax2in
integer, intent(in) :: ixComax3in
integer, intent(in) :: ixFimin1in
integer, intent(in) :: ixFimin2in
integer, intent(in) :: ixFimin3in
integer, intent(in) :: ixFimax1in
integer, intent(in) :: ixFimax2in
integer, intent(in) :: ixFimax3in
double precision, intent(in) :: dxCo1
double precision, intent(in) :: dxCo2
double precision, intent(in) :: dxCo3
double precision, intent(in) :: xComin1
double precision, intent(in) :: xComin2
double precision, intent(in) :: xComin3
double precision, intent(in) :: dxFi1
double precision, intent(in) :: dxFi2
double precision, intent(in) :: dxFi3
double precision, intent(in) :: xFimin1
double precision, intent(in) :: xFimin2
double precision, intent(in) :: xFimin3
logical, intent(in) :: ghost
logical, optional :: fine_min1in
logical, optional :: fine_min2in
logical, optional :: fine_min3in
logical, optional :: fine_max1in
logical, optional :: fine_max2in
logical, optional :: fine_max3in

public subroutine store_faces()

To achive consistency and thus conservation of divergence, when refining a block we take into account the faces of the already fine neighbours, if any. This routine stores them.

Arguments

None