11#if defined(__GNUC__) && !defined(__clang__)
12# pragma GCC diagnostic push
14# pragma GCC diagnostic ignored "-Wlogical-op"
17#include <Eigen/Sparse>
18#include <Eigen/src/Core/util/DisableStupidWarnings.h>
21# pragma GCC diagnostic pop
41 for (
int k = 0; k < 3; k++) {
48 for (
int k = 0; k < 3; k++) {
71 for (
int k = 0; k < 3; k++) {
72 for (
int l = 0;
l < 3;
l++) {
73 coeffRef(
l, k) =
v[k][
l];
80 for (
int k = 0; k < 3; k++) {
81 for (
int l = 0;
l < 3;
l++) {
82 coeffRef(
l, k) =
v[k][
l];
107 base_t::operator=(rhs);
113 return &coeffRef(3 *
vertex);
118 return &coeffRef(3 *
vertex);
144 m_trips.reserve(numverts * 9);
151 for (
int k = 0; k < 3; k++) {
152 for (
int l = 0;
l < 3;
l++) {
153 m_trips.emplace_back(i + k, j +
l, m.coeff(
l, k));
162 for (
int k = 0; k < 3; k++) {
163 for (
int l = 0;
l < 3;
l++) {
164 m_trips.emplace_back(i + k, j +
l, -m.coeff(
l, k));
171 m.setFromTriplets(m_trips.begin(), m_trips.end());
180 Eigen::ConjugateGradient<lMatrix, Eigen::Lower, Eigen::DiagonalPreconditioner<Scalar>>;
182using Eigen::ComputationInfo;
186 for (
int i = 0; i <
v.rows(); i++) {
187 if (i > 0 && i % 3 == 0) {
197 for (
int j = 0; j < m.rows(); j++) {
198 if (j > 0 && j % 3 == 0) {
202 for (
int i = 0; i < m.cols(); i++) {
203 if (i > 0 && i % 3 == 0) {
Matrix3 & operator=(const ctype &v)
Vector3 & operator=(const ctype &v)
lVector3f & operator=(T rhs)
const float * v3(int vertex) const
BLI_INLINE void print_lvector(const lVector3f &v)
ATTR_WARN_UNUSED_RESULT const BMLoop * l
BLI_INLINE void implicit_print_matrix_elem(float v)
Eigen::SparseMatrix< Scalar > lMatrix
ATTR_WARN_UNUSED_RESULT const BMVert * v
std::vector< Triplet > TripletList
BMesh const char void * data
Eigen::ConjugateGradient< lMatrix, Eigen::Lower, Eigen::DiagonalPreconditioner< Scalar > > ConjugateGradient
Eigen::Triplet< Scalar > Triplet
BLI_INLINE void print_lmatrix(const lMatrix &m)
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float
void reserve(int numverts)
void construct(lMatrix &m)
void add(int i, int j, const Matrix3 &m)
void sub(int i, int j, const Matrix3 &m)