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 methods to mphys interface for getting DV bounds and scaling factors #218

Merged
merged 2 commits into from
Jun 2, 2023

Conversation

A-CGray
Copy link
Contributor

@A-CGray A-CGray commented Jun 1, 2023

Adds methods to the TACSBuilder class to retrieve the DV bounds and scaling factors that have been defined in the element_callback. This makes it easy to define the DV bounds and scales when using TACS through MPhys, e.g

  dvs = self.add_subsystem("dvs", om.IndepVarComp(), promotes=["*"])
  structDVs = tacs_builder.get_initial_dvs()
  dvs.add_output("dv_struct", structDVs)
  lb, ub = tacs_builder.get_dv_bounds()
  structDVScaling = tacs_builder.get_dv_scalers()
  self.add_design_var(
      "dv_struct", lower=lb, upper=ub, scaler=structDVScaling
  )

@A-CGray A-CGray requested a review from timryanb June 1, 2023 23:41
@timryanb timryanb merged commit 3aea51c into master Jun 2, 2023
@timryanb timryanb deleted the MPhysHelpers branch June 2, 2023 13:10
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