Configuration options

Massimiliano Martinelli edited this page Mar 21, 2016 · 7 revisions

Some of the igatools capabilities can be activated/deactivated at configuration time (when cmake is invoked) through the definition of macro values.

The following table shows the list of available macros, their default value and a brief description about their meaning:

Macro Name Default value Description Macro dependencies Library dependencies Notes
IGATOOLS_USES_TRILINOS ON Activate the functionalities that uses the Trilinos library The following Trilinos packages must be available: Epetra, Amesos, Belos, AztecOO.
IGATOOLS_WITH_MESH_REFINEMENT ON Enables the support for the uniform mesh-refinement IGATOOLS_USES_TRILINOS must be set to ON
IGATOOLS_WITH_NURBS ON Enables the support for NURBS basis functions
IGATOOLS_WITH_SERIALIZATION OFF Enables the support for the serialization If set to ON the library does not compile with g++ version <= 5.3.0
IGATOOLS_WITH_XML_IO OFF Enables the I/O on XML ASCII files The XErces-C++ library must be available
IGATOOLS_WITH_PARAVIEW_PLUGIN OFF Enables the compilation of the igatools->Paraview plugin IGATOOLS_WITH_SERIALIZATION must be set to ON
USE_VTK OFF Enables some capabilities based on VTK The VTK library must be available
USE_CGAL OFF Enables some capabilities based on CGAL The CGAL library must be available

For example, if we want to disable the support of the NURBS basis (enabled by default), we need to add the following string to the cmake command: -DIGATOOLS_WITH_NURBS=OFF

About error checks, performance and debugging (a. k. a. ''compilation modes'')

igatools makes use defensive programming techniques to detect and easily find bugs at runtime, through the exception handling mechanism. We adopt two levels of checks, depending on the compilation mode you have chosen to use (Debug or Release):

  • The first level of checks, is active only when igatools is compiled in Debug mode and it is expensive in terms of running time and size of the compiled library. We perform this kind of checks wherever there may be a chance of error, e.g. out-of-bound index for accessing to vectors elements, uninitialized objects, invalid object states, mismatching dimensions, null-pointers, etc.
  • The second level of checks is always active (both in Debug and in Release mode) and it is used for checking anomalies that may be introduced by the input data.

The typical workflow for a user of igatools would be to first write his code and test it with the library in Debug mode on a small-size problem. When this is working as expected and (virtually) bug-free, compile and link the code with igatools compiled in Release mode on a real-size problem.

By default, igatools will be compiled in Debug mode, if you want to attain maximum performance (switching off a lot of error checks), you must compile the library in Release mode. In order to do so, you should add to the cmake command, the option -DCMAKE_BUILD_TYPE=Release.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.