pmgbergen / porepy

Python Simulation Tool for Fractured and Deformable Porous Media

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow to obtain convergence rates using a subset of data points

jhabriel opened this issue · comments

Currently, the ConvergenceAnalysis class provides the method order_of_convergence that estimates the observed order of convergence for a given variable by fitting a line from a log-log representation of the data (e.g., log_2(mesh_size) vs log_2(error)).

The requested functionality is to allow for fitting the line using only a subset of the the data, e.g., log_2(mesh_size[-2:-1]) vs log_2(error[-2:-1]).

A possible option is to add an additional parameter data_range: Slice that will access only a range of the data.

The motivation for this functionality is to capture the convergence rates after asymptotic convergence have been obtained.