QuantEcon / SimpleDifferentialOperators.jl

Library for simple upwind finite differences
MIT License
12 stars 2 forks source link

Accurate unit tests for irregular grids #86

Closed chiyahn closed 5 years ago

chiyahn commented 5 years ago

https://github.com/QuantEcon/SimpleDifferentialOperators.jl/blob/master/test/operators.jl#L9-L29

This unit test (and other unit tests for mixed barrier conditions, etc.) does not check whether we get accurate solutions when we have irregular grids -- it barely checks if we get an appropriate solution when we get AbstractArray instead of AbstractRange type nodes

To implement it in a right way, one has to use something like [1.0; 2.0; 4.0] rather than collect(1:3) (which is essentially a unitform grid)