% Created: Enze Chen, June 2017
% Last edited: Enze Chen, December 2017
%
% Chapter 2 of the MSE 142 coursereader. This chapter develops the time-dependent and time-independent Schrodinger equations. The focus is less on the math and more on the analysis of the wave function solutions, such as Born's statistical interpretation, the normalization condition, and the superposition principle.

% Uncomment the following three lines and last line to individually compile this chapter
%\documentclass[12pt, english]{book}
%\usepackage{142crstyle}
%\begin{document}

\chapter{The \Sch\ Equation} \label{ch:sch}
%{ \doublespacing
We ended the previous chapter with Louis de Broglie's landmark hypothesis that all matter can behave as both particles and waves. If the de Broglie hypothesis was true, then we would expect there to be a function that can describe the wave amplitude of these particles. We will loosely derive this function and analyze it closely in this chapter, as it is central to quantum mechanics and everything we do in this course. \par

\section{Introduction to waves}
Recall that in 1924, Louis de Broglie derived the following relations:
\begin{tcolorbox}[title=de Broglie relations] \vspace{-2ex}
	\begin{equation*}
		E=\hbar\omega, \qquad p = \hbar k = \frac{h}{\lambda}
	\end{equation*}
\end{tcolorbox}
The following year, Austrian physicist Erwin \Sch\ decided to follow up on this idea and derive an equation that could model the wave-like behavior of particles.\footnote{A copy of the original paper can be found at E. \Sch, \href{https://journals.aps.org/pr/abstract/10.1103/PhysRev.28.1049}{\emph{Phys. Rev.}} \textbf{28}, 1049 (1926).} In classical mechanics, everyone knew that Newton's Second law ($F=ma$) could be solved to derive the position and velocity of any particle at any given time, provided a set of initial conditions. In quantum mechanics, they wished to answer an analogous question: Is there a governing equation that can be solved to describe the time-evolution of a quantum mechanical state given a set of initial conditions? \par

To work our way up to the final answer, let's first assume that there exists a function for the wave amplitude denoted by $\Psi$ (upper-case ``psi''). We can first express this function as a propagating wave, which is given by
\begin{equation}
	\Psi(x,t) = Ae^{i(kx-\omega t)} \label{eq:propwave}
\end{equation}
where $A$ is the amplitude coefficient (described more in  Section~\ref{sec:normse}), $k$ is the wavenumber, $\omega$ is the angular frequency, and $i$ is the imaginary constant. Even though we won't formally derive Equation~\ref{eq:propwave}, let's take some time to dissect it because it contains a lot of information. We're saying that the function describing wave-like behavior, $\Psi$, is a \textbf{complex exponential} function dependent on two variables, position $x$ and time $t$. Using Euler's formula (see Section~\ref{sec:math}), we can express complex exponentials in terms of sine and cosine functions:
\begin{equation*}
	\Psi(x,t) = Ae^{i(kx-\omega t)} = A\left(\cos(kx-\omega t) + i\sin(kx-\omega t)\right)
\end{equation*}

Though we will switch between both mathematical forms, the second form conveniently captures the wave motion in the sinusoidal functions. Since our function $\Psi$ depends on $t$, we say that it is a \textbf{traveling wave} that propagates through time, where $k$ and $\omega$ are some characteristic properties of the wave that also make the units cancel out (some physical intuition was provided back in Section~\ref{sec:db-hyp}). \par

To adapt Equation~\ref{eq:propwave} to the quantum mechanical context, let's rewrite it in terms of $p$ and $E$ to obtain
\begin{equation}
	\Psi(x,t) = Ae^{i(kx-\omega t)} = Ae^{i(\hbar kx - \hbar\omega t)/\hbar}  = Ae^{i(px-Et)/\hbar} \label{eq:qwave}
\end{equation}

We're getting closer! Now let's see what happens if we take a couple derivatives of this equation. Specifically, note that
\begin{equation}
	\pdv{\Psi}{t} = -\frac{iE}{\hbar}\Psi 		\label{eq:qwvdt}
\end{equation}
and
\begin{equation}
	\pdv[2]{\Psi}{x} = -\frac{p^2}{\hbar^2}\Psi \label{eq:qwvdx}
\end{equation}
where $\pdv{t}$ represents taking the \emph{partial} derivative of a quantity with respect to $t$ (reviewed in Section~\ref{sec:diff}). These two equations look pretty similar, so let's see if we can relate the two. We can use some clever manipulations from classical mechanics to obtain
\begin{equation}
E = \frac{1}{2}mv^2 = \frac{(mv)^2}{2m} = \frac{p^2}{2m}
\end{equation}

Even though we're at the quantum level, this must still hold true. Next, we will conveniently multiply Equation~\ref{eq:qwvdt} by $i\hbar$ and Equation~\ref{eq:qwvdx} by $-\frac{\hbar^2}{2m}$ to find that
\begin{equation*}
	i\hbar \pdv{\Psi}{t} = E\Psi = \frac{p^2}{2m} \Psi = -\frac{\hbar^2}{2m} \left( -\frac{p^2}{\hbar^2}\Psi \right) = -\frac{\hbar^2}{2m} \pdv[2]{\Psi}{x}
\end{equation*}

Equating the first and last terms above, we get
\begin{equation}
	i\hbar \pdv{\Psi}{t} = -\frac{\hbar^2}{2m} \pdv[2]{\Psi}{x}
\end{equation}
which is the famous \textbf{\Sch\ equation} for a free particle. For a particle that is moving through a non-zero potential $V(x,t)$, we modify our energy function to be $E = \frac{p^2}{2m} + V$ and obtain in full:
\begin{tcolorbox}[title=Time-dependent \Sch\ equation] \vspace{-2ex}
\begin{equation}
	i\hbar \pdv{\Psi}{t} = -\frac{\hbar^2}{2m} \pdv[2]{\Psi}{x} + V(x,t)\Psi \label{eq:tdse}
\end{equation}
\end{tcolorbox}

Equation~\ref{eq:tdse} is the one-dimensional, time-dependent \Sch\ equation that describes the time-evolution of a quantum mechanical system's \textbf{wave function}, $\Psi$. For the purposes of this course we will only consider one dimension in space (e.g. $x$ direction only). The \Sch\ equation is a \textbf{linear partial differential equation}, which means it depends on the derivatives of a function with respect to multiple variables, i.e. the first partial derivative of $\Psi$ with respect to time and the second partial derivative of $\Psi$ with respect to position. This equation was enthusiastically accepted by the physics community soon after it was proposed as it enabled new interpretations of quantum theory and had many other profound consequences.\footnote{For a Stanford professor's account of the origins of the \Sch\ equation, check out F. Bloch, \href{http://physicstoday.scitation.org/doi/pdf/10.1063/1.3024633}{\emph{Physics Today}} \textbf{29}, 12 (1976).} For example, if we can solve Equation~\ref{eq:tdse} with some initial condition $\Psi(x,0)$, then we can find $\Psi(x,t)$ for all future time.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Probability distribution} \label{sec:prob}
The \Sch\ equation governs the \emph{behavior} of the wave function $\Psi$, but the number one question all students inevitably ask is: ``What \emph{exactly is} the wave function?'' We know that it is a mathematical representation of a system's quantum state, but this definition is still ambiguous, and the fact that $\Psi$ is a complex function only seems to add to the ambiguity. \par

The now-standard interpretation of the wave function was originally proposed in 1926 by Max Born, who treated solutions of the \Sch\ equation with a statistical interpretation.\footnote{For his influential work on the interpretation of quantum mechanics and the \Sch\ equation, Max Born was awarded the 1954 Nobel Prize in Physics.} Born interpreted $\Psi$ as the \textbf{probability amplitude} and its absolute square (modulus squared) as a \textbf{probability density function}. In statistics, the probability density function gives the probability of a certain event occurring by the area underneath the density curve. Here, the absolute square of $\Psi$, expressed as $\abs{\Psi(x,t)}^2$, gives the probability density. The actual probability can be computed with an integral as follows:
\begin{tcolorbox}[title=Born's statistical interpretation] \vspace{-2ex}
\begin{equation}
	\int_a^b \abs{\Psi(x,t)}^2 \dd{x} = \mathbb{P}\text{(particle is between $a$ and $b$ at time $t$)} \label{eq:wfprob}
\end{equation}
\end{tcolorbox}

which is also shown below graphically in Figure~\ref{fig:wfprob}.
\begin{figure}[!h]
	\centering
	\includegraphics[width=0.4\linewidth]{prob-density}
	\caption{A plot of the absolute square of $\Psi$, with the shaded area representing the probability of finding the particle between points $a$ and $b$.}
	\label{fig:wfprob}
\end{figure}

The statistical interpretation is helpful for many reasons. For one, Equation~\ref{eq:wfprob} helps us reconcile our observations of discrete particles with the continuous nature of the wave function by modeling the latter as a probability. Taking the modulus squared of the wave function also results in a real quantity, since it is equivalent to multiplying the complex wave function by its complex conjugate.
\begin{tcolorbox}[title=Key point: modulus squared of a complex number] \vspace{-2ex}
	\begin{equation}
		\abs{\Psi}^2 = \Psi^*\Psi
	\end{equation}
\end{tcolorbox}

Like any good quantum theory, this interpretation has some strange consequences, the most significant of which is the idea of \textbf{indeterminacy}.\footnote{For a dense read perfect for a Friday evening, check out B. d'Espagnat, \href{https://www.scientificamerican.com/media/pdf/197911_0158.pdf}{\emph{Scientific American}} \textbf{11}, (1979), 158-181.} Notice that we cannot be certain about making measurements of position at the quantum scale, but we can only give a statistical figure as to the \emph{probability} of that result being measured. This is particularly troublesome if a measurement has been made of a particle's position, and then you ask where the particle was \emph{right before} the measurement was made. Was the particle at the same position where you had measured it? If so, why does quantum mechanics still give the possibility, however slight, that it was in fact meters away? And if it wasn't right there, where exactly was the particle?\footnote{\href{http://physicstoday.scitation.org/doi/abs/10.1063/1.880968}{Is the moon there when nobody looks?} N. Mermin, \emph{Physics Today} \textbf{38}, 4 (1985), 38-47.}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Normalization} \label{sec:normse}
However, even when we're surrounded by this uncertainty, there is one thing we \emph{can} be certain of---that \emph{somewhere} in space, the particle must exist and we can find it. This translates mathematically into
\begin{tcolorbox}[title=Normalization condition] \vspace{-1ex}
	\begin{equation}
	\int_{-\infty}^{+\infty} \abs{\Psi(x,t)}^2 \dd{x} = 1 \label{eq:norm}
	\end{equation}
\end{tcolorbox}

This equation says that the particle is guaranteed to exist in our system at any point in time, which must hold true for the statistical interpretation to make sense. \par

However, Equation~\ref{eq:norm} also imposes a constraint on the constant factor in the wave function, which we denoted with $A$ back in Equation~\ref{eq:propwave}. Specifically, we have
\begin{align*}
	\int_{-\infty}^{+\infty} \abs{\Psi(x,t)}^2 \dd{x} &= 1 \\
	\int_{-\infty}^{+\infty} \abs{A\Psi(x,t)}^2 \dd{x} &= 1 \\
	\abs{A}^2 \int_{-\infty}^{+\infty} \abs{\Psi(x,t)}^2 \dd{x} &= 1
\end{align*}

This process is called \textbf{normalizing} the wave function. Now we can define $A$ more precisely as a (possibly complex) coefficient that maintains the normalization condition in Equation~\ref{eq:norm}. Amazingly, the \Sch\ equation has the property that it preserves the normalization of the wave function over time, which means that we only have to solve for $A$ once!

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Superposition} \label{sec:super}
One of the most important consequences of the \Sch\ equation is that it can correctly model the superposition principle we discussed back in Chapter 1. Recall how we observed in the Stern-Gerlach experiment that the silver atoms seemed to simultaneously exist in two quantum states, $\ket{S^+}$ and $\ket{S^-}$. Could this mean that there exist multiple wave functions that satisfy the \Sch\ equation and collectively describe the behavior of the particle? Absolutely! \par

Specifically, if we have a wave function $\Psi_1$ that satisfies the \Sch\ equation and a second wave function $\Psi_2$ that also satisfies the \Sch\ equation, then \emph{any linear combination} of the two equations, $\Psi = c_1\Psi_1 + c_2\Psi_2$, is also a valid solution. You might be familiar with this property of linearity if you have already taken a course on differential equations. It allows us to take a set of all possible solutions to the \Sch\ equation and add them together to give a complete representation of all possible quantum states that the particle can be in. \par

Mathematically, the linearity principle of differential equations provides an explanation for the superposition we previously observed. As improbable as it may have seemed before, we now have yet another reason to believe that particles are capable of simultaneously existing in multiple states. It turns out that we can generalize the result from above even further and decompose any wave function into a sum of distinct quantum states. This is expressed generally as
\begin{tcolorbox}[title=Superposition of wave functions] \vspace{-2ex}
	\begin{equation}
		\Psi = \sum_n c_n\Psi_n  \label{eq:super}
	\end{equation}
\end{tcolorbox}

This equation is the general form that you should keep in mind as we derive more specific instances of the wave function in the following chapters.\footnote{If you have taken a course like CME 104 or MATH 53 here at Stanford, Equation~\ref{eq:super} should seem suspiciously similar to a Fourier series decomposition. While we leave out much of the mathematical hairiness in this course, this is indeed the case, and you can consider the individual wave functions $\Psi_n$ to be eigenstates that form a basis for the space occupied by $\Psi$.}

\section[Time-independence]{Time-independent \Sch\ equation}
Now we will return to the original \Sch\ equation, which was given in Equation~\ref{eq:tdse} as
\begin{equation*}
	i\hbar \pdv{\Psi}{t} = -\frac{\hbar^2}{2m} \pdv[2]{\Psi}{x} + V(x,t)\Psi
\end{equation*}

This is a very complicated differential equation whose general solution is a function of two variables $x$ and $t$. We now consider a special case where the potential function is \emph{time-independent}, i.e. $V=V(x)$, such as that given by a stationary, external electric field. This allows us to apply \textbf{separation of variables} and guess that the solution can be written as a product of two separate functions, each of which is a function of only one variable:\footnote{There's unfortunately no good rationale for why it would occur for us do this, other than ``it's been attempted many times and works well.'' See \href{https://math.stackexchange.com/questions/575205/why-separation-of-variables-works-in-pdes}{math.stackexchange} for a discussion.}
\begin{tcolorbox}[title = Separation of variables] \vspace{-2ex}
\begin{equation}
	\Psi(x,t) = \psi(x)\phi(t) \label{eq:sep}
\end{equation}
\end{tcolorbox}

Here, $\psi$ (lower-case ``psi'') is a function of $x$ alone, and $\phi$ (lower-case ``phi'') is a function of $t$ alone. This huge simplification allows us to derive a set of interesting solutions that in many cases model quantum mechanical states quite well. Moreover, we've seen in the previous section (Equation~\ref{eq:super}) that it's still possible to superimpose the separable solutions to construct the general solution to the \Sch\ equation. \par

The assumption of time-independent potentials turns the partial differential equation into two ordinary differential equations. We can substitute Equation~\ref{eq:sep} into the \Sch\ equation to obtain
\begin{align*}
	i\hbar \pdv{\Psi}{t} &= -\frac{\hbar^2}{2m} \pdv[2]{\Psi}{x} + V(x,t)\Psi \\
	i\hbar\psi \dv{\phi}{t} &= -\frac{\hbar^2}{2m} \phi\dv[2]{\psi}{x} + V(x)\psi(x)\phi(t) \tag{note the ordinary derivatives now} \\
	i\hbar\frac{1}{\phi} \dv{\phi}{t} &= -\frac{\hbar^2}{2m} \frac{1}{\psi}\dv[2]{\psi}{x} + V(x) \numberthis \label{eq:const}
\end{align*}

Now observe that the left hand side of Equation~\ref{eq:const} is purely a function of $t$ and the right hand side is purely a function of $x$. The only way this equation can be satisfied is if both sides are equal to a \emph{constant} (otherwise, you could vary one side without varying the other by just changing one variable). Let's call this constant $E$, for \textbf{energy}, and we will see why below. In any case, this gives us two equations, one for the left hand side,
\begin{equation}
	i\hbar \dv{\phi}{t} = E\phi \label{eq:phi}
\end{equation}
and another for the right hand side,
\begin{equation}
	-\frac{\hbar^2}{2m} \dv[2]{\psi}{x} + V(x)\psi = E\psi \label{eq:tise}
\end{equation}

Equation~\ref{eq:phi} can be solved using fairly straightforward integration. Specifically, we obtain
\begin{align*}
	i\hbar \dv{\phi}{t} &= E\phi \\
	\int \frac{1}{\phi} \dd{\phi} &= \int -\frac{iE}{\hbar} \dd{t} \\
	\ln \phi &= -\frac{iEt}{\hbar} \\
	\Aboxed{\phi(t) &= Ae^{-iEt/\hbar}} \numberthis
\end{align*}
which is another complex exponential function. Equation~\ref{eq:tise}, on the other hand, cannot be solved unless $V(x)$ is specified. In fact, this equation is formally known as the \textbf{time-independent \Sch\ equation} and it can be solved for a variety of simple potentials $V(x)$.
\begin{tcolorbox}[title = Time-independent \Sch\ equation] \vspace{-2ex}
	\begin{equation*}
		-\frac{\hbar^2}{2m} \dv[2]{\psi}{x} + V(x)\psi = E\psi
	\end{equation*}
\end{tcolorbox}

Overall, the solution we have found to Equation~\ref{eq:sep} is
\begin{equation}
	\Psi(x,t) = \psi(x)e^{-iEt/\hbar}
\end{equation}
where we have absorbed the constant $A$ into $\psi(x)$, the solution to the time-independent \Sch\ equation. Here are some further remarks and analyses of the general time-independent solution.
\begin{enumerate}[1.]
	\item The solutions $\psi(x)$ are called \textbf{stationary states} because the probability density is no longer time-dependent. Observe that
	\begin{equation*}
		\abs{\Psi(x,t)}^2 = \abs{\psi(x)e^{-iEt/\hbar}}^2 = \abs{\psi(x)}^2e^{-iEt/\hbar}e^{iEt/\hbar} = \abs{\psi(x)}^2e^0 = \abs{\psi(x)}^2
	\end{equation*}
	and the time-dependence cancels out. This suggests that nothing is ``occurring'' in a stationary state since the probability of finding a particle does not change with time.

	\item Let's go back and address why we labeled the unknown constant as $E$ for energy. Recall that we argued in class that the energy in quantum mechanics could be represented by an \textbf{operator}
	\begin{equation}
		\hat{E} = i\hbar\pdv{t} \label{eq:Eop}
	\end{equation}

	and the momentum by another operator
	\begin{equation}
		\hat{p} = -i\hbar\pdv{x} \label{eq:Pop}
	\end{equation}

	Operators can be considered as special functions that map between different physical states and we distinguish them from their classical values with a hat symbol. Viewed in this way, we see that the time-independent \Sch\ equation is just a statement that the total energy is given by the sum of the kinetic energy and the potential energy. It is reassuring to see that conservation of energy also applies at the quantum level! In fact, this sum is another operator in and of itself, known as the \textbf{Hamiltonian},
	\begin{tcolorbox}[title = Hamiltonian operator] \vspace{-2ex}
		\begin{equation}
		\hat{H} = -\frac{\hbar^2}{2m}\pdv[2]{x}+V(x) \label{eq:ham}
		\end{equation}
	\end{tcolorbox}
	which allows us to write the time-independent \Sch\ equation as
	\begin{equation}
		\hat{H}\psi = E\psi \label{eq:tise-ham}
	\end{equation}

	Conveniently, the time-independent \Sch\ equation expressed in this form shows that stationary states have a single \emph{definite energy} that is invariant with respect to time, instead of a superposition of different energies. We will definitely see the Hamiltonian again in later chapters.

	\item Last but not least, we note that we have a solution for finding \emph{a particular} solution, but not the general solution. As alluded to in the previous section, we can actually find a set of solutions labeled by an index $n$. Due to the superposition principle, we can construct the general solution to the time-dependent \Sch\ equation\footnote{Note our language here: Superposition states \emph{cannot} be a solution to the time-\emph{independent} \Sch\ equation anymore, as each term would have a different energy value.} as a quantum superposition state given by
	\begin{tcolorbox}[title = Superposition of states] \vspace{-2ex}
		\begin{equation}
		\Psi(x,t) = \sum_{n=1}^{\infty} A_n\psi_n(x)e^{-iE_nt/\hbar} \label{eq:tise-sup}
		\end{equation}
	\end{tcolorbox}
	Now all that remains is to find the coefficients $A_n$, which we will see how to do in the following chapter. Once that is complete, we can construct the general solution to the \Sch\ equation using Equation~\ref{eq:tise-sup} and a (possibly infinite) set of stationary states as the basis.
\end{enumerate}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section[\Sch's Cat]{Application: \Sch's Cat}
We end this chapter with an entertaining discussion about a famous consequence of the \Sch\ equation and the principle of superposition. Shortly after \Sch\ published his namesake wave equation, Niels Bohr and Werner Heisenberg devised the \textbf{Copenhagen interpretation} of quantum mechanics,\footnote{A history of its development is provided by the \href{http://history.aip.org/exhibits/heisenberg/p09.htm}{American Institute of Physics}.} which states among many other things that \emph{prior} to making a \textbf{measurement}, a quantum system exists without definite properties, i.e. in a superposition state; it is only in the \emph{process} of making a measurement that the superposition of wave functions is disturbed and \textbf{collapses} into one of the possible states. \par

While this novel interpretation was groundbreaking, many notable scientists did not agree, chief among them Einstein and \Sch. For his entire life, Einstein had trouble reconciling the Copenhagen interpretation with everyday reality and asserted in a 1935 landmark publication that the wave function was incomplete.\footnote{A. Einstein, B. Podolsky, N. Rosen. \href{https://journals.aps.org/pr/abstract/10.1103/PhysRev.47.777}{\emph{Phys. Rev.}} \textbf{47}, 777 (1935)} As is typically done in a field like quantum mechanics, Einstein formulated a hypothetical paradox in a \textbf{thought experiment} (\emph{Gedankenexperiment} in German) to show the shortcomings of the Copenhagen interpretation. \par

\begin{figure}[!h]
	\centering
	\includegraphics[width=0.55\linewidth]{cat}
	\caption{\Sch's cat thought experiment. Radioactive decay, which happens at random, will cause the flask to shatter and release the poison, which kills the cat. While classical observation says the cat is alive \emph{or} dead, the Copenhagen interpretation says the cat is \emph{simultaneously} alive \emph{and} dead prior to observation. Image courtesy of \href{https://en.wikipedia.org/wiki/Schrödinger\%27s_cat}{Wikipedia}.}
	\label{fig:cat}
\end{figure}

While the details of the aforementioned EPR paradox will be left as an exercise to the reader, another thought experiment that illustrated the problem of the Copenhagen interpretation quite well was \textbf{\Sch's cat}, formulated by its namesake in response to Einstein's article. Shown here in Figure~\ref{fig:cat}, \Sch\ proposed a situation where a cat is trapped in a steel chamber with a radioactive substance that randomly decays over time. When it decays, a hammer is released to break a flask of poison which then kills the cat. However, we will not know the outcome until we open the steel chamber some time later, and only then can we confirm if the cat is alive or dead. Just like the question we posed at the end of Section~\ref{sec:prob}, what then, is the state of the cat at any point in time \emph{before} the observation is made? \par

If the Copenhagen interpretation was extended to the macroscopic world, then the cat must be in a superposition of states while inside the sealed chamber, which effectively makes it simultaneously alive \emph{and} dead. But this is directly contrary to the classical description, which says that the cat can only be alive \emph{or} dead. Is one set of laws ``more correct'' than the other? \par

It turns out there's no single, accepted answer to this paradox, and I encourage you to think through its peculiarities. Ultimately, \Sch\ was interested in seeing when a quantum state transitions from a superposition of states into a unique classical state. This actually has profound consequences on what it means to make an \textbf{observation/measurement} of a quantum mechanical system and how scientists are inherently limited in the accuracy of their measurements by the strange laws of quantum mechanics.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\section{Summary}
\begin{figure}[!h]
	\centering
	\includegraphics[width=0.9\linewidth]{xkcd-schrodinger}
	\caption{Image courtesy of \href{https://xkcd.com/45/}{xkcd}.}
	\label{fig:xkcd2}
\end{figure}

To recap, we started this chapter searching for a mathematical expression that could describe the wave-like behavior of particles that we observed in the previous chapter. We saw how Erwin \Sch's namesake wave equation did just that, and we used a time-independent potential function to simplify its overall formulation from a time-dependent, linear partial differential equation (Equation~\ref{eq:tdse}) into a time-independent, linear ordinary differential equation (Equation~\ref{eq:tise}). However, our focus was less on the math and more on the analysis of the wave function $\Psi$, where we saw how the statistical interpretation, normalization condition, and superposition principle all helped us make sense of the solutions to the \Sch\ equation. Even though scientists continue to debate the interpretation of the \Sch\ equation, there is no debate over its power, which we will utilize in the next chapter when we consider the particle in a box model. I assure you---the fun has only just begun!

%} % for doublespacing
%\end{document}


\documentclass[10pt]{article}
\usepackage{a4wide}
\usepackage{listings}
\usepackage{listings}
\newcommand{\be}{\begin{equation}}
\newcommand{\ee}{\end{equation}}
\newcommand{\OP}[1]{{\bf\widehat{#1}}}

\begin{document}

\section*{Project 1, Variational Monte Carlo studies of helium and beryllium}

The final aim of this project is to develop a variational Monte Carlo program which can be used to obtain ground state properties of atoms like He, Be, O, Ne, Si etc as well as diatomic molecules.
for important molecules

The aim of the first project  is to use the Variational Monte
Carlo (VMC) method and evaluate
the ground state energy of  the
helium and beryllium atoms. The variational Monte Carlo part will include the basic ingredients for adding additional features in projects 2 and 3, allowing you to build a professional code that can be used to perform first principle calculations of atoms and molecules.
If you however object orient properly your code,
you should be able to make your code flexible enough to run for two-dimensional systems like electrons confined in so-called quantum dots or other fermionic systems in one, two and three dimensions.  Object orientation is a mandatory feature of your code.

{\bf The deadline for project 1 is February 27, at noon}.  See below for delivery format.

\section*{Variational Monte Carlo calculations of the helium atom}

We will start with the simplest possible system beyond hydrogen, namely the helium atom.
We label $r_1$ the distance from electron 1 to the nucleus and similarly
$r_2$ the distance between electron 2 and the nucleus.
The contribution to the potential energy from the interactions between the
electrons and the nucleus is
\be
   -\frac{2}{r_1}-\frac{2}{r_2},
\ee
and if we add the electron-electron repulsion with
$r_{12}=|{\bf r}_1-{\bf r}_2|$, the total potential energy
$V(r_1, r_2)$ is
\be
 V(r_1, r_2)=-\frac{2}{r_1}-\frac{2}{r_2}+
               \frac{1}{r_{12}},
\ee
yielding the total Hamiltonian
\be
   \OP{H}=-\frac{\nabla_1^2}{2}-\frac{\nabla_2^2}{2}
          -\frac{2}{r_1}-\frac{2}{r_2}+
               \frac{1}{r_{12}},
\ee
and Schr\"odinger's equation reads
\be
   \OP{H}\psi=E\psi.
\ee
All equations are in so-called atomic units. The distances
$r_i$ and $r_{12}$ are dimensionless. To have energies in electronvolt
you need to multiply all results with
$2\times E_0$,
where $E_0=13.6$ eV.
The ``experimental'' binding energy for helium in atomic units a.u. is $E_{\mathrm{He}}=-2.9037$ a.u..

\begin{enumerate}

\item[a)] We want to perform  a Variational Monte Carlo calculation of the ground state of the helium atom.
In our first attempt we will use a brute force Metropolis sampling with two trial wave functions which have the following forms
\begin{equation}
   \psi_{T1}({\bf r_1},{\bf r_2}, {\bf r_{12}}) =
   \exp{\left(-\alpha(r_1+r_2)\right)}
\label{eq:trial1}
\end{equation}
and
\begin{equation}
   \psi_{T2}({\bf r_1},{\bf r_2}, {\bf r_{12}}) =
   \exp{\left(-\alpha(r_1+r_2)\right)}
   \exp{\left(\frac{r_{12}}{2(1+\beta r_{12})}\right)},
\label{eq:trial2}
\end{equation}
with $\alpha$ and $\beta$ as variational parameters.

Your task is to perform a Variational Monte Carlo calculation
using the Metropolis algorithm to compute the integral
\begin{equation}
   \langle E \rangle =
   \frac{\int d{\bf r_1}d{\bf r_2}\psi^{\ast}_{Ti}({\bf r_1},{\bf r_2}, {\bf r_{12}})\OP{H}({\bf r_1},{\bf r_2}, {\bf r_{12}})\psi_{T1}({\bf r_1},{\bf r_2}, {\bf r_{12}})}
        {\int d{\bf r_1}d{\bf r_2}\psi^{\ast}_{Ti}({\bf r_1},{\bf r_2}, {\bf r_{12}})\psi_{Ti}({\bf r_1},{\bf r_2}, {\bf r_{12}})}.
\end{equation}
Find the  energy minimum and compute also the mean distance
$r_{12}$ between the two electrons for the optimal set of the variational parameters.
A code for doing a VMC calculation for the helium atom can be
found on the webpage of the course.

Your Monte Carlo moves are determined by
\begin{equation}
   {\bf R}' = {\bf R} +\delta \times r,
\end{equation}
where $r$ is a random number from the uniform distribution and $\delta$
a chosen step length.
In solving this exercise you need to devise an algorithm which finds
an optimal value of $\delta$ for the variational parameters $\alpha$ and $\beta$,
resulting in roughly $50\%$ accepted moves.

Give a physical  interpretation of the best value of $\alpha$.
Make a plot of the variance as a function of the number of Monte Carlo
cycles.
\item[b)]
Find closed form expressions for the local energy (see below) for the above
trial wave functiona and explain shortly how they
satisfy or not
the cusp condition when $r_1\rightarrow 0$ or
$r_2\rightarrow 0$ or  $r_{12}\rightarrow 0$. Show that
closed-form expression for the second trial wave function is
\[
E_{L2} = E_{L1}+\frac{1}{2(1+\beta r_{12})^2}\left\{\frac{\alpha(r_1+r_2)}{r_{12}}(1-\frac{\mathbf{r}_1\mathbf{r}_2}{r_1r_2})-\frac{1}{2(1+\beta r_{12})^2}-\frac{2}{r_{12}}+\frac{2\beta}{1+\beta r_{12}}\right\},
\]
where
\[
E_{L1} = \left(\alpha-Z\right)\left(\frac{1}{r_1}+\frac{1}{r_2}\right)+\frac{1}{r_{12}}-\alpha^2,
\]
is the local energy for the first trial function.
Compare and discuss the results obtained  with and without the closed-form expressions (in terms of CPU time).
\item[c)] Introduce now importance sampling and study the dependence of the results as a function of the time step $\delta t$.
Compare the results with those obtained under a) and comment eventual differences.

\item[d)] In performing the Monte Carlo analysis you should use blocking as a technique  to make the statistical analysis of the numerical data. Present your results with a proper evaluation of the statistical errors.
\item[e)]  With the optimal parameters for the ground state wave function, compute the onebody density and
the charge density. Discuss your results and compare the results with those obtained with pure hydrogenic wave functions. Run a Monte Carlo calculations without the Jastrow factor as well
and compute the same quantities. How important are the correlations induced by the Jastrow factor?

\end{enumerate}

\section*{Variational Monte Carlo calculations of the Beryllium atom}
The previous exercise has prepared you for extending your calculational machinery  to other systems.
Here we will focus on the  beryllium atoms.
It is convenient to make modules or classes of trial wave functions, both many-body wave functions
and single-particle wave functions  and the quantum numbers  involved, such as spin, orbital momentum and principal
quantum numbers.

The new item you need to pay attention to is the calculation of the Slater Determinant. This is an additional complication
to your VMC calculations. For beryllium however, these calculations can be considerably simplified. The second project will
include parallelization and a proper treatment of the Slater determinant.
If we stick to hydrogen-like wave functions,
the trial wave function for Beryllium can be written as
\begin{equation}
   \psi_{T}({\bf r_1},{\bf r_2}, {\bf r_3}, {\bf r_4}) =
   Det\left(\phi_{1}({\bf r_1}),\phi_{2}({\bf r_2}),
   \phi_{3}({\bf r_3}),\phi_{4}({\bf r_4})\right)
   \prod_{i<j}^{4}\exp{\left(\frac{r_{ij}}{2(1+\beta r_{ij})}\right)},
\end{equation}
where $Det$ is a Slater determinant and the single-particle wave functions
are the hydrogen wave functions for the $1s$ and $2s$ orbitals. Their form
within the variational ansatz are given by
\begin{equation}
\phi_{1s}({\bf r_i}) = e^{-\alpha r_i},
\end{equation}
and
\begin{equation}
\phi_{2s}({\bf r_i}) = \left(1-\alpha r_i/2\right)e^{-\alpha r_i/2}.
\end{equation}

You can approximate the Slater determinant for the ground state of the Beryllium atom
by writing it out as
\begin{equation}
   \psi_{T}({\bf r_1},{\bf r_2}, {\bf r_3}, {\bf r_4}) \propto
\left(\phi_{1s}({\bf r_1})\phi_{2s}({\bf r_2})-\phi_{1s}({\bf r_2})\phi_{2s}({\bf r_1})\right)
\left(\phi_{1s}({\bf r_3})\phi_{2s}({\bf r_4})-\phi_{1s}({\bf r_4})\phi_{2s}({\bf r_3})\right).
\end{equation}
Here you can see a simple code example which implements the above expression
\begin{lstlisting}
 for (i = 0; i < number_particles; i++) {
    argument[i] = 0.0;
    r_single_particle = 0;
    for (j = 0; j < dimension; j++) {
      r_single_particle  += r[i][j]*r[i][j];
    }
    argument[i] = sqrt(r_single_particle);
  }
// Slater determinant, no factors as they vanish in Metropolis ratio
wf  = (psi1s(argument[0])*psi2s(argument[1])
       -psi1s(argument[1])*psi2s(argument[0]))*
      (psi1s(argument[2])*psi2s(argument[3])
       -psi1s(argument[3])*psi2s(argument[2]));
\end{lstlisting}
For beryllium we can easily implement the explicit evaluation of the Slater determinant.  The above will serve as a useful check
for your function which computes the Slater determinat in project 2.
The derivatives of the single-particle wave functions can be computed analytically and you should use the closed form expression for the local energy.

For the correlation part
\[
\Psi_C=\prod_{i< j}g(r_{ij})= \exp{\left\{\sum_{i<j}\frac{ar_{ij}}{1+\beta r_{ij}}\right\}},
\]
we need to take into account whether electrons have equal or opposite spins since we have to obey the
electron-electron cusp condition as well.  For Beryllium, as an example,  you can fix electrons 1 and 2 to have spin up while
electrons 3 and 4 have spin down.
When the electrons have  equal spins
\[
a= 1/4,
\]
while for opposite spins (as for the ground state of  helium)
\[
a= 1/2.
\]

\begin{enumerate}
\item[(f)]   Write a function which sets up the Slater determinant for beryllium.
Compute the ground state energies beryllium as you did for the helium atom
in exercise d.
The calculations should include  blocking and importance sampling using the closed form expression for the local energy.

\item[g)]  With the optimal parameters for the ground state wave function, compute again the onebody density and
the charge density. Discuss your results and compare the results with those obtained with a pure hydrogenic wave functions. Run a Monte Carlo calculations without the Jastrow factor as well
and compute the same quantities. How important are the correlations induced by the Jastrow factor?

\end{enumerate}

\section*{How to write the report}
What should the report contain and how can I structure it? A typical structure follows here.
\begin{itemize}
\item An abstract with the main findings.
\item  An introduction where you explain the aims and rationale for the physics case and what you have done. At the end of the introduction you should give a brief summary of the structure of the report
\item Theoretical models and technicalities. This sections ends often being the methods section.
\item Results and discussion
\item Conclusions and perspectives
\item Appendix with extra material
\item Bibliography
\end{itemize}
Keep always a good log of what you do.

\subsection*{What should I focus on? Introduction.}
You don't need to answer all questions in a chronological order. When you write the introduction you could focus on the following aspects
\begin{itemize}
\item Motivate the reader, the first part of the introduction gives always a motivation and tries to give the overarching ideas
\item What I have done
\item The structure of the report, how it is organized etc
\end{itemize}
\subsection*{What should I focus on? Methods sections.}
\begin{itemize}
\item Describe the methods and algorithms
\item You need to explain how you implemented the methods and also say something about the structure of your algorithm and present some parts of your code
\item You should plug in some calculations to demonstrate your code, such as selected runs used to validate and verify your results. The latter is extremely important!! A reader needs to understand that your code reproduces selected benchmarks and reproduces previous results, either numerical and/or well-known closed form expressions.
\end{itemize}

\subsection*{What should I focus on? Results sections.}
\begin{itemize}
\item Present your results
\item Give a critical discussion of your work and place it in the correct context.
\item Relate your work to other calculations/studies
\item An eventual reader should be able to reproduce your calculations if she/he wants to do so. All input variables should be properly explained.
\item Make sure that figures and tables contain enough information in their captions, axis labels etc so that an eventual reader can gain a first impression of your work by studying figures and tables only.
\end{itemize}

\subsection*{What should I focus on? Conclusions sections.}
\begin{itemize}
\item State your main findings and interpretations
\item Try as far as possible to present perspectives for future work
\item Try to discuss the pros and cons of the methods and possible improvements
\end{itemize}

\subsection*{What should I focus on? Additional material, appendices.}
\begin{itemize}
\item Additional calculations used to validate the codes
\item Selected calculations, these can be listed with few comments
\item Listing of the code if you feel this is necessary
\item You can consider moving parts of the material from the methods section to the appendix. You can also place additional material on your webpage.
\end{itemize}
\subsection*{What should I focus on? References.}
\begin{itemize}
\item Give always references to material you base your work on, either scientific articles/reports or books.
\item Refer to articles as: name(s) of author(s), journal, volume (boldfaced), page and year in parenthesis.
\item Refer to books as: name(s) of author(s), title of book, publisher, place and year, eventual page numbers
\end{itemize}

\section*{Format for electronic delivery of report and programs}
%
Your are free to choose your format for handing in. The simplest way is that you send us your github link that contains the report in your chosen format(pdf, ps, docx, ipython notebook etc) and the programs.
As programming language you have to choose either C++ or Fortran or Python. We recommend C++ or Fortran.
Finally,
we recommend that you work together. Optimal working groups consist of
2-3 students, but more people can collaborate. You can then hand in a common report.

\section*{Literature}
\begin{enumerate}
\item B.~L.~Hammond, W.~A.~Lester and P.~J.~Reynolds, Monte Carlo methods
in Ab Inition Quantum Chemistry, World Scientific, Singapore, 1994, chapters
2-5 and appendix B.

\item B.H.~Bransden and C.J.~Joachain, Physics of Atoms and molecules,
Longman, 1986. Chapters 6, 7 and 9.
\item S.A.~Alexander and R.L.~Coldwell,
Int.~Journal of Quantum Chemistry, {\bf 63} (1997) 1001.  This article is available
at the webpage of the course as the file jastrow.pdf under the project 1 link.
\item C.J.~Umrigar, K.G.~Wilson and J.W.~Wilkins, Phys.~Rev.~Lett.~{\bf 60}
(1988) 1719.

\end{enumerate}

\section*{Unit tests, how and why?}
Unit Testing is the practice of testing the smallest testable parts, called units, of an application individually and independently to determine if they behave exactly as expected. Unit tests (short code fragments) are usually written such that they can be preformed at any time during the development to continually verify the behavior of the code. In this way, possible bugs will be identified early in the development cycle, making the debugging at later stage much easier. There are many benefits associated with Unit Testing, such as
\begin{itemize}
\item It increases confidence in changing and maintaining code. Big changes can be made to the code quickly, since the tests will ensure that everything still is working properly.
\item Since the code needs to be modular to make Unit Testing possible, the code will be easier to reuse. This improves the code design.
\item Debugging is easier, since when a test fails, only the latest changes need to be debugged.
\item Different parts of a project can be tested without the need to wait for the other parts to be available.
\item A unit test can serve as a documentation on the functionality of a unit of the code.
\end{itemize}
Here follows a simple example, see the website of the course for more information on how to install unit test libraries.
\begin{verbatim}
#include <unittest++/UnitTest++.h>

class MyMultiplyClass{
public:
   double multiply(double x, double y) {
      return x * y;
   }
};
TEST(MyMath) {
     MyMultiplyClass my; CHECK_EQUAL(56, my.multiply(7,8));
}
int main()
{
return UnitTest::RunAllTests();
}
\end{verbatim}
For Fortran users, the link at \url{http://sourceforge.net/projects/fortranxunit/} contains a similar software for unit testing.
\end{document}


% \subsection{Historical review}
The early developments that led to the original MPM started with the \textbf{Particle-In-Cell} method (PIC) for fluid dynamics problems \cite{PIC}.
The novelty brought by PIC was the representation of a fluid by a collection of moving particles inside a background control volume subdivided into cells.
Every single particle is given a constant mass and a position which is updated based on the velocity field resulting from the solution of the discrete linear momentum balance equation on the fixed background mesh. On the other hand, energy and pressure are stored at cell centroids during the whole computation as element-wise constant fields ($C^0$ approximation).
During the movement of Lagrangian points, fields are temporarily projected back and forth between the grid and particles so that the latter can transport information from one cell to another.
This procedure is referred to as the \textit{convective phase}.
PIC thus enables the merging of Lagrangian and Eulerian techniques since the moving particles with ascribed masses allow the simulation of problems involving several highly deformed fluids without mesh distortion.

In spite of the good results provided by PIC, the numerical diffusion it suffers from has been addressed by two different ways.
First, the method has been extended to a \textit{fully Lagrangian} version \cite{McCrory_FLIP} by storing not only mass and position but all the fields at particles.
Second, a new projection procedure from the grid to particles has been proposed in order to reach second-order accuracy in space of the convective phase \cite{PIC_Nishiguchi}.
Rather than ascribing cell velocity to particles as done in PIC, Lagrangian point velocities are updated based on the change of linear momentum resulting from the solution of the discrete system.
Merging those two improvements yielded the so-called \textbf{FLuid Implicit Particle} method (FLIP) \cite{FLIP}.
This approach enables the reduction of numerical diffusion but introduces noise in the vicinity of discontinuities \cite{Mass_Flip}.
It is worth noticing that in this new PIC formulation, the background mesh is used for solving balance equations only, thus providing an adaptive feature to the numerical scheme.

Even though particles carry the whole history of the problem, FLIP has been essentially used until the 90's to model history-independent constitutive models which were dealt with at the grid level. The first application of the method to history-dependent materials was made in the context of solid mechanics \cite{Sulsky94}. Lagrangian particles are then seen as material points since they are used to store every field of the problem and to compute constitutive equations, thus leading to the Material Point Method that is derived hereinafter.

\subsection{Derivation of the MPM}
Consider a solid domain with volume $\Omega_t$ bounded by the surface $\partial \Omega_t$, subject to traction forces and prescribed velocity on its boundaries within the time interval $\tau=\[0,T\]$:
\begin{align}
  & \tens{\sigma}\cdot\vect{n}=\vect{T}_d \quad \text{on } \partial \Omega_t^\sigma\\
  & \vect{v} = \vect{\tilde{v}} \quad \text{on } \partial \Omega_t^v
\end{align}
where $\vect{n}$ is the outward normal vector to $\partial \Omega_t$ and the set of boundaries satisfies $\partial \Omega_t =\partial \Omega^\sigma_t \cup \partial \Omega^v_t$.
%We seek an approximate solution of the eulerian balance equation of linear momentum \eqref{eq:HPP_linear_momentum} in a finite-dimensional function space using Galerkin approach.

\subsubsection*{Weak formulation of the continuum problem}
The weak form of the Eulerian balance equation of linear momentum \eqref{eq:HPP_linear_momentum} is written based on the Galerkin approach and the following function spaces:
\begin{equation}
\Vscr^1 = \{ \vect{u} \in H^1(\Omega_t) \}  \quad ; \quad \Vscr^1_{h} = \{\vect{u} \in \Vscr^1 | \vect{u}=\vect{\tilde{v}} \text{ on } \partial \Omega_t^v \}  \quad ; \quad \Vscr^1_{h,0} = \{\vect{u} \in \Vscr_h^1 | \vect{u}=\vect{0} \text{ on } \partial \Omega_t^v \}
\end{equation}
where $H^1(\Omega_t)$ denotes the \textit{Sobolev} space \cite[Ch.4]{Belytschko}, \cite[Ch.1]{DiPietro}. Multiplication of equation \eqref{eq:HPP_linear_momentum} by a test function $\vect{w} \in \Vscr^1_{h,0}$ and integration over $\Omega_t$ yields, after integration by parts, the following weak form:
\begin{equation}
  \label{eq:linear_momentum_weak_form}
  \begin{aligned}
    &\text{Find $\vect{v}\in \Vscr_h^1$ such that} \\
    &\int_{\Omega_t}  \rho  \vect{\dot{v}} \cdot \vect{w}\: dv + \int_{\Omega_t}\tens{\sigma}:
    \nablat \vect{w} \:dv - \int_{\partial \Omega^\sigma_t} \vect{T}_d\cdot\vect{w}\: ds= \int_{\Omega_t} \rho \vect{b}\cdot \vect{w} \: dv  \qquad \forall \: \vect{w} \in \Vscr_{h,0}^1, \forall\: t \in \tau
  \end{aligned}
\end{equation}

\subsubsection{The MPM discretization}
The continuum body is discretized into a set of $N_p$ material points in an arbitrary Cartesian grid. The grid is here supposed to be made of $N_n$ nodes and $E$ non-overlapping cells or elements. The set of faces separating cells that contain particles and empty ones defines the boundary of the mesh (see figure \ref{fig:domain} for a two-dimensional case).
\begin{figure}[ht]
  \centering
  {\input{chapter3/pgfFigures/continuum}}
  {\input{chapter3/pgfFigures/mpm_discretization}}
  \caption{Representation of a continuum body by a set of material points in $\Rbb^2$.}
  \label{fig:domain}
\end{figure}
Analogously to the Finite Element Method (FEM) \cite{Belytschko}, the velocity is approximated on the MPM background mesh by:
\begin{equation}
  \label{eq:approximation_basis}
  \vect{v}(\vect{x},t)=S_j(\vect{x})\vect{v}^{j}(t)
\end{equation}
where $\vect{v}^{i}$ is the velocity of the $i$th grid node, and $S_i(\vect{x})$ the (linear) shape function attached to it. One feature of the original MPM is that the mass density is approximated in the grid based on the mass carried by each material point:
\begin{equation}
  \label{eq:density_approx}
  \rho\(\vect{x},t\)=\sum_{p=1}^{N_p} m_p \: \delta(\vect{\phi}(\vect{X}^p,t)-\vect{x})=\sum_{p=1}^{N_p} m_p \: \delta(\vect{x}^p-\vect{x})
\end{equation}
where the Dirac delta function $\delta$ is often referred to as the \textit{characteristic function} of material points, and $\vect{x}^p$ is the position of the $p$th particle. In what follows, the dependence on time will be omitted for simplicity and $p$ and $(i,j)$ stand respectively for material points and nodes.

By introducing successively in the weak form \eqref{eq:linear_momentum_weak_form} the specific Cauchy tensor $\rho \tens{\bar{\sigma}}=\tens{\sigma}$ and the approximation of mass density \eqref{eq:density_approx}, the integration property of the delta function allows writing:
\begin{equation}
  \begin{aligned}
    &\text{Find $\vect{v}\in \Vscr_h^1$ such that} \\
    & \sum_{p=1}^{N_p} m_p  \[\vect{\dot{v}}(\vect{x}^p) \cdot \vect{w}(\vect{x}^p) + \tens{\bar{\sigma}}(\vect{x}^p):\nablat \vect{w}(\vect{x}^p) \]  = \sum_{p=1}^{N_p}m_p \vect{b}(\vect{x}^p)\cdot \vect{w}(\vect{x}^p) + \int_{\partial \Omega^\sigma_t} \vect{T}_d\cdot\vect{w}\: ds  \qquad \forall \: \vect{w} \in \Vscr_{h,0}^1, \forall\: t \in \tau
  \end{aligned}
\end{equation}
Then, with the finite element approximation \eqref{eq:approximation_basis}, the weak form reads:
\begin{equation}
  \label{eq:mpm_discrete_weak}
    \begin{aligned}
      &\text{Find $\vect{v} \in \Vscr_h^1$ such that} \\
      & \vect{w}^i \sum_{p=1}^{N_p} m_p  \[ S_{ip} S_{jp} \vect{\dot{v}}^j + \nablav S_{ip} \cdot \tens{\bar{\sigma}}^p \]  =  \vect{w}^i\( \sum_{p=1}^{N_p}m_p S_{ip}\vect{b}^p  + \int_{\partial \Omega^\sigma_t} S_i(\vect{x})\vect{T}_d\: ds\)  \qquad \forall \: \vect{w} \in \Vscr_{h,0}^1, \forall \: t \in \tau
  \end{aligned}
\end{equation}
in which $S_{ip}=S_i(\vect{x}^p)$ and $\tens{\bar{\sigma}}^p=\tens{\bar{\sigma}}(\vect{x}^p)$. Next, the arbitrariness of the test function $\vect{w}$ leads to the semi-discrete equation in matrix form:
\begin{equation}
  \label{eq:mpm_semi-discrete}
  M_{ij} \vect{\dot{v}}^j = \vect{f}_{int}^i + \vect{f}_{ext}^i
\end{equation}
where the definition of the mass matrix $M_{ij}$ and internal and external forces vectors $\vect{f}_{int}^i $ and $\vect{f}_{ext}^i$ are:
\begin{subequations}
  \begin{alignat}{1}
    & M_{ij}= \sum_{p=1}^{N_p} m_p  S_{ip} S_{jp} \label{eq:mass_matrix}\\
    & \vect{f}_{int}^i = - \sum_{p=1}^{N_p} m_p \nablav S_{ip} \cdot \tens{\bar{\sigma}}^p \label{eq:int_forces}\\
    & \vect{f}_{ext}^i =\sum_{p=1}^{N_p}m_p S_{ip}\vect{b}^p  + \int_{\partial \Omega^\sigma_t} S_i(\vect{x})\vect{T}_d\: ds \label{eq:ext_forces}
  \end{alignat}
\end{subequations}
In addition, note that particles play the role of integration points in the semi-discrete form so that the mass matrix depends on the positions of material points in the grid and must be computed at each time step. Hence, the MPM can be seen as an extension of FEM with moving Gauss' points. However, this quadrature rule results in a consistent mass matrix $M_{ij}$ that may be singular when only one material point lies in an element due to reduced integration. The use of a linear combination of the (positive-definite) diagonally lumped mass matrix $M^L_i=\sum_p S_{ip}m_p$, and the (positive semi-definite) consistent mass matrix is then recommended \cite{Love}. Nevertheless, since no parameter values are prescribed for this combination, the lumped mass matrix is widely used in MPM simulations in spite of additional dissipation of kinetic energy it introduces \cite{Mass_Flip}.

At last, system \eqref{eq:mpm_semi-discrete} is solved for nodal accelerations $\vect{\dot{v}}^i$, from which time integration allows updating nodal velocities. Hence, the time interval $\tau$ is discretized in $N_T$ sub-intervals of size $\Delta t^n$ such that $\sum_{n=1}^{N_T} \Delta t^n = T$ and time integration is performed with an explicit forward Euler algorithm. The discrete equations are thus written:
\begin{equation}
  \label{eq:mpm_discrete}
  \frac{\vect{v}^{i,n+1}-\vect{v}^{i,n}}{\Delta t^n} = \vect{\dot{v}}^i
\end{equation}
where the superscripts $\bullet^{k,l}$ denote the time step $l$ at which the $k$th nodal field is evaluated.

Recall that the background grid inherited from FLIP is arbitrary so that fields must be projected between particles and nodes to $(i)$ solve the linear system \eqref{eq:mpm_semi-discrete} and $(ii)$ advect the solution by moving material points. The first mapping step, required to build the discrete form, aims at satisfying the conservation of linear momentum:
\begin{equation}
  \label{eq:particles2nodes}
  M^{L,n}_i \vect{v}^{i,n} = \sum_{p=1}^{N_p} S_{ip}m_p \vect{v}^{p,n}
\end{equation}
that must be solved for every $\vect{v}^i$. Once the nodal accelerations are calculated from system \eqref{eq:mpm_semi-discrete}, nodal velocity increments can be computed to \textbf{update} the velocity of each material point by following FLIP approach \cite{PIC_Nishiguchi}:
%the velocity of each material points is \textbf{updated} according to the approach followed in FLIP \cite{PIC_Nishiguchi}:
\begin{equation}
  \label{eq:mp_velocity_update}
  \vect{v}^{p,n+1}= \vect{v}^{p,n}+ \Delta t^n \sum_{i=1}^{N_n} S_{ip}\vect{\dot{v}}^{i}
\end{equation}
On the other hand, updated nodal velocities resulting from the solution of \eqref{eq:mpm_discrete} are used to update the particle positions:
\begin{equation}
  \label{eq:position_update}
  \vect{x}^{p,n+1}=\vect{x}^{p,n} + \Delta t^n\sum_{i=1}^{N_n} S_{ip}\vect{v}^{i,n+1}
\end{equation}

\begin{remark}
  \label{rq:dual_velo}
  Equations \eqref{eq:mp_velocity_update} and \eqref{eq:position_update} lead to a double definition of the velocity since the time derivative of the displacement of a given particle does not correspond to its velocity. This can be seen in a finite differences sense by combining equations \eqref{eq:position_update} and \eqref{eq:mpm_discrete}:
  \begin{equation}
    \label{eq:double_velocity_mpm}
    \frac{\vect{x}^{p,n+1} - \vect{x}^{p,n}}{\Delta t^n}  =\sum_{i=1}^{N_n} S_{ip}\vect{v}^{i,n+1} = \sum_{i=1}^{N_n} S_{ip} \( \vect{v}^{i,n} + \Delta t \vect{\dot{v}}^i\)
  \end{equation}
  Next, on gets from equation \eqref{eq:mp_velocity_update}:
  \begin{equation*}
    \Delta t^n \sum_{i=1}^{N_n} S_{ip}\vect{\dot{v}}^{i}= \vect{v}^{p,n+1}- \vect{v}^{p,n}
  \end{equation*}
  which, once introduced in \eqref{eq:double_velocity_mpm}, yields:
  \begin{equation}
    \frac{\vect{x}^{p,n+1} - \vect{x}^{p,n}}{\Delta t^n}= \sum_{i=1}^{N_n} S_{ip} \vect{v}^{i,n} +   \vect{v}^{p,n+1} - \vect{v}^{p,n}
  \end{equation}
  Considering the mapping \eqref{eq:mp_velocity_update}, the right-hand side of this equation does not identify to the updated material point velocity, it then comes out that $\vect{\dot{x}}^{p,n+1} \ne \vect{v}^{p,n+1}$.
\end{remark}

The computation of constitutive equations is performed at material points within the MPM, thanks to the updated nodal velocity field and the gradient of the shape functions. One has therefore some freedom since stress can be updated right after either the resolution of \eqref{eq:mpm_discrete} or the projection \eqref{eq:particles2nodes}. The first option yields the \textit{Update Stress Last} (USL) algorithm while the second implementation is called \textit{Update Stress First} (USF) \cite{Bardenhagen_USF_USL}.

\subsubsection{Boundary conditions enforcement}

Writing the weak form of linear momentum balance on the grid implies that Neumann boundary conditions are enforced on nodes through the external forces vector \eqref{eq:ext_forces}.
% Next, since stress are computed at material points based the nodal velocity field, Dirichlet boundary conditions are also dealt with at nodes.
Next, since deformation gradient is updated by means of the nodal velocity field, Dirichlet boundary conditions are also dealt with at nodes.
For USL, it is done once the solution is updated on the grid so that stresses can be computed and material point kinematics can be updated.
On the other hand, the USF formulation first requires applying Dirichlet boundary conditions to compute the stress, and then again after solving discrete equations for particle kinematics \cite{USF_USL}.
Furthermore, the enforcement of boundary conditions is still a challenging aspect of the material point method (as the other mesh-free methods) for problems involving complex geometries, see for instance \cite{Bcs_MPM}.

\subsubsection{Solution scheme summary}
All the ingredients derived above are now summarized to write the procedure followed within the MPM for one time step.
Position and velocity vectors $\vect{x}^n$ and $\vect{v}^n$ are supposed known at every material point that discretize the continuum body in a computational grid at time $t^n$.
USL formulation further requires the knowledge of the specific stress tensor $\tens{\bar{\sigma}}^n$ at material points. The MPM solution scheme then consists of the following steps:
\begin{itemize}
\item[(a)] Computation of the consistent and lumped mass matrices as well as external forces (Neumann boundary conditions) from equations \eqref{eq:mass_matrix} and \eqref{eq:ext_forces}.
\item[(b)] Projection of fields to the grid \eqref{eq:particles2nodes} and enforce Dirichlet boundary conditions on the nodal velocity.
$\newline$
\textbf{USF formulation:} enforcement of Dirichlet boundary conditions on the mesh and integration of constitutive equations so that $\tens{\bar{\sigma}}^n$ is computed at material points.
\item[(c)] Evaluation of internal forces from equation \eqref{eq:int_forces}.
\item[(d)] Solution of the semi-discrete and discrete forms \eqref{eq:mpm_semi-discrete} and \eqref{eq:mpm_discrete} so that nodal accelerations $\vect{\dot{v}}^i$ and updated velocities $\vect{v}^{i,n+1}$ are determined. Enforcement of Dirichlet boundary conditions.%: set the velocity of boundary nodes to the prescribed values and their accelerations to zero.
\item[(e)] Update material point velocities and positions with equations \eqref{eq:mp_velocity_update} and \eqref{eq:position_update} respectively. At this point the mesh has virtually moved, but since fields have been transferred back to particles, the underlying grid can be discarded and rebuilt for computational convenience, thus involving the projection (b) at the subsequent time increment.
$\newline$
\textbf{USL formulation:} computation of constitutive equations so that $\tens{\bar{\sigma}}^{n+1}$ is stored at material points.
%\item[(f)] If the USL implementation is set, constitutive equations must be integrated.
\end{itemize}

\subsection{Other Lagrangian formulations of the MPM}
The above formulation of the MPM, which is widely used, provides a material description of the motion while being based on Eulerian quantities.
Alternatively, one can solve a discrete system written on a reference configuration, provided the use of a suitable stress measure \cite{Love}.
Although both formulations lead to a material description of the deformation, they are distinguished hereinafter by referring to them as the Eulerian formulation and the Lagrangian formulation respectively.
% Despite the above Eulerian formulation of the MPM is widely used, an alternative method that solves a discrete system on a reference configuration has been developed \cite{Love}.
% The derivation of this approach is now briefly recalled.
The derivation of the latter approach is now briefly recalled.

\subsubsection*{Discretized equations}
An approximate solution of the balance equation of Lagrangian linear momentum is sought within the time interval $\tau=\[0,T\]$, in a solid with volume $\Omega_0$ and boundary $\partial \Omega_0$ in the reference configuration. The body is subject to traction forces and prescribed velocity on its boundaries:
\begin{align}
  & \tens{\Pi}\cdot\vect{N}=\vect{T}_{d,0} \quad \text{on } \partial \Omega_0^\Pi\\
  & \vect{v} = \vect{\tilde{v}} \quad \text{on } \partial \Omega_0^v
\end{align}
where $\vect{N}$ is the outward normal vector to $\partial \Omega_0$ and the set of boundaries satisfies $\partial \Omega_0 =\partial \Omega^\Pi_0 \cap \partial \Omega^v_0$. Thus, the weak form of equation \eqref{eq:Lagrangian_linear_momentum} is written by means of the Galerkin method. After integration by parts, one gets:
\begin{equation}
  \label{eq:lagrangian_momentum_weak_form}
  \begin{aligned}
    &\text{Find $\vect{v}\in \Vscr_h^1$ such that} \\
    &\int_{\Omega_0}  \rho_0  \vect{\dot{v}} \cdot \vect{w}\: dv + \int_{\Omega_0}\tens{\Pi}:
    \nablat_0 \vect{w} \:dv - \int_{\partial \Omega^\Pi_0} \vect{T}_{d,0}\cdot\vect{w}\: ds= \int_{\Omega_0} \rho_0 \vect{b}\cdot \vect{w} \: dv  \qquad \forall \: \vect{w} \in \Vscr_{h,0}^1, \forall\: t \in \tau
  \end{aligned}
\end{equation}
The solid is represented in the reference configuration with a collection of $N_p$ material points whose masses, combined with the Dirac delta function, define the reference mass density: $\rho_0(\vect{X})=\sum_{p=1}^{N_p}m_p \delta\(\vect{X}^p-\vect{X}\)$.
% The solid is represented in the reference configuration with a collection of $N_p$ material points that can move in an arbitrary grid.
% Similarly to the Eulerian formulation, the reference mass density is defined based on the masses carried by the particles and the delta Dirac distribution: $\rho_0(\vect{X})=\sum_{p=1}^{N_p}m_p \delta\(\vect{X}^p-\vect{X}\)$.
Thus, the specific PK1 stress tensor $\rho_0\tens{\bar{\Pi}}=\tens{\Pi}$ is introduced so that the weak form reads:
\begin{equation}
  \label{eq:discrete_lagrangian_momentum_weak_form}
  \begin{aligned}
    &\text{Find $\vect{v}\in \Vscr_h^1$ such that} \\
    & \sum_{p=1}^{N_p}  m_p\( \vect{\dot{v}}^p \cdot \vect{w}^p + \tens{\bar{\Pi}}^p:
    \nablat_0 \vect{w}^p \) - \int_{\partial \Omega^\Pi_0} \vect{T}_{d,0}\cdot\vect{w}\: ds= \sum_{p=1}^{N_p} m_p \vect{b}^p\cdot \vect{w}^p   \qquad \forall \: \vect{w} \in \Vscr_{h,0}^1, \forall\: t \in \tau
  \end{aligned}
\end{equation}
Next, shape functions defined at nodes of a background grid and arbitrariness of the test field $\vect{w}$ lead to the semi-discrete form:
\begin{equation}
  \label{eq:lagrangian_mpm_semi-discrete}
  M_{ij} \vect{\dot{v}}^j = \vect{f}_{int}^i + \vect{f}_{ext}^i
\end{equation}
Since the particles are considered as integration points, the diagonally lumped mass matrix is used in order to circumvent an eventual singularity. Hence, the lumped mass matrix and forces vectors involved in the semi-discrete system \eqref{eq:lagrangian_mpm_semi-discrete} equation read:
\begin{subequations}
  \begin{alignat}{1}
    \label{eq:lag_mass}
    & M^L_{i}= \sum_{p=1}^{N_p} m_p  S_{ip}\\
    \label{eq:lag_fint}
    & \vect{f}_{int}^i = - \sum_{p=1}^{N_p} m_p \nablav_0 S_{ip} \cdot \tens{\bar{\Pi}}^p\\
    \label{eq:lag_fext}
    & \vect{f}_{ext}^i =\sum_{p=1}^{N_p}m_p S_{ip}\vect{b}^p  + \int_{\partial \Omega^\Pi_0} S_i(\vect{x})\vect{T}_{d,0}\: ds
  \end{alignat}
\end{subequations}

%Note that the description of the reference mass density used yields a weak form \eqref{eq:discrete_lagrangian_momentum_weak_form} involving fields in the reference configuration, so that the shape functions, their gradient and hence, the mass matrix and forces vector, are also evaluated in this configuration.
At last, the explicit time discretization of equation \eqref{eq:lagrangian_mpm_semi-discrete} yields the discrete system that is solved at nodes to advance the velocity from time increment $t^n$ to $t^{n+1}$:
\begin{equation}
  \label{eq:lagrangian_mpm_discrete}
  M^L_i \frac{\vect{v}^{j,n+1} - \vect{v}^{j,n}}{\Delta t^n} =\vect{f}_{int}^i + \vect{f}_{ext}^i
\end{equation}

% Garder la généralité du Lagrangien jusqu'à la fin du solution scheme ?
\subsubsection*{Solution scheme}
Suppose that position and velocity vectors, as well as the specific PK1 tensor, are stored at material points at time $t^n$ in the volume $\Omega_n$, that is: $\vect{x}^{p,n}$, $\vect{v}^{p,n}$ and $\tens{\bar{\Pi}}^{p,n}$ are known $\: \forall p=1,...,N_p$.
In the reference configuration, which may be defined as the \textbf{the last computed} configuration according to \cite{Love}, one first has to compute the mass matrix \eqref{eq:lag_mass}.
% One first has to compute the mass matrix \eqref{eq:lag_mass} in the reference configuration which may be defined, as proposed in \cite{Love}, as the \textbf{the last computed} one, that is $\Omega_0\equiv \Omega_{n}$.
This \textit{updated Lagrangian} formulation of the MPM bases the computation of the mass matrix on the shape functions evaluated at particle positions $\vect{x}^{p,n}$.
Alternatively, the reference configuration may be kept constant during simulations so that the mass matrix is computed once and for all based on $\vect{X}^{p}$.
%It is however worth noticing that such a \textit{total Lagrangian} formulation of the MPM is, to our knowledge, not found in the literature.
It is however worth noticing that such a \textit{total Lagrangian} formulation of the MPM does not, to our knowledge, appear in the literature.

Next, analogously to the Eulerian formulation of the MPM, the mapping of the velocity from particles to nodes aims at ensuring the conservation of Lagrangian linear momentum by solving the following system for the nodal velocities:
\begin{equation*}
  M^{L}_i \vect{v}^{i,n} = \sum_{p=1}^{N_p} S_{ip}m_p \vect{v}^{p,n}
\end{equation*}

Once the force vectors are built from equations \eqref{eq:lag_fint} and \eqref{eq:lag_fext}, acceleration and velocity are computed on the grid by successively solving systems \eqref{eq:lagrangian_mpm_semi-discrete} and \eqref{eq:lagrangian_mpm_discrete}.
Then, according to the FLIP mapping \eqref{eq:mp_velocity_update}, these fields are used to update the material point kinematics (\textit{i.e. compute $\vect{v}^{p,n+1}$ and $\vect{x}^{p,n+1}$}).
Moreover, the gradient of the shape functions provides the deformation gradient thanks to the following explicit time discretization:
\begin{equation}
  \label{eq:total_def_grad}
  \frac{\tens{F}^{p,n+1}-\tens{F}^{p,n}}{\Delta t}= \nablat_0 \vect{v}^{p,n+1}
\end{equation}
The above equations yield directly the updated deformation gradient for the total Lagrangian formulation.
On the other hand, the use of the velocity gradient tensor is made in the updated Lagrangian formulation, which is approximated as:
\begin{equation}
  \nablat_n \vect{v} \approx \sum_{p=1}^{N_p}\nablav S_{ip}(\vect{x}^{p,n}) \otimes \vect{v}^{i,n}
\end{equation}
where $\nabla_n \(\bullet\) = \left.\drond{\vect{v}}{\vect{x}}\right|_{\vect{x}=\vect{\phi}(\vect{X},t^n)}$ denotes the gradient operator in the configuration $\Omega_n$.
The chain rule then allows identifying this tensor in the right-hand side of equation \eqref{eq:total_def_grad}:
\begin{equation}
  \nablat_0 \vect{v}^{p,n+1} =\nablat_n \vect{v}^{p,n+1} \cdot \drond{\phi(\vect{X},t^n)}{\vect{X}} =\nablat_n \vect{v}^{p,n+1} \cdot \tens{F}^{p,n}
\end{equation}
so that the deformation gradient at time $t^{n+1}$ in the updated Lagrangian formulation results from:
\begin{equation}
  \label{eq:updated_def_grad}
  \frac{\tens{F}^{p,n+1}-\tens{F}^{p,n}}{\Delta t}= \nablat_n \vect{v}^{p,n+1} \cdot \tens{F}^{p,n}
\end{equation}
Finally, constitutive equations can be dealt with at the particle level. Note that the choice between USL and USF algorithms for the integration of constitutive equations also arises with Lagrangian formulations developed above.

Although the material point method presented above has been successfully applied to a wide range of complex engineering problems involving finite deformations \cite{Wieckowski}, this approach suffers from limitations which are discussed below.

\subsection{Shortcomings of the MPM}
\subsubsection*{The grid-crossing instability}
The research on MPM mainly focused so far on the instability arising from the computation of internal forces when material points move from one cell to another, the so-called \textit{grid-crossing} error \cite{Gimp}.
While particle positions have no influence in total Lagrangian approaches, the discontinuity of the gradient the of shape functions across element interfaces yields tremendous noise in the numerical solution of both Eulerian and updated Lagrangian MPMs.
The \textbf{Generalized Interpolation Material Point Method} (GIMP) addresses this issue by modifying the particle characteristic function, thus widening the domain of influence of material points \cite{Gimp}.
By doing so, every particle is given a domain having a constant shape or not, that must be tracked during the computation, leading respectively to the uniform GIMP (uGIMP) or contiguous particle GIMP (cpGIMP) formulations \cite{Book_MPM}.
In the cpGIMP algorithm, diagonal entries of the deformation gradient are used to update the "shapes" of particles.
%The \textbf{Convected Particle Domain Interpolation} (CPDI) \cite{CPDI}, on the other hand, accounts for shear deformations and rotations of particles domains, thus providing an improvement of GIMP.
%However, these methods involve other difficulties related to the tracking of the deforming domains of material points in the Eulerian grid, and may also suffer from mesh entanglement \cite{DDMPM0}.
However, these methods involve other difficulties related to the tracking of the deforming domains of material points in the Eulerian grid, and may also suffer from mesh entanglement \cite{DDMPM0}.
The \textbf{Convected Particle Domain Interpolation} (CPDI) \cite{CPDI}, accounts for shear deformations and rotations of particle domains and also considers alternative grid basis functions, thus providing an improvement of GIMP.
Other approaches consisting in the direct modification of the approximation basis have then been followed to tackle the grid-crossing error.
% \cite{Steffen_quadError} montre qu'utiliser des Bspline permet de réduire l'erreur de quadrature des forces internes et donc de limiter le grid crossing. Ensuite on a eu la BSMPM
% First, the \textbf{B-Spline Material Point Method} (BSMPM) \cite{Steffen_quadError} uses quadratic or cubic B-Spline functions with continuous gradients as nodal shape functions allowing to circumvent the instability \cite{MPM_BSpline1}.
First, since the midpoint rule leads to significant quadrature error for discontinuous functions over particle domains, the use of quadratic or cubic B-Spline as nodal shape functions has been proposed in \cite{Steffen_quadError}.
Then, the \textbf{B-Spline Material Point Method} (BSMPM) \cite{MPM_BSpline1}, based on continuous gradients, allows circumventing the grid-crossing instability.
Second, the classical approximation basis is used and modified gradients with extended supports are introduced in the \textbf{Dual Domain Material Point Method} (DDMPM) \cite{DDMPM0}.
BSMPM and DDMPM  both solve the grid-crossing error by widening the domain of influence of material points since B-Spline functions span more cells than Lagrange polynomials, and the support of the modified gradient of DDMPM is larger than that of the shape functions.

\begin{remark}
  Since it enables to get rid of the grid-crossing instability, the total Lagrangian formulation will be used for all applications of the MPM in this work.
\end{remark}

\subsubsection*{The back-mapping instability}
Numerical oscillations that are due to the updating of the velocity field at material points \cite{Mass_Flip} appear in the MPM solution, even for problems that do not involve the grid-crossing instability.
Although a total Lagrangian formulation is considered, such a mapping of the velocity is required in order to, for instance, employ mesh-adaption techniques.
As an illustration, consider a one-dimensional elastic bar of length $L=6\:m$ with Young's modulus $E=200 \:GPa$ and mass density $\rho=7800 \:kg\cdot m^{-3}$ within the infinitesimal theory.
The bar is initially in a free stress state and Riemann-type initial velocities are prescribed along the bar, that is: $v=v_0>0$ for $x\in[0,L/2[$ and $v=-v_0$ for $x \in ]L/2,L]$.
\begin{figure}[ht]
  \centering
  {\input{chapter3/pgfFigures/US_diffusion10} \phantomsubcaption \label{subfig:US_diffusion_10}}
  {\input{chapter3/pgfFigures/US_diffusion25} \phantomsubcaption \label{subfig:US_diffusion_25}}\\
  {\input{chapter3/pgfFigures/US_energies} \phantomsubcaption \label{subfig:US_energies}}
  \caption{MPM solutions of the bars impact problem for various discretizations. (a)--(b) comparison of stress computed with USF and USL formulations and exact solutions (c) numerical total energy evolution. Courant number: CFL$=0.7$ ; $v_0=\frac{1}{200}\sqrt{\frac{E}{\rho}}$.}
  \label{fig:US_diffusion}
\end{figure}
Both ends of the bar are traction free so that this problem is equivalent to an impact of two elastic bars moving toward each other.
The bar is discretized by using the MPM in a computational grid composed of $50$ regular cells, each containing either one or two material points (1ppc or 2ppc).
Single material points are centered in cells while particles sharing an element are placed symmetrically with respect to elements centers and are regularly spaced.
The exact solution of this problem (see section \ref{subsec:charac_Linear_problems}) consists of two elastic discontinuities emanating from the middle of the bar and propagating leftward and rightward.
In figure \ref{fig:US_diffusion}, numerical results provided by the USL and USF implementations of the MPM are compared to the exact solution before reflection of the waves on the boundaries.
Note that here and in what follows, the stress and the velocity are extracted at material points.

Figures \ref{fig:US_diffusion}\subref{subfig:US_diffusion_10} and \ref{fig:US_diffusion}\subref{subfig:US_diffusion_25} show that both USL and USF solutions oscillate once the elastic front passed.
Those oscillations are much more significant in the USF solutions regardless of the number of particles used.
Indeed, the noise in USL results quickly reduces so that the correct stress level is reached in the middle region of the bar.
Moreover, even though the $1ppc$ and $2ppc$ discretizations provide different results (slightly different for USL), neither of them enables the removal of oscillations.
Figure \ref{fig:US_diffusion}\subref{subfig:US_energies} shows, on the other hand, the evolution of numerical total energies resulting from an MPM approximation of kinetic and strain energies:
\begin{align}
  & e^{kin}=\frac{1}{2}\int_\Omega \rho \vect{v}\cdot\vect{v} \:d\Omega \approx \frac{1}{2}\sum_{p=1}^{N_p} m_p \vect{v}^p\cdot\vect{v}^p\\
  % & e^{strain}= \frac{1}{2}\int_\Omega \rho \tens{\bar{\sigma}}: \nablav \vect{v} \:d\Omega \approx \frac{1}{2}\sum_{p=1}^{N_p} m_p \tens{\bar{\sigma}}^p: \nablav \vect{v}^p
    & e^{strain}= \frac{1}{2}\int_\Omega \rho \tens{\bar{\sigma}}: \nablav \vect{u} \:d\Omega \approx \frac{1}{2}\sum_{p=1}^{N_p} m_p \tens{\bar{\sigma}}^p: \nablav \vect{u}^p
\end{align}
One can see that the USL formulation dissipates more energy than the USF for this problem.
These results differ from observations made in \cite{Bardenhagen_USF_USL} in which no significant differences for problems involving smooth solutions are noticed.
At last, figure \ref{fig:US_velocities} shows the numerical velocities at various times.
The same observations as before are made by looking at figures \ref{fig:US_velocities}\subref{subfig:US_velo_10} and \ref{fig:US_velocities}\subref{subfig:US_velo_25}, namely numerical oscillations in both USL and USF solutions with bigger peaks in the USF one.
Furthermore, a notable numerical artifact that prevents the proper assessment of the velocity occurs at the middle of the bar when two particles per cell are used.
This can be partially explained by the oscillating stress field that introduces noise in internal forces as well.
However, the velocity field given by the USL computation "locks" in the central region although the stress field converges in time to the exact solution (figures \ref{fig:US_diffusion}\subref{subfig:US_diffusion_10} and \ref{fig:US_diffusion}\subref{subfig:US_diffusion_25}), which implies that this issue is not due to the computation of internal forces, but most likely to the convective phase.
\begin{figure}[ht]
  \centering
  {\input{chapter3/pgfFigures/US_velo10}\phantomsubcaption \label{subfig:US_velo_10}}
  {\input{chapter3/pgfFigures/US_velo25}\phantomsubcaption \label{subfig:US_velo_25}}
  \caption{Comparison between exact, USF and USL velocities of the bars impact problem for various discretizations.}
  \label{fig:US_velocities}
\end{figure}

Since the back-mapping is known to be responsible for noise introduced in the MPM solution \cite{Mass_Flip}, we propose to project the velocity onto particles by a simple interpolation, as it is done in PIC:
%Since the back-mapping of fields from the grid to material points is known to be responsible for noise introduced in MPM solution , we propose to project fields onto particles as it is done in PIC instead, that is by a simple interpolation:
\begin{equation}
  \label{eq:PIC_Back-mapping}
  \vect{v}^{p,n+1}=\sum_{i=1}^{N_n} S_{ip}\vect{v}^{i,n+1}
\end{equation}
Particle positions are next updated as in FLIP, with the nodal velocity \eqref{eq:position_update}, thus amounting to deforming Lagrangian particles with the grid and exactly satisfying the relation $\vect{\dot{x}}^p=\vect{v}^p$, which is not the case in MPM.
It is then worth noticing that the weak form \eqref{eq:mpm_discrete_weak} is based on the definition \eqref{eq:PIC_Back-mapping}, this projection seems therefore more consistent.

The comparison between MPM using either PIC or FLIP mapping and exact velocities is plotted in figures \ref{fig:MPM_velocities}\subref{subfig:MPM_velo_10} and \ref{fig:MPM_velocities}\subref{subfig:MPM_velo_25}
\begin{figure}[h!]
  \centering
  {\input{chapter3/pgfFigures/mpm_velo10}\phantomsubcaption \label{subfig:MPM_velo_10}}
  {\input{chapter3/pgfFigures/mpm_velo25}\phantomsubcaption \label{subfig:MPM_velo_25}}
  \caption{Comparison between USL algorithm with classical or PIC mapping and exact velocities of the bars impact problem for various discretizations.}
  \label{fig:MPM_velocities}
\end{figure}
\begin{figure}[h!]
  \centering
  {\input{chapter3/pgfFigures/mpm_diffusion10} \phantomsubcaption \label{subfig:mpm_diffusion_10}}
  {\input{chapter3/pgfFigures/mpm_diffusion25} \phantomsubcaption \label{subfig:mpm_diffusion_25}}
  {\input{chapter3/pgfFigures/mpm_energies} \phantomsubcaption \label{subfig:mpm_energies}}
  \caption{Comparison of USL solutions using either PIC or FLIP projection and exact solution of the bars impact problem for various discretizations. (a)--(b) comparison of stress profiles at various times (c) evolution of total energy. CFL=$0.7$ ; $v_0=\frac{1}{200}\sqrt{\frac{E}{\rho}}$.}
  \label{fig:mpm_diffusion}
\end{figure}
As can be seen, the PIC projection eliminates the noise in numerical solutions as well as the velocity locking in the central region of the bar.
In addition, stress results provided by the USL using the PIC mapping are also close to the exact solution (see figures \ref{fig:mpm_diffusion}\subref{subfig:mpm_diffusion_10} and \ref{fig:mpm_diffusion}\subref{subfig:mpm_diffusion_25}).
However, the resolution of discontinuities (\textit{i.e. the sharpness of the solution}) allowed by the "modified" USL--MPM is slightly lower than that of the original formulation owing to numerical dissipation as shown in the energy plot in figure \ref{fig:mpm_diffusion}\subref{subfig:mpm_energies}.
This result was expected since the FLIP projection was preferred to PIC one for it enabled a reduction of numerical dissipation \cite{PIC_Nishiguchi}.

% This balance between diffusion and noise resulting from the projection between nodes and particles selected has been emphasized in \cite{XPIC}
% Furthermore, the mapping \eqref{eq:PIC_Back-mapping} has been identified in \cite{XPIC} as a solution of the problem:
% \begin{equation}
%   \vect{v}^{p,n+1} = \arg \min_{\vect{v}^{p}}|| \vect{v}^{p}||_2,\quad \text{such that }  \frac{\sum_{p=1}^{N_p}S_{ip} m_p\vect{v}^{p}}{\sum_{k=1}^{N_p}S_{ik} m_k}=\vect{v}^{i,n+1}
% \end{equation}
% in which the minimization is achieved by dissipating kinetic energy.

\subsection{Strategy for reducing oscillations and diffusion}
We are concerned with the accurate solution of hyperbolic problems in solids undergoing finite deformations.
Although the MPM enables an efficient management of large strains, the oscillations it suffers from do not allow accurate capture of waves propagating in a medium.
The above numerical simulations however suggest that noise can be removed by using an interpolation instead of an update of material point velocity, at the cost of additional diffusion.
Thus, the use of  a linear combination of PIC and FLIP projections to update particles velocity was proposed in \cite{Nairn}, which can be seen as an artificial damping.
Further, a tunable mapping procedure based on a parameter $m$ that completely eliminates noise in the MPM solution has been proposed in the \textit{Extended PIC of order m (XPIC(m))} \cite{XPIC}.
A classical interpolation is selected for $m=1$ whereas the mapping tends to FLIP as $m \rightarrow \infty$ while avoiding oscillations without dissipating energy.
Nevertheless, the method is still unable to capture discontinuities due to numerical diffusion.

The point of view adopted in this thesis is that numerical diffusion is essentially due to the projection of fields from nodes to particles which spreads the information.
Hence, a reduction of the domain of influence of nodes might result in lower dissipation.
As a consequence, the reintroduction of the PIC mapping combined with the \textit{Discontinuous Galerkin} approximation (DG) within the MPM is proposed here.
These two features are expected to respectively avoid spurious oscillations and limit numerical diffusion.

%%% Local Variables:
%%% mode: latex
%%% ispell-local-dictionary: "american"
%%% TeX-master: "../mainManuscript"
%%% End: