⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 installation.tex

📁 finite element library for mathematic majored research
💻 TEX
字号:
\chapter{Installation}\label{app:installation}\index{installation}The source code of \ffc{} is portable and should work on anysystem with a standard Python installation. Questions, bug reports and patchesconcerning the installation should be directed to the\ffc{} mailing list at the address\begin{code}ffc-dev@fenics.org\end{code}\ffc{} must currently be installed directly from source, but Debian(Ubuntu) packages will be available in the future, for \ffc{} andother \fenics{} components.%------------------------------------------------------------------------------\section{Installing from source}\subsection{Dependencies and requirements}\index{dependencies}\ffc{} depends on a number of libraries that need to be installed on yoursystem. These libraries include \fiat{} and the Python NumPy module. Inaddition, you need to have a working Python installation on your system.\subsubsection{Installing Python}\ffc{} is developed for Python 2.5, but should also work with Python2.3 and 2.4.To check which version of Python you have installed, issue the command\texttt{python~-V}:\begin{code}# python -VPython 2.5.1\end{code}If Python is not installed on your system, it can be downloaded from\begin{code}http://www.python.org/\end{code}Follow the installation instructions for Python given on the Python web page.For Debian (Ubuntu) users, the package to install is named \texttt{python}.\subsubsection{Installing NumPy}In addition to Python itself, \ffc{} depends on the Python package NumPy,which is used by \ffc{} to process multidimensional arrays (tensors).Python NumPy can be downloaded from\begin{code}http://www.scipy.org/\end{code}For Debian (Ubuntu) users, the package to install is \texttt{python-numpy}.\subsubsection{Installing FIAT}\ffc{} depends on the latest version of \fiat{}, which can bedownloaded from\begin{code}http://www.fenics.org/\end{code}\fiat{} is used by \ffc{} to create and evaluate finite element basisfunctions and quadrature rules.The installation instructions for \fiat{} are similar to those for\ffc{} given in detail below.% Input section shared with DOLFIN manual\input{chapters/installation-downloading.tex}\subsection{Installing \ffc{}}\ffc{} follows the standard installation procedure for Pythonpackages. Enter the source directory of \ffc{} and issue thefollowing command:\begin{code}# python setup.py install\end{code}This will install the \ffc{} Python package in a subdirectory called\texttt{ffc} in the default location for user-installed Pythonpackages (usually something like\texttt{/usr/lib/python2.5/site-packages}).  In addition, the compilerexecutable \texttt{ffc} (a Python script) will be installed in thedefault directory for user-installed Python scripts (usually in\texttt{/usr/bin}).To see a list of optional parameters to the installation script, type\begin{code}# python setup.py install --help\end{code}If you don't have root access to the system you are using, you canpass the \texttt{--home} option to the installation script to install\ffc{} in your home directory:\begin{code}# mkdir ~/local# python setup.py install --home ~/local\end{code}This installs the \ffc{} package in the directory \texttt{\~{}/local/lib/python}and the \ffc{} executable in \texttt{\~{}/local/bin}. If you use thisoption, make sure to set the environment variable \texttt{PYTHONPATH}to \texttt{\~{}/local/lib/python} and to add \texttt{\~{}/local/bin}to the \texttt{PATH} environment variable.\subsection{Compiling the demos}To test your installation of \ffc{}, enter the subdirectory\texttt{src/demo} and compile some of the demonstration forms.With \ffc{} installed on your system, just type\begin{code}# ffc Poisson.form\end{code}to compile the bilinear and linear forms for Poisson's equation.This will generate a C++ header file called \texttt{Poisson.h}containing UFC~\cite{www:ufc,ufcmanual} code that can be used to assemblethe linear system for Poisson's equation.It is also possible to compile the forms in \texttt{src/demo} withoutneeding to install \ffc{} on your system. In that case, you need tosupply the path to the \ffc{} executable:\begin{code}# ../bin/ffc Poisson.form\end{code}\subsection{Verifying the generated code}To verify the output generated by the compiler, enter the sub directory\texttt{src/test/regression} from within the \ffc{} source tree andrun the script \texttt{test.py}\begin{code}# python test.py\end{code}This script compiles all forms found in \texttt{src/demo} and comparesthe output with previously compiled forms in \texttt{src/test/regression/reference}.%------------------------------------------------------------------------------\section{Debian (Ubuntu) package}\index{Debian package}\index{Ubuntu package}In preparation.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -