| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(c_ptr), | value | :: | c_pt | |||
| real(kind=dp), | value | :: | Re |
function friction_factor_blasius(c_pt,Re) result(friction) bind(C) type(c_ptr), value :: c_pt real(dp), value :: Re real(dp) :: friction real(dp) :: Remin type(blasius_cfg_t), pointer :: blasius_ptr call c_f_pointer(c_pt,blasius_ptr) Remin=10.0_dp if(Re>Remin) then friction=blasius_ptr%alpha*(Re**(-blasius_ptr%beta)) else friction=blasius_ptr%alpha*(Remin**(-blasius_ptr%beta)) endif end function friction_factor_blasius