diff -urN freefem++-2.16-1.orig/DOC/freefem++doc.tex freefem++-2.16-1/DOC/freefem++doc.tex --- freefem++-2.16-1.orig/DOC/freefem++doc.tex Tue Apr 17 12:08:23 2007 +++ freefem++-2.16-1/DOC/freefem++doc.tex Sat Apr 21 11:31:01 2007 @@ -4,7 +4,7 @@ \usepackage{styles} \usepackage{txfonts} \usepackage{times} -\def\VERSION{2.16} +\def\VERSION{2.16-1} \def\key#1{\emph{#1}\index{#1}} \def\vec#1{\mbox{\boldmath $#1$}} \def\C{\mathbb{C}} @@ -195,7 +195,7 @@ boundaries intersect, the user must specify the intersection points. % \item Automatic mesh generator, based on the Delaunay-Voronoi -algorithm. Inner points density is proportional to the density of +algorithm. Inner point density is proportional to the density of points on the boundary \cite{George}. % \item Metric-based anisotropic mesh adaptation. The metric can be @@ -245,13 +245,13 @@ or go to the end of the page to get the full list of download. Remark: Binaries are available for Microsoft Windows and Apple -Mac OS X and linux. +Mac OS X and Linux. %"\texttt{FreeFem++}" at \url{http://www.freefem.org}. \subsubsection{Installation from sources} -To compile and install for the source. +To compile and install from source. First under window we use \texttt{cygwin} environment from \begin{center} @@ -309,7 +309,7 @@ \end{enumerate} -As an installation test, under unix is : go into the directory +As an installation test, under unix: go into the directory \texttt{examples++-tutorial} and run \freefempp on the example script \texttt{LaplaceP1.edp} with the command~: @@ -317,8 +317,8 @@ FreeFem++ LaplaceP1.edp \eFF -And if you are using \texttt{nedit} as ours text editor, -Do one time \verb!nedit -import edp.nedit! to have coloring syntex for yours \ttCC{.edp} +And if you are using \texttt{nedit} as your text editor, +Do one time \verb!nedit -import edp.nedit! to have coloring syntax for yours \ttCC{.edp} files. @@ -459,8 +459,8 @@ \begin{figure}[htbp] % figure placement: here, top, bottom, or page \centering \includegraphics[width=10cm]{mi.jpg} - \caption{Screen of edp with \texttt{mi} text editor} - \label{fig:mi} + \caption{Screen of edp with \texttt{mi} text editor + \label{fig:mi}} \end{figure} \paragraph{Under terminal} @@ -717,7 +717,7 @@ where $M$ is the dimension of $V_h$, i.e. the number of vertices. The $w_k$ are called the \index{degree of freedom}\emph{degree of freedom} of $w$ and $M$ the number of the degree of freedom. -\begin{figure}[htbp]\label{fig-hatFunction} +\begin{figure}[htbp] \begin{minipage}{\textwidth} \begin{minipage}{0.3\textwidth} \includegraphics[width=\textwidth]{secondT}% @@ -726,7 +726,7 @@ \hspace{0.5mm} \begin{minipage}{0.7\textwidth} \includegraphics[width=\textwidth]{hat}% -\caption{Graph of $\phi_1$ (left hand side) and $\phi_6$} +\caption{Graph of $\phi_1$ (left hand side) and $\phi_6$ \label{fig-hatFunction}} \end{minipage} \end{minipage} \end{figure} @@ -1098,12 +1098,12 @@ savemesh(Th,"Th.msh"); \eFF \end{example} -\begin{figure}[htbp]\label{figmembrane} +\begin{figure}[htbp] \begin{center} \includegraphics[width=7cm]{membraneTh}~~~ \includegraphics[width=7cm]{membrane}\\ \includegraphics[width=12cm]{gnumembrane}\\ -\caption{ Mesh and level lines of the membrane deformation. Below: the same in 3D +\caption{\label{figmembrane} Mesh and level lines of the membrane deformation. Below: the same in 3D drawn by \texttt{gnuplot} from a file generated by \freefempp.} \end{center} \end{figure} @@ -1337,10 +1337,10 @@ \end{itemize} \begin{figure}[htbp] -\begin{center}\label{figheatex} +\begin{center} \includegraphics[width=6cm]{heatexTh}~~~ \includegraphics[width=6cm]{heatex} -\caption{ The heat exchanger} +\caption{\label{figheatex} The heat exchanger} \end{center} \end{figure} @@ -1445,11 +1445,11 @@ @plot(v,wait=1,ps="eigen.eps"); \eFF \begin{figure}[htbp] -\begin{center}\label{figsound} +\begin{center} \includegraphics[width=8cm]{sound0}~~~ \includegraphics[width=8cm]{eigen} -\caption{Left:Amplitude of an acoustic signal coming from the left vertical wall. +\caption{\label{figsound}Left:Amplitude of an acoustic signal coming from the left vertical wall. Right: first eigen state ($\lambda=(k/c)^2=19.4256$) close to $20$ of eigenvalue problem :$ -\Delta \varphi = \lambda \varphi$ and $ \frac{\partial \varphi}{\partial n} = 0$ on $\Gamma$} \end{center} \end{figure} @@ -1519,11 +1519,11 @@ Results are shown on Figure \ref{figthermic}. \begin{figure}[htbp] -\begin{center}\label{figthermic} +\begin{center} \includegraphics[width=8cm]{thermic}~~~ \includegraphics[width=8cm]{thermicvst} -\caption{ Temperature at T=4.9. Right: decay of temperature versus time at x=3, y=0.5} +\caption{\label{figthermic} Temperature at T=4.9. Right: decay of temperature versus time at x=3, y=0.5} \end{center} \end{figure} @@ -1668,11 +1668,11 @@ A zoom of the streamlines are shown on Figure \ref{figpotential}. \begin{figure}[htbp] -\begin{center}\label{figpotential} +\begin{center} \includegraphics[width=8cm]{potential} \includegraphics[width=8cm]{potheat} -\caption{ Zoom around the NACA0012 airfoil showing the streamlines (curve $\psi=$ constant). +\caption{\label{figpotential} Zoom around the NACA0012 airfoil showing the streamlines (curve $\psi=$ constant). To obtain such a plot use the interactive graphic command: ``+" and p. Right: temperature distribution at time T=25 (now the maximum is at 90 instead of 120). Note that an incidence angle has been added here (see Chapter 9).} @@ -1828,11 +1828,11 @@ N.x,N.y} is the \x{normal} to the edge. \begin{figure}[htbp] -\begin{center}\label{figconvect} +\begin{center} \includegraphics[width=8cm]{convectCG} \includegraphics[width=8cm]{convectDG} -\caption{ The rotated hill after one revolution, left with Characteristics-Galerkin, +\caption{\label{figconvect} The rotated hill after one revolution, left with Characteristics-Galerkin, on the right with Discontinuous $P_1$ Galerkin FEM.} \end{center} \end{figure} @@ -2017,12 +2017,12 @@ \end{example} \begin{figure}[htbp] -\begin{center}\label{figNSproj} +\begin{center} \includegraphics[width=15cm]{NSprojTh}\\ \includegraphics[width=15cm]{NSprojP}\\ \includegraphics[width=15cm]{NSprojU} -\caption{ Rannacher's projection algorithm: result on an adapted mesh (top) showing +\caption{\label{figNSproj} Rannacher's projection algorithm: result on an adapted mesh (top) showing the pressure (middle) and the horizontal velocity $u$ at Reynolds 400.} \end{center} \end{figure} @@ -2154,11 +2154,11 @@ \begin{figure}[hbtp] -\begin{center}\label{figlame} +\begin{center} \includegraphics[width=15cm]{lamevect}\\ \includegraphics[width=15cm]{lamedeform} -\caption{ Solution of Lam\'e's equations for elasticity for a 2D beam deflected by its +\caption{\label{figlame} Solution of Lam\'e's equations for elasticity for a 2D beam deflected by its own weight and clamped by its left vertical side; result are shown with a amplification factor equal to 100. {\em Remark: the size of the arrow is automatically bound, but the color gives the real length}} \end{center} @@ -2197,10 +2197,10 @@ \eFF \begin{figure}[htbp] -\begin{center}\label{figstokes} +\begin{center} \includegraphics[width=8cm]{stokes} -\caption{ Solution of Stokes' equations for the driven cavity problem, showing the +\caption{\label{figstokes} Solution of Stokes' equations for the driven cavity problem, showing the velocity field and the pressure level lines.} \end{center} \end{figure} @@ -2228,11 +2228,11 @@ $$ where $I_B$ is $1$ in the object and $0$ elsewhere. \begin{figure}[htbp] -\begin{center}\label{figmuonde} +\begin{center} \includegraphics[width=5cm]{rmuonde} \includegraphics[width=5cm]{imuonde} \includegraphics[width=5cm]{tempmuonde} -\caption{A microwave oven: real (left) and imaginary (middle) parts +\caption{\label{figmuonde}A microwave oven: real (left) and imaginary (middle) parts of wave and temperature (right).} \end{center} \end{figure} @@ -2369,11 +2369,11 @@ The program found $b=2.00125,c=3.00109,d=4.00551$. Figure \ref{figcontrol} shows $u$ at convergence and the successive function evaluations of $J$. -\begin{figure}\label{figcontrol} +\begin{figure} \begin{center} \includegraphics[width=5cm]{u-bfgs} \includegraphics[width=5cm]{J-bfgs} -\caption{On the left the level lines of $u$. On the right the successive evaluations of +\caption{\label{figcontrol}On the left the level lines of $u$. On the right the successive evaluations of $J$ by BFGS (5 values above 500 have been removed for readability)} \end{center} \end{figure} @@ -3779,8 +3779,8 @@ \begin{center} \includegraphics[height=5cm]{square} \end{center} - \caption{Boundary labels of the mesh by \texttt{square(10,10)}} - \label{fig:square} \index{label} + \caption{Boundary labels of the mesh by \texttt{square(10,10)} + \label{fig:square}} \index{label} \end{figure} If you want to construct a $n\times m$ grid in the rectangle $[x_0,x_1]\times [y_0,y_1]$, you can @@ -3819,8 +3819,8 @@ \begin{center} \includegraphics[height=4cm]{border} \end{center} - \caption{Orientation of the boundary defined by $(\phi_x(t),\phi_y(t))$} - \label{fig:border} \index{border} + \caption{Orientation of the boundary defined by $(\phi_x(t),\phi_y(t))$ + \label{fig:border}} \index{border} \end{figure} The general expression to define a triangulation with \texttt{buildmesh} is \begin{center} @@ -3882,8 +3882,8 @@ \begin{minipage}{\textwidth} \begin{minipage}{0.5\textwidth} \includegraphics[width=\textwidth]{mesh_sample}% -\caption{mesh by \texttt{buildmesh(C(10))}} -\label{fig:meshSample} +\caption{mesh by \texttt{buildmesh(C(10))} +\label{fig:meshSample}} \end{minipage} \hspace{0.5mm} \begin{minipage}{0.5\textwidth} @@ -3924,8 +3924,8 @@ 10 6 1&$10_1\quad 10_2$\quad boundary label=1\\ \hline \end{tabular} - \caption{The structure of ``mesh\_sample.msh''} - \label{tab:meshSample} + \caption{The structure of ``mesh\_sample.msh'' + \label{tab:meshSample}} \end{table} There are many mesh file formats available for communication with @@ -6412,12 +6412,12 @@ +\frac{\p n_x}{\p x}\delta x\right)(x,y)\delta y. \] \begin{figure}[htbp] -\label{fig:soupfilm} +%\label{fig:soupfilm} \begin{center} \includegraphics[height=3cm]{soapfilm} \end{center} %\caption{``small plane'' ABCD} -\label{fig:soapfilm} +%\label{fig:soapfilm} \end{figure} Similarly, for the edges AB and DC we have \[ @@ -6496,8 +6496,7 @@ \begin{minipage}{\textwidth} \begin{minipage}{0.4\textwidth} \includegraphics[width=\textwidth]{aTutorial}% -\caption{isovalue of $u$} -\label{aTutorial} +\caption{isovalue of $u$\label{aTutorial}} \end{minipage} \hspace{0.5mm} \begin{minipage}{0.6\textwidth} @@ -6965,7 +6964,7 @@ problems: For given functions $f$ , $g_d$, $g_n$, find $p$ such that \begin{eqnarray} -\label{eqn:mixBoundary} +\label{eqn:mixBoundary1} -\Delta p &=& 1 \qquad \textrm{in }\Omega\nonumber\\ p&=&g_d\quad \textrm{on }\Gamma_D,\quad \p p/\p n=g_n\quad \textrm{on }\Gamma_N @@ -7104,10 +7103,10 @@ If the method is correct, we expect to look the graphics by an almost constant function $\eta$ on your computer as in Fig. \ref{fig:rhoP2}. \begin{figure}[hbt] \begin{center} -\label{fig:rhoP2} + \includegraphics[height=8cm]{rhoP2} \includegraphics[height=8cm]{ThrhoP2} \end{center} -\caption{Density of the error indicator with isotropic $P_{2}$ metric } +\caption{\label{fig:rhoP2}Density of the error indicator with isotropic $P_{2}$ metric } \end{figure} \end{example} @@ -7239,10 +7238,10 @@ \begin{figure}[hbt] \begin{center} -\label{fig:rhoP2} + \includegraphics[height=8cm]{arei-etak} \includegraphics[height=8cm]{arei-Thu} \end{center} -\caption{the error indicator with isotropic $P_{1}$ , the mesh and isovalue of the solution } +\caption{\label{fig:arei-Thu}the error indicator with isotropic $P_{1}$ , the mesh and isovalue of the solution } \end{figure} \end{example} @@ -7671,10 +7670,10 @@ f(x) = a*x + x-ln(1+x), \quad f'(x) = a+\frac{x}{1+x}, \quad f''(x) = \frac{1}{(1+x)^2} $$ -\subsubsection{Newton Ralphson algorithm} +\subsubsection{Newton-Raphson algorithm} Now, we solve the Euler problem $ \nabla J (u) = 0$ -with Newton Ralphson algorithm, that is, +with Newton-Raphson algorithm, that is, $$ u^{n+1} = u^n - ( \nabla^2 J (u^{n}))^{-1}*\nabla J(u^n) $$ @@ -7683,7 +7682,7 @@ First we introduice the two variational form \texttt{vdJ} and \texttt{vhJ} to compute respectively $ \nabla J$ and $ \nabla^2 J$ \bFF -// method of Newton Ralphson to solve dJ(u)=0; \hfilll +// method of Newton-Raphson to solve dJ(u)=0; \hfilll // $$ u^{n+1} = u^n - (\frac{\p dJ}{\p u_i})^{-1}*dJ(u^n) $$ \hfilll // --------------------------------------------- \hfilll Ph dalpha ; //to store $2 f''( |\nabla u|^2) $ optimisation @@ -7718,7 +7717,7 @@ w[]=H^-1*v[]; u[] -= w[]; } - plot (u,wait=1,cmm="solution with Newton Ralphson"); + plot (u,wait=1,cmm="solution with Newton-Raphson"); \eFF @@ -8122,8 +8121,8 @@ \begin{center} \includegraphics[height=6cm]{err02} \end{center} -\caption{$\max_{x\in \Omega}|u_h^n(\theta)-u_{ex}(n\tau)|/\max_{x\in \Omega}|u_{ex}(n\tau)|$ at $n=0,1,\cdots,29$} -\label{fig:err02} +\caption{$\max_{x\in \Omega}|u_h^n(\theta)-u_{ex}(n\tau)|/\max_{x\in \Omega}|u_{ex}(n\tau)|$ at $n=0,1,\cdots,29$ +\label{fig:err02}} \end{figure} We can see in Fig. \ref{fig:err02} that $u_h^n(\theta)$ become unstable at $\theta=0.4$, and figures are omitted in the case $\theta<0.4$. \end{example} @@ -9473,12 +9472,12 @@ \eFF \end{example} -\begin{figure}\label{fstruct} +\begin{figure} \begin{center} \includegraphics[width=6.7cm]{fluidstruct1} \includegraphics[width=6cm,angle=90]{fluidstruct2} \includegraphics[width=6cm,angle=90]{fluidstruct3} -\caption{ Fluid velocity and pressure (left) and displacement vector (center) +\caption{\label{fstruct} Fluid velocity and pressure (left) and displacement vector (center) of the structure and displaced geometry (right) in the fluid-structure interaction of a soft side and a driven cavity} \end{center} @@ -11680,7 +11679,7 @@ Load: lg_fem lg_mesh eigenvalue UMFPACK 1 : // Example of dynamic function load 2 : // -------------------------------- - 3 : // $Id: freefem++doc.tex,v 1.43 2007/04/17 10:08:23 hecht Exp $ + 3 : // $Id: freefem++doc.tex,v 1.44 2007/04/21 09:31:01 hecht Exp $ 4 : 5 : load "myfunction" lood: myfunction @@ -11765,7 +11764,7 @@ Load: lg_fem cadna lg_mesh eigenvalue UMFPACK 1 : // Example of dynamic function load 2 : // -------------------------------- - 3 : // $Id: freefem++doc.tex,v 1.43 2007/04/17 10:08:23 hecht Exp $ + 3 : // $Id: freefem++doc.tex,v 1.44 2007/04/21 09:31:01 hecht Exp $ 4 : // Discret Fast Fourier Transform 5 : // ------------------------------- 6 : load "dfft" lood: init dfft @@ -11854,7 +11853,7 @@ \bFF // Implementation of P1-P0 FVM-FEM // --------------------------------------------------------------------- -// $Id: freefem++doc.tex,v 1.43 2007/04/17 10:08:23 hecht Exp $ +// $Id: freefem++doc.tex,v 1.44 2007/04/21 09:31:01 hecht Exp $ // compile and link with ./load.link mat\_dervieux.cpp (i.e. the file name without .cpp) #include #include diff -urN freefem++-2.16-1.orig/examples++-load/regtests.edp freefem++-2.16-1/examples++-load/regtests.edp --- freefem++-2.16-1.orig/examples++-load/regtests.edp Tue Apr 17 12:08:24 2007 +++ freefem++-2.16-1/examples++-load/regtests.edp Sat Apr 21 11:31:39 2007 @@ -1,7 +1,7 @@ // Regression tests // ---------------- -// $Id: regtests.edp,v 1.2 2007/04/17 10:08:24 hecht Exp $ +// $Id: regtests.m4,v 1.1 2005-12-29 06:46:23 hecht Exp $ // Regression tests // ---------------- @@ -12,7 +12,7 @@ // "ref.edp" contains all reference values and may be rebuilt with // "make Ref" -// $Id: regtests.edp,v 1.2 2007/04/17 10:08:24 hecht Exp $ +// $Id: regtests.m4,v 1.1 2004/09/07 08:37:27 lehyaric Exp $ // The values tested here may not have a physical or mathematical // meaning. Their main property is to gather numerical values from the diff -urN freefem++-2.16-1.orig/src/bamglib/Mesh2.cpp freefem++-2.16-1/src/bamglib/Mesh2.cpp --- freefem++-2.16-1.orig/src/bamglib/Mesh2.cpp Fri Apr 6 17:41:45 2007 +++ freefem++-2.16-1/src/bamglib/Mesh2.cpp Fri Apr 20 18:24:56 2007 @@ -4640,7 +4640,8 @@ { const Real8 sqrt32=sqrt(3.)*0.5; const Real8 aireKh=sqrt32*0.5; - D2xD2 Br(D2xD2(D2(1.,0.),D2(0.5,sqrt32)).t()); + D2 Beq(1,0),Heq(0.5,sqrt32); + D2xD2 Br(D2xD2(Beq,Heq).t()); D2xD2 B1r(Br.inv()); /* D2xD2 BB = Br.t()*Br; cout << " BB = " << BB << " " << Br*B1r << endl; @@ -4664,7 +4665,8 @@ Triangle &K=triangles[it]; Real8 area3= Area2((R2) K[0],(R2) K[1],(R2) K[2])/6.; area+= area3; - D2xD2 B_K(D2xD2(K[0],K[1],K[2]).t()); + D2xD2 B_Kt(K[0],K[1],K[2]); + D2xD2 B_K(B_Kt.t()); D2xD2 B1K = Br*B_K.inv(); D2xD2 BK = B_K*B1r; D2xD2 B1B1 = B1K.t()*B1K; diff -urN freefem++-2.16-1.orig/src/fflib/strversionnumber.cpp freefem++-2.16-1/src/fflib/strversionnumber.cpp --- freefem++-2.16-1.orig/src/fflib/strversionnumber.cpp Fri Apr 20 17:13:54 2007 +++ freefem++-2.16-1/src/fflib/strversionnumber.cpp Fri Apr 20 18:25:13 2007 @@ -18,6 +18,6 @@ // buffer.precision(8); // buffer<