9#pragma warning(disable: 4068)
10#pragma warning(disable: 4127)
11#pragma warning(disable: 4464)
12#pragma warning(disable: 5054)
13#pragma clang diagnostic push
14#pragma clang diagnostic ignored "-Wdeprecated-anon-enum-enum-conversion"
15#pragma clang diagnostic ignored "-Wunknown-warning-option"
16#pragma clang diagnostic ignored "-Wunused-but-set-variable"
17#include <Eigen/SparseCore>
18#pragma clang diagnostic pop
64 const VertBitSet &
region()
const {
return region_; }
67 const VertBitSet &
freeVerts()
const {
return freeVerts_; }
81 template <
typename I,
typename G,
typename S>
82 void prepareRhs_(
I && iniRhs, G && g, S && s );
90 VertBitSet freeVerts_;
93 VertBitSet fixedSharpVertices_;
96 VertBitSet firstLayerFixedVerts_;
102 double centerCoeff = 0;
105 std::vector<Equation> equations_;
112 std::vector<Element> nonZeroElements_;
115 Vector< int, VertId > regionVert2id_;
116 Vector< int, VertId > freeVert2id_;
118 using SparseMatrix = Eigen::SparseMatrix<double,Eigen::RowMajor>;
122 bool solverValid_ =
false;
123 using SparseMatrixColMajor = Eigen::SparseMatrix<double,Eigen::ColMajor>;
129 virtual ~Solver() =
default;
130 virtual void compute(
const SparseMatrixColMajor& A ) = 0;
131 virtual Eigen::VectorXd solve(
const Eigen::VectorXd& rhs ) = 0;
133 std::unique_ptr<Solver> solver_;
136 bool rhsValid_ =
false;
137 Eigen::VectorXd rhs_[3];
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:46
Definition MRLaplacian.h:32
VertBitSet firstLayerFixedVerts() const
Definition MRLaplacian.h:70
const VertBitSet & freeVerts() const
Definition MRLaplacian.h:67
MRMESH_API void fixVertex(VertId v, const Vector3f &fixedPos, bool smooth=true)
MRMESH_API void updateSolver()
MRMESH_API void init(const VertBitSet &freeVerts, EdgeWeights weights, RememberShape rem=Laplacian::RememberShape::Yes)
RememberShape
Definition MRLaplacian.h:35
Laplacian(Mesh &mesh)
Definition MRLaplacian.h:40
const VertBitSet & region() const
Definition MRLaplacian.h:64
MRMESH_API void fixVertex(VertId v, bool smooth=true)
MRMESH_API void applyToScalar(VertScalars &scalarField)
Definition MRCameraOrientationPlugin.h:8
EdgeWeights
determines the weight of each edge in applications like Laplacian
Definition MREnums.h:8
I
Definition MRMesh/MRMeshFwd.h:88
Definition MRMesh/MRMesh.h:23