From bc229508c6a3305b04cd610ea65c4b5526c00311 Mon Sep 17 00:00:00 2001 From: Joshua Anibal Date: Thu, 12 Mar 2026 06:11:25 -0700 Subject: [PATCH 01/43] trying windows arm build --- .github/windows_arm64_steps/action.yml | 28 ++++++++++++++++++++++++++ .github/workflows/wheels.yml | 16 ++++++++++++++- .gitignore | 2 ++ 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 .github/windows_arm64_steps/action.yml diff --git a/.github/windows_arm64_steps/action.yml b/.github/windows_arm64_steps/action.yml new file mode 100644 index 0000000..65f6530 --- /dev/null +++ b/.github/windows_arm64_steps/action.yml @@ -0,0 +1,28 @@ +name: Build Dependencies(Win-ARM64) +description: "Common setup steps for Win-ARM64 CI" +runs: + using: "composite" + steps: + - name: Install LLVM + shell: pwsh + run: | + Invoke-WebRequest https://github.com/llvm/llvm-project/releases/download/llvmorg-20.1.8/LLVM-20.1.8-woa64.exe -UseBasicParsing -OutFile LLVM-woa64.exe + $expectedHash = "7c4ac97eb2ae6b960ca5f9caf3ff6124c8d2a18cc07a7840a4d2ea15537bad8e" + $fileHash = (Get-FileHash -Path "LLVM-woa64.exe" -Algorithm SHA256).Hash + if ($fileHash -ne $expectedHash) { + Write-Error "Checksum verification failed. The downloaded file may be corrupted or tampered with." + exit 1 + } + Start-Process -FilePath ".\LLVM-woa64.exe" -ArgumentList "/S" -Wait + echo "C:\Program Files\LLVM\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + + - name: Install pkgconf via vcpkg + shell: pwsh + run: | + & "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" arm64 + $env:VCPKG_ROOT = "C:\vcpkg" + Set-Location $env:VCPKG_ROOT + ./vcpkg install pkgconf:arm64-windows + $pkgconfPath = "$env:VCPKG_ROOT\installed\arm64-windows\tools\pkgconf" + Copy-Item "$pkgconfPath\pkgconf.exe" "$pkgconfPath\pkg-config.exe" -Force + echo "$pkgconfPath" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append \ No newline at end of file diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 85850f9..e552c07 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -29,7 +29,8 @@ jobs: - [windows-2025, win, AMD64] - [ubuntu-22.04, manylinux, x86_64] - [macos-14, macosx, arm64, openblas, "12.3"] - - [macos-15-intel, macosx, x86_64, openblas, "10.14"] + # - [macos-15-intel, macosx, x86_64, openblas, "10.14"] + - [windows-11-arm, win, ARM64, "", ""] python: [["cp39", "3.9"], ["cp310", "3.10"], ["cp311", "3.11"], ["cp312", "3.12"], ["cp313", "3.13"]] @@ -55,6 +56,19 @@ jobs: if: ${{ runner.os == 'Windows' }} + - name: Set environment variables for ARM64 + if: matrix.buildplat[1] == 'win' && matrix.buildplat[2] == 'ARM64' + run: | + echo "CC=clang-cl" >> $env:GITHUB_ENV + echo "CXX=clang-cl" >> $env:GITHUB_ENV + echo "FC=flang" >> $env:GITHUB_ENV + echo "TARGET_ARCH=${{ matrix.buildplat[2] }}" >> $env:GITHUB_ENV + + - name: Set up Flang and pkgconf for ARM64 + if: matrix.buildplat[1] == 'win' && matrix.buildplat[2] == 'ARM64' + uses: ./.github/windows_arm64_steps + + - name: Setup macOS if: startsWith( matrix.buildplat[0], 'macos-' ) run: | diff --git a/.gitignore b/.gitignore index 01894e0..4722b87 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,8 @@ dev_make_install/optvl tests/test_om_wrapper*_out examples/run_opt_om*_out +examples/*.avl +examples/*.ps # ============================================================================== # Github python gitignore template # ============================================================================== From 1c11fdb17c6901a0c5b02140ac5312fba695d135 Mon Sep 17 00:00:00 2001 From: Joshua Anibal Date: Thu, 12 Mar 2026 06:44:00 -0700 Subject: [PATCH 02/43] move gfortran flag into if statement --- .github/workflows/wheels.yml | 13 +++++++------ .gitignore | 1 + meson.build | 8 +++++++- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index e552c07..e2a2fd1 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -26,15 +26,16 @@ jobs: # - [macos-14, macosx, arm64, accelerate, "14.0"] # working - - [windows-2025, win, AMD64] - - [ubuntu-22.04, manylinux, x86_64] - - [macos-14, macosx, arm64, openblas, "12.3"] - # - [macos-15-intel, macosx, x86_64, openblas, "10.14"] + # - [windows-2025, win, AMD64] + # - [ubuntu-22.04, manylinux, x86_64] + # - [macos-14, macosx, arm64, openblas, "12.3"] - [windows-11-arm, win, ARM64, "", ""] + # removed + # - [macos-15-intel, macosx, x86_64, openblas, "10.14"] - python: [["cp39", "3.9"], ["cp310", "3.10"], ["cp311", "3.11"], ["cp312", "3.12"], ["cp313", "3.13"]] - # python: [["cp312", "3.12"]] + # python: [["cp39", "3.9"], ["cp310", "3.10"], ["cp311", "3.11"], ["cp312", "3.12"], ["cp313", "3.13"]] + python: [["cp312", "3.12"]] diff --git a/.gitignore b/.gitignore index 4722b87..1ff8fd3 100644 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,7 @@ tests/test_om_wrapper*_out examples/run_opt_om*_out examples/*.avl examples/*.ps +examples/opt_output_sweep/ # ============================================================================== # Github python gitignore template # ============================================================================== diff --git a/meson.build b/meson.build index 89d6410..a80f004 100644 --- a/meson.build +++ b/meson.build @@ -8,7 +8,6 @@ project( default_options: [ 'buildtype=debugoptimized', 'c_std=c99', - 'fortran_std=legacy', ], ) @@ -118,6 +117,13 @@ ff_args += [ '-O2' ] +if ff.get_id() == 'gcc' + # -std=legacy is not supported by all Fortran compilers, but very useful with + # gfortran since it avoids a ton of warnings that we don't care about. + # Needs fixing in Meson, see https://github.com/mesonbuild/meson/issues/11633. + ff_args += '-std=legacy' +endif + numpy_nodepr_api = '-DNPY_NO_DEPRECATED_API=NPY_1_9_API_VERSION' cc_args = [numpy_nodepr_api] From 446342e6302d3a247fcada883f1f0adcabbb8a67 Mon Sep 17 00:00:00 2001 From: Joshua Anibal Date: Thu, 12 Mar 2026 07:04:25 -0700 Subject: [PATCH 03/43] adjust ff flags --- meson.build | 13 ++++++++++--- pyproject.toml | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index a80f004..3410081 100644 --- a/meson.build +++ b/meson.build @@ -110,18 +110,25 @@ ff_args = ff.get_supported_arguments( ff_args += [ '-ffixed-line-length-80', - '-std=legacy', '-fdefault-real-8', '-fdefault-double-8', - '-fPIC', '-O2' ] +if host_machine.system() != 'windows' + ff_args += ['-fPIC'] +endif + +# --- add flags for fortran standard --- if ff.get_id() == 'gcc' # -std=legacy is not supported by all Fortran compilers, but very useful with # gfortran since it avoids a ton of warnings that we don't care about. # Needs fixing in Meson, see https://github.com/mesonbuild/meson/issues/11633. - ff_args += '-std=legacy' + ff_args += ['-std=legacy'] +elif ff.get_id() == 'llvm-flang' + + ff_args += ['-ffixed-form'] + endif numpy_nodepr_api = '-DNPY_NO_DEPRECATED_API=NPY_1_9_API_VERSION' diff --git a/pyproject.toml b/pyproject.toml index 9876685..60344ae 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,7 +33,7 @@ version = "2.4.0" # this automatically updates __init__.py and setup_deprecated. [tool.cibuildwheel] -skip = "cp36-* cp37-* pp* *_ppc64le *_i686 *_s390x" +skip = "cp38-* pp* *_ppc64le *_i686 *_s390x" build-verbosity = "3" test-command = "bash {project}/tools/wheels/cibw_test_command.sh {project}" From d750750d8bd6757754db74d893d892c2a3002a7c Mon Sep 17 00:00:00 2001 From: Joshua Anibal Date: Thu, 12 Mar 2026 08:06:38 -0700 Subject: [PATCH 04/43] remove warnings so I can see the error --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 3410081..f9dcb6f 100644 --- a/meson.build +++ b/meson.build @@ -127,7 +127,7 @@ if ff.get_id() == 'gcc' ff_args += ['-std=legacy'] elif ff.get_id() == 'llvm-flang' - ff_args += ['-ffixed-form'] + ff_args += ['-ffixed-form', '-w'] endif From 6dd8f504d981fd9e5c330aab604a740c2b9dbb0d Mon Sep 17 00:00:00 2001 From: Joshua Anibal Date: Thu, 12 Mar 2026 08:34:59 -0700 Subject: [PATCH 05/43] add generic seconds subroutine --- src/second.f | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/second.f b/src/second.f index a2daf9f..2ddaf21 100755 --- a/src/second.f +++ b/src/second.f @@ -1,12 +1,10 @@ - SUBROUTINE SECONDS(TSEC) REAL*8 TSEC C -C...SECNDS is a real*4 function that returns seconds. -C The value is modified by subtracting the supplied argument. -C It acts as in the VMS FORTRAN Manual. +C...Returns elapsed wall-clock time in seconds +C Replacement for non-standard SECNDS intrinsic C - REAL*4 SECNDS, TIME - TIME = 0.0 - TSEC = SECNDS(TIME) - END + INTEGER COUNT, COUNT_RATE + CALL SYSTEM_CLOCK(COUNT, COUNT_RATE) + TSEC = DBLE(COUNT) / DBLE(COUNT_RATE) + END \ No newline at end of file From 74ea9de4a2adb2e23f189d0a9ad82f72f955a083 Mon Sep 17 00:00:00 2001 From: Joshua Anibal Date: Thu, 12 Mar 2026 17:56:18 -0700 Subject: [PATCH 06/43] add command to see .data sizes --- meson.build | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/meson.build b/meson.build index f9dcb6f..f1d4168 100644 --- a/meson.build +++ b/meson.build @@ -177,6 +177,17 @@ output : ['libavlmodule.c', 'libavl-f2pywrappers.f'], command: [py3, '-m', 'numpy.f2py', '@INPUT@', ] ) +llvm_nm = find_program('llvm-nm', required: false) +if llvm_nm.found() + custom_target('symbol-sizes', + output: 'symbol_sizes.txt', + command: [find_program('python3'), '-c', + 'import glob,subprocess,sys; objs=glob.glob("**/*.obj",recursive=True); r=subprocess.run(["llvm-nm","--print-size","--size-sort","--reverse-sort"]+objs,capture_output=True,text=True); print(r.stdout); open(sys.argv[1],"w").write(r.stdout)', + '@OUTPUT@'], + build_by_default: true, + ) +endif + py3.extension_module('libavl', avl_source_files, avl_c_wrapper, @@ -192,4 +203,5 @@ py3.extension_module('libavl', ) + install_subdir('optvl', install_dir: py3.get_install_dir()) From 14861fc070e94f491d3f5b9bfba238f75e9e7679 Mon Sep 17 00:00:00 2001 From: Joshua Anibal Date: Thu, 12 Mar 2026 18:33:50 -0700 Subject: [PATCH 07/43] reduce storage to near zero to test theory --- meson.build | 11 -------- src/includes/ADIMEN.INC | 56 ++++++++++++++++++++++++++++++----------- 2 files changed, 41 insertions(+), 26 deletions(-) diff --git a/meson.build b/meson.build index f1d4168..004bf81 100644 --- a/meson.build +++ b/meson.build @@ -177,17 +177,6 @@ output : ['libavlmodule.c', 'libavl-f2pywrappers.f'], command: [py3, '-m', 'numpy.f2py', '@INPUT@', ] ) -llvm_nm = find_program('llvm-nm', required: false) -if llvm_nm.found() - custom_target('symbol-sizes', - output: 'symbol_sizes.txt', - command: [find_program('python3'), '-c', - 'import glob,subprocess,sys; objs=glob.glob("**/*.obj",recursive=True); r=subprocess.run(["llvm-nm","--print-size","--size-sort","--reverse-sort"]+objs,capture_output=True,text=True); print(r.stdout); open(sys.argv[1],"w").write(r.stdout)', - '@OUTPUT@'], - build_by_default: true, - ) -endif - py3.extension_module('libavl', avl_source_files, avl_c_wrapper, diff --git a/src/includes/ADIMEN.INC b/src/includes/ADIMEN.INC index cf2a343..ce42ba3 100644 --- a/src/includes/ADIMEN.INC +++ b/src/includes/ADIMEN.INC @@ -32,28 +32,54 @@ ! to make it easier to termine the true size in clear_ad_seeds_fast() ! I increased some values to avoid matching + ! ! PARAMETER (NVMAX=4000) + ! PARAMETER (NVMAX=5000) + + ! ! PARAMETER (NSMAX=400) ! max number of strips + ! ! PARAMETER (NSECMAX=401) ! max number of geometry sections + ! PARAMETER (NSMAX=500) ! max number of strips + ! PARAMETER (NSECMAX=301) ! max number of geometry sections + ! PARAMETER (NFMAX=100) ! max number of surfaces + ! PARAMETER (NLMAX=502) ! max number of body nodes + ! PARAMETER (NBMAX=20) ! max number of bodies + + ! PARAMETER (NUMAX=6) ! number of velocity components + ! PARAMETER (NDMAX=30) ! max number of control surfaces + ! PARAMETER (NGMAX=21) ! max number of design variables + + ! PARAMETER (NRMAX=25) ! max number of run cases + ! PARAMETER (NTMAX=503) ! max number of time values + + ! PARAMETER (NOBMAX=1) ! max number of off body points + ! ! PARAMETER (NOBMAX=1000) ! max number of off body points + + ! PARAMETER (ICONX=20) ! + ! PARAMETER (IBX=200) ! max number of airfoil coordinates + ! ! PARAMETER (IBX=300) ! max number of airfoil coordinates + + ! PARAMETER (NVMAX=4000) - PARAMETER (NVMAX=5000) + PARAMETER (NVMAX=5) - ! PARAMETER (NSMAX=400) ! max number of strips - ! PARAMETER (NSECMAX=401) ! max number of geometry sections - PARAMETER (NSMAX=500) ! max number of strips - PARAMETER (NSECMAX=301) ! max number of geometry sections - PARAMETER (NFMAX=100) ! max number of surfaces - PARAMETER (NLMAX=502) ! max number of body nodes - PARAMETER (NBMAX=20) ! max number of bodies + ! PARAMETER (NSMAX=4) ! max number of strips + ! PARAMETER (NSECMAX=4) ! max number of geometry sections + PARAMETER (NSMAX=5) ! max number of strips + PARAMETER (NSECMAX=3) ! max number of geometry sections + PARAMETER (NFMAX=1) ! max number of surfaces + PARAMETER (NLMAX=5) ! max number of body nodes + PARAMETER (NBMAX=2) ! max number of bodies PARAMETER (NUMAX=6) ! number of velocity components - PARAMETER (NDMAX=30) ! max number of control surfaces - PARAMETER (NGMAX=21) ! max number of design variables + PARAMETER (NDMAX=3) ! max number of control surfaces + PARAMETER (NGMAX=2) ! max number of design variables - PARAMETER (NRMAX=25) ! max number of run cases - PARAMETER (NTMAX=503) ! max number of time values + PARAMETER (NRMAX=2) ! max number of run cases + PARAMETER (NTMAX=5) ! max number of time values PARAMETER (NOBMAX=1) ! max number of off body points - ! PARAMETER (NOBMAX=1000) ! max number of off body points + ! PARAMETER (NOBMAX=1) ! max number of off body points - PARAMETER (ICONX=20) ! - PARAMETER (IBX=200) ! max number of airfoil coordinates + PARAMETER (ICONX=2) ! + PARAMETER (IBX=2) ! max number of airfoil coordinates ! PARAMETER (IBX=300) ! max number of airfoil coordinates From 20d3610e1e765837058b63282bb17cc4e8651528 Mon Sep 17 00:00:00 2001 From: Joshua Anibal Date: Fri, 13 Mar 2026 06:11:56 -0700 Subject: [PATCH 08/43] fix windows repair --- tools/wheels/repair_windows.sh | 50 +++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 19 deletions(-) diff --git a/tools/wheels/repair_windows.sh b/tools/wheels/repair_windows.sh index 583e589..f7af6d4 100644 --- a/tools/wheels/repair_windows.sh +++ b/tools/wheels/repair_windows.sh @@ -1,32 +1,44 @@ +# from scipy + set -xe WHEEL="$1" DEST_DIR="$2" -# create a temporary directory in the destination folder and unpack the wheel -# into there -pushd $DEST_DIR -mkdir -p tmp -pushd tmp -wheel unpack $WHEEL -pushd optvl* -# To avoid DLL hell, the file name of libopenblas that's being vendored with -# the wheel has to be name-mangled. delvewheel is unable to name-mangle PYD -# containing extra data at the end of the binary, which frequently occurs when -# building with mingw. -# We therefore find each PYD in the directory structure and strip them. +# Skip the strip command based on TARGET_ARCH +# TARGET_ARCH should be set by the CI environment (e.g., ARM64, AMD64) +TARGET_ARCH="${TARGET_ARCH:-}" # Default to empty string if not set + +if [ "$TARGET_ARCH" = "ARM64" ]; then + echo "Skipping stripping for ARM64 target." +else + echo "Performing stripping for AMD64 target." + + # create a temporary directory in the destination folder and unpack the wheel + # into there + pushd $DEST_DIR + mkdir -p tmp + pushd tmp + wheel unpack $WHEEL + pushd optvl* -for f in $(find ./optvl* -name '*.pyd'); do strip $f; done + # To avoid DLL hell, the file name of libopenblas that's being vendored with + # the wheel has to be name-mangled. delvewheel is unable to name-mangle PYD + # containing extra data at the end of the binary, which frequently occurs when + # building with mingw. + # We therefore find each PYD in the directory structure and strip them. + for f in $(find ./optvl* -name '*.pyd'); do strip $f; done -# now repack the wheel and overwrite the original -wheel pack . -mv -fv *.whl $WHEEL -cd $DEST_DIR -rm -rf tmp + # now repack the wheel and overwrite the original + wheel pack . + mv -fv *.whl $WHEEL + cd $DEST_DIR + rm -rf tmp +fi # the libopenblas.dll is placed into this directory in the cibw_before_build # script. -delvewheel repair --add-path /c/opt/openblas/openblas_dll -w $DEST_DIR $WHEEL +delvewheel repair -w $DEST_DIR $WHEEL From 0f8a8ccdb55487b84debec696e5afff180f552d9 Mon Sep 17 00:00:00 2001 From: Joshua Anibal Date: Fri, 13 Mar 2026 06:28:18 -0700 Subject: [PATCH 09/43] try with more vortices --- src/includes/ADIMEN.INC | 2 +- tools/wheels/cibw_test_command.sh | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/includes/ADIMEN.INC b/src/includes/ADIMEN.INC index ce42ba3..586aaec 100644 --- a/src/includes/ADIMEN.INC +++ b/src/includes/ADIMEN.INC @@ -59,7 +59,7 @@ ! PARAMETER (NVMAX=4000) - PARAMETER (NVMAX=5) + PARAMETER (NVMAX=5000) ! PARAMETER (NSMAX=4) ! max number of strips ! PARAMETER (NSECMAX=4) ! max number of geometry sections diff --git a/tools/wheels/cibw_test_command.sh b/tools/wheels/cibw_test_command.sh index 99ebf95..a7e46db 100644 --- a/tools/wheels/cibw_test_command.sh +++ b/tools/wheels/cibw_test_command.sh @@ -5,7 +5,8 @@ PROJECT_DIR="$1" cd $PROJECT_DIR/tests # install tesing dependencies -pip install "scipy<=1.16" psutil "openmdao!=3.38" +pip install --only-binary "scipy<=1.16" +pip install psutil "openmdao!=3.38" #HACK: if the tests are not split up the CI runs out of memory... From e9835925e9c730f6f6fe92c4550c3f1f1a253922 Mon Sep 17 00:00:00 2001 From: Joshua Anibal Date: Fri, 13 Mar 2026 06:39:28 -0700 Subject: [PATCH 10/43] increase other constants --- .github/workflows/docs.yml | 78 +++++++++++++++---------------- src/includes/ADIMEN.INC | 12 ++--- tools/wheels/cibw_test_command.sh | 2 +- 3 files changed, 45 insertions(+), 47 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 4153b60..6510c86 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,46 +1,46 @@ -name: MkDocs +# name: MkDocs -on: - push: - branches: - - main - pull_request: - branches: - - main - - dev +# on: +# push: +# branches: +# - main +# pull_request: +# branches: +# - main +# - dev -jobs: - deploy: - runs-on: ubuntu-latest - steps: - - name: Checkout Repository - uses: actions/checkout@v2 +# jobs: +# deploy: +# runs-on: ubuntu-latest +# steps: +# - name: Checkout Repository +# uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: '3.x' +# - name: Set up Python +# uses: actions/setup-python@v2 +# with: +# python-version: '3.x' - - name: Install Dependencies - run: | - python -m pip install --upgrade pip - pip install mkdocs-material - pip install markdown - pip install pymdown-extensions - pip install Pygments - pip install mkdocstrings - pip install 'mkdocstrings[python]' - pip install mkdocs-gen-files - pip install mkdocs-literate-nav - pip install mkdocs-include-markdown-plugin +# - name: Install Dependencies +# run: | +# python -m pip install --upgrade pip +# pip install mkdocs-material +# pip install markdown +# pip install pymdown-extensions +# pip install Pygments +# pip install mkdocstrings +# pip install 'mkdocstrings[python]' +# pip install mkdocs-gen-files +# pip install mkdocs-literate-nav +# pip install mkdocs-include-markdown-plugin - - name: Test Build - run: | - # mkdocs build --strict # can't use strict mode because of some typ annotations - mkdocs build +# - name: Test Build +# run: | +# # mkdocs build --strict # can't use strict mode because of some typ annotations +# mkdocs build - - name: Build and Deploy - if: github.event_name == 'push' - run: | - mkdocs gh-deploy --force +# - name: Build and Deploy +# if: github.event_name == 'push' +# run: | +# mkdocs gh-deploy --force diff --git a/src/includes/ADIMEN.INC b/src/includes/ADIMEN.INC index 586aaec..dfa2865 100644 --- a/src/includes/ADIMEN.INC +++ b/src/includes/ADIMEN.INC @@ -61,13 +61,11 @@ ! PARAMETER (NVMAX=4000) PARAMETER (NVMAX=5000) - ! PARAMETER (NSMAX=4) ! max number of strips - ! PARAMETER (NSECMAX=4) ! max number of geometry sections - PARAMETER (NSMAX=5) ! max number of strips - PARAMETER (NSECMAX=3) ! max number of geometry sections - PARAMETER (NFMAX=1) ! max number of surfaces - PARAMETER (NLMAX=5) ! max number of body nodes - PARAMETER (NBMAX=2) ! max number of bodies + PARAMETER (NSMAX=500) ! max number of strips + PARAMETER (NSECMAX=301) ! max number of geometry sections + PARAMETER (NFMAX=100) ! max number of surfaces + PARAMETER (NLMAX=502) ! max number of body nodes + PARAMETER (NBMAX=20) ! max number of bodies PARAMETER (NUMAX=6) ! number of velocity components PARAMETER (NDMAX=3) ! max number of control surfaces diff --git a/tools/wheels/cibw_test_command.sh b/tools/wheels/cibw_test_command.sh index a7e46db..996ac8e 100644 --- a/tools/wheels/cibw_test_command.sh +++ b/tools/wheels/cibw_test_command.sh @@ -5,7 +5,7 @@ PROJECT_DIR="$1" cd $PROJECT_DIR/tests # install tesing dependencies -pip install --only-binary "scipy<=1.16" +pip install --only-binary :all: 'scipy<=1.16' pip install psutil "openmdao!=3.38" From 5033657a322e1805fa44a06be616152b8a8f0733 Mon Sep 17 00:00:00 2001 From: Joshua Anibal Date: Fri, 13 Mar 2026 06:55:58 -0700 Subject: [PATCH 11/43] increase other constants again --- src/includes/ADIMEN.INC | 8 ++++---- tools/wheels/cibw_test_command.sh | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/includes/ADIMEN.INC b/src/includes/ADIMEN.INC index dfa2865..143326d 100644 --- a/src/includes/ADIMEN.INC +++ b/src/includes/ADIMEN.INC @@ -68,11 +68,11 @@ PARAMETER (NBMAX=20) ! max number of bodies PARAMETER (NUMAX=6) ! number of velocity components - PARAMETER (NDMAX=3) ! max number of control surfaces - PARAMETER (NGMAX=2) ! max number of design variables + PARAMETER (NDMAX=30) ! max number of control surfaces + PARAMETER (NGMAX=21) ! max number of design variables - PARAMETER (NRMAX=2) ! max number of run cases - PARAMETER (NTMAX=5) ! max number of time values + PARAMETER (NRMAX=25) ! max number of run cases + PARAMETER (NTMAX=503) ! max number of time values PARAMETER (NOBMAX=1) ! max number of off body points ! PARAMETER (NOBMAX=1) ! max number of off body points diff --git a/tools/wheels/cibw_test_command.sh b/tools/wheels/cibw_test_command.sh index 996ac8e..6bf454b 100644 --- a/tools/wheels/cibw_test_command.sh +++ b/tools/wheels/cibw_test_command.sh @@ -5,7 +5,7 @@ PROJECT_DIR="$1" cd $PROJECT_DIR/tests # install tesing dependencies -pip install --only-binary :all: 'scipy<=1.16' +pip install --only-binary :all: scipy pip install psutil "openmdao!=3.38" From 9b0615b6d45b03be7bda50fdb1aaa8ff866954c5 Mon Sep 17 00:00:00 2001 From: Joshua Anibal Date: Fri, 13 Mar 2026 07:44:25 -0700 Subject: [PATCH 12/43] print some info about the library during repair --- tools/wheels/repair_windows.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/wheels/repair_windows.sh b/tools/wheels/repair_windows.sh index f7af6d4..9172115 100644 --- a/tools/wheels/repair_windows.sh +++ b/tools/wheels/repair_windows.sh @@ -39,6 +39,8 @@ else cd $DEST_DIR rm -rf tmp fi -# the libopenblas.dll is placed into this directory in the cibw_before_build -# script. + +llvm-objdump -p $WHEEL | grep "DLL Name" +dumpbin /dependents $WHEEL delvewheel repair -w $DEST_DIR $WHEEL + From 103c0d0c8ec9e49ee839533dcd4ea3268dfcac56 Mon Sep 17 00:00:00 2001 From: Joshua Anibal Date: Fri, 13 Mar 2026 08:06:15 -0700 Subject: [PATCH 13/43] try printing llvm-objdump again --- tools/wheels/cibw_test_command.sh | 1 + tools/wheels/repair_windows.sh | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/tools/wheels/cibw_test_command.sh b/tools/wheels/cibw_test_command.sh index 6bf454b..48e5317 100644 --- a/tools/wheels/cibw_test_command.sh +++ b/tools/wheels/cibw_test_command.sh @@ -14,6 +14,7 @@ pip install psutil "openmdao!=3.38" # pip install testflo # testflo -v . +python -c "import platform; print(platform.machine())" # test package built and installed correctly python test_import.py diff --git a/tools/wheels/repair_windows.sh b/tools/wheels/repair_windows.sh index 9172115..388fb8b 100644 --- a/tools/wheels/repair_windows.sh +++ b/tools/wheels/repair_windows.sh @@ -12,6 +12,15 @@ TARGET_ARCH="${TARGET_ARCH:-}" # Default to empty string if not set if [ "$TARGET_ARCH" = "ARM64" ]; then echo "Skipping stripping for ARM64 target." + + pushd $DEST_DIR + mkdir -p tmp + pushd tmp + wheel unpack $WHEEL + pushd optvl* + + llvm-objdump -p *.pyd | grep "DLL Name" + dumpbin /dependents *.pyd else echo "Performing stripping for AMD64 target." @@ -40,7 +49,5 @@ else rm -rf tmp fi -llvm-objdump -p $WHEEL | grep "DLL Name" -dumpbin /dependents $WHEEL delvewheel repair -w $DEST_DIR $WHEEL From e690d55838cc6023cececbd8d881156fea4f3436 Mon Sep 17 00:00:00 2001 From: Joshua Anibal Date: Fri, 13 Mar 2026 17:56:47 -0700 Subject: [PATCH 14/43] try printing llvm-objdump again x2 --- tools/wheels/repair_windows.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/wheels/repair_windows.sh b/tools/wheels/repair_windows.sh index 388fb8b..2ef54ae 100644 --- a/tools/wheels/repair_windows.sh +++ b/tools/wheels/repair_windows.sh @@ -18,9 +18,9 @@ if [ "$TARGET_ARCH" = "ARM64" ]; then pushd tmp wheel unpack $WHEEL pushd optvl* - - llvm-objdump -p *.pyd | grep "DLL Name" - dumpbin /dependents *.pyd + ls + llvm-objdump -p (Get-ChildItem *.pyd) | Select-String 'DLL Name' + dumpbin /dependents (Get-ChildItem *.pyd) else echo "Performing stripping for AMD64 target." From 1ffeabb8906f4fdfbfc15ecd9303e25d05cd0b63 Mon Sep 17 00:00:00 2001 From: Joshua Anibal Date: Fri, 13 Mar 2026 18:50:24 -0700 Subject: [PATCH 15/43] try printing llvm-objdump again x3 --- src/includes/ADIMEN.INC | 6 +++--- tools/wheels/repair_windows.sh | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/includes/ADIMEN.INC b/src/includes/ADIMEN.INC index 143326d..04fa4c0 100644 --- a/src/includes/ADIMEN.INC +++ b/src/includes/ADIMEN.INC @@ -32,7 +32,7 @@ ! to make it easier to termine the true size in clear_ad_seeds_fast() ! I increased some values to avoid matching - ! ! PARAMETER (NVMAX=4000) + ! ! ! PARAMETER (NVMAX=4000) ! PARAMETER (NVMAX=5000) ! ! PARAMETER (NSMAX=400) ! max number of strips @@ -77,7 +77,7 @@ PARAMETER (NOBMAX=1) ! max number of off body points ! PARAMETER (NOBMAX=1) ! max number of off body points - PARAMETER (ICONX=2) ! - PARAMETER (IBX=2) ! max number of airfoil coordinates + PARAMETER (ICONX=20) ! + PARAMETER (IBX=50) ! max number of airfoil coordinates ! PARAMETER (IBX=300) ! max number of airfoil coordinates diff --git a/tools/wheels/repair_windows.sh b/tools/wheels/repair_windows.sh index 2ef54ae..dbb278b 100644 --- a/tools/wheels/repair_windows.sh +++ b/tools/wheels/repair_windows.sh @@ -19,8 +19,8 @@ if [ "$TARGET_ARCH" = "ARM64" ]; then wheel unpack $WHEEL pushd optvl* ls - llvm-objdump -p (Get-ChildItem *.pyd) | Select-String 'DLL Name' - dumpbin /dependents (Get-ChildItem *.pyd) + llvm-objdump -p *.pyd | grep 'DLL Name' + dumpbin /dependents *.pyd else echo "Performing stripping for AMD64 target." From a0c1ead8509cf385a6664d9bf95276e71aa7314e Mon Sep 17 00:00:00 2001 From: Joshua Anibal Date: Tue, 17 Mar 2026 18:14:13 -0700 Subject: [PATCH 16/43] tweak sizes to determine max --- src/amake.f | 8 ++++++++ src/includes/ADIMEN.INC | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/amake.f b/src/amake.f index 6571b47..3ba72c5 100644 --- a/src/amake.f +++ b/src/amake.f @@ -577,6 +577,14 @@ SUBROUTINE MAKESURF(ISURF) C... nodal grid associated with vortex strip (aft-panel nodes) C... NOTE: airfoil in plane of wing, but not rotated perpendicular to dihedral; C... retained in (x,z) plane at this point + + ! recompute + ! XLASEC + ! XUASEC + ! ZLASEC + ! ZUASEC + + CALL AKIMA( XLASEC(1,ISEC,ISURF), ZLASEC(1,ISEC,ISURF), NSL, & XPT(IVC+1), ZL_L, DSDX ) CALL AKIMA( XUASEC(1,ISEC,ISURF), ZUASEC(1,ISEC,ISURF), NSL, diff --git a/src/includes/ADIMEN.INC b/src/includes/ADIMEN.INC index 04fa4c0..77961b3 100644 --- a/src/includes/ADIMEN.INC +++ b/src/includes/ADIMEN.INC @@ -78,6 +78,6 @@ ! PARAMETER (NOBMAX=1) ! max number of off body points PARAMETER (ICONX=20) ! - PARAMETER (IBX=50) ! max number of airfoil coordinates + PARAMETER (IBX=1) ! max number of airfoil coordinates ! PARAMETER (IBX=300) ! max number of airfoil coordinates From 7149d13a11298b1b3e8eefa4762ef391652ac180 Mon Sep 17 00:00:00 2001 From: Joshua Anibal Date: Tue, 17 Mar 2026 18:35:37 -0700 Subject: [PATCH 17/43] tweak sizes to determine max 2 --- src/includes/ADIMEN.INC | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/includes/ADIMEN.INC b/src/includes/ADIMEN.INC index 77961b3..5d09de0 100644 --- a/src/includes/ADIMEN.INC +++ b/src/includes/ADIMEN.INC @@ -78,6 +78,6 @@ ! PARAMETER (NOBMAX=1) ! max number of off body points PARAMETER (ICONX=20) ! - PARAMETER (IBX=1) ! max number of airfoil coordinates + PARAMETER (IBX=3) ! max number of airfoil coordinates ! PARAMETER (IBX=300) ! max number of airfoil coordinates From c666be0afac55ab92e2cac7cceee8490b2a17f68 Mon Sep 17 00:00:00 2001 From: Joshua Anibal Date: Tue, 17 Mar 2026 20:37:04 -0700 Subject: [PATCH 18/43] tweak sizes to determine max 3 --- src/includes/ADIMEN.INC | 4 ++-- tools/wheels/cibw_test_command.sh | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/includes/ADIMEN.INC b/src/includes/ADIMEN.INC index 5d09de0..fa4922b 100644 --- a/src/includes/ADIMEN.INC +++ b/src/includes/ADIMEN.INC @@ -77,7 +77,7 @@ PARAMETER (NOBMAX=1) ! max number of off body points ! PARAMETER (NOBMAX=1) ! max number of off body points - PARAMETER (ICONX=20) ! - PARAMETER (IBX=3) ! max number of airfoil coordinates + PARAMETER (ICONX=10) ! + PARAMETER (IBX=5) ! max number of airfoil coordinates ! PARAMETER (IBX=300) ! max number of airfoil coordinates diff --git a/tools/wheels/cibw_test_command.sh b/tools/wheels/cibw_test_command.sh index 48e5317..57981ad 100644 --- a/tools/wheels/cibw_test_command.sh +++ b/tools/wheels/cibw_test_command.sh @@ -3,6 +3,8 @@ set -xe PROJECT_DIR="$1" cd $PROJECT_DIR/tests +python -c "import platform; print(platform.machine())" +llvm-objdump -p ../optvl/libavl.cp312-win_arm64.pyd | findstr "DLL Name" # install tesing dependencies pip install --only-binary :all: scipy @@ -14,7 +16,8 @@ pip install psutil "openmdao!=3.38" # pip install testflo # testflo -v . -python -c "import platform; print(platform.machine())" + + # test package built and installed correctly python test_import.py From dad48941ced2c8c78cf562740d8353ac5ddbf769 Mon Sep 17 00:00:00 2001 From: Joshua Anibal Date: Tue, 17 Mar 2026 20:43:47 -0700 Subject: [PATCH 19/43] tweak sizes to determine max 4 --- src/includes/ADIMEN.INC | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/includes/ADIMEN.INC b/src/includes/ADIMEN.INC index fa4922b..54d52e0 100644 --- a/src/includes/ADIMEN.INC +++ b/src/includes/ADIMEN.INC @@ -77,7 +77,7 @@ PARAMETER (NOBMAX=1) ! max number of off body points ! PARAMETER (NOBMAX=1) ! max number of off body points - PARAMETER (ICONX=10) ! + PARAMETER (ICONX=5) ! PARAMETER (IBX=5) ! max number of airfoil coordinates ! PARAMETER (IBX=300) ! max number of airfoil coordinates From 1e65053175057d2b2e73c3c9c47231e8d97c8c3f Mon Sep 17 00:00:00 2001 From: Joshua Anibal Date: Thu, 19 Mar 2026 18:07:48 -0700 Subject: [PATCH 20/43] low data size again --- src/includes/ADIMEN.INC | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/includes/ADIMEN.INC b/src/includes/ADIMEN.INC index 54d52e0..135e084 100644 --- a/src/includes/ADIMEN.INC +++ b/src/includes/ADIMEN.INC @@ -77,7 +77,7 @@ PARAMETER (NOBMAX=1) ! max number of off body points ! PARAMETER (NOBMAX=1) ! max number of off body points - PARAMETER (ICONX=5) ! + PARAMETER (ICONX=2) ! PARAMETER (IBX=5) ! max number of airfoil coordinates ! PARAMETER (IBX=300) ! max number of airfoil coordinates From 9c0e59a1505bc1fb36b7a601b13dd6ab5b856bcb Mon Sep 17 00:00:00 2001 From: Joshua Anibal Date: Thu, 19 Mar 2026 18:16:00 -0700 Subject: [PATCH 21/43] low data size again 2 --- src/includes/ADIMEN.INC | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/includes/ADIMEN.INC b/src/includes/ADIMEN.INC index 135e084..c57f3f2 100644 --- a/src/includes/ADIMEN.INC +++ b/src/includes/ADIMEN.INC @@ -78,6 +78,6 @@ ! PARAMETER (NOBMAX=1) ! max number of off body points PARAMETER (ICONX=2) ! - PARAMETER (IBX=5) ! max number of airfoil coordinates + PARAMETER (IBX=2) ! max number of airfoil coordinates ! PARAMETER (IBX=300) ! max number of airfoil coordinates From 4e2b662e3c89a3169d071cfc6a2a4f06f9d279a1 Mon Sep 17 00:00:00 2001 From: Joshua Anibal Date: Thu, 19 Mar 2026 18:45:10 -0700 Subject: [PATCH 22/43] low data size again 3 --- tools/wheels/repair_windows.sh | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/tools/wheels/repair_windows.sh b/tools/wheels/repair_windows.sh index dbb278b..58a638d 100644 --- a/tools/wheels/repair_windows.sh +++ b/tools/wheels/repair_windows.sh @@ -12,15 +12,7 @@ TARGET_ARCH="${TARGET_ARCH:-}" # Default to empty string if not set if [ "$TARGET_ARCH" = "ARM64" ]; then echo "Skipping stripping for ARM64 target." - - pushd $DEST_DIR - mkdir -p tmp - pushd tmp - wheel unpack $WHEEL - pushd optvl* - ls - llvm-objdump -p *.pyd | grep 'DLL Name' - dumpbin /dependents *.pyd + else echo "Performing stripping for AMD64 target." From c07fd6630a63e28b4c347cb7ef22c4b8c34ea52a Mon Sep 17 00:00:00 2001 From: Joshua Anibal Date: Tue, 24 Mar 2026 18:50:03 -0700 Subject: [PATCH 23/43] low data size again 4 --- src/includes/ADIMEN.INC | 2 +- src/includes/AVL_ad_seeds.inc | 48 +++++++++++++++++------------------ 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/includes/ADIMEN.INC b/src/includes/ADIMEN.INC index c57f3f2..c530541 100644 --- a/src/includes/ADIMEN.INC +++ b/src/includes/ADIMEN.INC @@ -77,7 +77,7 @@ PARAMETER (NOBMAX=1) ! max number of off body points ! PARAMETER (NOBMAX=1) ! max number of off body points - PARAMETER (ICONX=2) ! + PARAMETER (ICONX=10) ! max number of control or design variable declaration lines per section PARAMETER (IBX=2) ! max number of airfoil coordinates ! PARAMETER (IBX=300) ! max number of airfoil coordinates diff --git a/src/includes/AVL_ad_seeds.inc b/src/includes/AVL_ad_seeds.inc index dae2b9f..62661d1 100644 --- a/src/includes/AVL_ad_seeds.inc +++ b/src/includes/AVL_ad_seeds.inc @@ -594,18 +594,18 @@ C real(kind=avl_real) VREFL_DIFF real(kind=avl_real) ENC_DIFF real(kind=avl_real) ENV_DIFF - real(kind=avl_real) ENC_D_DIFF - real(kind=avl_real) ENC_G_DIFF - real(kind=avl_real) ENV_D_DIFF - real(kind=avl_real) ENV_G_DIFF +c real(kind=avl_real) ENC_D_DIFF +c real(kind=avl_real) ENC_G_DIFF +c real(kind=avl_real) ENV_D_DIFF +c real(kind=avl_real) ENV_G_DIFF real(kind=avl_real) DCP_DIFF real(kind=avl_real) DCP_U_DIFF real(kind=avl_real) DCP_D_DIFF real(kind=avl_real) DCP_G_DIFF real(kind=avl_real) GAM_DIFF real(kind=avl_real) GAM_U_0_DIFF - real(kind=avl_real) GAM_U_D_DIFF - real(kind=avl_real) GAM_U_G_DIFF +c real(kind=avl_real) GAM_U_D_DIFF +C real(kind=avl_real) GAM_U_G_DIFF real(kind=avl_real) GAM_U_DIFF real(kind=avl_real) GAM_D_DIFF real(kind=avl_real) GAM_G_DIFF @@ -643,17 +643,17 @@ C & ENC_DIFF(3,NVMAX), & ENV_DIFF(3,NVMAX), & ENC_D_DIFF(3,NVMAX,NDMAX), - & ENC_G_DIFF(3,NVMAX,NGMAX), - & ENV_D_DIFF(3,NVMAX,NDMAX), - & ENV_G_DIFF(3,NVMAX,NGMAX), +c & ENC_G_DIFF(3,NVMAX,NGMAX), +c & ENV_D_DIFF(3,NVMAX,NDMAX), +c & ENV_G_DIFF(3,NVMAX,NGMAX), & DCP_DIFF(NVMAX), & DCP_U_DIFF(NVMAX,NUMAX), & DCP_D_DIFF(NVMAX,NDMAX), & DCP_G_DIFF(NVMAX,NGMAX), & GAM_DIFF(NVMAX), & GAM_U_0_DIFF(NVMAX,NUMAX), - & GAM_U_D_DIFF(NVMAX,NUMAX,NDMAX), - & GAM_U_G_DIFF(NVMAX,NUMAX,NGMAX), +c & GAM_U_D_DIFF(NVMAX,NUMAX,NDMAX), +c & GAM_U_G_DIFF(NVMAX,NUMAX,NGMAX), & GAM_U_DIFF(NVMAX,NUMAX), & GAM_D_DIFF(NVMAX,NDMAX), & GAM_G_DIFF(NVMAX,NGMAX), @@ -697,38 +697,38 @@ C real(kind=avl_real) AMACH_DIFF real(kind=avl_real) VC_DIFF real(kind=avl_real) VC_U_DIFF - real(kind=avl_real) VC_D_DIFF - real(kind=avl_real) VC_G_DIFF +c real(kind=avl_real) VC_D_DIFF +c real(kind=avl_real) VC_G_DIFF real(kind=avl_real) WC_DIFF real(kind=avl_real) WC_U_DIFF - real(kind=avl_real) WC_D_DIFF - real(kind=avl_real) WC_G_DIFF +c real(kind=avl_real) WC_D_DIFF +c real(kind=avl_real) WC_G_DIFF real(kind=avl_real) VV_DIFF real(kind=avl_real) VV_U_DIFF real(kind=avl_real) VV_D_DIFF - real(kind=avl_real) VV_G_DIFF +c real(kind=avl_real) VV_G_DIFF real(kind=avl_real) WV_DIFF real(kind=avl_real) WV_U_DIFF real(kind=avl_real) WV_D_DIFF - real(kind=avl_real) WV_G_DIFF +c real(kind=avl_real) WV_G_DIFF COMMON /SOLV_R_DIFF/ & AMACH_DIFF, & VC_DIFF(3,NVMAX), & VC_U_DIFF(3,NVMAX,NUMAX), - & VC_D_DIFF(3,NVMAX,NDMAX), - & VC_G_DIFF(3,NVMAX,NGMAX), +c & VC_D_DIFF(3,NVMAX,NDMAX), +c & VC_G_DIFF(3,NVMAX,NGMAX), & WC_DIFF(3,NVMAX), & WC_U_DIFF(3,NVMAX,NUMAX), - & WC_D_DIFF(3,NVMAX,NDMAX), - & WC_G_DIFF(3,NVMAX,NGMAX), +c & WC_D_DIFF(3,NVMAX,NDMAX), +c & WC_G_DIFF(3,NVMAX,NGMAX), & VV_DIFF(3,NVMAX), & VV_U_DIFF(3,NVMAX,NUMAX), & VV_D_DIFF(3,NVMAX,NDMAX), - & VV_G_DIFF(3,NVMAX,NGMAX), +c & VV_G_DIFF(3,NVMAX,NGMAX), & WV_DIFF(3,NVMAX), & WV_U_DIFF(3,NVMAX,NUMAX), - & WV_D_DIFF(3,NVMAX,NDMAX), - & WV_G_DIFF(3,NVMAX,NGMAX) + & WV_D_DIFF(3,NVMAX,NDMAX) +c & WV_G_DIFF(3,NVMAX,NGMAX) C real(kind=avl_real) ROB_DIFF real(kind=avl_real) VOB_DIFF From 23ac0c41b432a3739eb4d1b2365b222ddd01b511 Mon Sep 17 00:00:00 2001 From: Joshua Anibal Date: Wed, 25 Mar 2026 07:39:35 -0700 Subject: [PATCH 24/43] removed some unused data from ad seeds --- src/includes/AVL_ad_seeds.inc | 66 +++++++++++++++---------------- tools/wheels/cibw_test_command.sh | 1 + 2 files changed, 34 insertions(+), 33 deletions(-) diff --git a/src/includes/AVL_ad_seeds.inc b/src/includes/AVL_ad_seeds.inc index 62661d1..eee64d2 100644 --- a/src/includes/AVL_ad_seeds.inc +++ b/src/includes/AVL_ad_seeds.inc @@ -390,28 +390,28 @@ C real(kind=avl_real) SSPACE_DIFF real(kind=avl_real) SSPACES_DIFF real(kind=avl_real) XYZLES_DIFF - real(kind=avl_real) XSEC_DIFF - real(kind=avl_real) YSEC_DIFF +c real(kind=avl_real) XSEC_DIFF +c real(kind=avl_real) YSEC_DIFF real(kind=avl_real) XFMIN_R_DIFF real(kind=avl_real) XFMAX_R_DIFF - real(kind=avl_real) XLASEC_DIFF - real(kind=avl_real) ZLASEC_DIFF - real(kind=avl_real) XUASEC_DIFF - real(kind=avl_real) ZUASEC_DIFF +c real(kind=avl_real) XLASEC_DIFF +c real(kind=avl_real) ZLASEC_DIFF +c real(kind=avl_real) XUASEC_DIFF +c real(kind=avl_real) ZUASEC_DIFF real(kind=avl_real) CHORDS_DIFF real(kind=avl_real) AINCS_DIFF - real(kind=avl_real) XASEC_DIFF - real(kind=avl_real) CASEC_DIFF - real(kind=avl_real) SASEC_DIFF - real(kind=avl_real) TASEC_DIFF - real(kind=avl_real) CLCDSEC_DIFF +c real(kind=avl_real) XASEC_DIFF +c real(kind=avl_real) CASEC_DIFF +c real(kind=avl_real) SASEC_DIFF +c real(kind=avl_real) TASEC_DIFF +c real(kind=avl_real) CLCDSEC_DIFF real(kind=avl_real) CLCDSRF_DIFF real(kind=avl_real) CLAF_DIFF - real(kind=avl_real) XHINGED_DIFF - real(kind=avl_real) VHINGED_DIFF - real(kind=avl_real) GAIND_DIFF - real(kind=avl_real) REFLD_DIFF - real(kind=avl_real) GAING_DIFF +c real(kind=avl_real) XHINGED_DIFF +c real(kind=avl_real) VHINGED_DIFF +c real(kind=avl_real) GAIND_DIFF +c real(kind=avl_real) REFLD_DIFF +c real(kind=avl_real) GAING_DIFF COMMON /SURF_GEOM_R_DIFF/ & XYZSCAL_DIFF(3, NFMAX), & XYZTRAN_DIFF(3, NFMAX), @@ -421,28 +421,28 @@ C & SSPACE_DIFF(NFMAX), & SSPACES_DIFF(NSECMAX, NFMAX), & XYZLES_DIFF(3, NSECMAX, NFMAX), - & XSEC_DIFF(IBX, NSECMAX, NFMAX), - & YSEC_DIFF(IBX, NSECMAX, NFMAX), +c & XSEC_DIFF(IBX, NSECMAX, NFMAX), +c & YSEC_DIFF(IBX, NSECMAX, NFMAX), & XFMIN_R_DIFF(NSECMAX, NFMAX), & XFMAX_R_DIFF(NSECMAX, NFMAX), - & XLASEC_DIFF(IBX, NSECMAX, NFMAX), - & ZLASEC_DIFF(IBX, NSECMAX, NFMAX), - & XUASEC_DIFF(IBX, NSECMAX, NFMAX), - & ZUASEC_DIFF(IBX, NSECMAX, NFMAX), +c & XLASEC_DIFF(IBX, NSECMAX, NFMAX), +c & ZLASEC_DIFF(IBX, NSECMAX, NFMAX), +c & XUASEC_DIFF(IBX, NSECMAX, NFMAX), +c & ZUASEC_DIFF(IBX, NSECMAX, NFMAX), & CHORDS_DIFF(NSECMAX, NFMAX), & AINCS_DIFF(NSECMAX, NFMAX), - & XASEC_DIFF(IBX, NSECMAX, NFMAX), - & CASEC_DIFF(IBX, NSECMAX, NFMAX), - & SASEC_DIFF(IBX, NSECMAX, NFMAX), - & TASEC_DIFF(IBX, NSECMAX, NFMAX), - & CLCDSEC_DIFF(6, NSECMAX, NFMAX), +c & XASEC_DIFF(IBX, NSECMAX, NFMAX), +c & CASEC_DIFF(IBX, NSECMAX, NFMAX), +c & SASEC_DIFF(IBX, NSECMAX, NFMAX), +c & TASEC_DIFF(IBX, NSECMAX, NFMAX), +c & CLCDSEC_DIFF(6, NSECMAX, NFMAX), & CLCDSRF_DIFF(6, NFMAX), - & CLAF_DIFF(NSECMAX, NFMAX), - & XHINGED_DIFF(ICONX, NSECMAX, NFMAX), - & VHINGED_DIFF(3, ICONX, NSECMAX, NFMAX), - & GAIND_DIFF(ICONX, NSECMAX, NFMAX), - & REFLD_DIFF(ICONX, NSECMAX, NFMAX), - & GAING_DIFF(ICONX, NSECMAX, NFMAX) + & CLAF_DIFF(NSECMAX, NFMAX) +c & XHINGED_DIFF(ICONX, NSECMAX, NFMAX), +c & VHINGED_DIFF(3, ICONX, NSECMAX, NFMAX), +c & GAIND_DIFF(ICONX, NSECMAX, NFMAX), +c & REFLD_DIFF(ICONX, NSECMAX, NFMAX), +c & GAING_DIFF(ICONX, NSECMAX, NFMAX) C real(kind=avl_real) MSHBLK_DIFF real(kind=avl_real) RV1MSH_DIFF diff --git a/tools/wheels/cibw_test_command.sh b/tools/wheels/cibw_test_command.sh index 57981ad..0ba2403 100644 --- a/tools/wheels/cibw_test_command.sh +++ b/tools/wheels/cibw_test_command.sh @@ -4,6 +4,7 @@ PROJECT_DIR="$1" cd $PROJECT_DIR/tests python -c "import platform; print(platform.machine())" +ls ../optvl llvm-objdump -p ../optvl/libavl.cp312-win_arm64.pyd | findstr "DLL Name" # install tesing dependencies From 3ab0277648df752935612540e9b18ea7df201e80 Mon Sep 17 00:00:00 2001 From: Joshua Anibal Date: Wed, 25 Mar 2026 07:49:13 -0700 Subject: [PATCH 25/43] add back in two variables --- src/includes/AVL_ad_seeds.inc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/includes/AVL_ad_seeds.inc b/src/includes/AVL_ad_seeds.inc index eee64d2..1a7b28b 100644 --- a/src/includes/AVL_ad_seeds.inc +++ b/src/includes/AVL_ad_seeds.inc @@ -400,9 +400,9 @@ c real(kind=avl_real) XUASEC_DIFF c real(kind=avl_real) ZUASEC_DIFF real(kind=avl_real) CHORDS_DIFF real(kind=avl_real) AINCS_DIFF -c real(kind=avl_real) XASEC_DIFF + real(kind=avl_real) XASEC_DIFF c real(kind=avl_real) CASEC_DIFF -c real(kind=avl_real) SASEC_DIFF + real(kind=avl_real) SASEC_DIFF c real(kind=avl_real) TASEC_DIFF c real(kind=avl_real) CLCDSEC_DIFF real(kind=avl_real) CLCDSRF_DIFF @@ -431,9 +431,9 @@ c & XUASEC_DIFF(IBX, NSECMAX, NFMAX), c & ZUASEC_DIFF(IBX, NSECMAX, NFMAX), & CHORDS_DIFF(NSECMAX, NFMAX), & AINCS_DIFF(NSECMAX, NFMAX), -c & XASEC_DIFF(IBX, NSECMAX, NFMAX), + & XASEC_DIFF(IBX, NSECMAX, NFMAX), c & CASEC_DIFF(IBX, NSECMAX, NFMAX), -c & SASEC_DIFF(IBX, NSECMAX, NFMAX), + & SASEC_DIFF(IBX, NSECMAX, NFMAX), c & TASEC_DIFF(IBX, NSECMAX, NFMAX), c & CLCDSEC_DIFF(6, NSECMAX, NFMAX), & CLCDSRF_DIFF(6, NFMAX), From 74eab7eaa37a65c2d79cd3b7c1e0fbe4b7dedaca Mon Sep 17 00:00:00 2001 From: Joshua Anibal Date: Wed, 25 Mar 2026 09:26:14 -0700 Subject: [PATCH 26/43] split surf geom variables into a different include --- optvl/optvl_class.py | 1 + src/ad_src/forward_ad_src/amake_d.f | 5 + src/ad_src/reverse_ad_src/amake_b.f | 5 + src/ainput.f | 1 + src/amake.f | 11 +++ src/f2py/libavl.pyf | 1 + src/includes/ADIMEN.INC | 4 +- src/includes/AVL.INC | 138 ---------------------------- src/includes/AVL_surf.INC | 137 +++++++++++++++++++++++++++ tools/wheels/cibw_test_command.sh | 2 +- 10 files changed, 164 insertions(+), 141 deletions(-) create mode 100644 src/includes/AVL_surf.INC diff --git a/optvl/optvl_class.py b/optvl/optvl_class.py index 8ab2a53..ca8f6ae 100644 --- a/optvl/optvl_class.py +++ b/optvl/optvl_class.py @@ -286,6 +286,7 @@ def __init__( # # get just the file name avl_lib_so_file = os.path.basename(avl_lib_so_file) + self.avl = MExt.MExt("libavl", module_name, "optvl", lib_so_file=avl_lib_so_file, debug=debug)._module diff --git a/src/ad_src/forward_ad_src/amake_d.f b/src/ad_src/forward_ad_src/amake_d.f index 17bf2b2..d59880c 100644 --- a/src/ad_src/forward_ad_src/amake_d.f +++ b/src/ad_src/forward_ad_src/amake_d.f @@ -18,6 +18,7 @@ SUBROUTINE UPDATE_SURFACES_D() use avl_heap_inc use avl_heap_diff_inc INCLUDE 'AVL.INC' + INCLUDE 'AVL_surf.INC' INCLUDE 'AVL_ad_seeds.inc' INTEGER ii INTEGER isurf @@ -201,6 +202,7 @@ SUBROUTINE UPDATE_SURFACES_D() C SUBROUTINE MAKESURF_D(isurf) INCLUDE 'AVL.INC' + INCLUDE 'AVL_surf.INC' INCLUDE 'AVL_ad_seeds.inc' C C @@ -1341,6 +1343,7 @@ SUBROUTINE MAKESURF_D(isurf) C SUBROUTINE MAKESURF_MESH_D(isurf) INCLUDE 'AVL.INC' + INCLUDE 'AVL_surf.INC' INCLUDE 'AVL_ad_seeds.inc' C working variables (AVL original) INTEGER isurf @@ -2625,6 +2628,7 @@ SUBROUTINE MAKESURF_MESH_D(isurf) C SUBROUTINE SDUPL_D(nn, ypt, msg) INCLUDE 'AVL.INC' + INCLUDE 'AVL_surf.INC' INCLUDE 'AVL_ad_seeds.inc' CHARACTER*(*) msg INTEGER idx_vor @@ -2923,6 +2927,7 @@ SUBROUTINE SDUPL_D(nn, ypt, msg) C and uses the real mesh to compute normals if it is SUBROUTINE ENCALC_D() INCLUDE 'AVL.INC' + INCLUDE 'AVL_surf.INC' INCLUDE 'AVL_ad_seeds.inc' C REAL ep(3), eq(3), es(3), eb(3), ec(3), ecxb(3) diff --git a/src/ad_src/reverse_ad_src/amake_b.f b/src/ad_src/reverse_ad_src/amake_b.f index abb90cb..96c94a4 100644 --- a/src/ad_src/reverse_ad_src/amake_b.f +++ b/src/ad_src/reverse_ad_src/amake_b.f @@ -22,6 +22,7 @@ SUBROUTINE UPDATE_SURFACES_B() use avl_heap_inc use avl_heap_diff_inc INCLUDE 'AVL.INC' + INCLUDE 'AVL_surf.INC' INCLUDE 'AVL_ad_seeds.inc' INTEGER ii INTEGER isurf @@ -245,6 +246,7 @@ SUBROUTINE UPDATE_SURFACES_B() C SUBROUTINE MAKESURF_B(isurf) INCLUDE 'AVL.INC' + INCLUDE 'AVL_surf.INC' INCLUDE 'AVL_ad_seeds.inc' C C @@ -2237,6 +2239,7 @@ SUBROUTINE MAKESURF_B(isurf) C SUBROUTINE MAKESURF_MESH_B(isurf) INCLUDE 'AVL.INC' + INCLUDE 'AVL_surf.INC' INCLUDE 'AVL_ad_seeds.inc' C working variables (AVL original) INTEGER isurf @@ -3949,6 +3952,7 @@ SUBROUTINE MAKESURF_MESH_B(isurf) C SUBROUTINE SDUPL_B(nn, ypt, msg) INCLUDE 'AVL.INC' + INCLUDE 'AVL_surf.INC' INCLUDE 'AVL_ad_seeds.inc' CHARACTER*(*) msg INTEGER idx_vor @@ -4463,6 +4467,7 @@ SUBROUTINE SDUPL_B(nn, ypt, msg) C and uses the real mesh to compute normals if it is SUBROUTINE ENCALC_B() INCLUDE 'AVL.INC' + INCLUDE 'AVL_surf.INC' INCLUDE 'AVL_ad_seeds.inc' C REAL ep(3), eq(3), es(3), eb(3), ec(3), ecxb(3) diff --git a/src/ainput.f b/src/ainput.f index 93c42cb..7e36f80 100644 --- a/src/ainput.f +++ b/src/ainput.f @@ -23,6 +23,7 @@ SUBROUTINE INPUT(LUN,FNAME,FERR) C Reads an processes an AVL configuration input file C--------------------------------------------------------- INCLUDE 'AVL.INC' + INCLUDE 'AVL_surf.INC' C CHARACTER*(*) FNAME LOGICAL FERR diff --git a/src/amake.f b/src/amake.f index 3ba72c5..798cf37 100644 --- a/src/amake.f +++ b/src/amake.f @@ -24,6 +24,7 @@ SUBROUTINE MAKESURF(ISURF) C using info from configuration input file. C-------------------------------------------------------------- INCLUDE 'AVL.INC' + INCLUDE 'AVL_surf.INC' C C REAL XYZLEL(3), XYZLER(3) @@ -650,6 +651,7 @@ SUBROUTINE MAKESURF(ISURF) integer function flatidx(idx_x, idx_y, idx_surf) include 'AVL.INC' + INCLUDE 'AVL_surf.INC' ! store MFRST and NVC in the common block integer idx_x, idx_y, idx_surf flatidx = idx_x + (idx_y - 1) * (NVC(idx_surf)+1) @@ -663,6 +665,7 @@ subroutine makesurf_mesh(isurf) C and the given mesh coordinate array. c-------------------------------------------------------------- INCLUDE 'AVL.INC' + INCLUDE 'AVL_surf.INC' ! input/output integer isurf @@ -1425,6 +1428,7 @@ subroutine update_surfaces() c-------------------------------------------------------------- use avl_heap_inc include 'AVL.INC' + INCLUDE 'AVL_surf.INC' integer ii NSTRIP = 0 @@ -1484,6 +1488,7 @@ SUBROUTINE MAKEBODY(IBODY) C using info from configuration input file. C-------------------------------------------------------------- INCLUDE 'AVL.INC' + INCLUDE 'AVL_surf.INC' C C REAL XBOD(IBX), YBOD(IBX), TBOD(IBX) C @@ -1582,6 +1587,7 @@ subroutine update_bodies() c Updates all bodies, using the stored data. c-------------------------------------------------------------- include 'AVL.INC' + INCLUDE 'AVL_surf.INC' integer IBODY, NBOD, NBLDS character*120 upname @@ -1623,6 +1629,7 @@ subroutine set_section_coordinates(isec,isurf,x,y,n,nin,xfmin, c Sets the airfoil coodinate data for the given section and surface c-------------------------------------------------------------- include 'AVL.INC' + INCLUDE 'AVL_surf.INC' c input integer isec, isurf, n, nin real x(n), y(n) @@ -1682,6 +1689,7 @@ subroutine set_body_coordinates(ibod,xb,yb,nb,nin,storecoords) c Sets the body oml coodinate data for the given section and surface c-------------------------------------------------------------- include 'AVL.INC' + INCLUDE 'AVL_surf.INC' integer ibod, nb, nin real xb(nb), yb(nb) logical storecoords @@ -1710,6 +1718,7 @@ SUBROUTINE SDUPL(NN, Ypt,MSG) C reflected about y=Ypt. C----------------------------------- INCLUDE 'AVL.INC' + INCLUDE 'AVL_surf.INC' CHARACTER*(*) MSG integer idx_vor C @@ -1931,6 +1940,7 @@ SUBROUTINE BDUPL(NN,Ypt,MSG) C reflected about y=Ypt. C----------------------------------- INCLUDE 'AVL.INC' + INCLUDE 'AVL_surf.INC' CHARACTER*(*) MSG C NNI = NBODY + 1 @@ -2017,6 +2027,7 @@ SUBROUTINE ENCALC C...COMMENTS C INCLUDE 'AVL.INC' + INCLUDE 'AVL_surf.INC' C REAL EP(3), EQ(3), ES(3), EB(3), EC(3), ECXB(3) REAL EC_G(3,NDMAX), ECXB_G(3) diff --git a/src/f2py/libavl.pyf b/src/f2py/libavl.pyf index c5c9157..a4b0dad 100644 --- a/src/f2py/libavl.pyf +++ b/src/f2py/libavl.pyf @@ -8,6 +8,7 @@ python module libavl ! in subroutine avl ! in :libavl:avl.f include '../includes/AVL.INC' + include '../includes/AVL_surf.INC' include '../includes/AVL_ad_seeds.inc' ! parameters from diff --git a/src/includes/ADIMEN.INC b/src/includes/ADIMEN.INC index c530541..3a73bb6 100644 --- a/src/includes/ADIMEN.INC +++ b/src/includes/ADIMEN.INC @@ -77,7 +77,7 @@ PARAMETER (NOBMAX=1) ! max number of off body points ! PARAMETER (NOBMAX=1) ! max number of off body points - PARAMETER (ICONX=10) ! max number of control or design variable declaration lines per section - PARAMETER (IBX=2) ! max number of airfoil coordinates + PARAMETER (ICONX=20) ! max number of control or design variable declaration lines per section + PARAMETER (IBX=200) ! max number of airfoil coordinates ! PARAMETER (IBX=300) ! max number of airfoil coordinates diff --git a/src/includes/AVL.INC b/src/includes/AVL.INC index fc47c9c..93612b2 100644 --- a/src/includes/AVL.INC +++ b/src/includes/AVL.INC @@ -395,144 +395,6 @@ C & CF_LSRF(3,NFMAX), CM_LSRF(3,NFMAX), & CL_LSRF(NFMAX), CD_LSRF(NFMAX), CMLE_LSRF(NFMAX) -C !start added variables for python geometry minipulation - - LOGICAL LDUPL_B - COMMON /BODY_GEOM_L/ - & LDUPL_B(NBMAX) ! T if body is a duplicated -c - COMMON /BODY_GEOM_I/ - & NSEC_B(NBMAX), ! number of sections in body - & NVB(NFMAX), ! number of body elements - & NBOD(NBMAX) ! number of body oml points - - REAL(kind=avl_real) XYZSCAL_B - REAL(kind=avl_real) XYZTRAN_B - REAL(kind=avl_real) YDUPL_B - REAL(kind=avl_real) XYZLES_B - REAL(kind=avl_real) BSPACE - REAL(kind=avl_real) XBOD - REAL(kind=avl_real) YBOD - REAL(kind=avl_real) TBOD - REAL(kind=avl_real) XBOD_R - REAL(kind=avl_real) YBOD_R - COMMON /BODY_GEOM_R/ - & XYZSCAL_B(3, NBMAX), ! scaling factors for XYZ coordinates - & XYZTRAN_B(3, NBMAX), ! translation factors for XYZ coordinates - & YDUPL_B(NBMAX), ! y duplicate - & XYZLES_B(3, NSMAX, NBMAX), ! leading edge cordinate vector - & BSPACE(NBMAX), ! body spacing - & XBOD(IBX, NBMAX), ! body oml x-coordinates - & YBOD(IBX, NBMAX), ! body oml y-coordinates - & TBOD(IBX, NBMAX), ! body oml thickness - & XBOD_R(IBX, NBMAX), ! raw input oml x-coordinates - & YBOD_R(IBX, NBMAX) ! raw input oml y-coordinates -c - LOGICAL LDUPL - LOGICAL LSURFSPACING - COMMON /SURF_GEOM_L/ - & LDUPL(NFMAX), ! T if surface is a duplicated - & LSURFSPACING(NFMAX) ! surface spacing set under the surface heeading - - COMMON /SURF_GEOM_I/ - & NSEC(NFMAX), ! number of sections in surface - & NVC(NFMAX), ! number of chordwise elements - & NVS(NFMAX), ! number of spanwise elements - & NSPANS(NSECMAX, NFMAX), ! number of spanwise elements vector - & NASEC(NSECMAX, NFMAX), ! number of points used to represent section geometry - & NAPTSSEC(NSECMAX, IBX), ! number of points of input airfoil geometry - & ICONTD(ICONX, NSECMAX, NFMAX), ! control variable index - & NSCON(NSECMAX, NFMAX), ! number of control variables - & IDESTD(ICONX, NSECMAX, NFMAX), ! design variable index - & NSDES(NSECMAX, NFMAX) ! number of design variables - - REAL(kind=avl_real) XYZSCAL - REAL(kind=avl_real) XYZTRAN - REAL(kind=avl_real) YDUPL - REAL(kind=avl_real) ADDINC - REAL(kind=avl_real) CSPACE - REAL(kind=avl_real) SSPACE - REAL(kind=avl_real) SSPACES - REAL(kind=avl_real) XYZLES - REAL(kind=avl_real) XSEC - REAL(kind=avl_real) YSEC - REAL(kind=avl_real) XFMIN_R - REAL(kind=avl_real) XFMAX_R - REAL(kind=avl_real) XLASEC - REAL(kind=avl_real) ZLASEC - REAL(kind=avl_real) XUASEC - REAL(kind=avl_real) ZUASEC - REAL(kind=avl_real) CHORDS - REAL(kind=avl_real) AINCS - REAL(kind=avl_real) XASEC - REAL(kind=avl_real) CASEC - REAL(kind=avl_real) SASEC - REAL(kind=avl_real) TASEC - REAL(kind=avl_real) CLCDSEC - REAL(kind=avl_real) CLCDSRF - REAL(kind=avl_real) CLAF - REAL(kind=avl_real) XHINGED - REAL(kind=avl_real) VHINGED - REAL(kind=avl_real) GAIND - REAL(kind=avl_real) REFLD - REAL(kind=avl_real) GAING - COMMON /SURF_GEOM_R/ - & XYZSCAL(3, NFMAX), ! scaling factors for XYZ coordinates - & XYZTRAN(3, NFMAX), ! translation factors for XYZ coordinates - & YDUPL(NFMAX), ! y position of duplicate plane - & ADDINC(NFMAX), ! additional incidence angle - & CSPACE(NFMAX), ! chordwise spacing - & SSPACE(NFMAX), ! spanwise spacing - & SSPACES(NSECMAX, NFMAX), ! spanwise spacing vector - & XYZLES(3, NSECMAX, NFMAX), ! leading edge cordinate vector - & XSEC(IBX, NSECMAX, NFMAX), ! raw section input x coordinates - & YSEC(IBX, NSECMAX, NFMAX), ! raw section input y coordinates - & XFMIN_R(NSECMAX, NFMAX), ! section input lower x bound - & XFMAX_R(NSECMAX, NFMAX), ! section input upper x bound - & XLASEC(IBX, NSECMAX, NFMAX), ! airfoil lower surface x-coords - & ZLASEC(IBX, NSECMAX, NFMAX), ! airfoil lower surface z-coords - & XUASEC(IBX, NSECMAX, NFMAX), ! airfoil upper surface x-coords - & ZUASEC(IBX, NSECMAX, NFMAX), ! airfoil upper surface z-coords - & CHORDS(NSECMAX, NFMAX), ! chord length vectorm - & AINCS(NSECMAX, NFMAX), ! incidence angle vector - & XASEC(IBX, NSECMAX, NFMAX), ! the x coordinate aifoil section - & CASEC(IBX, NSECMAX, NFMAX), ! camber line at xasec - & SASEC(IBX, NSECMAX, NFMAX), ! slope of camber line at xasec - & TASEC(IBX, NSECMAX, NFMAX), ! thickness at xasec - & CLCDSEC(6, NSECMAX, NFMAX), - & CLCDSRF(6, NFMAX), - & CLAF(NSECMAX, NFMAX), ! CL alpha (dCL/da) scaling factor - & XHINGED(ICONX, NSECMAX, NFMAX), ! hinge location - & VHINGED(3, ICONX, NSECMAX, NFMAX), ! hinge vector - & GAIND(ICONX, NSECMAX, NFMAX), ! control surface gain - & REFLD(ICONX, NSECMAX, NFMAX), ! control surface reflection - & GAING(ICONX, NSECMAX, NFMAX) ! desgin variable gain - - COMMON /SURF_MESH_I/ - & MFRST(NFMAX), ! stores the index in the MSHBLK where each surface's mesh begins - & IPTSEC(NSMAX,NFMAX) ! stores the iptloc vector for each surface - - REAL(kind=avl_real) MSHBLK - REAL(kind=avl_real) RV1MSH - REAL(kind=avl_real) RV2MSH - REAL(kind=avl_real) RVMSH - REAL(kind=avl_real) RCMSH - COMMON /SURF_MESH_R/ - & MSHBLK(3, 4*NVMAX), ! block to store all surface meshes - & RV1MSH(3,NVMAX), ! mesh h.v. vortex left points - & RV2MSH(3,NVMAX), ! mesh h.v. vortex right points - & RVMSH(3,NVMAX), ! mesh h.v. vortex center points - & RCMSH(3,NVMAX) ! mesh h.v. control points - - LOGICAL LSURFMSH - LOGICAL LMESHFLAT - COMMON /SURF_MESH_L/ - & LSURFMSH(NFMAX), ! T if surface uses a mesh cordinates for its geometry - & LMESHFLAT(NFMAX) ! T if the surface's mesh should be flattened when computing vorticies and control points - - -C !!--- end added variables for python geometry manipulation --- - COMMON /STRP_I/ & LSSURF(NSMAX), ! index of surface which contains this strip & IJFRST(NSMAX), ! index of first element in strip diff --git a/src/includes/AVL_surf.INC b/src/includes/AVL_surf.INC new file mode 100644 index 0000000..a6e4b65 --- /dev/null +++ b/src/includes/AVL_surf.INC @@ -0,0 +1,137 @@ +C !start added variables for python geometry minipulation + + LOGICAL LDUPL_B + COMMON /BODY_GEOM_L/ + & LDUPL_B(NBMAX) ! T if body is a duplicated +c + COMMON /BODY_GEOM_I/ + & NSEC_B(NBMAX), ! number of sections in body + & NVB(NFMAX), ! number of body elements + & NBOD(NBMAX) ! number of body oml points + + REAL(kind=avl_real) XYZSCAL_B + REAL(kind=avl_real) XYZTRAN_B + REAL(kind=avl_real) YDUPL_B + REAL(kind=avl_real) XYZLES_B + REAL(kind=avl_real) BSPACE + REAL(kind=avl_real) XBOD + REAL(kind=avl_real) YBOD + REAL(kind=avl_real) TBOD + REAL(kind=avl_real) XBOD_R + REAL(kind=avl_real) YBOD_R + COMMON /BODY_GEOM_R/ + & XYZSCAL_B(3, NBMAX), ! scaling factors for XYZ coordinates + & XYZTRAN_B(3, NBMAX), ! translation factors for XYZ coordinates + & YDUPL_B(NBMAX), ! y duplicate + & XYZLES_B(3, NSMAX, NBMAX), ! leading edge cordinate vector + & BSPACE(NBMAX), ! body spacing + & XBOD(IBX, NBMAX), ! body oml x-coordinates + & YBOD(IBX, NBMAX), ! body oml y-coordinates + & TBOD(IBX, NBMAX), ! body oml thickness + & XBOD_R(IBX, NBMAX), ! raw input oml x-coordinates + & YBOD_R(IBX, NBMAX) ! raw input oml y-coordinates +c + LOGICAL LDUPL + LOGICAL LSURFSPACING + COMMON /SURF_GEOM_L/ + & LDUPL(NFMAX), ! T if surface is a duplicated + & LSURFSPACING(NFMAX) ! surface spacing set under the surface heeading + + COMMON /SURF_GEOM_I/ + & NSEC(NFMAX), ! number of sections in surface + & NVC(NFMAX), ! number of chordwise elements + & NVS(NFMAX), ! number of spanwise elements + & NSPANS(NSECMAX, NFMAX), ! number of spanwise elements vector + & NASEC(NSECMAX, NFMAX), ! number of points used to represent section geometry + & NAPTSSEC(NSECMAX, IBX), ! number of points of input airfoil geometry + & ICONTD(ICONX, NSECMAX, NFMAX), ! control variable index + & NSCON(NSECMAX, NFMAX), ! number of control variables + & IDESTD(ICONX, NSECMAX, NFMAX), ! design variable index + & NSDES(NSECMAX, NFMAX) ! number of design variables + + REAL(kind=avl_real) XYZSCAL + REAL(kind=avl_real) XYZTRAN + REAL(kind=avl_real) YDUPL + REAL(kind=avl_real) ADDINC + REAL(kind=avl_real) CSPACE + REAL(kind=avl_real) SSPACE + REAL(kind=avl_real) SSPACES + REAL(kind=avl_real) XYZLES + REAL(kind=avl_real) XSEC + REAL(kind=avl_real) YSEC + REAL(kind=avl_real) XFMIN_R + REAL(kind=avl_real) XFMAX_R + REAL(kind=avl_real) XLASEC + REAL(kind=avl_real) ZLASEC + REAL(kind=avl_real) XUASEC + REAL(kind=avl_real) ZUASEC + REAL(kind=avl_real) CHORDS + REAL(kind=avl_real) AINCS + REAL(kind=avl_real) XASEC + REAL(kind=avl_real) CASEC + REAL(kind=avl_real) SASEC + REAL(kind=avl_real) TASEC + REAL(kind=avl_real) CLCDSEC + REAL(kind=avl_real) CLCDSRF + REAL(kind=avl_real) CLAF + REAL(kind=avl_real) XHINGED + REAL(kind=avl_real) VHINGED + REAL(kind=avl_real) GAIND + REAL(kind=avl_real) REFLD + REAL(kind=avl_real) GAING + COMMON /SURF_GEOM_R/ + & XYZSCAL(3, NFMAX), ! scaling factors for XYZ coordinates + & XYZTRAN(3, NFMAX), ! translation factors for XYZ coordinates + & YDUPL(NFMAX), ! y position of duplicate plane + & ADDINC(NFMAX), ! additional incidence angle + & CSPACE(NFMAX), ! chordwise spacing + & SSPACE(NFMAX), ! spanwise spacing + & SSPACES(NSECMAX, NFMAX), ! spanwise spacing vector + & XYZLES(3, NSECMAX, NFMAX), ! leading edge cordinate vector + & XSEC(IBX, NSECMAX, NFMAX), ! raw section input x coordinates + & YSEC(IBX, NSECMAX, NFMAX), ! raw section input y coordinates + & XFMIN_R(NSECMAX, NFMAX), ! section input lower x bound + & XFMAX_R(NSECMAX, NFMAX), ! section input upper x bound + & XLASEC(IBX, NSECMAX, NFMAX), ! airfoil lower surface x-coords + & ZLASEC(IBX, NSECMAX, NFMAX), ! airfoil lower surface z-coords + & XUASEC(IBX, NSECMAX, NFMAX), ! airfoil upper surface x-coords + & ZUASEC(IBX, NSECMAX, NFMAX), ! airfoil upper surface z-coords + & CHORDS(NSECMAX, NFMAX), ! chord length vectorm + & AINCS(NSECMAX, NFMAX), ! incidence angle vector + & XASEC(IBX, NSECMAX, NFMAX), ! the x coordinate aifoil section + & CASEC(IBX, NSECMAX, NFMAX), ! camber line at xasec + & SASEC(IBX, NSECMAX, NFMAX), ! slope of camber line at xasec + & TASEC(IBX, NSECMAX, NFMAX), ! thickness at xasec + & CLCDSEC(6, NSECMAX, NFMAX), + & CLCDSRF(6, NFMAX), + & CLAF(NSECMAX, NFMAX), ! CL alpha (dCL/da) scaling factor + & XHINGED(ICONX, NSECMAX, NFMAX), ! hinge location + & VHINGED(3, ICONX, NSECMAX, NFMAX), ! hinge vector + & GAIND(ICONX, NSECMAX, NFMAX), ! control surface gain + & REFLD(ICONX, NSECMAX, NFMAX), ! control surface reflection + & GAING(ICONX, NSECMAX, NFMAX) ! desgin variable gain + + COMMON /SURF_MESH_I/ + & MFRST(NFMAX), ! stores the index in the MSHBLK where each surface's mesh begins + & IPTSEC(NSMAX,NFMAX) ! stores the iptloc vector for each surface + + REAL(kind=avl_real) MSHBLK + REAL(kind=avl_real) RV1MSH + REAL(kind=avl_real) RV2MSH + REAL(kind=avl_real) RVMSH + REAL(kind=avl_real) RCMSH + COMMON /SURF_MESH_R/ + & MSHBLK(3, 4*NVMAX), ! block to store all surface meshes + & RV1MSH(3,NVMAX), ! mesh h.v. vortex left points + & RV2MSH(3,NVMAX), ! mesh h.v. vortex right points + & RVMSH(3,NVMAX), ! mesh h.v. vortex center points + & RCMSH(3,NVMAX) ! mesh h.v. control points + + LOGICAL LSURFMSH + LOGICAL LMESHFLAT + COMMON /SURF_MESH_L/ + & LSURFMSH(NFMAX), ! T if surface uses a mesh cordinates for its geometry + & LMESHFLAT(NFMAX) ! T if the surface's mesh should be flattened when computing vorticies and control points + + +C !!--- end added variables for python geometry manipulation --- diff --git a/tools/wheels/cibw_test_command.sh b/tools/wheels/cibw_test_command.sh index 0ba2403..9975296 100644 --- a/tools/wheels/cibw_test_command.sh +++ b/tools/wheels/cibw_test_command.sh @@ -5,7 +5,7 @@ PROJECT_DIR="$1" cd $PROJECT_DIR/tests python -c "import platform; print(platform.machine())" ls ../optvl -llvm-objdump -p ../optvl/libavl.cp312-win_arm64.pyd | findstr "DLL Name" +# llvm-objdump -p ../optvl/libavl.cp312-win_arm64.pyd | findstr "DLL Name" # install tesing dependencies pip install --only-binary :all: scipy From 86e1eaa51a7949c19b5505eadae70321f707fac0 Mon Sep 17 00:00:00 2001 From: Joshua Anibal Date: Wed, 25 Mar 2026 18:08:02 -0700 Subject: [PATCH 27/43] try to get the build passing again --- src/includes/ADIMEN.INC | 2 +- tools/wheels/cibw_test_command.sh | 72 +++++++++++++++---------------- 2 files changed, 37 insertions(+), 37 deletions(-) diff --git a/src/includes/ADIMEN.INC b/src/includes/ADIMEN.INC index 3a73bb6..b9465f7 100644 --- a/src/includes/ADIMEN.INC +++ b/src/includes/ADIMEN.INC @@ -78,6 +78,6 @@ ! PARAMETER (NOBMAX=1) ! max number of off body points PARAMETER (ICONX=20) ! max number of control or design variable declaration lines per section - PARAMETER (IBX=200) ! max number of airfoil coordinates + PARAMETER (IBX=2) ! max number of airfoil coordinates ! PARAMETER (IBX=300) ! max number of airfoil coordinates diff --git a/tools/wheels/cibw_test_command.sh b/tools/wheels/cibw_test_command.sh index 9975296..2c7ba3e 100644 --- a/tools/wheels/cibw_test_command.sh +++ b/tools/wheels/cibw_test_command.sh @@ -7,51 +7,51 @@ python -c "import platform; print(platform.machine())" ls ../optvl # llvm-objdump -p ../optvl/libavl.cp312-win_arm64.pyd | findstr "DLL Name" -# install tesing dependencies -pip install --only-binary :all: scipy -pip install psutil "openmdao!=3.38" +# # install tesing dependencies +# pip install --only-binary :all: scipy +# pip install psutil "openmdao!=3.38" -#HACK: if the tests are not split up the CI runs out of memory... -# python -m unittest -v -# pip install testflo -# testflo -v . +# #HACK: if the tests are not split up the CI runs out of memory... +# # python -m unittest -v +# # pip install testflo +# # testflo -v . -# test package built and installed correctly -python test_import.py -python -m unittest -v test_import.py -python -m unittest -v test_io.py -python -m unittest -v test_input_dict.py +# # test package built and installed correctly +# python test_import.py +# python -m unittest -v test_import.py +# python -m unittest -v test_io.py +# python -m unittest -v test_input_dict.py -# test mem ussage of pyavl and test framework -python -m unittest -v test_tear_down.py +# # test mem ussage of pyavl and test framework +# python -m unittest -v test_tear_down.py -# test basic avl functionality -python -m unittest -v test_parameters.py -python -m unittest -v test_analysis.py -python -m unittest -v test_surf_geom.py -python -m unittest -v test_stab_derivs.py -python -m unittest -v test_body_axis_derivs.py -# test eigenmode analysis -python -m unittest -v test_eigen_analysis.py +# # test basic avl functionality +# python -m unittest -v test_parameters.py +# python -m unittest -v test_analysis.py +# python -m unittest -v test_surf_geom.py +# python -m unittest -v test_stab_derivs.py +# python -m unittest -v test_body_axis_derivs.py +# # test eigenmode analysis +# python -m unittest -v test_eigen_analysis.py -# tests for adjoint -python -m unittest -v test_new_subroutines.py -#HACK: if the tests are not split up the windows version has -# an error loading the shared lib. -python -m unittest -v test_partial_derivs.TestFunctionPartials -python -m unittest -v test_partial_derivs.TestResidualPartials -python -m unittest -v test_consurf_partial_derivs.TestResidualDPartials -python -m unittest -v test_consurf_partial_derivs.TestConSurfDerivsPartials -python -m unittest -v test_stab_derivs_partial_derivs.TestResidualUPartials -python -m unittest -v test_stab_derivs_partial_derivs.TestStabDerivDerivsPartials +# # tests for adjoint +# python -m unittest -v test_new_subroutines.py +# #HACK: if the tests are not split up the windows version has +# # an error loading the shared lib. +# python -m unittest -v test_partial_derivs.TestFunctionPartials +# python -m unittest -v test_partial_derivs.TestResidualPartials +# python -m unittest -v test_consurf_partial_derivs.TestResidualDPartials +# python -m unittest -v test_consurf_partial_derivs.TestConSurfDerivsPartials +# python -m unittest -v test_stab_derivs_partial_derivs.TestResidualUPartials +# python -m unittest -v test_stab_derivs_partial_derivs.TestStabDerivDerivsPartials -python -m unittest -v test_body_axis_derivs_partial_derivs.py -python -m unittest -v test_total_derivs.py +# python -m unittest -v test_body_axis_derivs_partial_derivs.py +# python -m unittest -v test_total_derivs.py -# test openmdao wrapper and basic optimization results -python -m unittest -v test_om_wrapper.py +# # test openmdao wrapper and basic optimization results +# python -m unittest -v test_om_wrapper.py From 1aad6d21996a9469e4473d23d5137226cf88461e Mon Sep 17 00:00:00 2001 From: Joshua Anibal Date: Wed, 25 Mar 2026 18:49:03 -0700 Subject: [PATCH 28/43] add flang flag --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 004bf81..f019748 100644 --- a/meson.build +++ b/meson.build @@ -127,7 +127,7 @@ if ff.get_id() == 'gcc' ff_args += ['-std=legacy'] elif ff.get_id() == 'llvm-flang' - ff_args += ['-ffixed-form', '-w'] + ff_args += ['-fno-init-global-zero', '-ffixed-form', '-w'] endif From aeef46108312d8d8eb479ce5f3a9b535dfba8256 Mon Sep 17 00:00:00 2001 From: Joshua Anibal Date: Thu, 26 Mar 2026 06:35:21 -0700 Subject: [PATCH 29/43] try to see if new flag is actually used --- pyproject.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 60344ae..f31724f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,6 +62,11 @@ select = "*-win_amd64" # environment = { CMAKE_PREFIX_PATH="c:/opt/64" } environment = { PKG_CONFIG_PATH="c:/opt/64/lib/pkgconfig" } +# pyproject.toml +[tool.cibuildwheel.config-settings] +setup-args = ["-Dbuildtype=debug"] # optional, but helps +compile-args = ["-v"] # this is the key one — makes ninja verbose + [project.urls] homepage = "https://github.com/joanibal/OptVL" # documentation = From 30f51649d4ca3d5a0c581c43e840d58408b85c1e Mon Sep 17 00:00:00 2001 From: Joshua Anibal Date: Thu, 26 Mar 2026 08:58:32 -0700 Subject: [PATCH 30/43] try to reduce .data size further and increase airfoil data size --- src/ad_src/forward_ad_src/amake_d.f | 3 ++ src/ad_src/forward_ad_src/asetup_d.f | 30 ++++++++--------- src/aio.f | 1 + src/amake.f | 3 ++ src/aoml.f | 3 ++ src/asetup.f | 24 +++++++------- src/f2py/libavl.pyf | 1 + src/includes/ADIMEN.INC | 2 +- src/includes/AVL.INC | 48 ++++++++++------------------ src/includes/AVL_oml.INC | 16 ++++++++++ 10 files changed, 71 insertions(+), 60 deletions(-) create mode 100644 src/includes/AVL_oml.INC diff --git a/src/ad_src/forward_ad_src/amake_d.f b/src/ad_src/forward_ad_src/amake_d.f index d59880c..a075467 100644 --- a/src/ad_src/forward_ad_src/amake_d.f +++ b/src/ad_src/forward_ad_src/amake_d.f @@ -203,6 +203,7 @@ SUBROUTINE UPDATE_SURFACES_D() SUBROUTINE MAKESURF_D(isurf) INCLUDE 'AVL.INC' INCLUDE 'AVL_surf.INC' + INCLUDE 'AVL_oml.INC' INCLUDE 'AVL_ad_seeds.inc' C C @@ -1344,6 +1345,7 @@ SUBROUTINE MAKESURF_D(isurf) SUBROUTINE MAKESURF_MESH_D(isurf) INCLUDE 'AVL.INC' INCLUDE 'AVL_surf.INC' + INCLUDE 'AVL_oml.INC' INCLUDE 'AVL_ad_seeds.inc' C working variables (AVL original) INTEGER isurf @@ -2629,6 +2631,7 @@ SUBROUTINE MAKESURF_MESH_D(isurf) SUBROUTINE SDUPL_D(nn, ypt, msg) INCLUDE 'AVL.INC' INCLUDE 'AVL_surf.INC' + INCLUDE 'AVL_oml.INC' INCLUDE 'AVL_ad_seeds.inc' CHARACTER*(*) msg INTEGER idx_vor diff --git a/src/ad_src/forward_ad_src/asetup_d.f b/src/ad_src/forward_ad_src/asetup_d.f index 94ef1ec..efaedbe 100644 --- a/src/ad_src/forward_ad_src/asetup_d.f +++ b/src/ad_src/forward_ad_src/asetup_d.f @@ -170,23 +170,23 @@ SUBROUTINE VELSUM_D() C DO i=1,nvor DO k=1,3 - vc(k, i) = 0.0 + ! vc(k, i) = 0.0 vv_diff(k, i) = 0.D0 vv(k, i) = 0.0 C--- h.v. velocity at control points and vortex midpoints DO j=1,nvor - vc(k, i) = vc(k, i) + wc_gam(k, i, j)*gam(j) + ! vc(k, i) = vc(k, i) + wc_gam(k, i, j)*gam(j) vv_diff(k, i) = vv_diff(k, i) + gam(j)*wv_gam_diff(k, i, j) + + wv_gam(k, i, j)*gam_diff(j) vv(k, i) = vv(k, i) + wv_gam(k, i, j)*gam(j) ENDDO DO n=1,numax - vc_u(k, i, n) = 0.0 + ! vc_u(k, i, n) = 0.0 vv_u_diff(k, i, n) = 0.D0 vv_u(k, i, n) = 0.0 DO j=1,nvor - vc_u(k, i, n) = vc_u(k, i, n) + wc_gam(k, i, j)*gam_u(j, n - + ) + ! vc_u(k, i, n) = vc_u(k, i, n) + wc_gam(k, i, j)*gam_u(j, n + ! + ) vv_u_diff(k, i, n) = vv_u_diff(k, i, n) + gam_u(j, n)* + wv_gam_diff(k, i, j) + wv_gam(k, i, j)*gam_u_diff(j, n) vv_u(k, i, n) = vv_u(k, i, n) + wv_gam(k, i, j)*gam_u(j, n @@ -194,12 +194,12 @@ SUBROUTINE VELSUM_D() ENDDO ENDDO DO n=1,ncontrol - vc_d(k, i, n) = 0.0 + ! vc_d(k, i, n) = 0.0 vv_d_diff(k, i, n) = 0.D0 vv_d(k, i, n) = 0.0 DO j=1,nvor - vc_d(k, i, n) = vc_d(k, i, n) + wc_gam(k, i, j)*gam_d(j, n - + ) + ! vc_d(k, i, n) = vc_d(k, i, n) + wc_gam(k, i, j)*gam_d(j, n + ! + ) vv_d_diff(k, i, n) = vv_d_diff(k, i, n) + gam_d(j, n)* + wv_gam_diff(k, i, j) + wv_gam(k, i, j)*gam_d_diff(j, n) vv_d(k, i, n) = vv_d(k, i, n) + wv_gam(k, i, j)*gam_d(j, n @@ -207,11 +207,11 @@ SUBROUTINE VELSUM_D() ENDDO ENDDO DO n=1,ndesign - vc_g(k, i, n) = 0.0 + ! vc_g(k, i, n) = 0.0 vv_g(k, i, n) = 0.0 DO j=1,nvor - vc_g(k, i, n) = vc_g(k, i, n) + wc_gam(k, i, j)*gam_g(j, n - + ) + ! vc_g(k, i, n) = vc_g(k, i, n) + wc_gam(k, i, j)*gam_g(j, n + ! + ) vv_g(k, i, n) = vv_g(k, i, n) + wv_gam(k, i, j)*gam_g(j, n + ) ENDDO @@ -228,21 +228,21 @@ SUBROUTINE VELSUM_D() + (2) + wvsrd_u(k, i, 3)*vinf(3) + wvsrd_u(k, i, 4)*wrot(1) + + wvsrd_u(k, i, 5)*wrot(2) + wvsrd_u(k, i, 6)*wrot(3) C--- total velocity at control points and vortex midpoints - wc(k, i) = vc(k, i) + wcsrd(k, i) + ! wc(k, i) = vc(k, i) + wcsrd(k, i) wv_diff(k, i) = vv_diff(k, i) + wvsrd_diff(k, i) wv(k, i) = vv(k, i) + wvsrd(k, i) DO n=1,numax - wc_u(k, i, n) = vc_u(k, i, n) + wcsrd_u(k, i, n) + ! wc_u(k, i, n) = vc_u(k, i, n) + wcsrd_u(k, i, n) wv_u_diff(k, i, n) = vv_u_diff(k, i, n) wv_u(k, i, n) = vv_u(k, i, n) + wvsrd_u(k, i, n) ENDDO DO n=1,ndmax - wc_d(k, i, n) = vc_d(k, i, n) + ! wc_d(k, i, n) = vc_d(k, i, n) wv_d_diff(k, i, n) = vv_d_diff(k, i, n) wv_d(k, i, n) = vv_d(k, i, n) ENDDO DO n=1,ngmax - wc_g(k, i, n) = vc_g(k, i, n) + ! wc_g(k, i, n) = vc_g(k, i, n) wv_g(k, i, n) = vv_g(k, i, n) ENDDO ENDDO diff --git a/src/aio.f b/src/aio.f index 38716ce..0b24d64 100644 --- a/src/aio.f +++ b/src/aio.f @@ -1,6 +1,7 @@ subroutine write_tecplot(file_name, add_time, solution_time) C INCLUDE 'AVL.INC' + INCLUDE 'AVL_oml.INC' C LOGICAL LRANGEALL INTEGER LU, nChords, nStrips, nPts diff --git a/src/amake.f b/src/amake.f index 798cf37..39385df 100644 --- a/src/amake.f +++ b/src/amake.f @@ -25,6 +25,7 @@ SUBROUTINE MAKESURF(ISURF) C-------------------------------------------------------------- INCLUDE 'AVL.INC' INCLUDE 'AVL_surf.INC' + INCLUDE 'AVL_oml.INC' C C REAL XYZLEL(3), XYZLER(3) @@ -666,6 +667,7 @@ subroutine makesurf_mesh(isurf) c-------------------------------------------------------------- INCLUDE 'AVL.INC' INCLUDE 'AVL_surf.INC' + INCLUDE 'AVL_oml.INC' ! input/output integer isurf @@ -1719,6 +1721,7 @@ SUBROUTINE SDUPL(NN, Ypt,MSG) C----------------------------------- INCLUDE 'AVL.INC' INCLUDE 'AVL_surf.INC' + INCLUDE 'AVL_oml.INC' CHARACTER*(*) MSG integer idx_vor C diff --git a/src/aoml.f b/src/aoml.f index 6bfbbd2..8d8dce3 100644 --- a/src/aoml.f +++ b/src/aoml.f @@ -23,6 +23,7 @@ SUBROUTINE CPOML(save_file) C INCLUDE 'AVL.INC' + INCLUDE 'AVL_oml.INC' C logical :: save_file LOGICAL LRANGEALL @@ -59,6 +60,7 @@ SUBROUTINE CPTHK C...COMMENTS C INCLUDE 'AVL.INC' + INCLUDE 'AVL_oml.INC' C PARAMETER (NCMAX=256) DIMENSION AICT(NCMAX,NCMAX) ! AIC for no normal flow BC @@ -186,6 +188,7 @@ SUBROUTINE CPDUMP(save_file) C...COMMENTS C code reader in read_cpoml.c C INCLUDE 'AVL.INC' + INCLUDE 'AVL_oml.INC' logical :: save_file integer idx_mesh, idx_mesh_surf, idx_LE, idx_LE_lo, idx_LE_up diff --git a/src/asetup.f b/src/asetup.f index 90df01c..8ce5400 100644 --- a/src/asetup.f +++ b/src/asetup.f @@ -520,34 +520,34 @@ SUBROUTINE VELSUM() C DO I = 1, NVOR DO K = 1, 3 - VC(K,I) = 0.0 + ! VC(K,I) = 0.0 VV(K,I) = 0.0 C--- h.v. velocity at control points and vortex midpoints DO J = 1, NVOR - VC(K,I) = VC(K,I) + WC_GAM(K,I,J)*GAM(J) + ! VC(K,I) = VC(K,I) + WC_GAM(K,I,J)*GAM(J) VV(K,I) = VV(K,I) + WV_GAM(K,I,J)*GAM(J) ENDDO DO N = 1, NUMAX - VC_U(K,I,N) = 0.0 + ! VC_U(K,I,N) = 0.0 VV_U(K,I,N) = 0.0 DO J = 1, NVOR - VC_U(K,I,N) = VC_U(K,I,N) + WC_GAM(K,I,J)*GAM_U(J,N) + ! VC_U(K,I,N) = VC_U(K,I,N) + WC_GAM(K,I,J)*GAM_U(J,N) VV_U(K,I,N) = VV_U(K,I,N) + WV_GAM(K,I,J)*GAM_U(J,N) ENDDO ENDDO DO N = 1, NCONTROL - VC_D(K,I,N) = 0.0 + ! VC_D(K,I,N) = 0.0 VV_D(K,I,N) = 0.0 DO J = 1, NVOR - VC_D(K,I,N) = VC_D(K,I,N) + WC_GAM(K,I,J)*GAM_D(J,N) + ! VC_D(K,I,N) = VC_D(K,I,N) + WC_GAM(K,I,J)*GAM_D(J,N) VV_D(K,I,N) = VV_D(K,I,N) + WV_GAM(K,I,J)*GAM_D(J,N) ENDDO ENDDO DO N = 1, NDESIGN - VC_G(K,I,N) = 0.0 + ! VC_G(K,I,N) = 0.0 VV_G(K,I,N) = 0.0 DO J = 1, NVOR - VC_G(K,I,N) = VC_G(K,I,N) + WC_GAM(K,I,J)*GAM_G(J,N) + ! VC_G(K,I,N) = VC_G(K,I,N) + WC_GAM(K,I,J)*GAM_G(J,N) VV_G(K,I,N) = VV_G(K,I,N) + WV_GAM(K,I,J)*GAM_G(J,N) ENDDO ENDDO @@ -565,18 +565,18 @@ SUBROUTINE VELSUM() & + WVSRD_U(K,I,5)*WROT(2) & + WVSRD_U(K,I,6)*WROT(3) C--- total velocity at control points and vortex midpoints - WC(K,I) = VC(K,I) + WCSRD(K,I) + ! WC(K,I) = VC(K,I) + WCSRD(K,I) WV(K,I) = VV(K,I) + WVSRD(K,I) DO N = 1, NUMAX - WC_U(K,I,N) = VC_U(K,I,N) + WCSRD_U(K,I,N) + ! WC_U(K,I,N) = VC_U(K,I,N) + WCSRD_U(K,I,N) WV_U(K,I,N) = VV_U(K,I,N) + WVSRD_U(K,I,N) ENDDO DO N = 1, NDMAX - WC_D(K,I,N) = VC_D(K,I,N) + ! WC_D(K,I,N) = VC_D(K,I,N) WV_D(K,I,N) = VV_D(K,I,N) ENDDO DO N = 1, NGMAX - WC_G(K,I,N) = VC_G(K,I,N) + ! WC_G(K,I,N) = VC_G(K,I,N) WV_G(K,I,N) = VV_G(K,I,N) ENDDO C diff --git a/src/f2py/libavl.pyf b/src/f2py/libavl.pyf index a4b0dad..d847c0f 100644 --- a/src/f2py/libavl.pyf +++ b/src/f2py/libavl.pyf @@ -9,6 +9,7 @@ python module libavl ! in subroutine avl ! in :libavl:avl.f include '../includes/AVL.INC' include '../includes/AVL_surf.INC' + include '../includes/AVL_oml.INC' include '../includes/AVL_ad_seeds.inc' ! parameters from diff --git a/src/includes/ADIMEN.INC b/src/includes/ADIMEN.INC index b9465f7..745304f 100644 --- a/src/includes/ADIMEN.INC +++ b/src/includes/ADIMEN.INC @@ -78,6 +78,6 @@ ! PARAMETER (NOBMAX=1) ! max number of off body points PARAMETER (ICONX=20) ! max number of control or design variable declaration lines per section - PARAMETER (IBX=2) ! max number of airfoil coordinates + PARAMETER (IBX=50) ! max number of airfoil coordinates ! PARAMETER (IBX=300) ! max number of airfoil coordinates diff --git a/src/includes/AVL.INC b/src/includes/AVL.INC index 93612b2..e042fda 100644 --- a/src/includes/AVL.INC +++ b/src/includes/AVL.INC @@ -44,10 +44,10 @@ C & FEVDEF, ! default eigenvalue save file & TITLE, ! configuration title & STITLE(NFMAX), ! surface title - & AFILES(NSMAX,NFMAX), ! airfoil file names + & AFILES(NSECMAX,NFMAX), ! airfoil file names & BTITLE(NBMAX), ! body title & BFILES(NBMAX), ! body file names - & NACA(NSMAX,NFMAX), ! naca section names + & NACA(NSECMAX,NFMAX), ! naca section names & RTITLE(NRMAX), ! run case title & DNAME(NDMAX), ! control variable name & GNAME(NGMAX), ! design variable name @@ -600,22 +600,6 @@ cc#else & RES_U(NVMAX,NUMAX), ! residual for gamma_u lin sys & RES_D(NVMAX,NDMAX) ! residual for gamma_d lin. sys -cc#ifdef USE_CPOML - REAL(kind=avl_real) XYN1 - REAL(kind=avl_real) XYN2 - REAL(kind=avl_real) ZLON1 - REAL(kind=avl_real) ZLON2 - REAL(kind=avl_real) ZUPN1 - REAL(kind=avl_real) ZUPN2 - REAL(kind=avl_real) XYZSURF - REAL(kind=avl_real) CPSURF - COMMON /VRTX_S/ - & XYN1(2,NVMAX), XYN2(2,NVMAX), ! left/right aft-node of element - & ZLON1(NVMAX), ZLON2(NVMAX), ! left/right lower z-coord of aft-node - & ZUPN1(NVMAX), ZUPN2(NVMAX), ! left/right upper z-coord of aft-node - & XYZSURF(3, NVMAX, NFMAX), - & CPSURF(NVMAX,NFMAX) -cc#endif C COMMON /BODY_I/ & NL(NBMAX), ! number of source-line nodes in body @@ -644,13 +628,13 @@ C REAL(kind=avl_real) AMACH REAL(kind=avl_real) VC - REAL(kind=avl_real) VC_U - REAL(kind=avl_real) VC_D - REAL(kind=avl_real) VC_G - REAL(kind=avl_real) WC - REAL(kind=avl_real) WC_U - REAL(kind=avl_real) WC_D - REAL(kind=avl_real) WC_G +c REAL(kind=avl_real) VC_U +c REAL(kind=avl_real) VC_D +c REAL(kind=avl_real) VC_G +c REAL(kind=avl_real) WC +c REAL(kind=avl_real) WC_U +c REAL(kind=avl_real) WC_D +c REAL(kind=avl_real) WC_G REAL(kind=avl_real) WV REAL(kind=avl_real) WV_U REAL(kind=avl_real) WV_D @@ -667,14 +651,14 @@ cc & AICN(NVMAX,NVMAX), ! normalwash AIC matrix (and VL system matrix) cc & WC_GAM(3,NVMAX,NVMAX), ! c.p. velocity/Gamma influence matrix cc & WV_GAM(3,NVMAX,NVMAX), ! h.v. velocity/Gamma influence matrix & VC(3,NVMAX), ! h.v. induced velocity at c.p. - & VC_U(3,NVMAX,NUMAX), - & VC_D(3,NVMAX,NDMAX), - & VC_G(3,NVMAX,NGMAX), +c & VC_U(3,NVMAX,NUMAX), +c & VC_D(3,NVMAX,NDMAX), +c & VC_G(3,NVMAX,NGMAX), C - & WC(3,NVMAX), ! total induced velocity at c.p. (used in residual) - & WC_U(3,NVMAX,NUMAX), - & WC_D(3,NVMAX,NDMAX), - & WC_G(3,NVMAX,NGMAX), +c & WC(3,NVMAX), ! total induced velocity at c.p. (used in residual) +C & WC_U(3,NVMAX,NUMAX), +C & WC_D(3,NVMAX,NDMAX), +C & WC_G(3,NVMAX,NGMAX), C & VV(3,NVMAX), ! h.v. induced velocity at h.v. & VV_U(3,NVMAX,NUMAX), diff --git a/src/includes/AVL_oml.INC b/src/includes/AVL_oml.INC new file mode 100644 index 0000000..6cbc72a --- /dev/null +++ b/src/includes/AVL_oml.INC @@ -0,0 +1,16 @@ +cc#ifdef USE_CPOML + REAL(kind=avl_real) XYN1 + REAL(kind=avl_real) XYN2 + REAL(kind=avl_real) ZLON1 + REAL(kind=avl_real) ZLON2 + REAL(kind=avl_real) ZUPN1 + REAL(kind=avl_real) ZUPN2 + REAL(kind=avl_real) XYZSURF + REAL(kind=avl_real) CPSURF + COMMON /VRTX_S/ + & XYN1(2,NVMAX), XYN2(2,NVMAX), ! left/right aft-node of element + & ZLON1(NVMAX), ZLON2(NVMAX), ! left/right lower z-coord of aft-node + & ZUPN1(NVMAX), ZUPN2(NVMAX), ! left/right upper z-coord of aft-node + & XYZSURF(3, NVMAX, NFMAX), + & CPSURF(NVMAX,NFMAX) +cc#endif \ No newline at end of file From ee90274f13b204cf62ee5213e1fb2b28081982aa Mon Sep 17 00:00:00 2001 From: Joshua Anibal Date: Thu, 26 Mar 2026 09:07:39 -0700 Subject: [PATCH 31/43] restore all constants to prior size --- src/includes/ADIMEN.INC | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/includes/ADIMEN.INC b/src/includes/ADIMEN.INC index 745304f..3a73bb6 100644 --- a/src/includes/ADIMEN.INC +++ b/src/includes/ADIMEN.INC @@ -78,6 +78,6 @@ ! PARAMETER (NOBMAX=1) ! max number of off body points PARAMETER (ICONX=20) ! max number of control or design variable declaration lines per section - PARAMETER (IBX=50) ! max number of airfoil coordinates + PARAMETER (IBX=200) ! max number of airfoil coordinates ! PARAMETER (IBX=300) ! max number of airfoil coordinates From 989b9c7df0276d8ed742e38c17e8aafa014233d7 Mon Sep 17 00:00:00 2001 From: Joshua Anibal Date: Thu, 26 Mar 2026 09:54:06 -0700 Subject: [PATCH 32/43] half way --- src/includes/ADIMEN.INC | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/includes/ADIMEN.INC b/src/includes/ADIMEN.INC index 3a73bb6..83adf32 100644 --- a/src/includes/ADIMEN.INC +++ b/src/includes/ADIMEN.INC @@ -78,6 +78,6 @@ ! PARAMETER (NOBMAX=1) ! max number of off body points PARAMETER (ICONX=20) ! max number of control or design variable declaration lines per section - PARAMETER (IBX=200) ! max number of airfoil coordinates + PARAMETER (IBX=125) ! max number of airfoil coordinates ! PARAMETER (IBX=300) ! max number of airfoil coordinates From d4ee5de7eaba6d0987a745ea820ad745f6d5a997 Mon Sep 17 00:00:00 2001 From: Joshua Anibal Date: Thu, 26 Mar 2026 16:47:55 -0700 Subject: [PATCH 33/43] ibx=75 --- src/includes/ADIMEN.INC | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/includes/ADIMEN.INC b/src/includes/ADIMEN.INC index 83adf32..a75f689 100644 --- a/src/includes/ADIMEN.INC +++ b/src/includes/ADIMEN.INC @@ -78,6 +78,6 @@ ! PARAMETER (NOBMAX=1) ! max number of off body points PARAMETER (ICONX=20) ! max number of control or design variable declaration lines per section - PARAMETER (IBX=125) ! max number of airfoil coordinates + PARAMETER (IBX=75) ! max number of airfoil coordinates ! PARAMETER (IBX=300) ! max number of airfoil coordinates From 978e4c413b1130b07b728f76169006ccd3699e97 Mon Sep 17 00:00:00 2001 From: Joshua Anibal Date: Thu, 26 Mar 2026 16:56:40 -0700 Subject: [PATCH 34/43] ibx=100 --- src/includes/ADIMEN.INC | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/includes/ADIMEN.INC b/src/includes/ADIMEN.INC index a75f689..6f0f9e9 100644 --- a/src/includes/ADIMEN.INC +++ b/src/includes/ADIMEN.INC @@ -78,6 +78,6 @@ ! PARAMETER (NOBMAX=1) ! max number of off body points PARAMETER (ICONX=20) ! max number of control or design variable declaration lines per section - PARAMETER (IBX=75) ! max number of airfoil coordinates + PARAMETER (IBX=100) ! max number of airfoil coordinates ! PARAMETER (IBX=300) ! max number of airfoil coordinates From 9d29e4979528ca8070abf4062615b902242812d6 Mon Sep 17 00:00:00 2001 From: Joshua Anibal Date: Thu, 26 Mar 2026 18:16:46 -0700 Subject: [PATCH 35/43] ibx=200 and remove XLASEC, etc. with linking flag --- meson.build | 1 + src/ainput.f | 64 +++++++++---------- src/amake.f | 126 +++++++++++++++++++------------------- src/includes/ADIMEN.INC | 2 +- src/includes/AVL_surf.INC | 16 ++--- 5 files changed, 105 insertions(+), 104 deletions(-) diff --git a/meson.build b/meson.build index f019748..86212cc 100644 --- a/meson.build +++ b/meson.build @@ -128,6 +128,7 @@ if ff.get_id() == 'gcc' elif ff.get_id() == 'llvm-flang' ff_args += ['-fno-init-global-zero', '-ffixed-form', '-w'] + link_args_args += ['-fno-init-global-zero'] endif diff --git a/src/ainput.f b/src/ainput.f index 7e36f80..ce0fd98 100644 --- a/src/ainput.f +++ b/src/ainput.f @@ -605,14 +605,14 @@ SUBROUTINE INPUT(LUN,FNAME,FERR) TASEC(2,ISEC, ISURF) = 0.0 cc#ifdef USE_CPOML C - XLASEC(1,ISEC,ISURF) = 0 - XLASEC(2,ISEC,ISURF) = 0 - XUASEC(1,ISEC,ISURF) = 0 - XUASEC(2,ISEC,ISURF) = 0 - ZLASEC(1,ISEC,ISURF) = 0 - ZLASEC(2,ISEC,ISURF) = 0 - ZUASEC(1,ISEC,ISURF) = 0 - ZUASEC(2,ISEC,ISURF) = 0 + ! XLASEC(1,ISEC,ISURF) = 0 + ! XLASEC(2,ISEC,ISURF) = 0 + ! XUASEC(1,ISEC,ISURF) = 0 + ! XUASEC(2,ISEC,ISURF) = 0 + ! ZLASEC(1,ISEC,ISURF) = 0 + ! ZLASEC(2,ISEC,ISURF) = 0 + ! ZUASEC(1,ISEC,ISURF) = 0 + ! ZUASEC(2,ISEC,ISURF) = 0 CASEC(2,ISEC,ISURF) = 0 CASEC(2,ISEC,ISURF) = 0 cc#endif @@ -710,10 +710,10 @@ SUBROUTINE INPUT(LUN,FNAME,FERR) ZF = 0 ENDIF TH = ATAN(SLP) - XLASEC(I,ISEC,ISURF) = XF + 0.5*THK*SIN(TH) - XUASEC(I,ISEC,ISURF) = XF - 0.5*THK*SIN(TH) - ZLASEC(I,ISEC,ISURF) = ZF - 0.5*THK*COS(TH) - ZUASEC(I,ISEC,ISURF) = ZF + 0.5*THK*COS(TH) + ! XLASEC(I,ISEC,ISURF) = XF + 0.5*THK*SIN(TH) + ! XUASEC(I,ISEC,ISURF) = XF - 0.5*THK*SIN(TH) + ! ZLASEC(I,ISEC,ISURF) = ZF - 0.5*THK*COS(TH) + ! ZUASEC(I,ISEC,ISURF) = ZF + 0.5*THK*COS(TH) CASEC(I,ISEC,ISURF) = ZF cc#endif ENDDO @@ -725,15 +725,15 @@ SUBROUTINE INPUT(LUN,FNAME,FERR) idx_upper = NASEC(ISEC,ISURF) - I +1 idx_lower = I - XSEC(I ,isec, isurf) = - & XUASEC(idx_upper, ISEC, ISURF) - XSEC(I+NASEC(ISEC,ISURF),isec, isurf) = - & XLASEC(idx_lower, ISEC, ISURF) +! XSEC(I ,isec, isurf) = +! & XUASEC(idx_upper, ISEC, ISURF) +! XSEC(I+NASEC(ISEC,ISURF),isec, isurf) = +! & XLASEC(idx_lower, ISEC, ISURF) - YSEC(I ,isec, isurf) = - & ZUASEC(idx_upper, ISEC, ISURF) - YSEC(I+NASEC(ISEC,ISURF),isec, isurf) = - & ZLASEC(idx_lower, ISEC, ISURF) +! YSEC(I ,isec, isurf) = +! & ZUASEC(idx_upper, ISEC, ISURF) +! YSEC(I+NASEC(ISEC,ISURF),isec, isurf) = +! & ZLASEC(idx_lower, ISEC, ISURF) enddo @@ -827,10 +827,10 @@ SUBROUTINE INPUT(LUN,FNAME,FERR) cc#ifdef USE_CPOML C... lower/upper coordinates (for oml) CALL AKIMA(XIN,YIN,NIN,XASEC(I,ISEC,ISURF),ZC,DUMMY) - XLASEC(I,ISEC,ISURF) = XASEC(I,ISEC,ISURF) - XUASEC(I,ISEC,ISURF) = XASEC(I,ISEC,ISURF) - ZLASEC(I,ISEC,ISURF) = ZC - 0.5*TASEC(I,ISEC,ISURF) - ZUASEC(I,ISEC,ISURF) = ZC + 0.5*TASEC(I,ISEC,ISURF) + ! XLASEC(I,ISEC,ISURF) = XASEC(I,ISEC,ISURF) + ! XUASEC(I,ISEC,ISURF) = XASEC(I,ISEC,ISURF) + ! ZLASEC(I,ISEC,ISURF) = ZC - 0.5*TASEC(I,ISEC,ISURF) + ! ZUASEC(I,ISEC,ISURF) = ZC + 0.5*TASEC(I,ISEC,ISURF) CASEC(I,ISEC,ISURF) = ZC cc#endif END DO @@ -919,10 +919,10 @@ SUBROUTINE INPUT(LUN,FNAME,FERR) SASEC(I,ISEC,ISURF) = 0.0 TASEC(I,ISEC,ISURF) = 0.0 cc#ifdef USE_CPOML - XLASEC(I,ISEC,ISURF) = 0 - XUASEC(I,ISEC,ISURF) = 0 - ZLASEC(I,ISEC,ISURF) = 0 - ZUASEC(I,ISEC,ISURF) = 0 + ! XLASEC(I,ISEC,ISURF) = 0 + ! XUASEC(I,ISEC,ISURF) = 0 + ! ZLASEC(I,ISEC,ISURF) = 0 + ! ZUASEC(I,ISEC,ISURF) = 0 CASEC(I,ISEC,ISURF) = 0 cc#endif ENDDO @@ -950,10 +950,10 @@ SUBROUTINE INPUT(LUN,FNAME,FERR) cc#ifdef USE_CPOML C... lower/upper coordinates (for oml) CALL AKIMA(XIN,YIN,NIN,XASEC(I,ISEC,ISURF),ZC,DUMMY) - XLASEC(I,ISEC,ISURF) = XASEC(I,ISEC,ISURF) - XUASEC(I,ISEC,ISURF) = XASEC(I,ISEC,ISURF) - ZLASEC(I,ISEC,ISURF) = ZC - 0.5*TASEC(I,ISEC,ISURF) - ZUASEC(I,ISEC,ISURF) = ZC + 0.5*TASEC(I,ISEC,ISURF) + ! XLASEC(I,ISEC,ISURF) = XASEC(I,ISEC,ISURF) + ! XUASEC(I,ISEC,ISURF) = XASEC(I,ISEC,ISURF) + ! ZLASEC(I,ISEC,ISURF) = ZC - 0.5*TASEC(I,ISEC,ISURF) + ! ZUASEC(I,ISEC,ISURF) = ZC + 0.5*TASEC(I,ISEC,ISURF) CASEC(I,ISEC,ISURF) = ZC cc#endif END DO diff --git a/src/amake.f b/src/amake.f index 39385df..9729faf 100644 --- a/src/amake.f +++ b/src/amake.f @@ -587,35 +587,35 @@ SUBROUTINE MAKESURF(ISURF) ! ZUASEC - CALL AKIMA( XLASEC(1,ISEC,ISURF), ZLASEC(1,ISEC,ISURF), NSL, - & XPT(IVC+1), ZL_L, DSDX ) - CALL AKIMA( XUASEC(1,ISEC,ISURF), ZUASEC(1,ISEC,ISURF), NSL, - & XPT(IVC+1), ZU_L, DSDX ) -C - CALL AKIMA( XLASEC(1,ISEC+1,ISURF), ZLASEC(1,ISEC+1,ISURF), - & NSR, XPT(IVC+1), ZL_R, DSDX ) - CALL AKIMA( XUASEC(1,ISEC+1,ISURF), ZUASEC(1,ISEC+1,ISURF), - & NSR, XPT(IVC+1), ZU_R, DSDX ) -C - XYN1(1,idx_vor) = RLE1(1,idx_strip) + - & XPT(IVC+1)*CHORD1(idx_strip) - XYN1(2,idx_vor) = RLE1(2,idx_strip) +! CALL AKIMA( XLASEC(1,ISEC,ISURF), ZLASEC(1,ISEC,ISURF), NSL, +! & XPT(IVC+1), ZL_L, DSDX ) +! CALL AKIMA( XUASEC(1,ISEC,ISURF), ZUASEC(1,ISEC,ISURF), NSL, +! & XPT(IVC+1), ZU_L, DSDX ) +! C +! CALL AKIMA( XLASEC(1,ISEC+1,ISURF), ZLASEC(1,ISEC+1,ISURF), +! & NSR, XPT(IVC+1), ZL_R, DSDX ) +! CALL AKIMA( XUASEC(1,ISEC+1,ISURF), ZUASEC(1,ISEC+1,ISURF), +! & NSR, XPT(IVC+1), ZU_R, DSDX ) +! C +! XYN1(1,idx_vor) = RLE1(1,idx_strip) + +! & XPT(IVC+1)*CHORD1(idx_strip) +! XYN1(2,idx_vor) = RLE1(2,idx_strip) - ZL = (1.-F1)*ZL_L + F1 *ZL_R - ZU = (1.-F1)*ZU_L + F1 *ZU_R +! ZL = (1.-F1)*ZL_L + F1 *ZL_R +! ZU = (1.-F1)*ZU_L + F1 *ZU_R - ZLON1(idx_vor) = RLE1(3,idx_strip) + ZL*CHORD1(idx_strip) - ZUPN1(idx_vor) = RLE1(3,idx_strip) + ZU*CHORD1(idx_strip) -C - XYN2(1,idx_vor) = RLE2(1,idx_strip) + - & XPT(IVC+1)*CHORD2(idx_strip) - XYN2(2,idx_vor) = RLE2(2,idx_strip) +! ZLON1(idx_vor) = RLE1(3,idx_strip) + ZL*CHORD1(idx_strip) +! ZUPN1(idx_vor) = RLE1(3,idx_strip) + ZU*CHORD1(idx_strip) +! C +! XYN2(1,idx_vor) = RLE2(1,idx_strip) + +! & XPT(IVC+1)*CHORD2(idx_strip) +! XYN2(2,idx_vor) = RLE2(2,idx_strip) - ZL = (1.-F2)*ZL_L + F2 *ZL_R - ZU = (1.-F2)*ZU_L + F2 *ZU_R +! ZL = (1.-F2)*ZL_L + F2 *ZL_R +! ZU = (1.-F2)*ZU_L + F2 *ZU_R - ZLON2(idx_vor) = RLE2(3,idx_strip) + ZL*CHORD2(idx_strip) - ZUPN2(idx_vor) = RLE2(3,idx_strip) + ZU*CHORD2(idx_strip) +! ZLON2(idx_vor) = RLE2(3,idx_strip) + ZL*CHORD2(idx_strip) +! ZUPN2(idx_vor) = RLE2(3,idx_strip) + ZU*CHORD2(idx_strip) C cc#endif idx_vor = idx_vor + 1 @@ -1345,51 +1345,51 @@ subroutine makesurf_mesh(isurf) ! xptxind2 = (mesh_surf(1,idx_node_yp1+1) ! & - RLE2(1,idx_strip))/CHORD2(idx_strip) - ! Interpolate cross section on left side - CALL AKIMA( XLASEC(1,iptl,isurf), ZLASEC(1,iptl,isurf), - & NSL,xptxind1, ZL_L, DSDX ) - CALL AKIMA( XUASEC(1,iptl,isurf), ZUASEC(1,iptl,isurf), - & NSL,xptxind1, ZU_L, DSDX ) +! ! Interpolate cross section on left side +! CALL AKIMA( XLASEC(1,iptl,isurf), ZLASEC(1,iptl,isurf), +! & NSL,xptxind1, ZL_L, DSDX ) +! CALL AKIMA( XUASEC(1,iptl,isurf), ZUASEC(1,iptl,isurf), +! & NSL,xptxind1, ZU_L, DSDX ) - ! Interpolate cross section on right side - CALL AKIMA(XLASEC(1,iptr,isurf), - & ZLASEC(1,iptr,isurf),NSR, xptxind1, ZL_R, DSDX) +! ! Interpolate cross section on right side +! CALL AKIMA(XLASEC(1,iptr,isurf), +! & ZLASEC(1,iptr,isurf),NSR, xptxind1, ZL_R, DSDX) - CALL AKIMA(XUASEC(1,iptr,isurf), - & ZUASEC(1,iptr,isurf),NSR, xptxind1, ZU_R, DSDX) +! CALL AKIMA(XUASEC(1,iptr,isurf), +! & ZUASEC(1,iptr,isurf),NSR, xptxind1, ZU_R, DSDX) - ! Compute the left aft node of panel - ! X-point - XYN1(1,idx_vor) = RLE1(1,idx_strip) + - & xptxind1*CHORD1(idx_strip) +! ! Compute the left aft node of panel +! ! X-point +! XYN1(1,idx_vor) = RLE1(1,idx_strip) + +! & xptxind1*CHORD1(idx_strip) - ! Y-point - XYN1(2,idx_vor) = RLE1(2,idx_strip) +! ! Y-point +! XYN1(2,idx_vor) = RLE1(2,idx_strip) - ! Interpolate z from sections to left aft node of panel - ZL = (1.-f1)*ZL_L + f1 *ZL_R - ZU = (1.-f1)*ZU_L + f1 *ZU_R +! ! Interpolate z from sections to left aft node of panel +! ZL = (1.-f1)*ZL_L + f1 *ZL_R +! ZU = (1.-f1)*ZU_L + f1 *ZU_R - ! Store left aft z-point - ZLON1(idx_vor) = RLE1(3,idx_strip) + ZL*CHORD1(idx_strip) - ZUPN1(idx_vor) = RLE1(3,idx_strip) + ZU*CHORD1(idx_strip) +! ! Store left aft z-point +! ZLON1(idx_vor) = RLE1(3,idx_strip) + ZL*CHORD1(idx_strip) +! ZUPN1(idx_vor) = RLE1(3,idx_strip) + ZU*CHORD1(idx_strip) - ! Compute the right aft node of panel - ! X-point - XYN2(1,idx_vor) = RLE2(1,idx_strip) + - & xptxind1*CHORD2(idx_strip) +! ! Compute the right aft node of panel +! ! X-point +! XYN2(1,idx_vor) = RLE2(1,idx_strip) + +! & xptxind1*CHORD2(idx_strip) - ! Y-point - XYN2(2,idx_vor) = RLE2(2,idx_strip) +! ! Y-point +! XYN2(2,idx_vor) = RLE2(2,idx_strip) - ! Interpolate z from sections to right aft node of panel - ZL = (1.-f2)*ZL_L + f2 *ZL_R - ZU = (1.-f2)*ZU_L + f2 *ZU_R +! ! Interpolate z from sections to right aft node of panel +! ZL = (1.-f2)*ZL_L + f2 *ZL_R +! ZU = (1.-f2)*ZU_L + f2 *ZU_R - ! Store right aft z-point - ZLON2(idx_vor) = RLE2(3,idx_strip) + ZL*CHORD2(idx_strip) - ZUPN2(idx_vor) = RLE2(3,idx_strip) + ZU*CHORD2(idx_strip) +! ! Store right aft z-point +! ZLON2(idx_vor) = RLE2(3,idx_strip) + ZL*CHORD2(idx_strip) +! ZUPN2(idx_vor) = RLE2(3,idx_strip) + ZU*CHORD2(idx_strip) idx_vor = idx_vor + 1 @@ -1675,10 +1675,10 @@ subroutine set_section_coordinates(isec,isurf,x,y,n,nin,xfmin, & SASEC(i,isec,isurf)) call AKIMA(xin,tin,nin,XASEC(i,isec,isurf), & TASEC(i,isec,isurf),dummy) - XLASEC(i,isec,isurf) = XASEC(i,isec,isurf) - XUASEC(i,isec,isurf) = XASEC(i,isec,isurf) - ZLASEC(i,isec,isurf) = zc - 0.5*TASEC(i,isec,isurf) - ZUASEC(i,isec,isurf) = zc + 0.5*TASEC(i,isec,isurf) + ! XLASEC(i,isec,isurf) = XASEC(i,isec,isurf) + ! XUASEC(i,isec,isurf) = XASEC(i,isec,isurf) + ! ZLASEC(i,isec,isurf) = zc - 0.5*TASEC(i,isec,isurf) + ! ZUASEC(i,isec,isurf) = zc + 0.5*TASEC(i,isec,isurf) CASEC(i,isec,isurf) = zc end do diff --git a/src/includes/ADIMEN.INC b/src/includes/ADIMEN.INC index 6f0f9e9..3a73bb6 100644 --- a/src/includes/ADIMEN.INC +++ b/src/includes/ADIMEN.INC @@ -78,6 +78,6 @@ ! PARAMETER (NOBMAX=1) ! max number of off body points PARAMETER (ICONX=20) ! max number of control or design variable declaration lines per section - PARAMETER (IBX=100) ! max number of airfoil coordinates + PARAMETER (IBX=200) ! max number of airfoil coordinates ! PARAMETER (IBX=300) ! max number of airfoil coordinates diff --git a/src/includes/AVL_surf.INC b/src/includes/AVL_surf.INC index a6e4b65..aceca25 100644 --- a/src/includes/AVL_surf.INC +++ b/src/includes/AVL_surf.INC @@ -61,10 +61,10 @@ c REAL(kind=avl_real) YSEC REAL(kind=avl_real) XFMIN_R REAL(kind=avl_real) XFMAX_R - REAL(kind=avl_real) XLASEC - REAL(kind=avl_real) ZLASEC - REAL(kind=avl_real) XUASEC - REAL(kind=avl_real) ZUASEC +c REAL(kind=avl_real) XLASEC +c REAL(kind=avl_real) ZLASEC +c REAL(kind=avl_real) XUASEC +c REAL(kind=avl_real) ZUASEC REAL(kind=avl_real) CHORDS REAL(kind=avl_real) AINCS REAL(kind=avl_real) XASEC @@ -92,10 +92,10 @@ c & YSEC(IBX, NSECMAX, NFMAX), ! raw section input y coordinates & XFMIN_R(NSECMAX, NFMAX), ! section input lower x bound & XFMAX_R(NSECMAX, NFMAX), ! section input upper x bound - & XLASEC(IBX, NSECMAX, NFMAX), ! airfoil lower surface x-coords - & ZLASEC(IBX, NSECMAX, NFMAX), ! airfoil lower surface z-coords - & XUASEC(IBX, NSECMAX, NFMAX), ! airfoil upper surface x-coords - & ZUASEC(IBX, NSECMAX, NFMAX), ! airfoil upper surface z-coords +c & XLASEC(IBX, NSECMAX, NFMAX), ! airfoil lower surface x-coords +c & ZLASEC(IBX, NSECMAX, NFMAX), ! airfoil lower surface z-coords +c & XUASEC(IBX, NSECMAX, NFMAX), ! airfoil upper surface x-coords +c & ZUASEC(IBX, NSECMAX, NFMAX), ! airfoil upper surface z-coords & CHORDS(NSECMAX, NFMAX), ! chord length vectorm & AINCS(NSECMAX, NFMAX), ! incidence angle vector & XASEC(IBX, NSECMAX, NFMAX), ! the x coordinate aifoil section From de7d85cd6b13421cf456d30b5977ed4b01a7f545 Mon Sep 17 00:00:00 2001 From: Joshua Anibal Date: Thu, 26 Mar 2026 18:47:06 -0700 Subject: [PATCH 36/43] fix link flag --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 86212cc..2082aeb 100644 --- a/meson.build +++ b/meson.build @@ -128,7 +128,7 @@ if ff.get_id() == 'gcc' elif ff.get_id() == 'llvm-flang' ff_args += ['-fno-init-global-zero', '-ffixed-form', '-w'] - link_args_args += ['-fno-init-global-zero'] + link_args += ['-fno-init-global-zero'] endif From 629421fa65baf2914234ddf5c7f6a43675f75c90 Mon Sep 17 00:00:00 2001 From: Joshua Anibal Date: Thu, 26 Mar 2026 18:49:13 -0700 Subject: [PATCH 37/43] try ibx=50 for the section data --- src/includes/AVL_surf.INC | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/includes/AVL_surf.INC b/src/includes/AVL_surf.INC index aceca25..7a630b9 100644 --- a/src/includes/AVL_surf.INC +++ b/src/includes/AVL_surf.INC @@ -61,10 +61,10 @@ c REAL(kind=avl_real) YSEC REAL(kind=avl_real) XFMIN_R REAL(kind=avl_real) XFMAX_R -c REAL(kind=avl_real) XLASEC -c REAL(kind=avl_real) ZLASEC -c REAL(kind=avl_real) XUASEC -c REAL(kind=avl_real) ZUASEC + REAL(kind=avl_real) XLASEC + REAL(kind=avl_real) ZLASEC + REAL(kind=avl_real) XUASEC + REAL(kind=avl_real) ZUASEC REAL(kind=avl_real) CHORDS REAL(kind=avl_real) AINCS REAL(kind=avl_real) XASEC @@ -92,16 +92,16 @@ c REAL(kind=avl_real) ZUASEC & YSEC(IBX, NSECMAX, NFMAX), ! raw section input y coordinates & XFMIN_R(NSECMAX, NFMAX), ! section input lower x bound & XFMAX_R(NSECMAX, NFMAX), ! section input upper x bound -c & XLASEC(IBX, NSECMAX, NFMAX), ! airfoil lower surface x-coords -c & ZLASEC(IBX, NSECMAX, NFMAX), ! airfoil lower surface z-coords -c & XUASEC(IBX, NSECMAX, NFMAX), ! airfoil upper surface x-coords -c & ZUASEC(IBX, NSECMAX, NFMAX), ! airfoil upper surface z-coords + & XLASEC(50, NSECMAX, NFMAX), ! airfoil lower surface x-coords + & ZLASEC(50, NSECMAX, NFMAX), ! airfoil lower surface z-coords + & XUASEC(50, NSECMAX, NFMAX), ! airfoil upper surface x-coords + & ZUASEC(50, NSECMAX, NFMAX), ! airfoil upper surface z-coords & CHORDS(NSECMAX, NFMAX), ! chord length vectorm & AINCS(NSECMAX, NFMAX), ! incidence angle vector - & XASEC(IBX, NSECMAX, NFMAX), ! the x coordinate aifoil section - & CASEC(IBX, NSECMAX, NFMAX), ! camber line at xasec - & SASEC(IBX, NSECMAX, NFMAX), ! slope of camber line at xasec - & TASEC(IBX, NSECMAX, NFMAX), ! thickness at xasec + & XASEC(50, NSECMAX, NFMAX), ! the x coordinate aifoil section + & CASEC(50, NSECMAX, NFMAX), ! camber line at xasec + & SASEC(50, NSECMAX, NFMAX), ! slope of camber line at xasec + & TASEC(50, NSECMAX, NFMAX), ! thickness at xasec & CLCDSEC(6, NSECMAX, NFMAX), & CLCDSRF(6, NFMAX), & CLAF(NSECMAX, NFMAX), ! CL alpha (dCL/da) scaling factor From c5449f4bcec2c15088cc60bf6c53ec4bd12cc005 Mon Sep 17 00:00:00 2001 From: Joshua Anibal Date: Fri, 27 Mar 2026 06:17:43 -0700 Subject: [PATCH 38/43] try ibx=25 for the section data --- src/includes/AVL_surf.INC | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/includes/AVL_surf.INC b/src/includes/AVL_surf.INC index 7a630b9..63f7565 100644 --- a/src/includes/AVL_surf.INC +++ b/src/includes/AVL_surf.INC @@ -1,4 +1,6 @@ C !start added variables for python geometry minipulation + ! include ADIMEN.INC + LOGICAL LDUPL_B COMMON /BODY_GEOM_L/ @@ -92,16 +94,16 @@ c & YSEC(IBX, NSECMAX, NFMAX), ! raw section input y coordinates & XFMIN_R(NSECMAX, NFMAX), ! section input lower x bound & XFMAX_R(NSECMAX, NFMAX), ! section input upper x bound - & XLASEC(50, NSECMAX, NFMAX), ! airfoil lower surface x-coords - & ZLASEC(50, NSECMAX, NFMAX), ! airfoil lower surface z-coords - & XUASEC(50, NSECMAX, NFMAX), ! airfoil upper surface x-coords - & ZUASEC(50, NSECMAX, NFMAX), ! airfoil upper surface z-coords + & XLASEC(25, NSECMAX, NFMAX), ! airfoil lower surface x-coords + & ZLASEC(25, NSECMAX, NFMAX), ! airfoil lower surface z-coords + & XUASEC(25, NSECMAX, NFMAX), ! airfoil upper surface x-coords + & ZUASEC(25, NSECMAX, NFMAX), ! airfoil upper surface z-coords & CHORDS(NSECMAX, NFMAX), ! chord length vectorm & AINCS(NSECMAX, NFMAX), ! incidence angle vector - & XASEC(50, NSECMAX, NFMAX), ! the x coordinate aifoil section - & CASEC(50, NSECMAX, NFMAX), ! camber line at xasec - & SASEC(50, NSECMAX, NFMAX), ! slope of camber line at xasec - & TASEC(50, NSECMAX, NFMAX), ! thickness at xasec + & XASEC(25, NSECMAX, NFMAX), ! the x coordinate aifoil section + & CASEC(25, NSECMAX, NFMAX), ! camber line at xasec + & SASEC(25, NSECMAX, NFMAX), ! slope of camber line at xasec + & TASEC(25, NSECMAX, NFMAX), ! thickness at xasec & CLCDSEC(6, NSECMAX, NFMAX), & CLCDSRF(6, NFMAX), & CLAF(NSECMAX, NFMAX), ! CL alpha (dCL/da) scaling factor From 48307e612def024970159c198b0a8fb38ed19fbe Mon Sep 17 00:00:00 2001 From: Joshua Anibal Date: Fri, 27 Mar 2026 08:05:26 -0700 Subject: [PATCH 39/43] see if new aifoil organization will fit --- src/ad_src/forward_ad_src/amake_d.f | 156 ++++++++++++++-------------- src/includes/AVL_surf.INC | 26 +++-- 2 files changed, 90 insertions(+), 92 deletions(-) diff --git a/src/ad_src/forward_ad_src/amake_d.f b/src/ad_src/forward_ad_src/amake_d.f index a075467..1d67176 100644 --- a/src/ad_src/forward_ad_src/amake_d.f +++ b/src/ad_src/forward_ad_src/amake_d.f @@ -1257,41 +1257,41 @@ SUBROUTINE MAKESURF_D(isurf) C---------- TE control point used only if surface sheds a wake lvnc(idx_vor) = lfwake(isurf) C -Cc#ifdef USE_CPOML -C... nodal grid associated with vortex strip (aft-panel nodes) -C... NOTE: airfoil in plane of wing, but not rotated perpendicular to dihedral; -C... retained in (x,z) plane at this point - CALL AKIMA(xlasec(1, isec, isurf), zlasec(1, isec, isurf - + ), nsl, xpt(ivc+1), zl_l, dsdx) - CALL AKIMA(xuasec(1, isec, isurf), zuasec(1, isec, isurf - + ), nsl, xpt(ivc+1), zu_l, dsdx) -C - CALL AKIMA(xlasec(1, isec+1, isurf), zlasec(1, isec+1, - + isurf), nsr, xpt(ivc+1), zl_r, dsdx) - CALL AKIMA(xuasec(1, isec+1, isurf), zuasec(1, isec+1, - + isurf), nsr, xpt(ivc+1), zu_r, dsdx) -C - xyn1(1, idx_vor) = rle1(1, idx_strip) + xpt(ivc+1)* - + chord1(idx_strip) - xyn1(2, idx_vor) = rle1(2, idx_strip) - zl = (1.-f1)*zl_l + f1*zl_r - zu = (1.-f1)*zu_l + f1*zu_r - zlon1(idx_vor) = rle1(3, idx_strip) + zl*chord1( - + idx_strip) - zupn1(idx_vor) = rle1(3, idx_strip) + zu*chord1( - + idx_strip) -C - xyn2(1, idx_vor) = rle2(1, idx_strip) + xpt(ivc+1)* - + chord2(idx_strip) - xyn2(2, idx_vor) = rle2(2, idx_strip) - zl = (1.-f2)*zl_l + f2*zl_r - zu = (1.-f2)*zu_l + f2*zu_r - zlon2(idx_vor) = rle2(3, idx_strip) + zl*chord2( - + idx_strip) - zupn2(idx_vor) = rle2(3, idx_strip) + zu*chord2( - + idx_strip) -C -Cc#endif +! Cc#ifdef USE_CPOML +! C... nodal grid associated with vortex strip (aft-panel nodes) +! C... NOTE: airfoil in plane of wing, but not rotated perpendicular to dihedral; +! C... retained in (x,z) plane at this point +! CALL AKIMA(xlasec(1, isec, isurf), zlasec(1, isec, isurf +! + ), nsl, xpt(ivc+1), zl_l, dsdx) +! CALL AKIMA(xuasec(1, isec, isurf), zuasec(1, isec, isurf +! + ), nsl, xpt(ivc+1), zu_l, dsdx) +! C +! CALL AKIMA(xlasec(1, isec+1, isurf), zlasec(1, isec+1, +! + isurf), nsr, xpt(ivc+1), zl_r, dsdx) +! CALL AKIMA(xuasec(1, isec+1, isurf), zuasec(1, isec+1, +! + isurf), nsr, xpt(ivc+1), zu_r, dsdx) +! C +! xyn1(1, idx_vor) = rle1(1, idx_strip) + xpt(ivc+1)* +! + chord1(idx_strip) +! xyn1(2, idx_vor) = rle1(2, idx_strip) +! zl = (1.-f1)*zl_l + f1*zl_r +! zu = (1.-f1)*zu_l + f1*zu_r +! zlon1(idx_vor) = rle1(3, idx_strip) + zl*chord1( +! + idx_strip) +! zupn1(idx_vor) = rle1(3, idx_strip) + zu*chord1( +! + idx_strip) +! C +! xyn2(1, idx_vor) = rle2(1, idx_strip) + xpt(ivc+1)* +! + chord2(idx_strip) +! xyn2(2, idx_vor) = rle2(2, idx_strip) +! zl = (1.-f2)*zl_l + f2*zl_r +! zu = (1.-f2)*zu_l + f2*zu_r +! zlon2(idx_vor) = rle2(3, idx_strip) + zl*chord2( +! + idx_strip) +! zupn2(idx_vor) = rle2(3, idx_strip) + zu*chord2( +! + idx_strip) +! C +! Cc#endif idx_vor = idx_vor + 1 ENDDO C @@ -2545,49 +2545,49 @@ SUBROUTINE MAKESURF_MESH_D(isurf) + idx_node_yp1+1))/2-rle(1, idx_strip))/chord(idx_strip) C C - CALL AKIMA(xlasec(1, iptl, isurf), zlasec(1, iptl, isurf), - + nsl, xptxind1, zl_l, dsdx) - CALL AKIMA(xuasec(1, iptl, isurf), zuasec(1, iptl, isurf), - + nsl, xptxind1, zu_l, dsdx) -C Interpolate cross section on right side -C - CALL AKIMA(xlasec(1, iptr, isurf), zlasec(1, iptr, isurf), - + nsr, xptxind1, zl_r, dsdx) - CALL AKIMA(xuasec(1, iptr, isurf), zuasec(1, iptr, isurf), - + nsr, xptxind1, zu_r, dsdx) -C Compute the left aft node of panel -C X-point -C -C -C Y-point - xyn1(1, idx_vor) = rle1(1, idx_strip) + xptxind1*chord1( - + idx_strip) -C -C Interpolate z from sections to left aft node of panel - xyn1(2, idx_vor) = rle1(2, idx_strip) -C - zl = (1.-f1)*zl_l + f1*zl_r -C Store left aft z-point - zu = (1.-f1)*zu_l + f1*zu_r -C - zlon1(idx_vor) = rle1(3, idx_strip) + zl*chord1(idx_strip) -C Compute the right aft node of panel -C X-point - zupn1(idx_vor) = rle1(3, idx_strip) + zu*chord1(idx_strip) -C -C Y-point - xyn2(1, idx_vor) = rle2(1, idx_strip) + xptxind1*chord2( - + idx_strip) -C -C Interpolate z from sections to right aft node of panel - xyn2(2, idx_vor) = rle2(2, idx_strip) - zl = (1.-f2)*zl_l + f2*zl_r -C Store right aft z-point - zu = (1.-f2)*zu_l + f2*zu_r -C - zlon2(idx_vor) = rle2(3, idx_strip) + zl*chord2(idx_strip) - zupn2(idx_vor) = rle2(3, idx_strip) + zu*chord2(idx_strip) -C +! CALL AKIMA(xlasec(1, iptl, isurf), zlasec(1, iptl, isurf), +! + nsl, xptxind1, zl_l, dsdx) +! CALL AKIMA(xuasec(1, iptl, isurf), zuasec(1, iptl, isurf), +! + nsl, xptxind1, zu_l, dsdx) +! C Interpolate cross section on right side +! C +! CALL AKIMA(xlasec(1, iptr, isurf), zlasec(1, iptr, isurf), +! + nsr, xptxind1, zl_r, dsdx) +! CALL AKIMA(xuasec(1, iptr, isurf), zuasec(1, iptr, isurf), +! + nsr, xptxind1, zu_r, dsdx) +! C Compute the left aft node of panel +! C X-point +! C +! C +! C Y-point +! xyn1(1, idx_vor) = rle1(1, idx_strip) + xptxind1*chord1( +! + idx_strip) +! C +! C Interpolate z from sections to left aft node of panel +! xyn1(2, idx_vor) = rle1(2, idx_strip) +! C +! zl = (1.-f1)*zl_l + f1*zl_r +! C Store left aft z-point +! zu = (1.-f1)*zu_l + f1*zu_r +! C +! zlon1(idx_vor) = rle1(3, idx_strip) + zl*chord1(idx_strip) +! C Compute the right aft node of panel +! C X-point +! zupn1(idx_vor) = rle1(3, idx_strip) + zu*chord1(idx_strip) +! C +! C Y-point +! xyn2(1, idx_vor) = rle2(1, idx_strip) + xptxind1*chord2( +! + idx_strip) +! C +! C Interpolate z from sections to right aft node of panel +! xyn2(2, idx_vor) = rle2(2, idx_strip) +! zl = (1.-f2)*zl_l + f2*zl_r +! C Store right aft z-point +! zu = (1.-f2)*zu_l + f2*zu_r +! C +! zlon2(idx_vor) = rle2(3, idx_strip) + zl*chord2(idx_strip) +! zupn2(idx_vor) = rle2(3, idx_strip) + zu*chord2(idx_strip) +! C idx_vor = idx_vor + 1 ENDDO C End vortex loop diff --git a/src/includes/AVL_surf.INC b/src/includes/AVL_surf.INC index 63f7565..f7eb152 100644 --- a/src/includes/AVL_surf.INC +++ b/src/includes/AVL_surf.INC @@ -1,6 +1,4 @@ C !start added variables for python geometry minipulation - ! include ADIMEN.INC - LOGICAL LDUPL_B COMMON /BODY_GEOM_L/ @@ -63,10 +61,10 @@ c REAL(kind=avl_real) YSEC REAL(kind=avl_real) XFMIN_R REAL(kind=avl_real) XFMAX_R - REAL(kind=avl_real) XLASEC - REAL(kind=avl_real) ZLASEC - REAL(kind=avl_real) XUASEC - REAL(kind=avl_real) ZUASEC +c REAL(kind=avl_real) XLASEC +c REAL(kind=avl_real) ZLASEC +c REAL(kind=avl_real) XUASEC +c REAL(kind=avl_real) ZUASEC REAL(kind=avl_real) CHORDS REAL(kind=avl_real) AINCS REAL(kind=avl_real) XASEC @@ -94,16 +92,16 @@ c & YSEC(IBX, NSECMAX, NFMAX), ! raw section input y coordinates & XFMIN_R(NSECMAX, NFMAX), ! section input lower x bound & XFMAX_R(NSECMAX, NFMAX), ! section input upper x bound - & XLASEC(25, NSECMAX, NFMAX), ! airfoil lower surface x-coords - & ZLASEC(25, NSECMAX, NFMAX), ! airfoil lower surface z-coords - & XUASEC(25, NSECMAX, NFMAX), ! airfoil upper surface x-coords - & ZUASEC(25, NSECMAX, NFMAX), ! airfoil upper surface z-coords +c & XLASEC(IBX, NSECMAX, NFMAX), ! airfoil lower surface x-coords +c & ZLASEC(IBX, NSECMAX, NFMAX), ! airfoil lower surface z-coords +c & XUASEC(IBX, NSECMAX, NFMAX), ! airfoil upper surface x-coords +c & ZUASEC(IBX, NSECMAX, NFMAX), ! airfoil upper surface z-coords & CHORDS(NSECMAX, NFMAX), ! chord length vectorm & AINCS(NSECMAX, NFMAX), ! incidence angle vector - & XASEC(25, NSECMAX, NFMAX), ! the x coordinate aifoil section - & CASEC(25, NSECMAX, NFMAX), ! camber line at xasec - & SASEC(25, NSECMAX, NFMAX), ! slope of camber line at xasec - & TASEC(25, NSECMAX, NFMAX), ! thickness at xasec + & XASEC(50, NSECMAX, NFMAX), ! the x coordinate aifoil section + & CASEC(50, NSECMAX, NFMAX), ! camber line at xasec + & SASEC(50, NSECMAX, NFMAX), ! slope of camber line at xasec + & TASEC(50, NSECMAX, NFMAX), ! thickness at xasec & CLCDSEC(6, NSECMAX, NFMAX), & CLCDSRF(6, NFMAX), & CLAF(NSECMAX, NFMAX), ! CL alpha (dCL/da) scaling factor From e73618aba97849dd7dd2c174bbf2e2370e6e5bb0 Mon Sep 17 00:00:00 2001 From: Joshua Anibal Date: Fri, 27 Mar 2026 18:41:16 -0700 Subject: [PATCH 40/43] set 50 max for XASEC_DIFF, SASEC_DIFF variables --- .gitignore | 1 - src/includes/AVL_ad_seeds.inc | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 1ff8fd3..aa0b628 100644 --- a/.gitignore +++ b/.gitignore @@ -55,7 +55,6 @@ MANIFEST src/ad_src/forward_tmp/ src/ad_src/reverse_tmp/ src/ad_src/preprocessed_files/ -src/includes/AVL.INC examples/*.html examples/*.db examples/reports diff --git a/src/includes/AVL_ad_seeds.inc b/src/includes/AVL_ad_seeds.inc index 1a7b28b..6b0d6e5 100644 --- a/src/includes/AVL_ad_seeds.inc +++ b/src/includes/AVL_ad_seeds.inc @@ -431,9 +431,9 @@ c & XUASEC_DIFF(IBX, NSECMAX, NFMAX), c & ZUASEC_DIFF(IBX, NSECMAX, NFMAX), & CHORDS_DIFF(NSECMAX, NFMAX), & AINCS_DIFF(NSECMAX, NFMAX), - & XASEC_DIFF(IBX, NSECMAX, NFMAX), + & XASEC_DIFF(50, NSECMAX, NFMAX), c & CASEC_DIFF(IBX, NSECMAX, NFMAX), - & SASEC_DIFF(IBX, NSECMAX, NFMAX), + & SASEC_DIFF(50, NSECMAX, NFMAX), c & TASEC_DIFF(IBX, NSECMAX, NFMAX), c & CLCDSEC_DIFF(6, NSECMAX, NFMAX), & CLCDSRF_DIFF(6, NFMAX), From 6eab0c2a225bac851c8c67f46a9832a44087c900 Mon Sep 17 00:00:00 2001 From: Joshua Anibal Date: Mon, 30 Mar 2026 06:11:48 -0700 Subject: [PATCH 41/43] reenable the tests --- tools/wheels/cibw_test_command.sh | 92 +++++++++++++++---------------- 1 file changed, 45 insertions(+), 47 deletions(-) diff --git a/tools/wheels/cibw_test_command.sh b/tools/wheels/cibw_test_command.sh index 2c7ba3e..fbb792f 100644 --- a/tools/wheels/cibw_test_command.sh +++ b/tools/wheels/cibw_test_command.sh @@ -7,51 +7,49 @@ python -c "import platform; print(platform.machine())" ls ../optvl # llvm-objdump -p ../optvl/libavl.cp312-win_arm64.pyd | findstr "DLL Name" -# # install tesing dependencies -# pip install --only-binary :all: scipy -# pip install psutil "openmdao!=3.38" - - -# #HACK: if the tests are not split up the CI runs out of memory... -# # python -m unittest -v -# # pip install testflo -# # testflo -v . - - - - -# # test package built and installed correctly -# python test_import.py -# python -m unittest -v test_import.py -# python -m unittest -v test_io.py -# python -m unittest -v test_input_dict.py - -# # test mem ussage of pyavl and test framework -# python -m unittest -v test_tear_down.py - -# # test basic avl functionality -# python -m unittest -v test_parameters.py -# python -m unittest -v test_analysis.py -# python -m unittest -v test_surf_geom.py -# python -m unittest -v test_stab_derivs.py -# python -m unittest -v test_body_axis_derivs.py -# # test eigenmode analysis -# python -m unittest -v test_eigen_analysis.py - -# # tests for adjoint -# python -m unittest -v test_new_subroutines.py -# #HACK: if the tests are not split up the windows version has -# # an error loading the shared lib. -# python -m unittest -v test_partial_derivs.TestFunctionPartials -# python -m unittest -v test_partial_derivs.TestResidualPartials -# python -m unittest -v test_consurf_partial_derivs.TestResidualDPartials -# python -m unittest -v test_consurf_partial_derivs.TestConSurfDerivsPartials -# python -m unittest -v test_stab_derivs_partial_derivs.TestResidualUPartials -# python -m unittest -v test_stab_derivs_partial_derivs.TestStabDerivDerivsPartials - -# python -m unittest -v test_body_axis_derivs_partial_derivs.py -# python -m unittest -v test_total_derivs.py - -# # test openmdao wrapper and basic optimization results -# python -m unittest -v test_om_wrapper.py +# install tesing dependencies +pip install --only-binary :all: scipy +pip install psutil "openmdao!=3.38" + + +#HACK: if the tests are not split up the CI runs out of memory... +# python -m unittest -v +# pip install testflo +# testflo -v . + + +# test package built and installed correctly +python test_import.py +python -m unittest -v test_import.py +python -m unittest -v test_io.py +python -m unittest -v test_input_dict.py + +# test mem ussage of pyavl and test framework +python -m unittest -v test_tear_down.py + +# test basic avl functionality +python -m unittest -v test_parameters.py +python -m unittest -v test_analysis.py +python -m unittest -v test_surf_geom.py +python -m unittest -v test_stab_derivs.py +python -m unittest -v test_body_axis_derivs.py +# test eigenmode analysis +python -m unittest -v test_eigen_analysis.py + +# tests for adjoint +python -m unittest -v test_new_subroutines.py +#HACK: if the tests are not split up the windows version has +# an error loading the shared lib. +python -m unittest -v test_partial_derivs.TestFunctionPartials +python -m unittest -v test_partial_derivs.TestResidualPartials +python -m unittest -v test_consurf_partial_derivs.TestResidualDPartials +python -m unittest -v test_consurf_partial_derivs.TestConSurfDerivsPartials +python -m unittest -v test_stab_derivs_partial_derivs.TestResidualUPartials +python -m unittest -v test_stab_derivs_partial_derivs.TestStabDerivDerivsPartials + +python -m unittest -v test_body_axis_derivs_partial_derivs.py +python -m unittest -v test_total_derivs.py + +# test openmdao wrapper and basic optimization results +python -m unittest -v test_om_wrapper.py From ca77a696446abfe9d26b0a9ad7d84e1ef9d548c5 Mon Sep 17 00:00:00 2001 From: Joshua Anibal Date: Mon, 30 Mar 2026 08:25:04 -0700 Subject: [PATCH 42/43] print more info from tests --- tests/test_import.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_import.py b/tests/test_import.py index 71c643d..2154302 100644 --- a/tests/test_import.py +++ b/tests/test_import.py @@ -1,7 +1,10 @@ # ============================================================================= # Extension modules # ============================================================================= - +import struct, sys, sysconfig +print("Pointer size:", struct.calcsize("P") * 8, "bit") # 64 for both, less useful +print("Platform tag:", sysconfig.get_platform()) # THIS is the key one +print("sys.executable:", sys.executable) # ============================================================================= # Standard Python Modules # ============================================================================= From 431524d9d1781cb984c3bd02e5a51d38510a4f83 Mon Sep 17 00:00:00 2001 From: Joshua Anibal Date: Mon, 30 Mar 2026 18:03:19 -0700 Subject: [PATCH 43/43] try to learn more about the problem --- tests/test_import.py | 69 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/tests/test_import.py b/tests/test_import.py index 2154302..16ea39e 100644 --- a/tests/test_import.py +++ b/tests/test_import.py @@ -5,6 +5,75 @@ print("Pointer size:", struct.calcsize("P") * 8, "bit") # 64 for both, less useful print("Platform tag:", sysconfig.get_platform()) # THIS is the key one print("sys.executable:", sys.executable) + +import ctypes +import ctypes.wintypes +import os, sys, struct, glob + +print("Python arch:", struct.calcsize("P") * 8, "bit") +print("Executable:", sys.executable) + +# Check what VCRUNTIME140.dll Python itself loaded +import ctypes.util +kernel32 = ctypes.WinDLL("kernel32", use_last_error=True) +GetModuleFileNameW = kernel32.GetModuleFileNameW +GetModuleFileNameW.argtypes = [ctypes.wintypes.HMODULE, ctypes.wintypes.LPWSTR, ctypes.wintypes.DWORD] +GetModuleFileNameW.restype = ctypes.wintypes.DWORD +GetModuleHandleW = kernel32.GetModuleHandleW +GetModuleHandleW.argtypes = [ctypes.wintypes.LPCWSTR] +GetModuleHandleW.restype = ctypes.wintypes.HMODULE + +for dll_name in ["VCRUNTIME140.dll", "msvcp140.dll", "python312.dll"]: + h = GetModuleHandleW(dll_name) + if h: + buf = ctypes.create_unicode_buffer(260) + GetModuleFileNameW(h, buf, 260) + print(f"{dll_name}: loaded from {buf.value}") + else: + print(f"{dll_name}: not loaded") + +# Search common locations for VCRUNTIME140.dll +search_dirs = [ + os.path.dirname(sys.executable), + os.path.join(os.environ.get("SystemRoot", r"C:\Windows"), "System32"), + os.path.join(os.environ.get("SystemRoot", r"C:\Windows"), "SysWOW64"), +] +for d in search_dirs: + path = os.path.join(d, "VCRUNTIME140.dll") + if os.path.exists(path): + # Read PE machine type + with open(path, "rb") as f: + f.seek(0x3C) # e_lfanew offset + pe_offset = int.from_bytes(f.read(4), "little") + f.seek(pe_offset + 4) # Machine field + machine = int.from_bytes(f.read(2), "little") + arch = {0x8664: "x86_64", 0xAA64: "ARM64", 0x14C: "x86"}.get(machine, hex(machine)) + print(f"Found {path} -> {arch}") + +# Try a direct load of the .pyd to get better error info +print("\n--- Direct load test ---") +import importlib.util +spec = importlib.util.find_spec("optvl") +if spec: + pyd = glob.glob(os.path.join(spec.submodule_search_locations[0], "libavl*.pyd")) + if pyd: + print(f"Attempting ctypes load of: {pyd[0]}") + try: + ctypes.WinDLL(pyd[0]) + print("SUCCESS: Direct load works") + except OSError as e: + print(f"FAILED: {e}") + + # Now test loading from a temp copy (what MExt does) + import shutil, tempfile + tmpdir = tempfile.mkdtemp() + copied = shutil.copy(pyd[0], tmpdir) + print(f"Attempting ctypes load of temp copy: {copied}") + try: + ctypes.WinDLL(copied) + print("SUCCESS: Temp copy load works") + except OSError as e: + print(f"FAILED from temp: {e}") # ============================================================================= # Standard Python Modules # =============================================================================