Module fd4_boundary_mod


Uses:
    module fd4_domain_mod
    module fd4_block_mod
    module fd4_globaldef_mod
    module fd4_vartab_mod
    module fd4_ghostlist_mod
Subroutines and functions:
    public subroutine fd4_boundary_zerograd (domain, idx, st, nfields)
    public subroutine fd4_boundary_zerograd_block (domain, b, idx, st, nfields)
    private subroutine fd4_boundary_zerograd_set (domain, b, bgb, idx, st, nfields)
    public subroutine fd4_boundary_spec (domain, idx, st, nfields, face, lvalues, uvalues)
    private subroutine fd4_boundary_spec_set (domain, bgb, idx, st, nfields, lvalues, uvalues)

Apply boundary conditions on a domain.

Currently we have zero gradient and a simple method to set specific values.

Author: Matthias Lieber

See also: module fd4_domain_mod


Description of Subroutines and Functions

fd4_boundary_zerograd

public subroutine fd4_boundary_zerograd (domain, idx, st, nfields)
    type (fd4_domain), intent(inout) :: domain
    integer (kind=i_k), intent(in), dimension (nfields) :: idx
    integer (kind=i_k), intent(in), dimension (nfields) :: st
    integer (kind=i_k), intent(in) :: nfields
end subroutine fd4_boundary_zerograd
Parameters:
domain the domain
idx array of field indices
st array of time step indices
nfields size of idx amd st
Apply zero gradient boundary conditions on all blocks of a domain.

Sets the given cell-centered vars in the boundary ghost block to the same value as in the cells at domain boundary. Sets the value of the given face variables at domain boundary (within domain) to vnull.

TODO:


fd4_boundary_zerograd_block

public subroutine fd4_boundary_zerograd_block (domain, b, idx, st, nfields)
    type (fd4_domain), intent(inout) :: domain
    type (fd4_block), pointer :: b
    integer (kind=i_k), intent(in), dimension (nfields) :: idx
    integer (kind=i_k), intent(in), dimension (nfields) :: st
    integer (kind=i_k), intent(in) :: nfields
end subroutine fd4_boundary_zerograd_block
Parameters:
domain the domain
b the block
idx array of field indices
st array of time step indices
nfields size of idx amd st
Apply zero gradient boundary conditions on specified block

Sets the given cell-centered vars in the boundary ghost block to the same value as in the cells at domain boundary. Sets the value of the given face variables at domain boundary (within domain) to vnull.

TODO:


fd4_boundary_zerograd_set

private subroutine fd4_boundary_zerograd_set (domain, b, bgb, idx, st, nfields)
    type (fd4_domain), intent(inout) :: domain
    type (fd4_block), pointer :: b
    type (fd4_block), pointer :: bgb
    integer (kind=i_k), intent(in), dimension (nfields) :: idx
    integer (kind=i_k), intent(in), dimension (nfields) :: st
    integer (kind=i_k), intent(in) :: nfields
end subroutine fd4_boundary_zerograd_set
Parameters:
domain the domain
b the block
bgb the boundary ghost block
idx array of field indices
st array of time step indices
nfields size of idx amd st
Apply zero gradient boundary conditions on specified block/boundary ghost block pair.

Internal subroutine. Used by fd4_boundary_zerograd and fd4_boundary_zerograd_block.


fd4_boundary_spec

public subroutine fd4_boundary_spec (domain, idx, st, nfields, face, lvalues, uvalues)
    type (fd4_domain), intent(inout) :: domain
    integer (kind=i_k), intent(in), dimension (nfields) :: idx
    integer (kind=i_k), intent(in), dimension (nfields) :: st
    integer (kind=i_k), intent(in) :: nfields
    integer (kind=i_k), intent(in) :: face
    real (kind=r_k), target, intent(in), dimension (:) :: lvalues
    real (kind=r_k), target, intent(in), dimension (:) :: uvalues
end subroutine fd4_boundary_spec
Parameters:
domain the domain
idx array of field indices
st array of time step indices
nfields size of idx amd st
face dimension to process (1,2,3)
lvalues values for each ghost plane (lower boundary)
uvalues values for each ghost plane (upper boundary)
Apply specific gradient boundary conditions on all blocks of a domain.

value(1) is used for the first boundary layer, value(2) for the second etc. Does only process cell centered variables. Only one spatial dimension is processed.


fd4_boundary_spec_set

private subroutine fd4_boundary_spec_set (domain, bgb, idx, st, nfields, lvalues, uvalues)
    type (fd4_domain), intent(inout) :: domain
    type (fd4_block), pointer :: bgb
    integer (kind=i_k), intent(in), dimension (nfields) :: idx
    integer (kind=i_k), intent(in), dimension (nfields) :: st
    integer (kind=i_k), intent(in) :: nfields
    real (kind=r_k), target, intent(in), dimension (:) :: lvalues
    real (kind=r_k), target, intent(in), dimension (:) :: uvalues
end subroutine fd4_boundary_spec_set
Parameters:
domain the domain
bgb the boundary ghost block
idx array of field indices
st array of time step indices
nfields size of idx amd st
lvalues values for each ghost plane (lower boundary)
uvalues values for each ghost plane (upper boundary)
Apply specific boundary conditions on specified block/boundary ghost block pair.

Internal subroutine. Used by fd4_boundary_spec.