Skip to content

Add geo loss implementation#315

Open
ppinchuk wants to merge 33 commits intomainfrom
pp/geo_loss
Open

Add geo loss implementation#315
ppinchuk wants to merge 33 commits intomainfrom
pp/geo_loss

Conversation

@ppinchuk
Copy link
Copy Markdown
Collaborator

@ppinchuk ppinchuk commented Apr 9, 2026

Add (my best interpretation) of the geothermal physics loss from the STM paper.

@ppinchuk ppinchuk requested review from bnb32 and Copilot April 9, 2026 22:26
@ppinchuk ppinchuk self-assigned this Apr 9, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds a geothermal “physics loss” implementation (conductive heat transfer residual + regularizers) inspired by the referenced STM paper, along with unit tests for the new loss terms.

Changes:

  • Implement GeothermalConductiveHeatTransferLoss, GeothermalPositiveTemperatureGradientLoss, and GeothermalMohoBCLoss in sup3r/utilities/loss_metrics.py
  • Add synthetic-data tests covering geothermal heat transfer, positive gradient, and Moho BC losses
  • Refactor/extend some loss-metric utilities (e.g., reshaping helper) and update existing loss formatting

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 11 comments.

File Description
sup3r/utilities/loss_metrics.py Adds geothermal-specific loss classes and a helper for reshaping depth features for vertical derivatives.
tests/utilities/test_loss_metrics.py Adds unit tests validating behavior and error handling for the new geothermal loss implementations.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread sup3r/utilities/loss_metrics.py Outdated
Comment thread sup3r/utilities/loss_metrics.py Outdated
Comment thread sup3r/utilities/loss_metrics.py
Comment thread sup3r/utilities/loss_metrics.py
Comment thread sup3r/utilities/loss_metrics.py
Comment thread sup3r/utilities/loss_metrics.py
Comment thread sup3r/utilities/loss_metrics.py
Comment thread sup3r/utilities/loss_metrics.py
Comment thread tests/utilities/test_loss_metrics.py
Comment thread tests/utilities/test_loss_metrics.py
Copy link
Copy Markdown
Collaborator

@bnb32 bnb32 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@ppinchuk
Copy link
Copy Markdown
Collaborator Author

Ok, whew. Tests are now passing. Still good to go on this PR @bnb32?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants