SetInteriorFromEquation_MappedScalar2D_t Subroutine

public subroutine SetInteriorFromEquation_MappedScalar2D_t(this, geometry, time)

Sets the this % interior attribute using the eqn attribute, geometry (for physical positions), and provided simulation time.

Arguments

TypeIntentOptionalAttributesName
class(MappedScalar2D_t), intent(inout) :: this
type(SEMQuad), intent(in) :: geometry
real(kind=prec), intent(in) :: time

Contents


Source Code

  subroutine SetInteriorFromEquation_MappedScalar2D_t(this,geometry,time)
  !!  Sets the this % interior attribute using the eqn attribute,
  !!  geometry (for physical positions), and provided simulation time.
    implicit none
    class(MappedScalar2D_t),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

  endsubroutine SetInteriorFromEquation_MappedScalar2D_t