30 
calculated via the divergence of the gradient of the object, which is in this 
calculated via the divergence of the gradient of the object, which is in this 
31 
example $p$. Thus we can write; 
example $p$. Thus we can write; 
32 
\begin{equation} 
\begin{equation} 
33 
\nabla^2 p = \nabla \cdot \nabla p = \frac{\partial^2 p}{\partial 
\nabla^2 p = \nabla \cdot \nabla p = 
34 
x^2\hackscore{i}} 
\sum\hackscore{i}^n 
35 

\frac{\partial^2 p}{\partial x^2\hackscore{i}} 
36 
\label{eqn:laplacian} 
\label{eqn:laplacian} 
37 
\end{equation} 
\end{equation} 
38 
For the two dimensional case in Cartesian coordinates \refEq{eqn:laplacian} 
For the two dimensional case in Cartesian coordinates \refEq{eqn:laplacian} 
67 
\end{equation} 
\end{equation} 
68 


69 
\refEq{eqn:grad} corresponds to the Linear PDE general form value 
\refEq{eqn:grad} corresponds to the Linear PDE general form value 
70 
$X$. Notice however that the gernal form contains the term $X \hackscore{i,j}$, 
$X$. Notice however that the general form contains the term $X 
71 

\hackscore{i,j}$\footnote{This is the first derivative in the $j^{th}$ 
72 

direction for the $i^{th}$ component of the solution.}, 
73 
hence for a rank 0 object there is no need to do more than calculate the 
hence for a rank 0 object there is no need to do more than calculate the 
74 
gradient and submit it to the solver. In the case of the rank 1 or greater 
gradient and submit it to the solver. In the case of the rank 1 or greater 
75 
object, it is nesscary to calculate the trace also. This is the sum of the 
object, it is nesscary to calculate the trace also. This is the sum of the 
137 
This requirement makes the wave equation arduous to 
This requirement makes the wave equation arduous to 
138 
solve numerically due to the large number of time iterations required in each 
solve numerically due to the large number of time iterations required in each 
139 
solution. Models with very high velocities and frequencies will be the worst 
solution. Models with very high velocities and frequencies will be the worst 
140 
effected by this problem. 
affected by this problem. 
141 


142 
\section{Displacement Solution} 
\section{Displacement Solution} 
143 
\sslist{example07a.py} 
\sslist{example07a.py} 
235 
pl.savefig(os.path.join(savepath,"source_line.png")) 
pl.savefig(os.path.join(savepath,"source_line.png")) 
236 
\end{python} 
\end{python} 
237 
\begin{figure}[h] 
\begin{figure}[h] 
238 
\includegraphics[width=5in]{figures/sourceline.png} 
\centering 
239 

FIXME PLEASE! 
240 

% \includegraphics[width=6in]{figures/sourceline.png} 
241 
\caption{Cross section of the source function.} 
\caption{Cross section of the source function.} 
242 
\label{fig:cxsource} 
\label{fig:cxsource} 
243 
\end{figure} 
\end{figure} 
250 
\begin{python} 
\begin{python} 
251 
rec=Locator(mydomain,[250.,250.]) 
rec=Locator(mydomain,[250.,250.]) 
252 
\end{python} 
\end{python} 
253 
When the solution \verb u is update we can extract the value at that point 
When the solution \verb u is updated we can extract the value at that point 
254 
via; 
via; 
255 
\begin{python} 
\begin{python} 
256 
u_rec=rec.getValue(u) 
u_rec=rec.getValue(u) 
270 
\sslist{example07b.py} 
\sslist{example07b.py} 
271 


272 
An alternative method is to solve for the acceleration $\frac{\partial ^2 
An alternative method is to solve for the acceleration $\frac{\partial ^2 
273 
p}{\partial t^2}$ directly, and derive the the displacement solution from the 
p}{\partial t^2}$ directly, and derive the displacement solution from the 
274 
PDE solution. \refEq{eqn:waveu} is thus modified; 
PDE solution. \refEq{eqn:waveu} is thus modified; 
275 
\begin{equation} 
\begin{equation} 
276 
\nabla ^2 p  \frac{1}{c^2} a = 0 
\nabla ^2 p  \frac{1}{c^2} a = 0 
282 
p\hackscore{(t+1)}=2p\hackscore{(t)}  p\hackscore{(t1)} + h^2a 
p\hackscore{(t+1)}=2p\hackscore{(t)}  p\hackscore{(t1)} + h^2a 
283 
\end{equation} 
\end{equation} 
284 


285 

\subsection{Lumping} 
286 
For \esc, the acceleration solution is prefered as it allows the use of matrix 
For \esc, the acceleration solution is prefered as it allows the use of matrix 
287 
lumping. Lumping or mass lumping as it is sometimes known, is the process of 
lumping. Lumping or mass lumping as it is sometimes known, is the process of 
288 
aggressively approximating the density elements of a mass matrix into the main 
aggressively approximating the density elements of a mass matrix into the main 
289 
diagonal. The use of Lumping is motivaed by the simplicity of diagonal matrix 
diagonal. The use of Lumping is motivaed by the simplicity of diagonal matrix 
290 
inversion. As a result, Lumping can significantly reduce the computational 
inversion. As a result, Lumping can significantly reduce the computational 
291 
requirements of a problem. 
requirements of a problem. Care should be taken however, as this 
292 

function can only be used when the $A$, $B$ and $C$ coefficients of the 
293 

general form are zero. 
294 


295 
To turn lumping on in \esc one can use the command; 
To turn lumping on in \esc one can use the command; 
296 
\begin{python} 
\begin{python} 