eulerian_obj_MulInt0D Function

private impure function eulerian_obj_MulInt0D(this, in) result(res)

Performs multiplication of integer Eulerian objects by integer scalar.

Type Bound

eulerian_obj_base

Arguments

Type IntentOptional Attributes Name
class(eulerian_obj_base), intent(in) :: this

An Eulerian object

integer, intent(in) :: in

An Eulerian object

Return Value class(eulerian_obj_base), allocatable

Result


Calls

proc~~eulerian_obj_mulint0d~~CallsGraph proc~eulerian_obj_mulint0d eulerian_obj_base%eulerian_obj_MulInt0D proc~eulerian_obj_init eulerian_obj_base%eulerian_obj_Init proc~eulerian_obj_mulint0d->proc~eulerian_obj_init

Source Code

    impure function eulerian_obj_MulInt0D(this,in) result (res)
      !> Performs multiplication of integer Eulerian objects by integer scalar.
      implicit none
      class(eulerian_obj_base), intent(in)  :: this                            !! An Eulerian object
      integer,                  intent(in)  :: in                              !! An Eulerian object
      class(eulerian_obj_base), allocatable :: res                             !! Result

      select type (this)
      type is (eulerian_obj_r)
        allocate(eulerian_obj_r:: res)
        call res%Initialize(this%name,this%block,this%parallel,this%staggering)

        select type(res)
        type is (eulerian_obj_r)
          res%cell = this%cell*real(in,wp)
        end select

      type is (eulerian_obj_i)
        allocate(eulerian_obj_i:: res)
        call res%Initialize(this%name,this%block,this%parallel,this%staggering)

        select type(res)
        type is (eulerian_obj_i)
          res%cell = this%cell*in
        end select

      class default
        call this%parallel%Stop("Error performing multiplication of Eulerian object")
      end select

      return
    end function eulerian_obj_MulInt0D