yaeos__fitting Module



Abstract Interfaces

abstract interface

  • public subroutine model_from_X(problem, X)

    Function that returns a setted model from the parameters vector

    Arguments

    Type IntentOptional Attributes Name
    class(FittingProblem), intent(inout) :: problem

    Fitting problem to optimize

    real(kind=pr), intent(in) :: X(:)

    Vector of parameters to fit


Derived Types

type, public, abstract ::  FittingProblem

This derived type holds all the relevant information for a parameter optimization problem. It keeps the base model structure that will be optimized and a procedure get_model_from_X that should reconstruct the model with the desired parameters to optimize.

Read more…

Components

Type Visibility Attributes Name Initial
type(EquilibriumState), public, allocatable :: experimental_points(:)

Experimental points to fit

class(ArModel), public, allocatable :: model

Residual Helmholtz Model to fit

logical, public :: verbose = .false.

If true log the fitting process

Type-Bound Procedures

procedure(model_from_X), public, deferred :: get_model_from_X

Functions

public function optimize(X, opt, data) result(y)

Arguments

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

Vector of parameters to fit

class(Optimizer), intent(inout) :: opt

Optimizer object, bsaed on the Optimizer class from yaeos__optimizers

class(FittingProblem), intent(inout), optional :: data

Fitting problem to optimize

Return Value real(kind=pr)


Subroutines

public subroutine calc_pt_envel(model, exp_point, model_point, converged)

Arguments

Type IntentOptional Attributes Name
class(ArModel), intent(in) :: model
type(EquilibriumState), intent(in) :: exp_point
type(EquilibriumState), intent(out) :: model_point
logical, intent(out) :: converged

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

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

Read more…

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