Fronts.ParamEstim
module: parameter estimation support
The ParamEstim
submodule provides support for optimization-based parameter estimation runs using Fronts
.
Fronts.ParamEstim.ScaledSolution
— TypeScaledSolution
Wrapper for a solution scaled in o
as if affecting the diffusivity by a constant factor D0
.
Extra fields
original
: original unscaled solution.D0
: scaling factor.
Fronts.ParamEstim.AbstractCostFunction
— Typeabstract type AbstractCostFunction{fit_D0} end
Abstract cost function for parameter estimation.
Type parameters
fit_D0::Bool
: whether to fit an additional constant factorD0
that affects the diffusivity. Values
of D0
can be found with relative efficiency without additional solver calls; so if any such constant factors affecting the diffusivity are unknown, it is recommended not to fit those factors directly but set fit_D0
to true
instead. Values of D0
are found internally by local optimization. If true
, the candidate
function will return a ScaledSolution
that includes the found value of D0
.
Fronts.ParamEstim.RSSCostFunction
— TypeRSSCostFunction{fit_D0}(func, prob::InverseProblem[; D0tol, oi_hint]) <: AbstractCostFunction
Residual sum of squares cost function for parameter estimation.
Type parameters
fit_D0::Bool
: whether to fit an additional constant factorD0
that affects the diffusivity. Values
of D0
can be found with relative efficiency without additional solver calls; so if any such constant factors affecting the diffusivity are unknown, it is recommended not to fit those factors directly but set fit_D0
to true
instead. Values of D0
are found internally by local optimization. If true
, the candidate
function will return a ScaledSolution
that includes the found value of D0
.
Arguments
func
: function that takes a vector of parameter values and returns either aFronts.Solution
or a
Fronts.AbstractSemiinfiniteProblem
. If func returns an AbstractSemiinfiniteProblem
, it is solved with solve
. Solution
s with successful ReturnCode
are passed to the cost function; otherwise, the cost is set to Inf
.
prob
: inverse problem. SeeInverseProblem
.
Keyword arguments
D0tol=1e-3
: iffit_D0
istrue
, a tolerance forD0
.oi_hint=nothing
: iffit_D0
istrue
, an optional hint as to the point ino
where the initial
condition begins. The hint will be used as an aid in finding the optimal value for D0
. Otherwise, the fitting process will start by attempting to match sorptivities.
References
GERLERO, G. S.; BERLI, C. L. A.; KLER, P. A. Open-source high-performance software packages for direct and inverse solving of horizontal capillary flow. Capillarity, 2023, vol. 6, no. 2, p. 31-40.
See also: candidate
, ScaledSolution
, Fronts.Solution
, Fronts.AbstractSemiinfiniteProblem
(::RSSCostFunction)(p::AbstractVector)
Return the cost of the solution obtained with parameter values p
.
The RSSCostFunction
object is meant to be passed to your optimizer of choice for minimization as the objective function.
If you need to know more than just the cost, call the candidate
function instead.
Fronts.ParamEstim.candidate
— Functioncandidate(cf::AbstractCostFunction, ::AbstractVector)
candidate(cf::AbstractCostFunction, ::Fronts.AbstractSemiinfiniteProblem)
candidate(cf::AbstractCostFunction, ::Fronts.Solution)
Return the candidate solution for a given cost function and parameter values, problem, or solution.