%global commit cdfd828d0ef273541704126273f68649f3e84134 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global snapdate 20260224 %global febiolibdir %{_libdir}/febio Name: febio-erd # Upstream's commit of 2026-02-24, the one built for FEBio 4.12 (tagged the next # day); later commits follow FEBio's develop branch. Version: 1.0.0^%{snapdate}git%{shortcommit} Release: 1%{?dist} Summary: Elastic reaction-diffusion plugin for the FEBio finite element solver # The repository has no licence file and no licence notice in any source file. # Packaged as MIT, the licence of FEBio itself, on Morgan's decision until upstream # answers (asked in docs/upstream/febio-questions.md). Revisit before any wider use. License: MIT URL: https://github.com/febiosoftware/FEBioERD Source0: %{url}/archive/%{commit}/FEBioERD-%{commit}.tar.gz BuildRequires: gcc-c++ BuildRequires: cmake BuildRequires: ninja-build # 4.12-5 ships the plugin folder and the febio.xml that imports it. BuildRequires: febio-devel >= 4.12-5 # Built against the FEBio 4.12 SDK headers; the plugin ABI is not stable across releases. Requires: (febio%{?_isa} >= 4.12-5 with febio%{?_isa} < 4.13) %description FEBioERD adds the elastic-reaction-diffusion module to FEBio, coupling large-deformation solid mechanics with reacting, diffusing species, for example kinematic growth and remodelling (LaBelle et al. 2024). FEBio loads the plugin automatically from %{febiolibdir}/plugins. %prep %autosetup -n FEBioERD-%{commit} # Fedora: no static libstdc++/libgcc, keep warnings (-w hid them), C++17 to match # the FEBio 4.12 headers, and an RPATH to febio's private library directory. sed -i -e 's|add_compile_options(-static-libstdc++ -static-libgcc -w -Wall)|add_compile_options(-Wall)|' \ -e 's|set(CMAKE_BUILD_RPATH $ORIGIN/../lib/)|set(CMAKE_BUILD_RPATH %{febiolibdir})|' \ -e 's|set(CMAKE_CXX_STANDARD 11)|set(CMAKE_CXX_STANDARD 17)|' CMakeLists.txt grep -q 'add_compile_options(-Wall)' CMakeLists.txt grep -q 'CMAKE_BUILD_RPATH %{febiolibdir}' CMakeLists.txt %build %cmake -GNinja %cmake_build %install # No install rules upstream. install -D -m 0755 %{_vpath_builddir}/lib/libFEBioERD.so %{buildroot}%{febiolibdir}/plugins/libFEBioERD.so %check # Load the built plugin into the installed febio4 and solve shipped example models. mkdir -p check cat > check/febio.xml < %{buildroot}%{febiolibdir}/plugins/libFEBioERD.so EOF # LaBelle 2024 kinematic-growth cube (case 1). Its 9,600-element Tet10 mesh takes # over half an hour per few steps on a builder, so solve it on the same 0.5x0.5x1 # box as 2x2x4 hex8 elements with the same node sets, for 5 of its 200 steps. awk 'BEGIN { nx = 2; ny = 2; nz = 4 print "" print "\n\t\n\t\t" for (k = 0; k <= nz; k++) for (j = 0; j <= ny; j++) for (i = 0; i <= nx; i++) { id = 1 + i + j*(nx+1) + k*(nx+1)*(ny+1) printf "\t\t\t%g,%g,%g\n", id, 0.5*i/nx, 0.5*j/ny, 1.0*k/nz all = all (all == "" ? "" : ",") id if (k == 0) bot = bot (bot == "" ? "" : ",") id if (j == 0) xax = xax (xax == "" ? "" : ",") id if (i == 0) yax = yax (yax == "" ? "" : ",") id } print "\t\t\n\t\t" e = 0 for (k = 0; k < nz; k++) for (j = 0; j < ny; j++) for (i = 0; i < nx; i++) { n = 1 + i + j*(nx+1) + k*(nx+1)*(ny+1); dy = nx+1; dz = (nx+1)*(ny+1) printf "\t\t\t%d,%d,%d,%d,%d,%d,%d,%d\n", ++e, n, n+1, n+1+dy, n+dy, n+dz, n+1+dz, n+1+dy+dz, n+dy+dz } print "\t\t" printf "\t\t%s\n", all printf "\t\t%s\n", bot printf "\t\t%s\n", xax printf "\t\t%s\n", yax print "\t\n" }' > check/CubeHex8_Mesh.feb sed -e 's|200<|5<|' -e 's|from="./CubeTet10_Mesh.feb"|from="./CubeHex8_Mesh.feb"|' \ Example/KinematicGrowth_LaBelle2024/Cube/cube_case1.feb > check/cube.feb grep -q '5<' check/cube.feb && grep -q 'CubeHex8_Mesh' check/cube.feb (cd check && OMP_NUM_THREADS=1 febio4 -config febio.xml -i cube.feb -silent) || { tail -n 40 check/cube.log; exit 1; } grep -q 'N O R M A L T E R M I N A T I O N' check/cube.log got=$(awk -F: '/Number of time steps completed/ {print $2+0}' check/cube.log) echo "cube: $got time steps"; test "$got" = 5 %files %doc Documentation/README.md %{febiolibdir}/plugins/libFEBioERD.so %changelog * Fri Oct 09 2026 Morgan Hough - 1.0.0^20260224gitcdfd828-1 - Initial package, FEBioERD at upstream commit cdfd828 (2026-02-24), for FEBio 4.12. - License: MIT assumed; upstream ships no licence (asked).