Implementing SNOPT trial version in DAFoam #998
|
Hi people, I wish to work on Topology optimization, example cases- I am quite unsure how to get these things working for running I have explained the steps I followed under #520 (comment) and thought of creating detailed discussion to those who needs SNOPT. |
Replies: 3 comments 3 replies
|
For the The hard part is that the files you listed look like the prebuilt/library distribution, not the SNOPT source layout that pyOptSparse's normal source build expects. The current pyOptSparse SNOPT docs say the source-build path expects the SNOPT zip's If you installed pyOptSparse from conda, the SNOPT module is not included because of licensing. In that case pyOptSparse expects you to build the SNOPT Python binding separately and point it at that directory with: export PYOPTSPARSE_IMPORT_SNOPT_FROM=/path/to/snopt-bindFor the library-only route, the SNOPT FAQ also says pyOptSparse needs a modified A quick sanity check before going back to the DAFoam case is: python - <<'PY'
from pyoptsparse import SNOPT
print(SNOPT)
PYIf that import fails, Refs:
|
|
I think I have found the solution and is working for me. For those in future, try these steps and let me know in case of any issues.
Thank you |
I think I have found the solution and is working for me. For those in future, try these steps and let me know in case of any issues.
Installing
pySNOPTin dockerdocker run -it -u dafoamuser --mount "type=bind,src=$(pwd),target=/home/dafoamuser/mount" -w /home/dafoamuser/mount dafoam/opt-packages:v5.0.0 bashbuild_pyoptsparsein~/dafoam/repo