SMTK is a library which provides a way to specify attributes (such as initial and boundary conditions, but also things like mesh sizing functions) that describe a physical simulation on a geometric domain, as well as high-level access to model geometry (through various solid model and mesh tools) for the purpose of linking attributes to geometric models of the simulation domain.
The SMTK documentation is at Read The Docs. What's below is a quick guide to building SMTK.
In order to build SMTK you must have
- A modern C++ compiler (gcc, clang, or VS) that supports C++11 features,
- CMake 2.8.11 or newer (3.2 is advised), and
- Boost 1.50.0 or newer.
We recommend using Ninja for fast builds.
You may optionally provide
- CGMA v13 or newer, built with OpenCascade or Cubit, for importing CAD models;
- Python version 2.7.3 or newer and Shiboken from the smtk-head branch, for Python wrappings of SMTK's C++ classes;
- Qt version 4.8 or newer, for widgets to interact with attributes and models;
- Remus from the master branch, for running SMTK modelers in remote processes; and
- ParaView version 4.3 or newer, or VTK version 6.2 or newer, for graphical presentation and selection of geometric models.
If you want to build the documentation you will need
- Doxygen version 1.8 or newer,
- Graphviz version 2 or newer,
- Sphinx version 1.2 or newer,
- Pygments version 1.6 or newer,
- breathe version 3.1 or newer,
- doxylink version 1.3 or newer,
- actdiag version 1.0 or newer, and
- optionally sphinx_rtd_theme for a much-improved appearance.
You may wish to obtain the test-data repository for SMTK in order to run tests which require input datasets; run:
git clone [email protected]:SMTKTestData.git
somewhere outside the SMTK source directory. When running CMake on SMTK,
set the SMTK_DATA_DIR
variable to point to the directory git clone
created.
Once you have prepared all of the dependencies, it is time to
create a build directory (again, outside the SMTK source directory
containing this ReadMe file) and run CMake.
These instructions will assume you have the SMTK source in a
directory named /source/SMTK
, the SMTK test-data in /data/SMTK
,
that you wish to build in a directory named /build/SMTK
, and will
install SMTK into /install/SMTK
.
To begin:
mkdir /build/SMTK
cd /build/SMTK
# If you do not have Ninja and do not have the SMTK test data:
cmake /source/SMTK
# or, if you have Ninja and the SMTK test data:
cmake -G Ninja -DSMTK_DATA_DIR:PATH=/data/SMTK /source/SMTK
At this point, CMake will likely complain that you are missing Boost. It will also default to not build python wrappings, Qt, VTK, or CGMA functionality since those require optional dependencies. To change these defaults and specify where Boost is located, you may do any of the following:
- manually edit the newly-created
/build/SMTK/CMakeCache.txt
file, - run the Qt
cmake-gui
command (assuming it is present in your build of CMake), or - run the text-based
ccmake
command (assuming it is present in your build of CMake).
Once you have updated all of the required settings, reconfigure (by re-running
cmake
, pressing the "Configure" button, or pressing the c
key, respectively --
depending on which method above you use to edit CMake settings). Once CMake is
in a good state, it will generate project files (either Makefiles, Ninja build
files, or an IDE project) either automatically (if you manually re-run cmake
)
or at your request (when running cmake-gui
or ccmake
).
You may then build and install SMTK using the generated project files.
The documentation is not built by default, but
CMake exposes targets named doc
and doc-userguide
that you can build.
The doc
target builds the doxygen reference documentation
which appears in /build/SMTK/doc/reference/smtk/html/index.xhtml
while the doc-userguide
target builds the user's guide and
tutorials which appear in /build/SMTK/doc/user/html/index.html
.