Forgive me if I'm overlooking a really easy solution, but I've been quite stuck on trying to implement the adjoint method for VSPAERO using the Python API. I've managed to use the API to run an "VSPAEROSweep" analysis (called by vsp.ExecAnalysis(<analysis name>)) but I'm getting confused in the required imports needed to access the optimizer and other adjoint functions here
https://github.com/OpenVSP/OpenVSP/tree/main/src/vsp_aero. Basically, what are the import steps in a Python script I can write to follow the steps shown in the 2022 workshop slides
fetch.php (openvsp.org)?
I think I'm just getting a little confused on the package structure.
Here's a skeleton of what I currently have (which is pretty much straight ripped from the AngelScript examples).
If I want to define a VSP_OPTIMIZER, for example, what import statement is needed on top of import openvsp as vsp?
vsp.VSPCheckSetup()
vsp.VSPRenew()
vsp.ReadVSPFile("notional_vehicle.vsp3")
analysis_name = "VSPAEROSweep"
//load inputs, etc. etc...
//for example...
vsp.SetIntAnalysisInput( analysis_name, "AlphaNpts", [0], 0 )
mach = [0.8]
vsp.SetDoubleAnalysisInput( analysis_name, "MachStart", mach, 0 )
rid = vsp.ExecAnalysis( analysis_name )