Migrating from the original scripts
The original repository was a folder of scripts you ran from inside folder_cfd/ (run.sh -> mpi_tot.py).
The code is the same code, reorganized; the old names still work.
Original |
Now |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bundled data, |
Docker image |
conda environment (Installation) |
Behavior changes
Volume-mesh deformation defaults to IDWarp-JAX (
warper="jax") instead of the Fortran IDWarp; the optimizer defaults to modOpt’s OpenSQP instead of PySLSQP.warper="idwarp"andalgorithm="PySLSQP"reproduce the original choices.Failed mesh check or primal solve raises
DAFoamError(originally: skipped / ignored). See How it works.DAFoam calls run in the case directory (originally only the adjoint solve did).
Geometry and projection caches go to
cache_dir, keyed by a digest of the STEP file and the surface mesh; the committedstored_files/*.pickleand__pycache__files are gone, and a cache that no longer unpickles is regenerated instead of crashing.lsdo_geoimports use the current top-level names (lg.SectionalParameterization, …), falling back to the deprecatedVolumeSectionalParameterizationnames on older versions.Projection is serial by default (
projection_options={"num_workers": N}to parallelize).The OpenFOAM case no longer ships a stale
blockMeshDict(it described a different geometry) orcontrolDict~.gather_array_to_rank0uses pickle-basedcomm.gatherinstead ofGathervwith explicit MPI datatypes: same result, nompi4pyimport in the module, testable without MPI.The debugging switches of
mpi_tot.py(faulthandler,PETSC_OPTIONS=-malloc_debug, interactivevedoplots) are not carried over.
Version note
The original ran on a Python 3.9 Docker image (dafoam/opt-packages, OpenFOAM v1812-era DAFoam and csdl_alpha’s
dev branch). The packaged stack targets DAFoam v5.1.1 on OpenFOAM v2506 and current csdl_alpha main. The
DAFoam methods used are identical in v4.0.4 and v5.1.1 and csdl_alpha main now contains the MPI region
operations, but the bundled case files were written for v1812 and have not yet been run on v2506 (Verification status).