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
40 for (
int k = 0; k < 3; k++) {
47 for (
int k = 0; k < 3; k++) {
70 for (
int k = 0; k < 3; k++) {
71 for (
int l = 0;
l < 3;
l++) {
72 coeffRef(
l, k) =
v[k][
l];
79 for (
int k = 0; k < 3; k++) {
80 for (
int l = 0;
l < 3;
l++) {
81 coeffRef(
l, k) =
v[k][
l];
106 base_t::operator=(
rhs);
110 float *
v3(
int vertex)
112 return &coeffRef(3 * vertex);
115 const float *
v3(
int vertex)
const
117 return &coeffRef(3 * vertex);
143 m_trips.reserve(numverts * 9);
150 for (
int k = 0; k < 3; k++) {
151 for (
int l = 0;
l < 3;
l++) {
152 m_trips.push_back(
Triplet(i + k, j +
l, m.coeff(
l, k)));
161 for (
int k = 0; k < 3; k++) {
162 for (
int l = 0;
l < 3;
l++) {
163 m_trips.push_back(
Triplet(i + k, j +
l, -m.coeff(
l, k)));
170 m.setFromTriplets(m_trips.begin(), m_trips.end());
178typedef Eigen::ConjugateGradient<lMatrix, Eigen::Lower, Eigen::DiagonalPreconditioner<Scalar>>
181using Eigen::ComputationInfo;
185 for (
int i = 0; i <
v.rows(); i++) {
186 if (i > 0 && i % 3 == 0) {
196 for (
int j = 0; j < m.rows(); j++) {
197 if (j > 0 && j % 3 == 0) {
201 for (
int i = 0; i < m.cols(); i++) {
202 if (i > 0 && i % 3 == 0) {
ATTR_WARN_UNUSED_RESULT const BMLoop * l
ATTR_WARN_UNUSED_RESULT const BMVert * v
Matrix3 & operator=(const ctype &v)
Vector3 & operator=(const ctype &v)
lVector3f & operator=(T rhs)
const float * v3(int vertex) const
local_group_size(16, 16) .push_constant(Type rhs
draw_view in_light_buf[] float
Eigen::ConjugateGradient< lMatrix, Eigen::Lower, Eigen::DiagonalPreconditioner< Scalar > > ConjugateGradient
std::vector< Triplet > TripletList
BLI_INLINE void print_lmatrix(const lMatrix &m)
Eigen::SparseMatrix< Scalar > lMatrix
BLI_INLINE void print_lvector(const lVector3f &v)
Eigen::Triplet< Scalar > Triplet
BLI_INLINE void implicit_print_matrix_elem(float v)
void construct(lMatrix &m)
void add(int i, int j, const Matrix3 &m)
void sub(int i, int j, const Matrix3 &m)
void reserve(int numverts)