Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
5beea78
bump eigen version
sanathkeshav Mar 17, 2026
df3cccc
sync small changes
sanathkeshav Mar 21, 2026
3b864a5
constrain hdf5 version in build
sanathkeshav Mar 30, 2026
5a35918
Bump prefix-dev/setup-pixi from 0.9.4 to 0.9.5 (#137)
dependabot[bot] Apr 6, 2026
4a95ec8
sync lsearch changes
sanathkeshav Apr 7, 2026
4455d00
sync line search changes from feature-early-yield
sanathkeshav Apr 21, 2026
cf7c716
Pin micro-manager-precice version to 0.8.0 due to pyFANS API incompat…
IshaanDesai Apr 21, 2026
ea32461
MPI communicator abstraction (#139)
Snapex2409 May 7, 2026
e6d89fc
Fix Mem-leak and CMake issues (#140)
Snapex2409 May 7, 2026
7ab83f6
Bump prefix-dev/setup-pixi from 0.9.5 to 0.9.6 (#144)
dependabot[bot] May 25, 2026
4f821d2
Bump actions/checkout from 6 to 7 (#145)
dependabot[bot] Jun 22, 2026
5e50d4a
Add DeepWiki badge to README
sanathkeshav Jun 23, 2026
03a62e0
Bump prefix-dev/setup-pixi from 0.9.6 to 0.10.0 (#146)
dependabot[bot] Jul 6, 2026
8ae72d0
Bugfix: fixes GBDiffusion post MaterialManager update and adds a test…
sanathkeshav Jul 10, 2026
194cf42
Add large strain support for pyFANS (#141)
Snapex2409 Jul 16, 2026
70a9441
J2Plasticity patch
sanathkeshav Jul 18, 2026
4b3e247
0 iteration edge case print patch
sanathkeshav Jul 18, 2026
4ad5aa5
Bump actions/setup-python from 6 to 7 (#148)
dependabot[bot] Jul 20, 2026
7b5c965
Add finite strain J2 plasticity model (#149)
sanathkeshav Jul 24, 2026
f9b9626
Logging based on `spdlog` (#150)
sanathkeshav Jul 29, 2026
e90388f
bump MSUtils version
sanathkeshav Aug 1, 2026
9b1beff
catch ill defined json inputs in matmanager
sanathkeshav Aug 1, 2026
3e89348
add publications
sanathkeshav Aug 2, 2026
aa6bff3
bump version
sanathkeshav Aug 2, 2026
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
4 changes: 2 additions & 2 deletions .github/workflows/build_and_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ jobs:
UBUNTU_VERSION: [noble, jammy]
steps:
- name: Checkout code
uses: actions/checkout@v6
uses: actions/checkout@v7

- name: Set up pixi
uses: prefix-dev/setup-pixi@v0.9.4
uses: prefix-dev/setup-pixi@v0.10.0
with:
environments: dashboard

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v6
uses: actions/checkout@v7

- name: Set up QEMU
uses: docker/setup-qemu-action@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pixi_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ jobs:
os: [ubuntu-latest, macos-latest]
steps:
- name: Checkout code
uses: actions/checkout@v6
uses: actions/checkout@v7

- name: Set up pixi
uses: prefix-dev/setup-pixi@v0.9.4
uses: prefix-dev/setup-pixi@v0.10.0
with:
environments: default

Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/run-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v6
uses: actions/checkout@v7
- name: Create markdownlint config
run: |
cat > .markdownlint.json << 'EOF'
Expand All @@ -35,7 +35,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v6
uses: actions/checkout@v7
- name: Create markdown-link-check config
run: |
cat > .markdown-link-check-config.json << 'EOF'
Expand All @@ -59,9 +59,9 @@ jobs:
name: pre-commit checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- name: Setup python
uses: actions/setup-python@v6
uses: actions/setup-python@v7
with:
python-version: '3.10'
check-latest: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_pyfans.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
steps:

- name: Checkout repository
uses: actions/checkout@v6
uses: actions/checkout@v7

- name: Generate build directory
run: mkdir -p ${{ env.FANS_BUILD_DIR }}
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -199,14 +199,17 @@ test/input_files/**/*.json

# Test microstructure files
!sphere32.h5
!diamond_GB.h5

# Test input files
!test_LinearElastic.json
!test_LinearThermal.json
!test_GBDiffusion.json
!test_PseudoPlastic.json
!test_J2Plasticity.json
!test_MixedBCs.json
!test_CompressibleNeoHookean.json
!test_FiniteStrainJ2Plasticity.json
!test_MixedBCs_LargeStrain.json

# pixi environments
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# FANS Changelog

## v0.7.0

- Add configurable logging using `spdlog` [#150](https://github.com/DataAnalyticsEngineering/FANS/pull/150)
- Add rate-independent finite-strain J2 plasticity with linear isotropic hardening [#149](https://github.com/DataAnalyticsEngineering/FANS/pull/149)
- Added large strain support for pyFANS [#141](https://github.com/DataAnalyticsEngineering/FANS/pull/141)
- Bugfix: fixes GBDiffusion post MaterialManager update and adds a test case [#147](https://github.com/DataAnalyticsEngineering/FANS/pull/147)
- Bugfix: mem-leak while reading microstructure and added wider CMake support [#140](https://github.com/DataAnalyticsEngineering/FANS/pull/140)
- Added MPI communicator abstraction [#139](https://github.com/DataAnalyticsEngineering/FANS/pull/139)

## v0.6.2

- Fix bug demanding a leading slash in the datasetname and exiting ungracefully [#123](https://github.com/DataAnalyticsEngineering/FANS/pull/123)
Expand Down
25 changes: 15 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cmake_minimum_required(VERSION 3.21)
# ##############################################################################

project(FANS
VERSION 0.6.2
VERSION 0.7.0
LANGUAGES C CXX
)

Expand Down Expand Up @@ -108,6 +108,7 @@ if (FANS_LIBRARY_FOR_MICRO_MANAGER)
FetchContent_MakeAvailable(pybind11)
endif()
find_package(nlohmann_json REQUIRED)
find_package(spdlog CONFIG REQUIRED)
# ##############################################################################
# TARGETS
# ##############################################################################
Expand Down Expand Up @@ -150,7 +151,9 @@ target_include_directories(FANS_FANS PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SO
# FANS.h header that consuming projects can use
set_property(TARGET FANS_FANS PROPERTY PUBLIC_HEADER
include/general.h
include/logging.h
include/matmodel.h
include/LargeStrainMechModel.h
include/MaterialManager.h
include/reader.h
include/solverCG.h
Expand All @@ -159,16 +162,17 @@ set_property(TARGET FANS_FANS PROPERTY PUBLIC_HEADER
include/setup.h
include/mixedBCs.h

include/material_models/LinearThermal.h
include/material_models/GBDiffusion.h
include/material_models/thermal/LinearThermal.h
include/material_models/thermal/GBDiffusion.h

include/material_models/LinearElastic.h
include/material_models/PseudoPlastic.h
include/material_models/J2Plasticity.h
include/material_models/J2PlasticityNew.h
include/material_models/small_strain/LinearElastic.h
include/material_models/small_strain/PseudoPlastic.h
include/material_models/small_strain/J2Plasticity.h
include/material_models/small_strain/J2PlasticityNew.h

include/material_models/SaintVenantKirchhoff.h
include/material_models/CompressibleNeoHookean.h
include/material_models/large_strain/SaintVenantKirchhoff.h
include/material_models/large_strain/CompressibleNeoHookean.h
include/material_models/large_strain/FiniteStrainJ2Plasticity.h
)

# version.h is generated and added to the build include directory
Expand Down Expand Up @@ -215,8 +219,9 @@ target_compile_definitions(FANS_FANS PUBLIC ${FFTW3_DEFINITIONS})

target_link_libraries(FANS_FANS PUBLIC Eigen3::Eigen)
target_link_libraries(FANS_FANS PUBLIC nlohmann_json::nlohmann_json)
target_link_libraries(FANS_FANS PUBLIC spdlog::spdlog)

target_include_directories(FANS_main PRIVATE ${HDF5_INCLUDE_DIRS})
target_include_directories(FANS_main PRIVATE ${HDF5_INCLUDE_DIRS} ${FFTW3_INCLUDE_DIRS})
target_link_libraries(FANS_main PRIVATE FANS::FANS)

# ##############################################################################
Expand Down
12 changes: 4 additions & 8 deletions FANS_Dashboard/FANS_Dashboard.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,7 @@
"fig = plot_subplots(strain_average, stress_average, labels_x=['Strain']*6, labels_y=['Stress']*6, \n",
" subplot_titles=['component - 11', 'component - 22', 'component - 33', 'component - 12', 'component - 13', 'component - 23'], \n",
" title='Stress average vs strain average', \n",
" nrows=2, ncols=3, linewidth=1, markersize=4, linecolor=[\"blue\"]*6, markercolor=[\"blue\"]*6, fontsize=16)\n",
"fig.show()"
" nrows=2, ncols=3, linewidth=1, markersize=4, linecolor=[\"blue\"]*6, markercolor=[\"blue\"]*6, fontsize=16)"
]
},
{
Expand All @@ -233,8 +232,7 @@
"fig = plot_subplots(strain_average, stress_average_deviatoric, labels_x=['Strain']*6, labels_y=['Stress_dev']*6,\n",
" subplot_titles=['component - 11', 'component - 22', 'component - 33', 'component - 12', 'component - 13', 'component - 23'],\n",
" title='Deviatoric stress average vs strain average',\n",
" nrows=2, ncols=3, linewidth=1, markersize=4, linecolor=[\"blue\"]*6, markercolor=[\"blue\"]*6, fontsize=16)\n",
"fig.show()"
" nrows=2, ncols=3, linewidth=1, markersize=4, linecolor=[\"blue\"]*6, markercolor=[\"blue\"]*6, fontsize=16)"
]
},
{
Expand All @@ -248,8 +246,7 @@
"fig = plot_subplots(time_broadcasted, stress_average_deviatoric, labels_x=['Time']*6, labels_y=['Stress_dev']*6,\n",
" subplot_titles=['component - 11', 'component - 22', 'component - 33', 'component - 12', 'component - 13', 'component - 23'],\n",
" title='Deviatoric stress average vs time',\n",
" nrows=2, ncols=3, linewidth=1, markersize=4, linecolor=[\"blue\"]*6, markercolor=[\"blue\"]*6, fontsize=16)\n",
"fig.show()"
" nrows=2, ncols=3, linewidth=1, markersize=4, linecolor=[\"blue\"]*6, markercolor=[\"blue\"]*6, fontsize=16)"
]
},
{
Expand All @@ -262,8 +259,7 @@
" np.column_stack((stress_average[:, 0], stress_average_deviatoric[:, 0])), \n",
" labels_x=['Strain_11']*2, labels_y=['Stress_11', 'Stress_dev_11'],\n",
" subplot_titles=['Stress_11 vs Strain_11', 'Stress_dev_11 vs Strain_11'],\n",
" nrows=1, ncols=2, linewidth=1, markersize=4, linecolor=[\"blue\"]*2, markercolor=[\"blue\"]*2, fontsize=16)\n",
"fig.show()"
" nrows=1, ncols=2, linewidth=1, markersize=4, linecolor=[\"blue\"]*2, markercolor=[\"blue\"]*2, fontsize=16)"
]
},
{
Expand Down
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<a href="https://anaconda.org/conda-forge/fans"><img src="https://anaconda.org/conda-forge/fans/badges/platforms.svg" alt="Anaconda-Server Badge"></a>
<a href="https://github.com/DataAnalyticsEngineering/FANS/actions"><img src="https://github.com/DataAnalyticsEngineering/FANS/workflows/Build%20and%20test%20pixi-build/badge.svg" alt="Build and test pixi-build"></a>
<a href="https://anaconda.org/conda-forge/fans"><img src="https://anaconda.org/conda-forge/fans/badges/downloads.svg" alt="Anaconda-Server Badge"></a>
<a href="https://deepwiki.com/DataAnalyticsEngineering/FANS"><img src="https://deepwiki.com/badge.svg" alt="Ask DeepWiki"></a>
<a href="https://prefix.dev/channels/conda-forge/packages/fans"><img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/prefix-dev/pixi/main/assets/badge/v0.json" alt="Pixi Badge"></a>
<img src="https://img.shields.io/github/last-commit/DataAnalyticsEngineering/FANS" alt="Last commit">
<a href="https://github.com/DataAnalyticsEngineering/FANS/blob/main/LICENSE"><img src="https://img.shields.io/github/license/DataAnalyticsEngineering/FANS" alt="License"></a>
Expand All @@ -24,6 +25,7 @@ Fourier-Accelerated Nodal Solver (FANS) is an FFT-based homogenization solver fo
- [Installing dependencies](#installing-dependencies)
- [Building FANS](#building-fans)
- [Python environment for the FANS dashboard](#python-environment-for-the-fans-dashboard)
- [Publications using FANS](docs/PUBLICATIONS.md)
- [Input file format](#input-file-format)
- [Microstructure definition](#microstructure-definition)
- [Problem type and material model](#problem-type-and-material-model)
Expand Down Expand Up @@ -71,6 +73,7 @@ FANS requires the following dependencies:
| **FFTW3** | FFT computations | **with MPI support** |
| **Eigen3** | Linear algebra | ≥ 3.4 |
| **nlohmann-json** | JSON parsing | ≥ 3.11 |
| **spdlog** | Logging | ≥ 1.17 |

### Installing dependencies

Expand Down Expand Up @@ -108,7 +111,8 @@ apt-get install -y \
libeigen3-dev \
libfftw3-dev \
libfftw3-mpi-dev \
nlohmann-json3-dev
nlohmann-json3-dev \
libspdlog-dev
```

</details>
Expand All @@ -122,7 +126,7 @@ We recommend installing the dependencies using [`brew`](https://brew.sh):
brew install gnu-time cmake gcc@15
brew install open-mpi --build-from-source --cc=gcc-15
brew install hdf5-mpi --build-from-source --cc=gcc-15
brew install fftw eigen nlohmann-json
brew install fftw eigen nlohmann-json spdlog

# Set environment variables
export CC=gcc-15 CXX=g++-15 MPICC=mpicc MPICXX=mpicxx
Expand All @@ -142,9 +146,10 @@ spack install hdf5+cxx+mpi
spack install eigen
spack install fftw+mpi
spack install nlohmann-json
spack install spdlog

# Load dependencies
spack load cmake mpi hdf5 eigen fftw nlohmann-json
spack load cmake mpi hdf5 eigen fftw nlohmann-json spdlog
```

Additionally, optimized FFTW implementations can be used depending on your system's architecture:
Expand Down Expand Up @@ -278,6 +283,7 @@ FANS requires a JSON input file specifying the problem parameters. Example input
- `J2ViscoPlastic_LinearIsotropicHardening` / `J2ViscoPlastic_NonLinearIsotropicHardening` for rate-independent / dependent J2 plasticity model with kinematic and linear/nonlinear isotropic hardening.
- `SaintVenantKirchhoff` for the hyperelastic Saint Venant-Kirchhoff material model.
- `CompressibleNeoHookean` for the compressible Neo-Hookean material model.
- `FiniteStrainJ2Plasticity` for rate-independent finite-strain J2 plasticity with linear isotropic hardening.

- `material_properties`: Material parameters specific to the chosen model. Properties are defined as arrays, where each element corresponds to one of the phases listed in the `phases` array.

Expand Down
1 change: 1 addition & 0 deletions cmake/FANSConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ endif()
find_dependency(Eigen3)
find_dependency(MPI)
find_dependency(FFTW3 COMPONENTS DOUBLE MPI)
find_dependency(spdlog CONFIG)

set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH_save}")
unset(CMAKE_MODULE_PATH_save)
Expand Down
14 changes: 9 additions & 5 deletions cmake/modules/FindFFTW3.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,15 @@ macro(find_specific_libraries KIND PARALLEL)
# adding target properties to the different cases
## MPI
if(PARALLEL STREQUAL "MPI")
if(MPI_C_LIBRARIES)
set_target_properties(fftw3::${kind}::mpi PROPERTIES
IMPORTED_LOCATION "${FFTW3_${KIND}_${PARALLEL}_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${FFTW3_INCLUDE_DIR_PARALLEL}"
IMPORTED_LINK_INTERFACE_LIBRARIES ${MPI_C_LIBRARIES})
set_target_properties(fftw3::${kind}::mpi PROPERTIES
IMPORTED_LOCATION "${FFTW3_${KIND}_${PARALLEL}_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${FFTW3_INCLUDE_DIR_PARALLEL}"
)

if(MPI_C_LIBRARIES AND NOT MPI_C_LIBRARIES STREQUAL "")
set_property(TARGET fftw3::${kind}::mpi PROPERTY
INTERFACE_LINK_LIBRARIES "${MPI_C_LIBRARIES}"
)
endif()
endif()
## OpenMP
Expand Down
1 change: 1 addition & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ RUN apt-get update -qq && apt-get install -y --no-install-recommends \
libfftw3-dev \
libfftw3-mpi-dev \
nlohmann-json3-dev \
libspdlog-dev \
# Required for preCICE Micro Manager Python bindings
python3-dev \
# Clean up
Expand Down
27 changes: 27 additions & 0 deletions docs/PUBLICATIONS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Publications using FANS

The following studies used FANS extensively as a primary data-generation tool.

## 2026

- Sanath Keshav and Felix Fritzen. **Robust Inverse Material Design With Physical Guarantees Using the Voigt–Reuss Net.** *International Journal for Numerical Methods in Engineering*, 127(7), 2026. ([10.1002/nme.70296](https://doi.org/10.1002/nme.70296))
- Yongliang Ou, Lena Scholz, Sanath Keshav, Yuji Ikeda, Marvin Kraft, Sergiy V. Divinski, Rafael Gómez-Bombarelli, Wolfgang Zeier, Felix Fritzen, and Blazej Grabowski. **Non-Arrhenius Li-ion transport and grain-size effects in argyrodite solid electrolytes.** Preprint, 2026. ([10.21203/rs.3.rs-7913719/v1](https://doi.org/10.21203/rs.3.rs-7913719/v1))

## 2025

- Alexandra Otto, Max Rosenkranz, Karl A. Kalina, and Markus Kästner. **Data-Driven Inverse Design of Spinodoid Architected Materials.** *GAMM-Mitteilungen*, 48(4), 2025. ([10.1002/gamm.70008](https://doi.org/10.1002/gamm.70008))
- Max Rosenkranz, Markus Kästner, and Ivo F. Sbalzarini. **Data-Efficient Inverse Design of Spinodoid Metamaterials.** *Integrating Materials and Manufacturing Innovation*, 14(4), 695–713, 2025. ([10.1007/s40192-025-00426-1](https://doi.org/10.1007/s40192-025-00426-1))
- Sanath Keshav, Julius Herb, and Felix Fritzen. **Spectral Normalization and Voigt–Reuss Net: A universal approach to microstructure-property forecasting with physical guarantees.** *GAMM-Mitteilungen*, 48(3), 2025. ([10.1002/gamm.70005](https://doi.org/10.1002/gamm.70005))
- Felix Fritzen, Julius Herb, and Shadi Sharba. **Thermo-plastic Nonuniform Transformation Field Analysis for eigenstress analysis of materials undergoing laser melt injection.** *Computer Methods in Applied Mechanics and Engineering*, 433, 117487, 2025. ([10.1016/j.cma.2024.117487](https://doi.org/10.1016/j.cma.2024.117487))

## 2024

- Julian Lißner and Felix Fritzen. **Microstructure homogenization: human vs machine.** *Advanced Modeling and Simulation in Engineering Sciences*, 11(1), 2024. ([10.1186/s40323-024-00275-1](https://doi.org/10.1186/s40323-024-00275-1))

## 2023

- Shadi Sharba, Julius Herb, and Felix Fritzen. **Reduced order homogenization of thermoelastic materials with strong temperature dependence and comparison to a machine-learned model.** *Archive of Applied Mechanics*, 93(7), 2855–2876, 2023. ([10.1007/s00419-023-02411-6](https://doi.org/10.1007/s00419-023-02411-6))

## 2022

- Sanath Keshav, Felix Fritzen, and Matthias Kabel. **FFT-based homogenization at finite strains using composite boxels (ComBo).** *Computational Mechanics*, 71(1), 191–212, 2022. ([10.1007/s00466-022-02232-4](https://doi.org/10.1007/s00466-022-02232-4))
Loading
Loading