error_function Subroutine

public subroutine error_function(X, Fobj, dF, func_data)

error_function

Error function for phase-equilibria optimization. Using two-phase points and an error function of:

Arguments

Type IntentOptional Attributes Name
real(kind=pr), intent(in) :: X(:)

Vector of parameters

real(kind=pr), intent(out) :: Fobj

Objective function

real(kind=pr), intent(out), optional :: dF(:)

Gradient of the objective function, only exists to be consistent with the Optimizer class API

class(*), intent(inout), optional :: func_data

Variables

Type Visibility Attributes Name Initial
type(EquilibriumState), public :: exp_point
integer, public :: i
type(EquilibriumState), public :: model_point

Each solved point

integer, public :: n_nconv
logical, public :: pt_converged