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
71 template <
typename I,
typename G,
typename S>
72 void prepareRhs_(
I && iniRhs, G && g, S && s );
92 double centerCoeff = 0;
95 std::vector<Equation> equations_;
102 std::vector<Element> nonZeroElements_;
105 Vector< int, VertId > regionVert2id_;
106 Vector< int, VertId > freeVert2id_;
108 using SparseMatrix = Eigen::SparseMatrix<double,Eigen::RowMajor>;
112 bool solverValid_ =
false;
113 using SparseMatrixColMajor = Eigen::SparseMatrix<double,Eigen::ColMajor>;
119 virtual ~Solver() =
default;
120 virtual void compute(
const SparseMatrixColMajor&
A ) = 0;
121 virtual Eigen::VectorXd solve(
const Eigen::VectorXd& rhs ) = 0;
123 std::unique_ptr<Solver> solver_;
126 bool rhsValid_ =
false;
127 Eigen::VectorXd rhs_[3];
int VertId
Definition MRDotNet/MRMeshFwd.h:51
#define MRMESH_API
Definition MRMesh/MRMeshFwd.h:46
Definition MRDotNet/MRBitSet.h:39
Definition MRLaplacian.h:32
VertBitSet firstLayerFixedVerts() const
Definition MRLaplacian.h:62
const VertBitSet & freeVerts() const
Definition MRLaplacian.h:60
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:58
MRMESH_API void fixVertex(VertId v, bool smooth=true)
MRMESH_API void applyToScalar(VertScalars &scalarField)
represents a 3-dimentional float-typed vector
Definition MRDotNet/MRVector3.h:8
Definition MRCameraOrientationPlugin.h:7
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