Skip to content

Need universal small value for denominators #435

Description

@katsmith133

There are a few places where a small, but non-zero value is needed in a denominator to prevent dividing by zero (and perhaps needed for other purposes too?), such as:

Real RichardsonNum = BruntVaisalaFreqSq(ICell, K) /
Kokkos::max(1.0e-12_Real, ShearSquared);

It would be helpful to have a universal variable, something like Eps, Puny, or Tiny defined somewhere that can be used by all. My first thought is to put it in GlobalConstants.h, but open to suggestions on both the name and location where its defined. So far it looks like 1.0e-12 is the value used most places (both MPAS-O and Omega), is there a need for a value other than this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    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