MappedGradient_MappedScalar2D Subroutine

public subroutine MappedGradient_MappedScalar2D(this, df)

Calculates the gradient of a function using the strong form of the gradient in mapped coordinates.

Arguments

TypeIntentOptionalAttributesName
class(MappedScalar2D), intent(inout) :: this
type(c_ptr), intent(out) :: df

Calls

proc~~mappedgradient_mappedscalar2d~~CallsGraph proc~mappedgradient_mappedscalar2d MappedGradient_MappedScalar2D interface~contravariantweight_2d_gpu ContravariantWeight_2D_gpu proc~mappedgradient_mappedscalar2d->interface~contravariantweight_2d_gpu interface~jacobianweight_2d_gpu JacobianWeight_2D_gpu proc~mappedgradient_mappedscalar2d->interface~jacobianweight_2d_gpu interface~vectordivergence_2d_gpu VectorDivergence_2D_gpu proc~mappedgradient_mappedscalar2d->interface~vectordivergence_2d_gpu

Contents


Source Code

  subroutine MappedGradient_MappedScalar2D(this,df)
  !! Calculates the gradient of a function using the strong form of the gradient
  !! in mapped coordinates.
    implicit none
    class(MappedScalar2D),intent(inout) :: this
    type(c_ptr),intent(out) :: df

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

    ! Strong-form divergence of the contravariant-weighted field (jas)
    call VectorDivergence_2D_gpu(this%interp%dMatrix_gpu,this%jas_gpu,df, &
                                 this%interp%N,2*this%nvar,this%nelem)

    call JacobianWeight_2D_gpu(df,this%geometry%J%interior_gpu,this%N,2*this%nVar,this%nelem)

  endsubroutine MappedGradient_MappedScalar2D