SetInteriorFromEquation_MappedScalar3D_t Subroutine

public subroutine SetInteriorFromEquation_MappedScalar3D_t(this, geometry, time)

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

Arguments

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

Contents


Source Code

  subroutine SetInteriorFromEquation_MappedScalar3D_t(this,geometry,time)
  !!  Sets the this % interior attribute using the eqn attribute,
  !!  geometry (for physical positions), and provided simulation time.
    implicit none
    class(MappedScalar3D_t),intent(inout) :: this
    type(SEMHex),intent(in) :: geometry
    real(prec),intent(in) :: time
    ! Local
    integer :: i,j,k,iEl,iVar
    real(prec) :: x
    real(prec) :: y
    real(prec) :: z

    do iVar = 1,this%nVar
      do iEl = 1,this%nElem
        do k = 1,this%interp%N+1
          do j = 1,this%interp%N+1
            do i = 1,this%interp%N+1

              ! Get the mesh positions
              x = geometry%x%interior(i,j,k,iEl,1,1)
              y = geometry%x%interior(i,j,k,iEl,1,2)
              z = geometry%x%interior(i,j,k,iEl,1,3)

              this%interior(i,j,k,iEl,iVar) = &
                this%eqn(iVar)%Evaluate((/x,y,z,time/))

            enddo
          enddo
        enddo
      enddo
    enddo

  endsubroutine SetInteriorFromEquation_MappedScalar3D_t