Skip to content

moncon_cutoff declared as integer, truncating 1e-8 to 0 #1197

@sbryngelson

Description

@sbryngelson

Bug

In `src/common/m_constants.fpp`, `moncon_cutoff` is declared as `integer, parameter` but assigned the value `1e-8_wp`. Fortran silently truncates the real to integer, setting `moncon_cutoff = 0`.

File: `src/common/m_constants.fpp`

Impact: The monotonicity check cutoff is 0 instead of 1e-8, making the check `abs(delta) < 0` which is always false. The monotonicity constraint is effectively disabled.

Severity: Critical — monotonicity limiting is silently bypassed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working or doesn't seem right

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions