MappedDGGradient_MappedScalar3D Subroutine

public subroutine MappedDGGradient_MappedScalar3D(this, df)

Calculates the gradient of a function using the weak form of the gradient and the average boundary state. This method will compute the average boundary state from the and attributes of

Arguments

TypeIntentOptionalAttributesName
class(MappedScalar3D), intent(in) :: this
type(c_ptr), intent(inout) :: df

Calls

proc~~mappeddggradient_mappedscalar3d~~CallsGraph proc~mappeddggradient_mappedscalar3d MappedDGGradient_MappedScalar3D interface~vectordivergence_3d_gpu VectorDivergence_3D_gpu proc~mappeddggradient_mappedscalar3d->interface~vectordivergence_3d_gpu interface~dg_boundarycontribution_3d_gpu DG_BoundaryContribution_3D_gpu proc~mappeddggradient_mappedscalar3d->interface~dg_boundarycontribution_3d_gpu interface~normalweight_3d_gpu NormalWeight_3D_gpu proc~mappeddggradient_mappedscalar3d->interface~normalweight_3d_gpu interface~jacobianweight_3d_gpu JacobianWeight_3D_gpu proc~mappeddggradient_mappedscalar3d->interface~jacobianweight_3d_gpu interface~contravariantweight_3d_gpu ContravariantWeight_3D_gpu proc~mappeddggradient_mappedscalar3d->interface~contravariantweight_3d_gpu

Contents


Source Code

  subroutine MappedDGGradient_MappedScalar3D(this,df)
    !! Calculates the gradient of a function using the weak form of the gradient
    !! and the average boundary state.
    !! This method will compute the average boundary state from the
    !! and  attributes of
    implicit none
    class(MappedScalar3D),intent(in) :: this
    type(c_ptr),intent(inout) :: df

    call ContravariantWeight_3D_gpu(this%interior_gpu, &
                                    this%geometry%dsdx%interior_gpu,this%jas_gpu, &
                                    this%interp%N,this%nvar,this%nelem)

    ! Weak-form (DG) divergence of the contravariant-weighted field (jas)
    call VectorDivergence_3D_gpu(this%interp%dgMatrix_gpu,this%jas_gpu,df, &
                                 this%interp%N,3*this%nvar,this%nelem)

    ! Do the boundary terms
    call NormalWeight_3D_gpu(this%avgBoundary_gpu, &
                             this%geometry%nhat%boundary_gpu,this%geometry%nscale%boundary_gpu, &
                             this%boundarynormal_gpu, &
                             this%interp%N,this%nvar,this%nelem)

    call DG_BoundaryContribution_3D_gpu(this%interp%bmatrix_gpu,this%interp%qweights_gpu, &
                                        this%boundarynormal_gpu,df,this%interp%N,3*this%nvar,this%nelem)

    call JacobianWeight_3D_gpu(df,this%geometry%J%interior_gpu,this%N,3*this%nVar,this%nelem)

  endsubroutine MappedDGGradient_MappedScalar3D