nf_solver_restart Function

public function nf_solver_restart(self) result(result)

Type Bound

nf_solver

Arguments

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

Solver object.

Return Value type(nf_result)


Variables

Type Visibility Attributes Name Initial
integer, public :: iflag
integer, public :: n

Source Code

   type(nf_result) function nf_solver_restart(self) result(result)

      class(nf_solver), intent(inout) :: self
         !! Solver object.

      integer :: iflag, n

      ! n = self%state%n

      ! associate (message => result%status%message, code => result%status%code)

      !    ! Validate that the solver has been initialized
      !    if (.not. self%initialized) then
      !       message = "Solver has not been initialized. Call `initialize` before `solve`."
      !       code = fixpnf_input_error
      !       return
      !    end if

      !    ! Validate the initial point 'x0'
      !    if (size(x0) /= n) then
      !       message = "Illegal input: length of `x0` must be equal to `n` specified during initialization."
      !       code = fixpnf_input_error
      !       return
      !    end if

      !    ! Validate the parameter vector 'a' for curve-tracking problems
      !    if (self%problem_type == curve_track) then
      !       if (.not. present(a)) then
      !          message = "Illegal input: parameter vector `a` must be provided for curve-tracking problems."
      !          code = fixpnf_input_error
      !          return
      !       end if
      !       if (size(a) /= size(self%state%a)) then
      !          message = "Illegal input: length of parameter vector `a` must match the dimension specified during initialization."
      !          code = fixpnf_input_error
      !          return
      !       end if
      !       a_ = a
      !    else
      !       a_ = zero
      !    end if

      ! end associate

      ! ! Determine 'iflag'
      ! if (self%problem_type == fix_point) then
      !    iflag = 0
      ! else if (self%problem_type == zero_find) then
      !    iflag = -1
      ! else if (self%problem_type == curve_track) then
      !    iflag = -2
      ! end if

      ! ! Call the solver
      ! call fixpnf(self%state, self%callbacks, self%state%n, x0, iflag, self%config, a_)

      ! ! Populate the result object
      ! result%arc_length = self%state%s
      ! result%lambda = self%state%y(1)
      ! result%x = self%state%y(2:n + 1)
      ! result%nfe = self%state%nfe
      ! result%status%code = iflag

   end function nf_solver_restart