/* $Id: colpack_prefix.omh 3664 2015-02-24 14:28:15Z bradbell $ */ /* -------------------------------------------------------------------------- CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-15 Bradley M. Bell CppAD is distributed under multiple licenses. This distribution is under the terms of the Eclipse Public License Version 1.0. A copy of this license is included in the COPYING file of this distribution. Please visit http://www.coin-or.org/CppAD/ for information on other licenses. -------------------------------------------------------------------------- */ $begin colpack_prefix$$ $dollar @$$ $spell datadir cppad.hpp namespace std CppAD includedirs colpack cmake dir Jacobians $$ $section Including the ColPack Sparsity Calculations$$ $index colpack, sparsity$$ $index sparsity, colpack$$ $head Purpose$$ If you specify a $icode colpack_prefix$$ on the $cref/cmake command/cmake/CMake Command/$$ line, the CppAD $cref sparse_jacobian$$ calculations use the $href%http://cscapes.cs.purdue.edu/dox/ColPack/html%ColPack%$$ package. $head colpack_prefix$$ $index colpack, prefix$$ $index prefix, colpack$$ If ColPack is installed on your system, you can specify a value for its install $icode colpack_prefix$$ on the $cref cmake$$ command line. The value of $icode colpack_prefix$$ must be such that, for one of the directories $icode dir$$ in $cref/cmake_install_includedirs/cmake/cmake_install_includedirs/$$, $codei% %colpack_prefix%/%dir%/ColPack/ColPackHeaders.h %$$ is a valid way to reference to the include file $code ColPackHeaders.h$$. $head cppad_colpack.cpp$$ $index cppad_colpack.cpp$$ The ColPack header files has a $codei% using namespace std %$$ at the global level. For this reason, CppAD does not include these files. It is therefore necessary to compile and link the short file $codei% %prefix%/%dir%/cppad/cppad_colpack.cpp %$$ where $icode dir$$ is the $cref/cmake_install_datadir/cmake/cmake_install_datadir/$$ and where $icode prefix$$ is such that $code cppad.hpp$$ was installed in $codei% %prefix%/include/cppad/cppad.hpp %$$ Hopefully, future versions of ColPack will not have this problem and it will no longer be necessary to do this. $children%example/colpack_jac.cpp %example/colpack_hes.cpp %bin/get_colpack.sh %$$ $head Example$$ The file $cref colpack_jac.cpp$$ ($cref colpack_hes.cpp$$) contains an example and test of using ColPack to compute the coloring for sparse Jacobians (Hessians). It returns true, if it succeeds and false otherwise. $head get_colpack$$ $index get, colpack$$ $index colpack, get$$ If you are using Unix, you can download and install a copy of ColPack using $cref get_colpack.sh$$. The corresponding $icode colpack_prefix$$ would be $code build/prefix$$. $end