26 #if defined(__GNUC__) && !defined(__clang__)
27 # pragma GCC diagnostic push
29 # pragma GCC diagnostic ignored "-Wlogical-op"
32 #include <Eigen/Sparse>
33 #include <Eigen/src/Core/util/DisableStupidWarnings.h>
36 # pragma GCC diagnostic pop
57 for (
int k = 0; k < 3; k++) {
64 for (
int k = 0; k < 3; k++) {
89 for (
int k = 0; k < 3; k++) {
90 for (
int l = 0;
l < 3;
l++) {
91 coeffRef(
l, k) =
v[k][
l];
98 for (
int k = 0; k < 3; k++) {
99 for (
int l = 0;
l < 3;
l++) {
100 coeffRef(
l, k) =
v[k][
l];
131 float *
v3(
int vertex)
133 return &coeffRef(3 * vertex);
136 const float *
v3(
int vertex)
const
138 return &coeffRef(3 * vertex);
166 m_trips.reserve(numverts * 9);
173 for (
int k = 0; k < 3; k++) {
174 for (
int l = 0;
l < 3;
l++) {
175 m_trips.push_back(
Triplet(i + k, j +
l, m.coeff(
l, k)));
184 for (
int k = 0; k < 3; k++) {
185 for (
int l = 0;
l < 3;
l++) {
186 m_trips.push_back(
Triplet(i + k, j +
l, -m.coeff(
l, k)));
193 m.setFromTriplets(m_trips.begin(), m_trips.end());
201 typedef Eigen::ConjugateGradient<lMatrix, Eigen::Lower, Eigen::DiagonalPreconditioner<Scalar>>
204 using Eigen::ComputationInfo;
208 for (
int i = 0; i <
v.rows(); i++) {
209 if (i > 0 && i % 3 == 0) {
213 printf(
"%f,\n",
v[i]);
219 for (
int j = 0; j < m.rows(); j++) {
220 if (j > 0 && j % 3 == 0) {
224 for (
int i = 0; i < m.cols(); i++) {
225 if (i > 0 && i % 3 == 0) {
typedef float(TangentPoint)[2]
ATTR_WARN_UNUSED_RESULT const BMLoop * l
ATTR_WARN_UNUSED_RESULT const BMVert * v
btGeneric6DofConstraint & operator=(btGeneric6DofConstraint &other)
Matrix3 & operator=(const ctype &v)
Vector3 & operator=(const ctype &v)
lVector3f & operator=(T rhs)
const float * v3(int vertex) const
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)