%-------------------------------------------------------------------------------

% This file is part of Code_Saturne, a general-purpose CFD tool.
%
% Copyright (C) 1998-2016 EDF S.A.
%
% This program is free software; you can redistribute it and/or modify it under
% the terms of the GNU General Public License as published by the Free Software
% Foundation; either version 2 of the License, or (at your option) any later
% version.
%
% This program is distributed in the hope that it will be useful, but WITHOUT
% ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
% FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
% details.
%
% You should have received a copy of the GNU General Public License along with
% this program; if not, write to the Free Software Foundation, Inc., 51 Franklin
% Street, Fifth Floor, Boston, MA 02110-1301, USA.

%-------------------------------------------------------------------------------

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% csdoc class wich is done for reports
\documentclass[a4paper,10pt,twoside]{csdoc}
%
% MACROS SUPPLEMENTAIRES
\usepackage{csmacros}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% PACKAGES ET COMMANDES POUR LE DOCUMENTS PDF ET LES HYPERLIENS
\hypersetup{%
  pdftitle = {CodeSaturne Theory and Programmer's Guide},
  pdfauthor = {MFEE},
  pdfpagemode = UseOutlines
}
\pdfinfo{/CreationDate (D:20030429000000-01 00 )}
%
% Pour avoir les Thumbnails a l'ouverture du document sous ACROREAD :
% pdfpagemode = UseThumbs
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% MACROS SUPPLEMENTAIRES
% \newcommand{/...}{...}
%
\setcounter{tocdepth}{1}
%Compteur de ``programme'' remis a jour dans les part.
\newcounter{prog}[part]
\renewcommand{\theprog}{\Alph{prog}}
\renewcommand{\thesection}{\thechapter.\arabic{section}}
\renewcommand{\theequation}{\thepart.\thechapter.\arabic{equation}}
\renewcommand{\thefigure}{\thepart.\thechapter.\arabic{figure}}
%
\newcommand{\programme}[1]{%
\passepage
\refstepcounter{prog}
\stepcounter{chapter}
\setcounter{section}{0}
\setcounter{equation}{0}
\setcounter{figure}{0}
\begin{center}
\Huge \bf \theprog - \underline{\fort{#1} routine}
\end{center}
\addcontentsline{toc}{chapter}{\theprog - #1 routine}
}
%
\renewcommand{\arraystretch}{2.0}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% INFO POUR PAGES DE GARDES
\titreCS{\CS \verscs Theory Guide}
\docassociesCS{}
\resumeCS{This document is the theory guide of the kernel of
 \CS~\verscs.
This documentation is attached to the corresponding version of
the code in order to facilitate updates.}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% For the List of symbols
%
\makenomenclature
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% DEBUT DU DOCUMENT
\begin{document}

\def\contentsname{\textbf{\normalsize Table of contents}\pdfbookmark[1]{Contents}{contents}}

\renewcommand{\logocs}{cs_logo_black}

\pdfbookmark[1]{Pages de garde}{pdg}
\large
\makepdgCS
\normalsize

\passepage
\input summary

\passepart
\begin{center}\begin{singlespace}
\tableofcontents
\end{singlespace}\end{center}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% CORPS DU DOCUMENT
%
\passepage

\printnomenclature
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% New doc Nov 2011
%
\chapter{Introduction}
\include{introd}

%\section{Backgrounds and history}

%\section{Notations}

\part{Generic solver capabilities}
%TODO add that to the class
%\setcounter{chapter}{0}
\setcounter{section}{0}
\setcounter{equation}{0}
\setcounter{figure}{0}

\chapter{Governing equations}\label{chapter:goveqn}
\include{goveqn}

\chapter{Time stepping}\label{chapter:timstp}
\include{timstp}

\chapter{Space discretization}\label{chapter:spadis}
\include{spadis}

\chapter{Boundary conditions}\label{chapter:bndcnd}
\include{bndcnd}

%\chapter{Source terms}

%\section{Head losses}
%\section{Mass source terms}
%\section{Coriolis source terms}

\chapter{Algebrae}
\include{algebr}

\part{Advanced modelling}

\setcounter{section}{0}
\setcounter{equation}{0}
\setcounter{figure}{0}

\chapter{Turbulence modelling}\label{chapter:turbul}
\include{turbul}

\chapter{Compressible flows}
See \S~ \ref{ap:cfbase}.
\include{comprs}

\chapter{Combustion}
\include{combustion_intro}
\include{combustion_thermo}
\include{combustion_gas}
\include{combustion_coal}


\chapter{Groundwater flows}
\include{ground_water}

\chapter{Magneto-Hydro Dynamics}
See \S~ \ref{ap:elbase}.
%\section{Electric arcs}
%\chapter{Radiative transfer}

\chapter{Lagrangian particle tracking}
See \S~ \ref{ap:elbase}.

%\chapter{Atmospheric flows}

%\chapter{Cooling towers}

%\chapter{ALE}

\chapter{Cavitation modelling}
\include{cavitation}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\appendix

\part{Appendices}
%\setcounter{chapter}{0}
\setcounter{section}{0}
\setcounter{equation}{0}
\setcounter{figure}{0}
\stepcounter{prog}
\include{apintr}

\part{Base module}
\include{bilsc2}
\include{clptur}
\include{clptrg}
\include{clsyvt}
\include{codits}
\include{condli}
\include{covofi}
\include{gradmc}
\include{gradrc}
\include{inimas}
\include{itrmas}
\include{matrix}
\include{navstv}
\include{predvv}
\include{resopv}
\include{turbke}
\include{turrij}
\include{viscfa}
\include{visort}
\include{visecv}
\include{vortex}

\part{Compressible module}
\setcounter{chapter}{0}
\setcounter{section}{0}
\setcounter{equation}{0}
\setcounter{figure}{0}

\include{cfbase}
\include{cfener}
\include{cfmsvl}
\include{cfqdmv}
\include{cfxtcl}

\part{Electric Arcs}
\setcounter{chapter}{0}
\setcounter{section}{0}
\setcounter{equation}{0}
\setcounter{figure}{0}

\include{elbase}

\setcounter{section}{0}
\setcounter{equation}{0}
\setcounter{figure}{0}

\part{Mesh Handling}
\setcounter{section}{0}
\setcounter{equation}{0}
\setcounter{figure}{0}

\chapter{Mesh Algorithms}\label{chapter:meshalgo}
\include{mesh_algo}

\chapter{Mesh Quality}\label{chapter:meshquality}
\include{mesh_quality}

\part{Appendices}
\stepcounter{prog}
\setcounter{section}{0}
\setcounter{equation}{0}
\setcounter{figure}{0}
\include{operat}

\part{References}
\setcounter{chapter}{0}
\setcounter{section}{0}
\setcounter{equation}{0}
\setcounter{figure}{0}
\stepcounter{prog}

\bibliographystyle{alpha}
\bibliography{csbiblio}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% FIN DU DOCUMENT
\end{document}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
