This is an old revision of the document!
====== Channelflow installation ====== If you are content to use channelflow's predefined command-line utilities (for time-integration, computation of equilibria and periodic orbits, etc.), you can [[:download#numbered_releases| download precompiled binary packages]] and install them using your Linux distribution's package manager. If you want to write your own channelflow programs or tinker with the channelflow source code, you should download channelflow source [[:download|via subversion]] (preferable) or as a [[:download#numbered_releases| numbered development package]]. ===== from the subversion server ===== Installing from the subversion source gives you access to the latest code and simplifies the process of merging your modifications to the source code with modifications to the official distribution. <code> cd ~ svn co http://svn.channelflow.org/channelflow cd channelflow mkdir build cd build cmake -DCMAKE_INSTALL_PREFIX=~/channelflow ~/channelflow/trunk make make test make install </code> ===== from a tarball ===== Installing from a tarball is good if you're content with stable releases and infrequent updates of channelflow. The following will download, compile, and install channelflow-1.5.0, using an out-of-source build directory ''~/channelflow/build'', and installing executables, libraries, and header files into ''~/channelflow/bin'', ''~/channelflow/lib'', ''~/channelflow/include''. <code> mkdir ~/channelflow cd ~/channelflow wget http://www.channelflow.org/download/channelflow-1.5.0.tgz tar xvfpz channeflow-1.5.0.tar.gz mkdir build cd build cmake -DCMAKE_INSTALL_PREFIX=~/channelflow ../channelflow-1.5.0 make make test make install </code> Of course if you're installing a different version of channelflow, change the version numbers to suit. If that doesn't work, read on. The most common problem with channelflow installation is that the compiler can't find required header files or libraries (such as FFTW3), because they're either not installed or installed in unusual locations. Fixes for these issues are discussed in the [[#prerequisites]] and the [[#configuration_options|]] sections. ====== Prerequisites ====== To install and use channelflow, you need - a computer, preferably running some form of Unix - a C++ compiler (e.g. g++) - the standard C++ library - the standard C math library - the [[http://www.cmake.org/overview/cmake|cmake]] build system - the Unix "make" utility - the [[http://www.fftw.org|FFTW]] Fourier transform package (development version) - the [[http://eigen.tuxfamily.org/|Eigen]] linear algebra package - the [[http://www.hdfgroup.org/HDF5|HDF5]] high-density datafile package(development version) [[http://www.fftw.org|FFTW]] is an elegant and efficient self-optimizing Fourier transform library. **FFTW is required** for channelflow. [[http://eigen.tuxfamily.org/|Eigen]] is a C++ pure-template linear algebra library. Most channelflow code does not rely on Eigen. The core fluid simulation algorithms of Channelflow do not require Eigen, however, a few high-level algorithms do (such as computing equilibria and periodic orbits). If you are just interested in time integration, you could strip out the the channelflow code that relies on it. [[http://www.hdfgroup.org/HDF5|HDF5]] provides flexible, efficient, cross-platform, and standardized data files that can be read by matlab, tecplot, etc. **HDF5 is not required,** but it is highly recommended. If you do not install HDF5, you can use a channelflow-specific binary files and transfer data to other tools with ASCII files. You will need to install the required tools and libraries if they are not already installed. ===== MS-Windows ===== FIXME //Incomplete instructions// On MS-Windows, you will probably need to install the [[http://www.cygwin.com|CygWin]] Linux emulation environment. ===== Mac OS X ===== FIXME // This is only a rough sketch of what you need to do to install on a Mac. // Installation on Macintosh computers is best done by first installing [[http://www.finkproject.org|fink]] and then installing channelflow. Fink is, roughly, a Debian Linux emulation environment for the Mac. 1. Uncomment the ''typedef unsigned int uint;'' line in ''channelflow/mathdefs.h'' //typedef unsigned int uint; so that it looks like this typedef unsigned int uint; 2. Install fftw3, hdf5, and eigen - here via fink * Install [[http://www.finkproject.org/|fink]] - assumed install directory ''/sw/'' * Install software: <code> fink install fftw3 fink install hdf5 fink install eigen </code> 3. Compile channelflow - requires location of libs / headers. Set these environment variables export CFLAGS=-I/sw/include export LDFLAGS=-L/sw/lib export CXXFLAGS=$CFLAGS export CPPFLAGS=$CXXFLAGS export ACLOCAL_FLAGS="-I /sw/share/aclocal" export PKG_CONFIG_PATH="/sw/lib/pkgconfig" export PATH=/sw/var/lib/fink/path-prefix-10.6:$PATH export MACOSX_DEPLOYMENT_TARGET=10.