From cf6699c5649804b8392022e7f01bb5f75931ee3a Mon Sep 17 00:00:00 2001 From: Sanath Date: Wed, 21 May 2025 18:14:03 +0200 Subject: [PATCH 1/3] fixed constexpr --- include/solver.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/solver.h b/include/solver.h index 81fedd4..8197206 100644 --- a/include/solver.h +++ b/include/solver.h @@ -490,7 +490,7 @@ void Solver::postprocess(Reader reader, const char resultsFileName[], i const double Lx2 = reader.L[0] / 2.0; const double Ly2 = reader.L[1] / 2.0; const double Lz2 = reader.L[2] / 2.0; - constexpr double rs2 = 1.0 / std::sqrt(2.0); + constexpr double rs2 = 0.7071067811865475; // 1.0 / std::sqrt(2.0) VectorXd u_total(local_n0 * n_y * n_z * howmany); /* ---------- single sweep ------------------------------------------------- */ ptrdiff_t n = 0; From 46093fff09b75b761da705d65b64692044a534ae Mon Sep 17 00:00:00 2001 From: Sanath Keshav Date: Wed, 21 May 2025 20:37:20 +0200 Subject: [PATCH 2/3] Update CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 92ce63c..322e061 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # FANS Changelog +## latest + +- remove std::sqrt from constexpr - failed on Clang + ## v0.4.0 - Support compilaion on MacOS X via conda-forge https://github.com/DataAnalyticsEngineering/FANS/pull/59 From 8e517320af2276811666a932830385efef05be28 Mon Sep 17 00:00:00 2001 From: Sanath Keshav Date: Thu, 22 May 2025 07:29:28 +0200 Subject: [PATCH 3/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a303380..e900a83 100644 --- a/README.md +++ b/README.md @@ -233,7 +233,7 @@ FANS requires a JSON input file specifying the problem parameters. Example input - `macroscale_loading`: This defines the external loading applied to the microstructure. It is an array of arrays, where each sub-array represents a loading condition applied to the system. The format of the loading array depends on the problem type: - For `thermal` problems, the array typically has 3 components, representing the temperature gradients in the $x$, $y$, and $z$ directions. -- For `mechanical` problems, the array must have 6 components, corresponding to the components of the strain tensor in Mandel notation (e.g., $[\varepsilon_{11},\; \varepsilon_{22},\; \varepsilon_{33},\; \sqrt{2}\varepsilon_{12},\; \sqrt{2}\varepsilon_{13},\; \sqrt{2}\varepsilon_{23}]$). +- For `mechanical` problems, the array must have 6 components, corresponding to the components of the strain tensor in Mandel notation (e.g., $[\varepsilon_{11}, \varepsilon_{22}, \varepsilon_{33}, \sqrt{2}\varepsilon_{12}, \sqrt{2}\varepsilon_{13}, \sqrt{2}\varepsilon_{23}]$). In the case of path/time-dependent loading as shown, for example as in plasticity problems, the `macroscale_loading` array can include multiple steps with corresponding loading conditions.