Skip to content

Loss of significance error in mf_cell_cons_interp routines #4382

@sw561

Description

@sw561

The mf_cell_cons_interp interpolater object limits the output to not create new minima or maxima. However there is a corner case where a numerical loss of significance error can lead to a negative number occuring in the fine mesh even while every cell on the coarse mesh is >= 0. A simple program to reproduce the error is attached below.

When investigating this I found that the slope limiting is based on ensuring that the reconstructed field on the cell does not exceed the maximum or drop below the minimum in any of the fine cells. When working with volume fractions, this means you can have a fine cell with exactly zero volume fraction, when the overlapping coarse cell is non-zero. (Although in fact this is the subtraction of two almost exactly equal numbers, leaving junk which may turn out to be negative)

This is different to what I'd expect: I would expect the slope limiting to be based on the extreme corner of the cell (and thus independent of the refinement ratio) rather than based on the value of the cell nearest the extreme corner.

main.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions