diff --git a/src/language/modules/SchemeModule.cpp b/src/language/modules/SchemeModule.cpp index 4e6e873478e84299787aef9b4a2644af8406093b..8363afeb0071498dedb2384c23750920cc0c66dc 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 62dbd50536ad2e725e67a25d9cddf481a62b40c6..dd88e5fa8cc230802698181df8b0639af925b2e4 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)