setgradientboundarycondition_DGModel1D_t Subroutine

public 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.

Arguments

TypeIntentOptionalAttributesName
class(DGModel1D_t), intent(inout) :: this

Called by

proc~~setgradientboundarycondition_dgmodel1d_t~~CalledByGraph proc~setgradientboundarycondition_dgmodel1d_t setgradientboundarycondition_DGModel1D_t proc~setgradientboundarycondition_dgmodel1d setgradientboundarycondition_DGModel1D proc~setgradientboundarycondition_dgmodel1d->proc~setgradientboundarycondition_dgmodel1d_t

Contents


Source Code

  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