\section{/home/peifer/diffit/modules/free\-Mem.cc File Reference}
\label{freeMem_8cc}\index{/home/peifer/diffit/modules/freeMem.cc@{/home/peifer/diffit/modules/freeMem.cc}}
{\tt \#include $<$math.h$>$}\par
{\tt \#include $<$stdlib.h$>$}\par
{\tt \#include $<$iostream$>$}\par
{\tt \#include \char`\"{}../def.h\char`\"{}}\par
{\tt \#include \char`\"{}../model.h\char`\"{}}\par
{\tt \#include \char`\"{}../nr.h\char`\"{}}\par
\subsection*{Functions}
\begin{CompactItemize}
\item 
void {\bf free\-Mem} ({\bf Glob\-Exp} $\ast$ex, {\bf Glob} $\ast$globs, int simit)
\end{CompactItemize}


\subsection{Function Documentation}
\index{freeMem.cc@{free\-Mem.cc}!freeMem@{freeMem}}
\index{freeMem@{freeMem}!freeMem.cc@{free\-Mem.cc}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void free\-Mem ({\bf Glob\-Exp} $\ast$ {\em ex}, {\bf Glob} $\ast$ {\em globs}, int {\em simit})}\label{freeMem_8cc_c39e0b1a98465f5380027ff10e613058}




Definition at line 11 of file free\-Mem.cc.

References FALSE, free\_\-d3tensor(), free\_\-dmatrix(), free\_\-dvector(), Glob::gnu\-Fp, Glob\-Exp::me, Glob\-Exp::mg, Glob\-Exp::n\-Measure, Glob\-Exp::nobs, Glob::npar, Glob::nr\-Exp, and Glob\-Exp::nvar.

\footnotesize\begin{verbatim}12 {
13   long nExp,i;
14   long nrExp=globs->nrExp;
15 
16 
17   delete globs->gnuFp;
18   
19   if(simit==FALSE)
20     {
21       for (nExp=1;nExp<=nrExp;++nExp) 
22         { 
23           long nPoints=ex[nExp].nPoints;
24           long nP=globs->npar;
25           long nvar=ex[nExp].nvar, nobs=ex[nExp].nobs;
26           long nMeas=ex[nExp].nMeasure;
27           long  me=ex[nExp].me, mg=ex[nExp].mg;
28           free_dvector(ex[nExp].errP,1,nP);
29           free_dvector(ex[nExp].errY0,1,nvar);
30           free_dmatrix(ex[nExp].yTry,1,nPoints,1,nvar);
31           free_dmatrix(ex[nExp].yTrySave,1,nPoints,1,nvar);
32           free_dmatrix(ex[nExp].yComp,1,nPoints,1,nvar);
33           free_dmatrix(ex[nExp].yPred,1,nMeas,1,nobs);
34           free_dmatrix(ex[nExp].h,1,nPoints,1,nvar);   
35           free_dmatrix(ex[nExp].residues,1,nMeas,1,nobs);
36           free_d3tensor(ex[nExp].dyds,1,nPoints,1,nvar,1,nvar);
37           free_d3tensor(ex[nExp].dydp,1,nPoints,1,nvar,1,nP);
38           free_d3tensor(ex[nExp].dmds,1,nMeas,1,nobs,1,nvar);
39           free_d3tensor(ex[nExp].dmdp,1,nMeas,1,nobs,1,nP);
40           if (me>0) 
41             {
42               free_dvector(ex[nExp].r2,1,me);
43               free_d3tensor(ex[nExp].dR2ds,1,me,1,nPoints,1,nvar);
44               free_dmatrix(ex[nExp].dR2dp,1,me,1,nP);
45             }
46           if (mg>0) 
47             {
48               free_dvector(ex[nExp].r3,1,mg);
49               free_d3tensor(ex[nExp].dR3ds,1,mg,1,nPoints,1,nvar);
50               free_dmatrix(ex[nExp].dR3dp,1,mg,1,nP);
51             }
52           
53           free_dvector(ex[nExp].ua,1,nMeas*nobs);
54           free_dmatrix(ex[nExp].Ea,1,nMeas*nobs,1,nvar);
55           free_dmatrix(ex[nExp].Pa,1,nMeas*nobs,1,nP);
56           free_dvector(ex[nExp].ue,1,me);
57           free_dmatrix(ex[nExp].Ee,1,me,1,nvar);
58           free_dmatrix(ex[nExp].Pe,1,me,1,nP);
59           free_dvector(ex[nExp].ug,1,mg);
60           free_dmatrix(ex[nExp].Eg,1,mg,1,nvar);
61           free_dmatrix(ex[nExp].Pg,1,mg,1,nP);
62           free_dmatrix(ex[nExp].dS,1,nPoints,1,nvar);
63           free_dvector(ex[nExp].dP,1,nP);
64           
65         }
66     }
67   for (nExp=1;nExp<=nrExp;++nExp) 
68     {
69       free(ex[nExp].splineNodes);
70       free(ex[nExp].splineY);
71       free(ex[nExp].splineGam);
72       free(ex[nExp].nNodes);
73       for(i=1;i<=NSPLINES;i++)
74         {
75           free(ex[nExp].splineNodes[i]);
76           free(ex[nExp].splineY[i]);
77           free(ex[nExp].splineGam[i]);
78         }
79     }
80   if(simit==FALSE && globs->covar!=NULL)
81     free_dmatrix(globs->covar,1,globs->fitdim,1,globs->fitdim);
82 }
\end{verbatim}\normalsize 


