Apply boundary conditions for the solution gradient. Periodic boundaries are set as the default; registered boundary conditions overwrite specific endpoints.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(DGModel1D_t), | intent(inout) | :: | this |
subroutine setgradientboundarycondition_DGModel1D_t(this)
!! Apply boundary conditions for the solution gradient.
!! Periodic boundaries are set as the default; registered
!! boundary conditions overwrite specific endpoints.
implicit none
class(DGModel1D_t),intent(inout) :: this
! Local
type(BoundaryCondition),pointer :: bc
procedure(SELF_bcMethod),pointer :: apply_bc
integer :: nelem
nelem = this%mesh%nElem
! Default: periodic boundary conditions
this%solutionGradient%extBoundary(1,1,1:this%nvar) = &
this%solutionGradient%boundary(2,nelem,1:this%nvar)
this%solutionGradient%extBoundary(2,nelem,1:this%nvar) = &
this%solutionGradient%boundary(1,1,1:this%nvar)
! Apply registered boundary conditions
bc => this%parabolicBCs%head
do while(associated(bc))
apply_bc => bc%bcMethod
call apply_bc(bc,this)
bc => bc%next
enddo
endsubroutine setgradientboundarycondition_DGModel1D_t