So-Bogus
A c++ sparse block matrix library aimed at Second Order cone problems
|
So-bogus is a set of loosely connected components, organized as follow:
For each module of the Core
library, several header files are available, following this naming pattern:
Module.fwd.hpp
Forward declarations of the module's public classesModule.hpp
Public classes and operators definitionsModule.impl.hpp
Full implementationFor the Block module, the file Block.io.hpp includes additional definitions for IO and serialization-related functions.
The behavior of the header-only libraries may be customized using the following compile-time macros:
BOGUS_DONT_PARALLELIZE
If defined, bogus will not use multiple threads, even it is compiled with OpenMP enabled. Not defined by default.
BOGUS_DEFAULT_INDEX_TYPE
Default integer index type, which will be used to refer to row or column indices. Should be signed for compatibility with OpenMP 2.0. Should be set to MKL_INT
if you plan to use the mkl bindings. Can be overwritten using template parameters for e.g. MappedSparseBlockMatrix. Defaults to int
BOGUS_DEFAULT_BLOCK_PTR
Integer type that will be used to refer to a given block within its sequential container. Defaults to std::size_t
BOGUS_WITHOUT_EIGEN
Do not include Eigen bindings, or anything Eigen for this matter. Will break block_solvers
and Second Order. Not defined by default.
BOGUS_BLOCK_WITHOUT_EIGEN_SPARSE
Do not include Eigen/Sparse bindings. Not defined by default.
BOGUS_WITH_MKL
Enable MKL bindings. Only supports matrix/vector multiplication for compressed SparseBlockMatrixBase with fixed-size blocks. See mkl. Not defined by default.
BOGUS_WITH_BOOST_SERIALIZATION
Enable serialization API. Not defined by default.
BOGUS_SHARED_PTR_NS
If defined, bogus will use shared_ptr from this namespace instead of its own limited NaiveSharedPtr. Values such as tr1
for C++03 or std
for C++11 should work. Not defined by default.
The Extra header-only library collects all modules that were not suited for inclusion in Core ( a.k.a. bogus ), for reasons as trivial as licensing issues.
At the time, the only module in Extra is Second Order.
Extra follows the same header naming convention as Core ( a.k.a. bogus ); see Header Naming Conventions.
The Interfaces part of So-bogus is not considered stable yet, but provide examples of how to use the Core ( a.k.a. bogus ) and Extra libraries. For instance, PrimalFrictionProblem is a relatively generic representation of a 2D or 3D friction problem for which the mass matrix is a diagonal of dense blocks. It can be converted to a DualFrictionProblem, which in turn can be solved using a GaussSeidel or ProjectedGradient block solver, or the Cadoux algorithm ACML11 .
On the other hand, MecheFrictionProblem defines a more specific interface, but provides more features, such as serialization or diagonal regularization. Its public interface rely on as few custom classes as possible.
Similarly, while bogus provides all the components required for solving Mixed Complementarity Problems, no such solver is exposed through the Interfaces .