An Asymptotic Numerical Method for Inverse Elastic Shape Design

SIGGRAPH 2014


Reviews

Information

  • Paper topic: Fabrication
  • Software type: Code
  • Able to run a replicability test: True
  • Replicability score: 5
  • Software language: C/C++
  • License: unspecified
  • Build mechanism: IDE Project (VS,..)
  • Dependencies: VEGA / Intel Math Kernel Library / Qt / QGLViewer / pthread / clapack / Eigen / alglib / freeglut / glui / levmar / sparselm
  • Documentation score {0,1,2}: 0
  • Reviewer: Nicolas Bonneel <nicolas.bonneel@liris.cnrs.fr>
  • Time spent for the test (build->first run, timeout at 100min): 100min

Source code information

Comments

I refreshed this old 2014 code to make it run on Qt 5 in 64bits with VS2017 using up to dates libraries rather than Qt 4 in 32 bits. This requires a number of adjustments, and fixing existing bugs, especially since there is no documentation nor build info:

- In mat3d.h, replace line 435:
  return(
    s << '[' << a00 << ' ' << a01 << ' ' << a02 << ']' << std::endl <<
    s << '[' << a10 << ' ' << a11 << ' ' << a12 << ']' << std::endl <<
    s << '[' << a20 << ' ' << a21 << ' ' << a22 << ']'
  );
by
  return(
    s << '[' << a00 << ' ' << a01 << ' ' << a02 << ']' << std::endl <<
    '[' << a10 << ' ' << a11 << ' ' << a12 << ']' << std::endl <<
    '[' << a20 << ' ' << a21 << ' ' << a22 << ']'
  );

- in neoHookeanANMForward.cpp and tribox3.cpp, add #include <algorithm> (for std::min)

- add the preprocessor directive HAVE_STRUCT_TIMESPEC in the vegaport project.

- add the include directory to freeglut in the VS project.

- in manipulatedforceframe.cpp line 35, replace 
dist = min((mp - pproj).norm(), (mp - qproj).norm());
by
dist = std::min((mp - pproj).norm(), (mp - qproj).norm());

** Regarding the port to Qt 5
- in inverseDeformableDesigner.vcxproj.user, changes the occurrences of Qt 4.8.4 to your Qt version (e.g., eg. C:\Libs\Qt\5.12.6\msvc2017_64 )
In the inverseDeformableDesigner project, add include path to $(QTDIR)\include\QtWidgets;

- in inversedeformabledesigner.h, replace #include <QtGui/QMainWindow> by #include <QtWidgets/QMainWindow>
- in inversedeformabledesigner.h, line 15 / inversedeformabledesigner.cpp line 4: replace Qt::WFlags by Qt::WindowFlags
- in inversedeformabledesigner.cpp add #include <QFileDialog>
- in inversedesigner.h, #include <QDockWidget> and #include <QListWidget> and #include <QLabel>
- in main.cpp line 1, replace #include <QtGui/QApplication> by #include <QtWidgets/QApplication>

- replace the included libraries QtCore4.lib QtGui4.lib QtOpenGL4.lib QtXml4.lib  by Qt5Core.lib Qt5Gui.lib Qt5OpenGL.lib Qt5Xml.lib
Also add Qt5Widgets.lib.

** Regarding the port to 64 bits:
* in the inverseDeformableDesigner project, replace the library mkl_intel_c_dll.lib by mkl_intel_lp64.lib

* You of course need to recompile the dependencies in 64 bits. This includes downloading a fresh QGLViewer (I used 2.7.2) :
- in manipulatedforceframe.h add #include "QGLViewer/manipulatedframe.h"
- in inversedesigner.h, add #include "QGLViewer/manipulatedcameraframe.h"
- in inversedesigner.cpp, line 2725, 2739, 2753, 2758, 2759, 2760, replace updateGL by update
* You need to use a 64bits phread. A precompiled library in x64 has been shipped with the code... but the dll are missing. I used the lib and dll from https://github.com/github-for-unity/sfw/tree/master/lib/pthreads-win32-2.9.1
In the VS project file, I removed pthreadVCE2.lib and pthreadVSE2.lib.

* You need to recompile sparselm-1.3 (which can be downloaded) without support for choldmod (use HAVE_CHOLMOD = false in cmake) ; clapack can be found here http://www.netlib.org/clapack/

* Levmar 3.6 can be downloaded and recompiled without hassle.

** Regarding MKL:
- set the MKL_INC_PATH to your MKL : C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2019.5.281\windows\mkl\include
Use the MKL library path in additional library directories: C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2019.5.281\windows\mkl\lib\intel64_win

- If you do all of the above, it should compile and run without complaining. However, it will crash during a solve with pardiso (?? pardiso is not linked with...). If this happens, just put the mkl dlls : mkl_core.dll, mkl_def.dll, mkl_intel_thread.dll and mkl_sequential.dll in the executable directory (or just add the MKL binary path to your Path environment variable).

** Regarding execution
There is no documentation. However, the interface is quite straigforward : just load an existing config file, and click and the back arrow to solve the proposed inverse problem.
The code manages to reproduce (at least) Fig. 2.

If you want to contribute with another review, please follow these instructions.

Please consider to cut/paste/edit the raw JSON data attached to this paper.