Calculates the gradient of a function using the strong form of the gradient in mapped coordinates.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(MappedScalar3D), | intent(inout) | :: | this | |||
| type(c_ptr), | intent(out) | :: | df |
subroutine MappedGradient_MappedScalar3D(this,df)
!! Calculates the gradient of a function using the strong form of the gradient
!! in mapped coordinates.
implicit none
class(MappedScalar3D),intent(inout) :: this
type(c_ptr),intent(out) :: df
call ContravariantWeight_3D_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_3D_gpu(this%interp%dMatrix_gpu,this%jas_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 MappedGradient_MappedScalar3D