Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add triangulated surface constraint to MPhys wrapper #192

Merged
merged 9 commits into from
Mar 14, 2023

Conversation

hajdik
Copy link
Contributor

@hajdik hajdik commented Mar 13, 2023

Purpose

This adds TriangulatedSurfaceConstraint to mphys_dvgeo so packaging constraints (GeoGrad) can be used in MPhys and cleans up a few things related to that constraint in DVCon. The GeoGrad fail flag, which skips CFD if the intersection between the two objects exceeds the tolerance, has also been exposed to the MPhys wrapper using OpenMDAO'sAnalysisError. The parallelism fix in #191 was also done for this constraint.
Unrelated to this constraint, a few missing options were added into existing constraints in the MPhys wrapper.

Expected time until merged

1 week

Type of change

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (non-backwards-compatible fix or feature)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Documentation update
  • Maintenance update
  • Other (please describe)

Testing

I have a runscript modified from an old MACH runscript that runs as expected with MPhys in place of MACH. If someone wants to use it in a docker container I can pass that and the input files along.

Checklist

  • I have run flake8 and black to make sure the Python code adheres to PEP-8 and is consistently formatted
  • I have formatted the Fortran code with fprettify or C/C++ code with clang-format as applicable
  • I have run unit and regression tests which pass locally with my changes
  • I have added new tests that prove my fix is effective or that my feature works
  • I have added necessary documentation

@hajdik hajdik requested a review from a team as a code owner March 13, 2023 18:04
@hajdik hajdik requested review from sseraj and ArshSaja March 13, 2023 18:04
@codecov
Copy link

codecov bot commented Mar 13, 2023

Codecov Report

Merging #192 (11f05db) into main (7c743d8) will decrease coverage by 0.04%.
The diff coverage is 5.55%.

@@            Coverage Diff             @@
##             main     #192      +/-   ##
==========================================
- Coverage   64.79%   64.75%   -0.04%     
==========================================
  Files          47       47              
  Lines       11957    11964       +7     
==========================================
  Hits         7747     7747              
- Misses       4210     4217       +7     
Impacted Files Coverage Δ
pygeo/constraints/DVCon.py 71.72% <ø> (ø)
pygeo/mphys/mphys_dvgeo.py 0.00% <0.00%> (ø)
pygeo/constraints/areaConstraint.py 75.91% <33.33%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@eytanadler
Copy link
Contributor

LGTM

Copy link
Contributor

@bernardopacini bernardopacini left a comment

Choose a reason for hiding this comment

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

Overall looks good to me! Just a few minor questions.

Noting that PR #191 affects this one (or vice versa, depending on which is merged first). We can go ahead and merge this and I can update that one.

pygeo/mphys/mphys_dvgeo.py Show resolved Hide resolved
pygeo/mphys/mphys_dvgeo.py Show resolved Hide resolved
@bernardopacini bernardopacini added the enhancement New feature or request label Mar 14, 2023
@bernardopacini
Copy link
Contributor

I am good with this, though I cam not a pyGeo maintainer so I cannot merge it. Whoever is (@mdolab/pygeo_maintainers), please go ahead and merge this in.

@anilyil anilyil merged commit 5b7066e into mdolab:main Mar 14, 2023
@hajdik hajdik deleted the mphys-geograd2 branch March 14, 2023 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants