NVIDIA / modulus-sym

Framework providing pythonic APIs, algorithms and utilities to be used with Modulus core to physics inform model training as well as higher level abstraction for domain experts
https://developer.nvidia.com/modulus
Apache License 2.0
165 stars 68 forks source link

Heaviside hotfix #87

Closed ktangsali closed 10 months ago

ktangsali commented 10 months ago

Modulus Pull Request

Description

A change was added to the Heaviside function in torch printer in this PR: https://github.com/NVIDIA/modulus-sym/pull/83/files

While this works for the forward function, the derivative of heaviside is not defined (this is needed for our zero equation turbulence examples) - the bug was pointed out during the QA runs (ref: NVBug, PyT Forums). This PR reverts the change to the heaviside function and also forces the value to be 0 for the numpy implementation. This was tested by running the pytests and the unittests both.

Checklist

Dependencies

ktangsali commented 10 months ago

/blossom-ci