particle_set_SetObjectType Subroutine

private pure subroutine particle_set_SetObjectType(this)

Sets the sample type used in allocation of polymorphic variables.

Type Bound

particle_set

Arguments

Type IntentOptional Attributes Name
class(particle_set), intent(inout) :: this

Lagrangian array to dump


Called by

proc~~particle_set_setobjecttype~~CalledByGraph proc~particle_set_setobjecttype particle_set%particle_set_SetObjectType proc~particle_set_changeparttype particle_set%particle_set_ChangePartType proc~particle_set_changeparttype->proc~particle_set_setobjecttype proc~particle_set_prepare particle_set%particle_set_Prepare proc~particle_set_prepare->proc~particle_set_changeparttype

Source Code

    pure subroutine particle_set_SetObjectType(this)
      !> Sets the sample type used in allocation of polymorphic variables.
      implicit none
      class(particle_set), intent(inout) :: this                               !! Lagrangian array to dump
      ! Work variables
      type(particle_obj)    :: sample                                          !! My sample
      type(particle_BH_obj) :: sample_BH                                       !! My sample

      select case (this%part_type)
      case (PP_TYPE_DEFAULT)
        allocate(this%sample,source=sample   )
      case (PP_TYPE_BASSET )
        allocate(this%sample,source=sample_BH)
      end select

      return
    end subroutine particle_set_SetObjectType