mdolab / pygeo

pyGeo provides geometric design variables and constraints suitable for gradient-based optimization.
https://mdolab-pygeo.readthedocs-hosted.com/en/latest/?badge=latest
Apache License 2.0
124 stars 55 forks source link

Increase 'nIter' for 'attachPoints' in 'pyBlock.py' #165

Closed DavidAnderegg closed 1 year ago

DavidAnderegg commented 1 year ago

Description of feature

When using DVGeo, pyBlock.py is used in the background. In the function attachPoints(...) found here the iterations-limit nIter is hardcoded to 100.

I encountered a problem where 100 is not enough.

Potential solution

Either increase the default value or make it adjustable through the regular DVGeo-wrapper.

sseraj commented 1 year ago

This can be adjusted by including the nIter keyword in the addPointSet call. If you are using ADflow, nIter can be passed to the CFD mesh point set by setting pointSetKwargs:

CFDPointSetKwargs = {"nIter": 500}
CFDSolver.setDVGeo(DVGeo, pointSetKwargs=CFDPointSetKwargs)
DavidAnderegg commented 1 year ago

Perfect! Exactly what i was looking for, thank you.