10 #if defined(__GNUC__) && !defined(__clang__)
11 # pragma GCC diagnostic push
13 # pragma GCC diagnostic ignored "-Wlogical-op"
16 #include <Eigen/Sparse>
17 #include <Eigen/src/Core/util/DisableStupidWarnings.h>
20 # pragma GCC diagnostic pop
41 for (
int k = 0; k < 3; k++) {
48 for (
int k = 0; k < 3; k++) {
73 for (
int k = 0; k < 3; k++) {
74 for (
int l = 0;
l < 3;
l++) {
75 coeffRef(
l, k) =
v[k][
l];
82 for (
int k = 0; k < 3; k++) {
83 for (
int l = 0;
l < 3;
l++) {
84 coeffRef(
l, k) =
v[k][
l];
115 float *
v3(
int vertex)
117 return &coeffRef(3 * vertex);
120 const float *
v3(
int vertex)
const
122 return &coeffRef(3 * vertex);
150 m_trips.reserve(numverts * 9);
157 for (
int k = 0; k < 3; k++) {
158 for (
int l = 0;
l < 3;
l++) {
159 m_trips.push_back(
Triplet(i + k, j +
l, m.coeff(
l, k)));
168 for (
int k = 0; k < 3; k++) {
169 for (
int l = 0;
l < 3;
l++) {
170 m_trips.push_back(
Triplet(i + k, j +
l, -m.coeff(
l, k)));
177 m.setFromTriplets(m_trips.begin(), m_trips.end());
185 typedef Eigen::ConjugateGradient<lMatrix, Eigen::Lower, Eigen::DiagonalPreconditioner<Scalar>>
188 using Eigen::ComputationInfo;
192 for (
int i = 0; i <
v.rows(); i++) {
193 if (i > 0 && i % 3 == 0) {
197 printf(
"%f,\n",
v[i]);
203 for (
int j = 0; j < m.rows(); j++) {
204 if (j > 0 && j % 3 == 0) {
208 for (
int i = 0; i < m.cols(); i++) {
209 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)