MASTmultiphysics / mast-multiphysics

Multidisciplinary-design Adaptation and Sensitivity Toolkit (MAST) - Sensitivity-enabled multiphysics FEA for design
https://www.mast-multiphysics.com
GNU Lesser General Public License v2.1
44 stars 24 forks source link

examples 5,6, 8 compilation issue #110

Closed Adrian-Diaz closed 3 years ago

Adrian-Diaz commented 3 years ago

Greetings,

It seems that if I set -DENABLE_NLOPT=ON (one of the CMAKE List variables to enable compiling examples 5, 6, and 8) the compiler complains it can't find the interfaces for the SNOPT and GCMMA libraries when compiling the cpp files for these examples. It looks like the include files for those interfaces are only provided if -DENABLE_SNOPT=ON and -DENABLE_GCMMA=ON (In which case both libraries must be provided for the CMake configure). I'm not sure if there's a workaround I'm missing to make the examples work, thanks for any help rendered in advance.

manavbhatia commented 3 years ago

Greetings! These examples are currently setup for GCMMA or SNOPT interfaces. If you want to use this with NLOPT (for which we had added an interface, but never really used it for anything), then you will need to modify the source code for the examples and add a small section to instantiate the NLOPT optimization routine, for example here.

Please note that this is the old MAST code, and most of our topology optimization work is happening on the new code base for MAST v3. Unless you have a compelling reason to work with old MAST, I would recommend moving to v3. The topology optimization approach in that is currently based on SIMP parameterization (old MAST had immersed boundary using cut-cells).

Adrian-Diaz commented 3 years ago

Greetings Dr. Bhatia, Thanks for the prompt response and for directing me to version 3. I'll be sure to try with that version. Closing the issue :)