From 38a381c7dadab176a4ace87c34869c9529515795 Mon Sep 17 00:00:00 2001
From: labourasse <labourassee@gmail.com>
Date: Thu, 23 Feb 2023 19:05:47 +0100
Subject: [PATCH] Add skeleton for smoother

---
 src/language/modules/SchemeModule.cpp | 25 +++++++++++++++++++++++++
 src/mesh/CMakeLists.txt               |  1 +
 2 files changed, 26 insertions(+)

diff --git a/src/language/modules/SchemeModule.cpp b/src/language/modules/SchemeModule.cpp
index 4e6e87347..8363afeb0 100644
--- a/src/language/modules/SchemeModule.cpp
+++ b/src/language/modules/SchemeModule.cpp
@@ -16,6 +16,7 @@
 #include <mesh/MeshData.hpp>
 #include <mesh/MeshDataManager.hpp>
 #include <mesh/MeshRandomizer.hpp>
+#include <mesh/MeshSmoother.hpp>
 #include <scheme/AcousticSolver.hpp>
 #include <scheme/AxisBoundaryConditionDescriptor.hpp>
 #include <scheme/DirichletBoundaryConditionDescriptor.hpp>
@@ -239,6 +240,30 @@ SchemeModule::SchemeModule()
 
                               ));
 
+  this->_addBuiltinFunction("smoothMesh", std::function(
+
+                                            [](std::shared_ptr<const IMesh> p_mesh,
+                                               const std::vector<std::shared_ptr<const IBoundaryConditionDescriptor>>&
+                                                 bc_descriptor_list) -> std::shared_ptr<const IMesh> {
+                                              MeshSmootherHandler handler;
+                                              return handler.getSmoothedMesh(*p_mesh, bc_descriptor_list);
+                                            }
+
+                                            ));
+
+  this->_addBuiltinFunction("smoothMesh",
+                            std::function(
+
+                              [](std::shared_ptr<const IMesh> p_mesh,
+                                 const std::vector<std::shared_ptr<const IBoundaryConditionDescriptor>>&
+                                   bc_descriptor_list,
+                                 const FunctionSymbolId& function_symbol_id) -> std::shared_ptr<const IMesh> {
+                                MeshSmootherHandler handler;
+                                return handler.getSmoothedMesh(*p_mesh, bc_descriptor_list, function_symbol_id);
+                              }
+
+                              ));
+
   this->_addBuiltinFunction("fixed", std::function(
 
                                        [](std::shared_ptr<const IBoundaryDescriptor> boundary)
diff --git a/src/mesh/CMakeLists.txt b/src/mesh/CMakeLists.txt
index 62dbd5053..dd88e5fa8 100644
--- a/src/mesh/CMakeLists.txt
+++ b/src/mesh/CMakeLists.txt
@@ -34,5 +34,6 @@ add_library(
   MeshLineNodeBoundary.cpp
   MeshNodeBoundary.cpp
   MeshRandomizer.cpp
+  MeshSmoother.cpp
   MeshTransformer.cpp
   SynchronizerManager.cpp)
-- 
GitLab