polaris.ocean.convergence.ConvergenceAnalysis.compute_error

ConvergenceAnalysis.compute_error(mesh_name, variable_name, zidx=None, error_type='l2')[source]

Compute the error for a given resolution

Parameters
  • mesh_name (str) – The name of the mesh

  • variable_name (str) – The variable name of which to evaluate error with respect to the exact solution

  • zidx (int, optional) – The z index to use to slice the field given by variable name

  • error_type ({'l2', 'inf'}, optional) – The type of error to compute

Returns

error (float) – The error of the variable given by variable_name