Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/windows_arm64_steps/action.yml
Original file line number Diff line number Diff line change
@@ -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
78 changes: 39 additions & 39 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -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
27 changes: 21 additions & 6 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +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"]]



Expand All @@ -55,6 +57,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: |
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ dev_make_install/optvl

tests/test_om_wrapper*_out
examples/run_opt_om*_out
examples/*.avl
examples/*.ps
examples/opt_output_sweep/
# ==============================================================================
# Github python gitignore template
# ==============================================================================
Expand Down
20 changes: 17 additions & 3 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ project(
default_options: [
'buildtype=debugoptimized',
'c_std=c99',
'fortran_std=legacy',
],
)

Expand Down Expand Up @@ -111,13 +110,27 @@ 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']
elif ff.get_id() == 'llvm-flang'

ff_args += ['-ffixed-form', '-w']

endif

numpy_nodepr_api = '-DNPY_NO_DEPRECATED_API=NPY_1_9_API_VERSION'

cc_args = [numpy_nodepr_api]
Expand Down Expand Up @@ -179,4 +192,5 @@ py3.extension_module('libavl',

)


install_subdir('optvl', install_dir: py3.get_install_dir())
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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}"

Expand Down
8 changes: 8 additions & 0 deletions src/amake.f
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
34 changes: 29 additions & 5 deletions src/includes/ADIMEN.INC
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,35 @@
! 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 (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
Expand All @@ -51,9 +75,9 @@
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 (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

14 changes: 6 additions & 8 deletions src/second.f
Original file line number Diff line number Diff line change
@@ -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
7 changes: 6 additions & 1 deletion tools/wheels/cibw_test_command.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ 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 "scipy<=1.16" psutil "openmdao!=3.38"
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...
Expand All @@ -14,6 +17,8 @@ pip install "scipy<=1.16" psutil "openmdao!=3.38"
# testflo -v .




# test package built and installed correctly
python test_import.py
python -m unittest -v test_import.py
Expand Down
Loading
Loading