Loading [MathJax]/extensions/TeX/boldsymbol.js
\newcommand{\uex}{{u_{\small\mbox{e}}}} \newcommand{\half}{\frac{1}{2}} \newcommand{\halfi}{{1/2}} \newcommand{\xpoint}{\boldsymbol{x}} \newcommand{\normalvec}{\boldsymbol{n}} \newcommand{\Oof}[1]{\mathcal{O}(#1)} \newcommand{\Ix}{\mathcal{I}_x} \newcommand{\Iy}{\mathcal{I}_y} \newcommand{\It}{\mathcal{I}_t} \newcommand{\setb}[1]{#1^0} % set begin \newcommand{\sete}[1]{#1^{-1}} % set end \newcommand{\setl}[1]{#1^-} \newcommand{\setr}[1]{#1^+} \newcommand{\seti}[1]{#1^i} \newcommand{\Real}{\mathbb{R}}

« Previous
Next »

PDE solvers should save memory

Important to minimize the memory usage.

The algorithm only needs to access the three most recent time levels, so we need only three arrays for u_i^{n+1} , u_i^n , and u_i^{n-1} , i=0,\ldots,N_x . Storing all the solutions in a two-dimensional array of size (N_x+1)\times (N_t+1) would be possible in this simple one-dimensional PDE problem, but not in large 2D problems and not even in small 3D problems.

« Previous
Next »