Struct LewkowiczSpeedResidual

Struct Documentation

struct LewkowiczSpeedResidual

Cost functor for fitting lewkowicz speed profiles.

Implements operator() as required by ceres-solver. Allows some parameters to be fixed.

Internal use only (see fit_lewkowicz_speed).

Public Functions

LewkowiczSpeedResidual(double z, double u, const Array5b &fixed_params, const Array5d &initial_params)

Construct the cost functor.

Parameters, where supplied in input initial_params and masked in input fixed_params are in this order:

  • pi_coles = params[0]
  • kappa = params[1]
  • u_inf = params[2]
  • shear_ratio = params[3]
  • delta_c = params[4]

Parameters
  • z: Observation data point, vertical coordinate in m
  • u: Observation data point, horizontal speed in m/s
  • fixed_params: Eigen::Array<bool, 5, 1>, logical mask, true where the parameter is fixed, false where it is allowed to vary
  • initial_params: Eigen::Array<double, 5, 1> containing initial parameter values. These are used where fixed parameters are specified

template <typename T>
bool operator()(T const *const *parameters, T *residual) const