Download vendor/libigl/tests/include/igl/bbw.cpp from AVSim/simulation-package: direct link, hf CLI and curl.
- Browser
- Download file 892 Bytes
-
https://huggingface.co/datasets/AVSim/simulation-package/resolve/main/vendor/libigl/tests/include/igl/bbw.cpp
- Command line
-
hf download hf://datasets/AVSim/simulation-package/vendor/libigl/tests/include/igl/bbw.cpp
-
curl -L -o bbw.cpp https://huggingface.co/datasets/AVSim/simulation-package/resolve/main/vendor/libigl/tests/include/igl/bbw.cpp
892 Bytes
| TEST_CASE("bbw: decimated_knight", "[igl]" "[slow]") | |
| { | |
| Eigen::MatrixXd V,C; | |
| Eigen::MatrixXi T,F,E; | |
| igl::readMESH(test_common::data_path("decimated-knight.mesh"),V,T,F); | |
| igl::readTGF(test_common::data_path("decimated-knight.tgf"),C,E); | |
| Eigen::MatrixXd W_groundtruth, Was, Wmo; | |
| igl::readDMAT( | |
| test_common::data_path("decimated-knight-matlab-active-set.dmat"),W_groundtruth); | |
| Eigen::VectorXi b; | |
| Eigen::MatrixXd bc; | |
| igl::boundary_conditions(V,T,C,Eigen::VectorXi(),E,Eigen::MatrixXi(),b,bc); | |
| igl::BBWData params; | |
| params.active_set_params.max_iter = 100; | |
| igl::bbw(V,T,b,bc,params,Was); | |
| // igl::writeDMAT("decimated-knight-as.dmat",Was); | |
| REQUIRE (1e-4 > (Was-W_groundtruth).array().abs().maxCoeff()); | |
| } | |