Commit e3c08ba1 authored by Jannis Teunissen's avatar Jannis Teunissen

Add Dirichlet 'copy' boundary condition (no extrapolation)

parent 3f30a03c
......@@ -247,6 +247,10 @@ contains
c0 = 0
c1 = 2
c2 = -1
case (af_bc_dirichlet_copy)
c0 = 1
c1 = 0
c2 = 0
case default
stop "fill_bc: unknown boundary condition"
end select
......@@ -345,6 +349,9 @@ contains
case (af_bc_neumann)
c0 = dr(af_neighb_dim(nb)) * af_neighb_high_pm(nb) ! This gives a + or - sign
c1 = 1
case (af_bc_dirichlet_copy)
c0 = 1
c1 = 0
case default
stop "fill_bc: unknown boundary condition"
end select
......
......@@ -63,6 +63,11 @@ module m_af_types
!> Value to indicate a continuous boundary condition
integer, parameter :: af_bc_continuous = -12
!> 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
integer, parameter :: af_bc_dirichlet_copy = -13
!> Maximum length of the names of variables
integer, parameter :: af_nlen = 20
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment