init Subroutine

private subroutine init(self)

初始化

Type Bound

external_force_type

Arguments

Type IntentOptional Attributes Name
class(external_force_type), intent(inout) :: self

Contents

Source Code


Source Code

    subroutine init(self)
        class(external_force_type), intent(inout) :: self

        if (spc_obj%has_gravity) then
            self%run => external_force_with_gravity
        else
            self%run => external_force_without_gravity
        end if

        self%r0 = 0.9_rk*rgn_obj%hsml
        self%dd = (spc_obj%c0/2)**2

    end subroutine init