-
-
Notifications
You must be signed in to change notification settings - Fork 5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28099 from claudiushaag/fans
Add FANS to conda-forge
- Loading branch information
Showing
2 changed files
with
101 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
From 393a0c622bcef196bbe1c0cc81fe8c15b9b152c4 Mon Sep 17 00:00:00 2001 | ||
From: Claudius Haag <[email protected]> | ||
Date: Thu, 28 Nov 2024 11:04:56 +0100 | ||
Subject: [PATCH] Fix gitignore for sphere32 inclusion + needed for copying | ||
when doing test for conda-forge packaging | ||
|
||
--- | ||
.gitignore | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/.gitignore b/.gitignore | ||
index 2bc948f..c713336 100644 | ||
--- a/.gitignore | ||
+++ b/.gitignore | ||
@@ -198,7 +198,7 @@ test/input_files/**/*.json | ||
**/scratch/ | ||
|
||
# Test microstructure files | ||
-!sphere.h5 | ||
+!sphere32.h5 | ||
|
||
# Test input files | ||
!test_LinearElastic.json | ||
-- | ||
2.34.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
context: | ||
version: "0.3.0" | ||
|
||
package: | ||
name: fans | ||
version: ${{ version }} | ||
|
||
source: | ||
url: https://github.com/DataAnalyticsEngineering/FANS/archive/refs/tags/v${{ version }}.tar.gz | ||
sha256: 1573478d9acd27a9cfc126a4167ce3951ec26e9896bf19577b44cbc4bdc48b88 | ||
patches: | ||
- fix_gitignore_ms.patch # modify so gitignore does not include the sphere32.h5 file | ||
|
||
build: | ||
number: 0 | ||
skip: | ||
- win | ||
- osx | ||
script: | ||
- if: linux | ||
then: | ||
- rm -rf build | ||
- mkdir build | ||
- cd build | ||
- cmake .. $CMAKE_ARGS -DCMAKE_C_COMPILER=$PREFIX/bin/mpicc -DCMAKE_CXX_COMPILER=$PREFIX/bin/mpicxx | ||
- cmake --build . -j | ||
- cmake --install . | ||
|
||
requirements: | ||
build: | ||
- ${{ compiler('c') }} | ||
- ${{ compiler('cxx') }} | ||
- ${{ stdlib('c') }} | ||
- cmake | ||
- make | ||
- ninja | ||
host: | ||
- hdf5 * mpi_openmpi* | ||
- fftw * mpi_openmpi* | ||
- openmpi-mpicxx | ||
- eigen | ||
|
||
tests: | ||
- package_contents: | ||
bin: | ||
- FANS | ||
- script: | ||
- JSON_FILE="$PREFIX/etc/conda/test-files/$PKG_NAME/0/test/input_files/test_LinearElastic.json" | ||
- MODIFIED_JSON_FILE="$PREFIX/etc/conda/test-files/$PKG_NAME/0/test/input_files/test_LinearElastic_mod.json" | ||
- NEW_MS_FILENAME="$PREFIX/etc/conda/test-files/$PKG_NAME/0/test/microstructures/sphere32.h5" | ||
# Use jq to create a modified copy of the JSON file | ||
- jq --arg new_filename "$NEW_MS_FILENAME" '.ms_filename = $new_filename' "$JSON_FILE" > "$MODIFIED_JSON_FILE" | ||
# Run tests | ||
- mpiexec -n 2 FANS "$MODIFIED_JSON_FILE" "$PREFIX/etc/conda/test-files/$PKG_NAME/0//test/test_results.h5" | ||
requirements: | ||
run: | ||
- jq | ||
files: | ||
source: | ||
- test/ | ||
|
||
about: | ||
homepage: https://github.com/DataAnalyticsEngineering/FANS | ||
summary: "FANS: an open-source, efficient, and parallel FFT-based homogenization solver designed to solve microscale multiphysics problems." | ||
description: | | ||
Fourier Accelerated Nodal Solvers (FANS) is an FFT-based homogenization solver designed to handle microscale multiphysics problems. | ||
This repository contains a C++ implementation of FANS, built using CMake and MPI for parallel computations. | ||
license: LGPL-3.0-only | ||
license_family: LGPL | ||
license_file: LICENSE | ||
|
||
extra: | ||
recipe-maintainers: | ||
- sanathkeshav | ||
- claudiushaag | ||
- EMMAOpenSource |