Sets the this % interior attribute using the eqn attribute, geometry (for physical positions), and provided simulation time.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(MappedScalar2D), | intent(inout) | :: | this | |||
type(SEMQuad), | intent(in) | :: | geometry | |||
real(kind=prec), | intent(in) | :: | time |
subroutine SetInteriorFromEquation_MappedScalar2D(this,geometry,time)
!! Sets the this % interior attribute using the eqn attribute,
!! geometry (for physical positions), and provided simulation time.
implicit none
class(MappedScalar2D),intent(inout) :: this
type(SEMQuad),intent(in) :: geometry
real(prec),intent(in) :: time
! Local
integer :: i,j,iEl,iVar
real(prec) :: x
real(prec) :: y
do iVar = 1,this%nVar
do iEl = 1,this%nElem
do j = 1,this%interp%N+1
do i = 1,this%interp%N+1
! Get the mesh positions
x = geometry%x%interior(i,j,iEl,1,1)
y = geometry%x%interior(i,j,iEl,1,2)
this%interior(i,j,iEl,iVar) = &
this%eqn(iVar)%Evaluate((/x,y,0.0_prec,time/))
enddo
enddo
enddo
enddo
call gpuCheck(hipMemcpy(this%interior_gpu,c_loc(this%interior),sizeof(this%interior),hipMemcpyHostToDevice))
endsubroutine SetInteriorFromEquation_MappedScalar2D