tem_get_new_varSys_data_ptr Function

public function tem_get_new_varSys_data_ptr(solver_bundle) result(resPtr)

Routine to get a pointer to a new instance of method_data for an operation variable

Arguments

Type IntentOptional Attributes Name
type(c_ptr), intent(in), optional :: solver_bundle

Optional solver data to store in tem_varSys_op_data_type

Return Value type(c_ptr)

Pointer to the newly created instance.


Source Code

  function tem_get_new_varSys_data_ptr(solver_bundle) result(resPtr)
    ! ---------------------------------------------------------------------- !
    !> Pointer to the newly created instance.
    type(c_ptr) ::  resPtr
    !> Optional solver data to store in tem_varSys_op_data_type
    type(c_ptr), optional, intent(in) :: solver_bundle
    ! ---------------------------------------------------------------------- !
    !> Local variable to allocate a new instance.
    type(tem_varSys_op_data_type), pointer :: res
    ! ---------------------------------------------------------------------- !

    allocate(res)
    if (present(solver_bundle)) res%solver_bundle = solver_bundle
    resPtr = c_loc(res)

  end function tem_get_new_varSys_data_ptr