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

Renaming functions and classes #13

Merged
merged 9 commits into from
Aug 9, 2023
Merged

Renaming functions and classes #13

merged 9 commits into from
Aug 9, 2023

Conversation

dc-luo
Copy link
Collaborator

@dc-luo dc-luo commented Aug 3, 2023

Main purpose of this PR is to make naming changes for style and clarity.

Cost functionals now have their consistently named methods: costGrad to grad, costHessian to hessian

Changed MeanVarRiskMeasure to MeanVarRiskMeasureStochastic to indicate it is the stochastic approximation version

By default, we now assume SAA risk measures support MPI based sample parallelism

  • Deprecated the original MeanVarRiskMeasureSAA, which was a purely serial implementation of sample average approximation for the mean variance risk measure
  • Renamed MeanVarRiskMeasureSAA_MPI to MeanVarRiskMeasureSAA
  • Renamed SuperquantileRiskMeasureSAA_MPI to SuperquantileRiskMeasureSAA
  • Their setting functions also had respective name changes

Some utilities also had name changes to snake case for stylistic reasons

  • gatherSamples to gather_samples
  • sampleSuperquantile to sample_superquantile (and similar)
  • applyBC to apply_BC, homogenizeBC to homogenize_BC

Note: functions that are also in hIPPYlib as camel case are not changed to snake case.

Examples have been updated with new capabilities

  • NewtonCG example with poisson
  • Comparison of deterministic and OUU for hyperelasticity material design

@dc-luo dc-luo requested a review from tomoleary August 3, 2023 21:16
@dc-luo dc-luo merged commit 8b2b1f9 into main Aug 9, 2023
1 check passed
@dc-luo dc-luo deleted the naming-dev branch August 9, 2023 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants