Apply boundary conditions for the solution. 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 setboundarycondition_DGModel1D_t(this)
!! Apply boundary conditions for the solution.
!! 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%solution%extBoundary(1,1,1:this%nvar) = &
this%solution%boundary(2,nelem,1:this%nvar)
this%solution%extBoundary(2,nelem,1:this%nvar) = &
this%solution%boundary(1,1,1:this%nvar)
! Apply registered boundary conditions
bc => this%hyperbolicBCs%head
do while(associated(bc))
apply_bc => bc%bcMethod
call apply_bc(bc,this)
bc => bc%next
enddo
endsubroutine setboundarycondition_DGModel1D_t