#define VERBOSE #include "bbw.h" #include #include #include #include #include #include #include #define EIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET #include #include #include igl::BBWData::BBWData(): partition_unity(false) {} void igl::BBWData::print() { using namespace std; cout<<"partition_unity: "< IGL_INLINE bool igl::bbw( const Eigen::MatrixBase & V, const Eigen::MatrixBase & Ele, const Eigen::MatrixBase & b, const Eigen::MatrixBase & bc, igl::BBWData & data, Eigen::MatrixBase & W ) { using namespace igl; using namespace std; using namespace Eigen; // number of domain vertices int n = V.rows(); // number of handles int m = bc.cols(); SparseMatrix L; cotmatrix(V,Ele,L); MassMatrixType mmtype = MASSMATRIX_VORONOI; if(Ele.cols() == 4) { mmtype = MASSMATRIX_BARYCENTRIC; } SparseMatrix M; SparseMatrix Mi; massmatrix(V,Ele,mmtype,M); invert_diag(M,Mi); // Biharmonic operator SparseMatrix Q = L.transpose() * Mi * L; W.derived().resize(n,m); if(data.partition_unity) { // Not yet implemented assert(false); }else { // No linear terms VectorXd c = VectorXd::Zero(n); // No linear constraints SparseMatrix A(0,n); VectorXd uc(0,1); VectorXd lc(0,1); // Upper and lower box constraints (Constant bounds) VectorXd ux = VectorXd::Ones(n); VectorXd lx = VectorXd::Zero(n); // Loop over handles for(int i = 0;i, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix, Eigen::Matrix >(Eigen::MatrixBase > const&, Eigen::MatrixBase > const&, Eigen::MatrixBase > const&, Eigen::MatrixBase > const&, igl::BBWData&, Eigen::MatrixBase >&); #endif