Skip to content
Snippets Groups Projects
Commit 298d6cef authored by Stéphane Del Pino's avatar Stéphane Del Pino
Browse files

[ci-skip] Begin Escobar smoother implementation

parent 937c5bae
No related branches found
No related tags found
No related merge requests found
...@@ -19,6 +19,13 @@ class TriangleTransformation<2> ...@@ -19,6 +19,13 @@ class TriangleTransformation<2>
double m_jacobian_determinant; double m_jacobian_determinant;
public: public:
PUGS_INLINE
TinyMatrix<Dimension>
jacobian() const
{
return m_jacobian;
}
PUGS_INLINE PUGS_INLINE
TinyVector<Dimension> TinyVector<Dimension>
operator()(const TinyVector<2>& x) const operator()(const TinyVector<2>& x) const
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include <mesh/MeshDataManager.hpp> #include <mesh/MeshDataManager.hpp>
#include <mesh/MeshRandomizer.hpp> #include <mesh/MeshRandomizer.hpp>
#include <mesh/MeshSmoother.hpp> #include <mesh/MeshSmoother.hpp>
#include <mesh/MeshSmootherEscobar.hpp>
#include <scheme/AcousticSolver.hpp> #include <scheme/AcousticSolver.hpp>
#include <scheme/AxisBoundaryConditionDescriptor.hpp> #include <scheme/AxisBoundaryConditionDescriptor.hpp>
#include <scheme/DirichletBoundaryConditionDescriptor.hpp> #include <scheme/DirichletBoundaryConditionDescriptor.hpp>
...@@ -306,6 +307,30 @@ SchemeModule::SchemeModule() ...@@ -306,6 +307,30 @@ SchemeModule::SchemeModule()
)); ));
this->_addBuiltinFunction("smoothMeshEscobar",
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> {
MeshSmootherEscobarHandler handler;
return handler.getSmoothedMesh(p_mesh, bc_descriptor_list);
}
));
this->_addBuiltinFunction("qualityEscobar",
std::function(
#warning REMOVE BEFORE MERGING
[](std::shared_ptr<const IMesh> p_mesh,
const std::vector<std::shared_ptr<const IBoundaryConditionDescriptor>>&
bc_descriptor_list) -> std::shared_ptr<const ItemValueVariant> {
MeshSmootherEscobarHandler handler;
return handler.getQuality(p_mesh, bc_descriptor_list);
}
));
this->_addBuiltinFunction("fixed", std::function( this->_addBuiltinFunction("fixed", std::function(
[](std::shared_ptr<const IBoundaryDescriptor> boundary) [](std::shared_ptr<const IBoundaryDescriptor> boundary)
......
...@@ -39,5 +39,6 @@ add_library( ...@@ -39,5 +39,6 @@ add_library(
MeshNodeInterface.cpp MeshNodeInterface.cpp
MeshRandomizer.cpp MeshRandomizer.cpp
MeshSmoother.cpp MeshSmoother.cpp
MeshSmootherEscobar.cpp
MeshTransformer.cpp MeshTransformer.cpp
SynchronizerManager.cpp) SynchronizerManager.cpp)
This diff is collapsed.
#ifndef MESH_SMOOTHER_ESCOBAR_HPP
#define MESH_SMOOTHER_ESCOBAR_HPP
#include <mesh/IMesh.hpp>
#include <scheme/IBoundaryConditionDescriptor.hpp>
#include <memory>
#include <vector>
class FunctionSymbolId;
class IZoneDescriptor;
class DiscreteFunctionVariant;
class ItemValueVariant;
class MeshSmootherEscobarHandler
{
private:
template <size_t Dimension>
class MeshSmootherEscobar;
public:
std::shared_ptr<const ItemValueVariant> getQuality(
const std::shared_ptr<const IMesh>& mesh,
const std::vector<std::shared_ptr<const IBoundaryConditionDescriptor>>& bc_descriptor_list) const;
std::shared_ptr<const IMesh> getSmoothedMesh(
const std::shared_ptr<const IMesh>& mesh,
const std::vector<std::shared_ptr<const IBoundaryConditionDescriptor>>& bc_descriptor_list) const;
std::shared_ptr<const IMesh> getSmoothedMesh(
const std::shared_ptr<const IMesh>& mesh,
const std::vector<std::shared_ptr<const IBoundaryConditionDescriptor>>& bc_descriptor_list,
const FunctionSymbolId& function_symbol_id) const;
std::shared_ptr<const IMesh> getSmoothedMesh(
const std::shared_ptr<const IMesh>& mesh,
const std::vector<std::shared_ptr<const IBoundaryConditionDescriptor>>& bc_descriptor_list,
const std::vector<std::shared_ptr<const IZoneDescriptor>>& smoothing_zone_list) const;
std::shared_ptr<const IMesh> getSmoothedMesh(
const std::shared_ptr<const IMesh>& mesh,
const std::vector<std::shared_ptr<const IBoundaryConditionDescriptor>>& bc_descriptor_list,
const std::vector<std::shared_ptr<const DiscreteFunctionVariant>>& smoothing_zone_list) const;
MeshSmootherEscobarHandler() = default;
MeshSmootherEscobarHandler(MeshSmootherEscobarHandler&&) = default;
~MeshSmootherEscobarHandler() = default;
};
#endif // MESH_SMOOTHER_ESCOBAR_HPP
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment