From 8218743e9fa0f341a38d2ce0a36d089ed0c2fc34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Intro=C3=AFni?= <32884037+CINTROINI@users.noreply.github.com> Date: Fri, 10 Apr 2026 07:56:47 +0200 Subject: [PATCH 1/8] Update Spack-Repo to account for MFEM 4.9 + Hypre 3.1.0 and prepare release of v2.0.0 --- spack_repo/packages/sloth/package.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/spack_repo/packages/sloth/package.py b/spack_repo/packages/sloth/package.py index 4f41ee91..9fdb74b8 100644 --- a/spack_repo/packages/sloth/package.py +++ b/spack_repo/packages/sloth/package.py @@ -15,8 +15,8 @@ class Sloth(CMakePackage): homepage = "https://github.com/Collab4Sloth/SLOTH" url = "https://github.com/Collab4Sloth/SLOTH.git" - version("master", git='https://github.com/Collab4Sloth/SLOTH.git', branch='master', preferred=True) - version("1.0.0", tag='v1.0.0') + version("2.0.0", tag='v2.0.0', preferred=True) + version("master", git='https://github.com/Collab4Sloth/SLOTH.git', branch='master') variant('petsc' , default=False , description='Enable PETSc solvers, preconditioners, etc.') variant('shared' , default=False , description='Enable Building MFEM with dynamic libraries.') @@ -24,11 +24,11 @@ class Sloth(CMakePackage): depends_on('hypre+int64', when='+petsc') depends_on('petsc+int64', when='+petsc') - depends_on('hypre@2.33.0 +shared') - depends_on('mfem@4.8.0 +mpi+suite-sparse +sundials +superlu-dist +miniapps') + depends_on('hypre@3.1.0 +shared') + depends_on('mfem@4.9.0 +mpi+suite-sparse +sundials +superlu-dist +miniapps') - depends_on('mfem@4.8.0:+petsc', when='+petsc') - depends_on('mfem@4.8.0:+shared', when='+shared') + depends_on('mfem@4.9.0:+petsc', when='+petsc') + depends_on('mfem@4.9.0:+shared', when='+shared') depends_on('cmake', type='build') def setup_build_environment(self, env): From a3c6f427814244f03542b3a3a04ec1e891f6ff78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Intro=C3=AFni?= <32884037+CINTROINI@users.noreply.github.com> Date: Fri, 10 Apr 2026 07:57:08 +0200 Subject: [PATCH 2/8] Update version number --- CMakeLists.txt | 2 +- doc/Doxyfile.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 125caeb6..f7a4cd1e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.12) set(CMAKE_EXPORT_COMPILE_COMMANDS ON ) -project(sloth VERSION 1.0 LANGUAGES CXX) +project(sloth VERSION 2.0 LANGUAGES CXX) list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/modules) diff --git a/doc/Doxyfile.cmake b/doc/Doxyfile.cmake index 3543a2f6..be41609c 100644 --- a/doc/Doxyfile.cmake +++ b/doc/Doxyfile.cmake @@ -36,7 +36,7 @@ PROJECT_NAME= SLOTH # The PROJECT_NUMBER tag can be used to enter a project or revision number. This # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER= "v1.0.0" +PROJECT_NUMBER= "v2.0.0" # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a From 7b96bc91df692fb2131a7a2a1744507c44660642 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Intro=C3=AFni?= <32884037+CINTROINI@users.noreply.github.com> Date: Fri, 10 Apr 2026 07:57:25 +0200 Subject: [PATCH 3/8] Typo --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 31c65768..a406ba2a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -12,7 +12,7 @@ Using the issue tracker The issue tracker is the preferred channel for bug reports, features requests and submitting pull requests, but please respect the following restrictions: -- Please do not use the issue tracker for personal support requests (contact directly the authors clement.introini@cea.fr +- Please do not use the issue tracker for personal support requests (contact directly the authors clement.introini@cea.fr) Bug reports =========== From 781e2f11a34e1156633db17092910cf359d62641 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Intro=C3=AFni?= <32884037+CINTROINI@users.noreply.github.com> Date: Fri, 10 Apr 2026 07:57:49 +0200 Subject: [PATCH 4/8] Add contributor --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 1acc7a8e..e1d2ade2 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,7 @@ For more details, see [CONTRIBUTING.md](CONTRIBUTING.md). Main guidelines are: --- - [Alessandro Scapini (PhD 2024-2027)]() - [Clément Plumecocq (PhD 2023-2026)]() + - [Marine Harel (Master 2026)]() - [Victor Navarre (Master 2025)]() - [Jules Czuckermand (Master 2025)]() - [Mouad Bakhkakh (Master 2024)]() From dbfb411048e19ef9536823c39dd58137862a7a26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Intro=C3=AFni?= <32884037+CINTROINI@users.noreply.github.com> Date: Fri, 10 Apr 2026 08:53:02 +0200 Subject: [PATCH 5/8] Update Doxyfile.cmake --- doc/Doxyfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/Doxyfile.cmake b/doc/Doxyfile.cmake index be41609c..1e725187 100644 --- a/doc/Doxyfile.cmake +++ b/doc/Doxyfile.cmake @@ -41,7 +41,7 @@ PROJECT_NUMBER= "v2.0.0" # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a # quick idea about the purpose of the project. Keep the description short. -PROJECT_BRIEF= "PhaseField solver" +PROJECT_BRIEF= "The multiphase-field multicomponent framework of the PLEIADES platform based on MFEM" # With the PROJECT_LOGO tag one can specify a logo or an icon that is included # in the documentation. The maximum height of the logo should not exceed 55 From 445b698765328b46d89920534f7f740b077dbb43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Intro=C3=AFni?= <32884037+CINTROINI@users.noreply.github.com> Date: Fri, 10 Apr 2026 10:10:06 +0200 Subject: [PATCH 6/8] Debug recommandations --- .../include/Coefficients/MfemCoefficient.hpp | 19 +++++++++---------- .../BlockAllenCahnNLFormIntegrator.tpp | 10 ---------- .../CahnHilliardNLFormIntegrator.tpp | 11 ----------- .../DiffusionFluxNLFormIntegrator.tpp | 4 ---- .../Integrators/RobinNLFormIntegrator.hpp | 2 +- .../Integrators/RobinNLFormIntegrator.tpp | 4 ++-- .../Integrators/TimeCHNLFormIntegrator.tpp | 1 - .../Integrators/TimeNLFormIntegrator.tpp | 1 - kernel/include/Operators/OperatorBase.tpp | 2 +- 9 files changed, 13 insertions(+), 41 deletions(-) diff --git a/kernel/include/Coefficients/MfemCoefficient.hpp b/kernel/include/Coefficients/MfemCoefficient.hpp index 9c8b0829..cd69fa72 100644 --- a/kernel/include/Coefficients/MfemCoefficient.hpp +++ b/kernel/include/Coefficients/MfemCoefficient.hpp @@ -32,18 +32,17 @@ class MfemCoefficient : public mfem::Coefficient { private: + int id_ = 0; Coefficients sloth_coefficient_; - - const mfem::ParGridFunction &gf_; - const std::vector &vaux_gf_; + const mfem::ParGridFunction& gf_; + const std::vector& vaux_gf_; mutable std::vector vaux_gf_at_ip_; - int id_ = 0; public: - MfemCoefficient(int id, const Coefficients &coef, const mfem::ParGridFunction &vun, - const std::vector &vauxn); - double Eval(mfem::ElementTransformation &T, const mfem::IntegrationPoint &ip) override; + MfemCoefficient(int id, const Coefficients& coef, const mfem::ParGridFunction& vun, + const std::vector& vauxn); + double Eval(mfem::ElementTransformation& T, const mfem::IntegrationPoint& ip) override; virtual ~MfemCoefficient() = default; }; @@ -54,8 +53,8 @@ class MfemCoefficient : public mfem::Coefficient { * @param vun * @param vauxn */ -MfemCoefficient::MfemCoefficient(int id, const Coefficients &coef, const mfem::ParGridFunction &vun, - const std::vector &vauxn) +MfemCoefficient::MfemCoefficient(int id, const Coefficients& coef, const mfem::ParGridFunction& vun, + const std::vector& vauxn) : id_(id), sloth_coefficient_(coef), gf_(vun), vaux_gf_(vauxn) {} /** @@ -65,7 +64,7 @@ MfemCoefficient::MfemCoefficient(int id, const Coefficients &coef, const mfem::P * @param ip * @return double */ -double MfemCoefficient::Eval(mfem::ElementTransformation &T, const mfem::IntegrationPoint &ip) { +double MfemCoefficient::Eval(mfem::ElementTransformation& T, const mfem::IntegrationPoint& ip) { if (this->sloth_coefficient_[id_].is_scalar()) { return this->sloth_coefficient_[id_].compute(); } diff --git a/kernel/include/Integrators/BlockAllenCahnNLFormIntegrator.tpp b/kernel/include/Integrators/BlockAllenCahnNLFormIntegrator.tpp index 44dd9722..cac8320c 100644 --- a/kernel/include/Integrators/BlockAllenCahnNLFormIntegrator.tpp +++ b/kernel/include/Integrators/BlockAllenCahnNLFormIntegrator.tpp @@ -180,8 +180,6 @@ void BlockAllenCahnNLFormIntegrator::AssembleElementVector( const auto& eta = *elfun[off_blk] * Psi; - const auto& phi = *elfun[blk] * Psi; - const auto& phin = this->u_old_[blk].GetValue(Tr, ip); vaux_gf_at_ip.clear(); for (const auto& aux_gf : vaux_gf_) { vaux_gf_at_ip.emplace_back(std::move(aux_gf.GetValue(Tr, ip))); @@ -213,7 +211,6 @@ void BlockAllenCahnNLFormIntegrator::AssembleElementVector( // { int blk = 1; - int off_blk = 0; mfem::DenseMatrix gradPsi; mfem::Vector Psi, gradU; int nd = el[blk]->GetDof(); @@ -241,8 +238,6 @@ void BlockAllenCahnNLFormIntegrator::AssembleElementVector( u_values[off_blk] = (*elfun[off_blk]) * Psi; u_values[off_blk + num_blocks] = this->u_old_[off_blk].GetValue(Tr, ip); } - const auto& phi = *elfun[off_blk] * Psi; - const auto& phin = this->u_old_[off_blk].GetValue(Tr, ip); const double coef_mob = this->compute_coefficient(mobility[blk], std::span(u_values), @@ -302,8 +297,6 @@ void BlockAllenCahnNLFormIntegrator::AssembleElementGrad( const mfem::IntegrationPoint& ip = ir->IntPoint(i); el[blk]->CalcShape(ip, Psi); Tr.SetIntPoint(&ip); - const auto& phi = *elfun[blk] * Psi; - const auto& phin = this->u_old_[blk].GetValue(Tr, ip); // Get aux values at ip TODO(cci) (move in method) vaux_gf_at_ip.clear(); for (const auto& aux_gf : vaux_gf_) { @@ -375,7 +368,6 @@ void BlockAllenCahnNLFormIntegrator::AssembleElementGrad( // Block 1 1 dR(eta)deta=dR(eta)dphi=d(M eta)/deta { int blk = 1; - int off_blk = 0; mfem::DenseMatrix gradPsi; mfem::Vector Psi, gradU; int nd = el[blk]->GetDof(); @@ -403,8 +395,6 @@ void BlockAllenCahnNLFormIntegrator::AssembleElementGrad( u_values[off_blk] = (*elfun[off_blk]) * Psi; u_values[off_blk + num_blocks] = this->u_old_[off_blk].GetValue(Tr, ip); } - const auto& phi = *elfun[off_blk] * Psi; - const auto& phin = this->u_old_[off_blk].GetValue(Tr, ip); const double coef_mob = -this->compute_coefficient(mobility[blk], std::span(u_values), std::span(vaux_gf_at_ip)) * diff --git a/kernel/include/Integrators/CahnHilliardNLFormIntegrator.tpp b/kernel/include/Integrators/CahnHilliardNLFormIntegrator.tpp index a94c2b30..d89d921c 100644 --- a/kernel/include/Integrators/CahnHilliardNLFormIntegrator.tpp +++ b/kernel/include/Integrators/CahnHilliardNLFormIntegrator.tpp @@ -210,8 +210,6 @@ void CahnHilliardNLFormIntegrator::AssembleElementVector( Tr.SetIntPoint(&ip); const auto& mu = *elfun[off_blk] * Psi; - const auto& phi = *elfun[blk] * Psi; - const auto& phin = this->u_old_[blk].GetValue(Tr, ip); // Get aux values at ip TODO(cci) (move in method) vaux_gf_at_ip.clear(); for (const auto& aux_gf : vaux_gf_) { @@ -245,7 +243,6 @@ void CahnHilliardNLFormIntegrator::AssembleElementVector( // { int blk = 1; - int off_blk = 0; mfem::DenseMatrix gradPsi; mfem::Vector Psi, gradU; int nd = el[blk]->GetDof(); @@ -263,8 +260,6 @@ void CahnHilliardNLFormIntegrator::AssembleElementVector( el[blk]->CalcShape(ip, Psi); // Tr.SetIntPoint(&ip); - const auto& phi = *elfun[off_blk] * Psi; - const auto& phin = this->u_old_[off_blk].GetValue(Tr, ip); vaux_gf_at_ip.clear(); for (const auto& aux_gf : vaux_gf_) { vaux_gf_at_ip.emplace_back(std::move(aux_gf.GetValue(Tr, ip))); @@ -333,9 +328,6 @@ void CahnHilliardNLFormIntegrator::AssembleElementGrad( el[blk]->CalcShape(ip, Psi); Tr.SetIntPoint(&ip); - const auto& phi = *elfun[blk] * Psi; - const auto& phin = this->u_old_[blk].GetValue(Tr, ip); - // Get aux values at ip TODO(cci) (move in method) vaux_gf_at_ip.clear(); for (const auto& aux_gf : vaux_gf_) { @@ -408,7 +400,6 @@ void CahnHilliardNLFormIntegrator::AssembleElementGrad( // Block 1 1 dR(mu)dmu=dR(mu)dphi=d(div M grad mu)/dmu { int blk = 1; - int off_blk = 0; mfem::DenseMatrix gradPsi; mfem::Vector Psi, gradU; int nd = el[blk]->GetDof(); @@ -436,8 +427,6 @@ void CahnHilliardNLFormIntegrator::AssembleElementGrad( u_values[off_blk] = (*elfun[off_blk]) * Psi; u_values[off_blk + num_blocks] = this->u_old_[off_blk].GetValue(Tr, ip); } - const auto& phi = *elfun[off_blk] * Psi; - const auto& phin = this->u_old_[off_blk].GetValue(Tr, ip); const double coef_mob = this->compute_coefficient(mobility[blk], std::span(u_values), diff --git a/kernel/include/Integrators/DiffusionFluxNLFormIntegrator.tpp b/kernel/include/Integrators/DiffusionFluxNLFormIntegrator.tpp index d7e52f10..83f81919 100644 --- a/kernel/include/Integrators/DiffusionFluxNLFormIntegrator.tpp +++ b/kernel/include/Integrators/DiffusionFluxNLFormIntegrator.tpp @@ -164,8 +164,6 @@ void DiffusionFluxNLFormIntegrator::AssembleElementVector( el[blk]->CalcShape(ip, Psi); Tr.SetIntPoint(&ip); - const auto& u = *elfun[blk] * Psi; - const auto& un = this->u_old_[blk].GetValue(Tr, ip); // Get aux values at ip TODO(cci) (move in method) vaux_gf_at_ip.clear(); for (const auto& aux_gf : vaux_gf_) { @@ -238,8 +236,6 @@ void DiffusionFluxNLFormIntegrator::AssembleElementGrad( for (int i = 0; i < ir->GetNPoints(); i++) { const mfem::IntegrationPoint& ip = ir->IntPoint(i); el[blk]->CalcShape(ip, Psi); - const auto& u = *elfun[blk] * Psi; - const auto& un = this->u_old_[blk].GetValue(Tr, ip); // Get aux values at ip TODO(cci) (move in method) vaux_gf_at_ip.clear(); for (const auto& aux_gf : vaux_gf_) { diff --git a/kernel/include/Integrators/RobinNLFormIntegrator.hpp b/kernel/include/Integrators/RobinNLFormIntegrator.hpp index 939ece4f..72d70c71 100644 --- a/kernel/include/Integrators/RobinNLFormIntegrator.hpp +++ b/kernel/include/Integrators/RobinNLFormIntegrator.hpp @@ -52,8 +52,8 @@ class RobinNLFormIntegrator : public SlothNLFormIntegrator { protected: std::vector vaux_gf_; - const unsigned int bdr_id_ = 0; // Boundary id const unsigned int blk_ = 0; // Block to which apply Robin + const unsigned int bdr_id_ = 0; // Boundary id Coefficient robin_a; Coefficient robin_b; diff --git a/kernel/include/Integrators/RobinNLFormIntegrator.tpp b/kernel/include/Integrators/RobinNLFormIntegrator.tpp index 2f86e5cd..9d601736 100644 --- a/kernel/include/Integrators/RobinNLFormIntegrator.tpp +++ b/kernel/include/Integrators/RobinNLFormIntegrator.tpp @@ -157,7 +157,7 @@ void RobinNLFormIntegrator::AssembleElementVector( *elvect[blk] = 0.; // Add Robin on the right block - if (blk == blk_) { + if (blk == static_cast(blk_)) { const mfem::IntegrationRule* ir = &mfem::IntRules.Get(el[blk]->GetGeomType(), 2 * el[blk]->GetOrder() + Tr.OrderW()); @@ -225,7 +225,7 @@ void RobinNLFormIntegrator::AssembleElementGrad( *elmat(blk, blk) = 0.0; // Add Robin on the right block - if (blk == blk_) { + if (blk == static_cast(blk_)) { const mfem::IntegrationRule* ir = &mfem::IntRules.Get(el[blk]->GetGeomType(), 2 * el[blk]->GetOrder() + Tr.OrderW()); diff --git a/kernel/include/Integrators/TimeCHNLFormIntegrator.tpp b/kernel/include/Integrators/TimeCHNLFormIntegrator.tpp index 297b0112..8c90f45f 100644 --- a/kernel/include/Integrators/TimeCHNLFormIntegrator.tpp +++ b/kernel/include/Integrators/TimeCHNLFormIntegrator.tpp @@ -312,7 +312,6 @@ void TimeCHNLFormIntegrator::AssembleElementGrad( Tr.SetIntPoint(&ip); el[blk]->CalcPhysShape(Tr, Psi); - const auto& phi = *elfun[blk] * Psi; // Get aux values at ip TODO(cci) (move in method) for (size_t k = 0; k < vaux_gf_.size(); ++k) { vaux_gf_at_ip[k] = vaux_gf_[k].GetValue(Tr, ip); diff --git a/kernel/include/Integrators/TimeNLFormIntegrator.tpp b/kernel/include/Integrators/TimeNLFormIntegrator.tpp index a4d54f7a..c7be183e 100644 --- a/kernel/include/Integrators/TimeNLFormIntegrator.tpp +++ b/kernel/include/Integrators/TimeNLFormIntegrator.tpp @@ -280,7 +280,6 @@ void TimeNLFormIntegrator::AssembleElementGrad( const mfem::IntegrationPoint& ip = ir->IntPoint(i); el[blk]->CalcShape(ip, Psi); Tr.SetIntPoint(&ip); - const auto& u = *elfun[blk] * Psi; // Get aux values at ip TODO(cci) (move in method) for (size_t k = 0; k < vaux_gf_.size(); ++k) { vaux_gf_at_ip[k] = vaux_gf_[k].GetValue(Tr, ip); diff --git a/kernel/include/Operators/OperatorBase.tpp b/kernel/include/Operators/OperatorBase.tpp index 5868ff8f..a6bee091 100644 --- a/kernel/include/Operators/OperatorBase.tpp +++ b/kernel/include/Operators/OperatorBase.tpp @@ -423,7 +423,7 @@ void OperatorBase::build_rhs_nonlinear_form(const std::vector Date: Fri, 10 Apr 2026 10:10:17 +0200 Subject: [PATCH 7/8] Add student contributor --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index e1d2ade2..3da765ec 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,7 @@ For more details, see [CONTRIBUTING.md](CONTRIBUTING.md). Main guidelines are: - [Alessandro Scapini (PhD 2024-2027)]() - [Clément Plumecocq (PhD 2023-2026)]() - [Marine Harel (Master 2026)]() + - [Tom Schnetz (Master 2026)]() - [Victor Navarre (Master 2025)]() - [Jules Czuckermand (Master 2025)]() - [Mouad Bakhkakh (Master 2024)]() From 62ac2a59ba628814367127a1c785e948f517e66c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Intro=C3=AFni?= <32884037+CINTROINI@users.noreply.github.com> Date: Fri, 10 Apr 2026 10:28:30 +0200 Subject: [PATCH 8/8] Update Doxyfile.cmake --- doc/Doxyfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/Doxyfile.cmake b/doc/Doxyfile.cmake index 1e725187..9165500e 100644 --- a/doc/Doxyfile.cmake +++ b/doc/Doxyfile.cmake @@ -763,7 +763,7 @@ INPUT_ENCODING= UTF-8 # *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, # *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, # *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf and *.qsf. -FILE_PATTERNS= *.hpp *.md +FILE_PATTERNS= *.cpp *.tpp *.hpp *.md # The RECURSIVE tag can be used to specify whether or not subdirectories should # be searched for input files as well.