[cig-commits] r5553 - long/3D/Gale/trunk/documentation

sue at geodynamics.org sue at geodynamics.org
Fri Dec 8 12:41:09 PST 2006


Author: sue
Date: 2006-12-08 12:41:04 -0800 (Fri, 08 Dec 2006)
New Revision: 5553

Modified:
   long/3D/Gale/trunk/documentation/gale.lyx
Log:
first full reread edits input

Modified: long/3D/Gale/trunk/documentation/gale.lyx
===================================================================
--- long/3D/Gale/trunk/documentation/gale.lyx	2006-12-08 20:28:52 UTC (rev 5552)
+++ long/3D/Gale/trunk/documentation/gale.lyx	2006-12-08 20:41:04 UTC (rev 5553)
@@ -1,8415 +1,8325 @@
-#LyX 1.4.3 created this file. For more info see http://www.lyx.org/
-\lyxformat 245
-\begin_document
-\begin_header
-\textclass book
-\begin_preamble
-\usepackage{hyperref}
-
-\let\myUrl\url
-\renewcommand{\url}[1]{(\myUrl{#1})}
-\end_preamble
-\language english
-\inputencoding auto
-\fontscheme default
-\graphics default
-\paperfontsize default
-\spacing single
-\papersize default
-\use_geometry true
-\use_amsmath 1
-\cite_engine basic
-\use_bibtopic false
-\paperorientation portrait
-\leftmargin 1in
-\topmargin 1in
-\rightmargin 1in
-\bottommargin 1in
-\secnumdepth 3
-\tocdepth 3
-\paragraph_separation indent
-\defskip medskip
-\quotes_language swedish
-\papercolumns 1
-\papersides 2
-\paperpagestyle headings
-\tracking_changes false
-\output_changes true
-\end_header
-
-\begin_body
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset ERT
-status collapsed
-
-\begin_layout Standard
-
-
-\backslash
-thispagestyle{empty}
-\end_layout
-
-\end_inset
-
-
-\begin_inset Float figure
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Standard
-\noindent
-\begin_inset Graphics
-	filename gale_cover.pdf
-	width 75page%
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Title
-Gale
-\end_layout
-
-\begin_layout Author
-© California Institute of Technology
-\newline
-Walter Landry and Luke Hodkinson
-\newline
-Version
- 1.0 
-\end_layout
-
-\begin_layout Date
-\begin_inset ERT
-status collapsed
-
-\begin_layout Standard
-
-
-\backslash
-today
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\begin_inset LatexCommand \tableofcontents{}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\begin_inset FloatList figure
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\begin_inset ERT
-status collapsed
-
-\begin_layout Standard
-
-
-\backslash
-raggedbottom
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-
-\newpage
-
-\end_layout
-
-\begin_layout Chapter
-Preface
-\end_layout
-
-\begin_layout Section
-Who will use Gale?
-\end_layout
-
-\begin_layout Standard
-The main audience for Gale is research scientists interested in tectonic
- modeling.
-\end_layout
-
-\begin_layout Section
-Citation
-\end_layout
-
-\begin_layout Standard
-Computational Infrastructure for Geodynamics (CIG) is making this source
- code available to you in the hope that the software will enhance your research
- in geophysics.
- The underlying C code for the finite element package was donated to CIG
- in July of 2005.
- A number of individuals have contributed a significant portion of their
- careers toward the development of Gale.
- It is essential that you recognize these individuals in the normal scientific
- practice by making appropriate acknowledgements.
- 
-\end_layout
-
-\begin_layout Standard
-The code is based on the method described in Moresi, L.N., F.
- Dufour, and H.-B.
- Mühlhaus (2003), A Lagrangian integration point finite element method for
- large deformation modeling of viscoelastic geomaterials, 
-\emph on
-J.
- Comp.
- Phys., 184
-\series bold
-,
-\series default
-\emph default
- 476-497.
- The code was originally developed by the Victorian Partnership for Advanced
- Computing (VPAC) and Louis Moresi's group at Monash University.
- Walter Landry of CIG and Luke Hodkinson of VPAC have enhanced the code
- to satisfy the requirements of the long-term tectonics community.
- Gus Correa and Robert Bialas from the Lamont-Doherty Earth Observatory
- provided valuable user testing.
- The Gale team requests that in your oral presentations and in your paper
- acknowledgements that you indicate your use of this code, the authors of
- the code, 
-\begin_inset LatexCommand \htmlurl[CIG]{www.geodynamics.org}
-
-\end_inset
-
-, 
-\begin_inset LatexCommand \htmlurl[Victoria Partnership for Advanced Computing]{www.vpac.org}
-
-\end_inset
-
-, and 
-\begin_inset LatexCommand \htmlurl[Monash University]{www.monash.edu}
-
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Section
-Support
-\end_layout
-
-\begin_layout Standard
-Gale development is supported by a grant from the National Science Foundation
- to CIG, managed by the Caltech Institute of Technology.
- However, most of the software components below Gale have been developed
- by the Victoria Partnership for Advanced Computing (VPAC) and Monash University.
-\end_layout
-
-\begin_layout Chapter
-Introduction
-\end_layout
-
-\begin_layout Section
-About Gale
-\end_layout
-
-\begin_layout Standard
-Gale is a parallel, two- or three-dimensional, implicit finite element code
- focusing on orogenesis, rifting, and subduction with coupling to surface
- erosion models.
- Gale uses a hybrid particle-in-cell scheme which combines a deformable
- mesh of computational points and a dense arrangement of mobile material
- points.
- The boundaries of the deformable mesh conform to the boundaries of the
- material as the simulation progresses, but the interior is constrained
- to remain as regular as possible.
- The particles track history-dependent properties such as strain for strain-soft
-ening materials.
- This allows Gale to simulate  problems with large deformations and irregular
- boundaries.
-\end_layout
-
-\begin_layout Standard
-CIG has developed Gale in response to community demand by building on existing
- work by VPAC and Louis Moresi's group at Monash University.
- The code is being released under the GNU General Public License.
-\end_layout
-
-\begin_layout Section
-Gale Computational Approach and Governing Equations
-\end_layout
-
-\begin_layout Subsection
-Infrastructure
-\end_layout
-
-\begin_layout Standard
-Gale uses both a regular grid and particles for simulation.
- The regular grid is used to solve differential equations, and particles
- are used to record material properties (e.g., strain history).
- Note that the regular grid can become distorted, since it may conform to
- an uneven upper surface.
-\end_layout
-
-\begin_layout Subsection
-Basic Equations
-\end_layout
-
-\begin_layout Standard
-We can decompose the stress tensor 
-\begin_inset Formula $\sigma$
-\end_inset
-
- into pressure 
-\begin_inset Formula $p$
-\end_inset
-
- and deviatoric stress 
-\begin_inset Formula $\tau$
-\end_inset
-
- 
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula \begin{equation}
-\sigma_{ij}=\tau_{ij}-p\delta_{ij},\label{eq:stress}\end{equation}
-
-\end_inset
-
-where 
-\begin_inset Formula $\delta$
-\end_inset
-
- is the Kronecker delta.
- In its simplest form, Gale solves a conservation equation for momentum
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula \begin{equation}
-\tau_{ij,j}-p_{,i}=0,\label{eq:simple momentum conservation}\end{equation}
-
-\end_inset
-
-subject to the continuity equation
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula \begin{equation}
-v_{i,i}=0,\label{eq:continuity}\end{equation}
-
-\end_inset
-
-where 
-\begin_inset Formula $v$
-\end_inset
-
- is the velocity.
- We use the convention that repeated indices (e.g., 
-\begin_inset Formula $v_{i,i}$
-\end_inset
-
-) imply a sum over all dimensions.
- So in three dimensions
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula \begin{equation}
-v_{i,i}\equiv v_{x,x}+v_{y,y}+v_{z,z}.\label{eq:implicit summation}\end{equation}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-Note that there is no explicit time dependency (yet).
- Gale simulates creeping flows, so acceleration terms are neglected and
- material motion evolves through a series of equilibria.
- If your boundary condition has a time component, then we may infer a time.
- For example, if the boundaries move inwards at 1 mm/sec, then the solution
- when the boundaries have moved 5 mm would correspond to 5 seconds.
-\end_layout
-
-\begin_layout Standard
-So far, these equations are very simple, taking no account of gravity or
- temperature.
- So this is mostly useful when simulating laboratory experiments.
-\end_layout
-
-\begin_layout Standard
-To solve eqs.
- 
-\begin_inset LatexCommand \ref{eq:simple momentum conservation}
-
-\end_inset
-
- and 
-\begin_inset LatexCommand \ref{eq:continuity}
-
-\end_inset
-
-, we assume a simple viscous material.
- This allows us to write 
-\begin_inset Formula $\tau$
-\end_inset
-
- in terms of the rate of strain tensor 
-\begin_inset Formula $D$
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula \begin{equation}
-\tau_{ij}=2\eta D_{ij}\equiv\eta\left(v_{i,j}+v_{j,i}\right),\label{eq:stress strain}\end{equation}
-
-\end_inset
-
-where 
-\begin_inset Formula $\eta$
-\end_inset
-
- is the viscosity.
- 
-\end_layout
-
-\begin_layout Standard
-Using standard finite-element techniques, we can represent eqs.
- 
-\begin_inset LatexCommand \ref{eq:simple elliptic}
-
-\end_inset
-
- and 
-\begin_inset LatexCommand \ref{eq:continuity}
-
-\end_inset
-
- in matrix form as 
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula \begin{equation}
-\left(\begin{array}{cc}
-K & G\\
-G^{T}\end{array}\right)\left(\begin{array}{c}
-v\\
-p\end{array}\right)=\left(\begin{array}{c}
-0\\
-0\end{array}\right),\label{eq:matrix form}\end{equation}
-
-\end_inset
-
-where 
-\begin_inset Formula $G$
-\end_inset
-
- is the simple gradient operator and 
-\begin_inset Formula $K$
-\end_inset
-
- is a more complicated submatrix depending on material properties.
-\begin_inset Foot
-status open
-
-\begin_layout Standard
-At this point, it is common in many codes to introduce a penalty function
- to make the right hand side of the continuity equation 
-\begin_inset LatexCommand \ref{eq:continuity}
-
-\end_inset
-
- non-zero.
- This would allow us to eliminate 
-\begin_inset Formula $p$
-\end_inset
-
- from the equation, leading to a simpler set of equations.
- However, this penalty function is non-physical and can cause spurious effects.
-\end_layout
-
-\end_inset
-
- This implies the separate relations
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula \begin{equation}
-\begin{array}{ccc}
-Kv+Gp & = & 0\\
-G^{T}v & = & 0\end{array}.\label{eq:expanded matrix}\end{equation}
-
-\end_inset
-
-We can then eliminate velocity by premultiplying by 
-\begin_inset Formula $G^{T}K^{-1}$
-\end_inset
-
- and using 
-\begin_inset Formula $G^{T}v=0$
-\end_inset
-
- 
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula \begin{equation}
-G^{T}K^{-1}Gp=0.\label{eq:final simple elliptic}\end{equation}
-
-\end_inset
-
-This equation is solved using the Uzawa algorithm 
-\begin_inset LatexCommand \cite{key-2}
-
-\end_inset
-
-.
- 
-\end_layout
-
-\begin_layout Subsection
-Gravity
-\end_layout
-
-\begin_layout Standard
-Gravity is accounted for by adding a body force term to eq.
- 
-\begin_inset LatexCommand \ref{eq:simple momentum conservation}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula \begin{equation}
-\tau_{ij,j}-p_{,i}=f_{i},\label{eq:body force}\end{equation}
-
-\end_inset
-
-where
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula \begin{equation}
-\begin{array}{ccc}
-f_{x} & = & 0\\
-f_{y} & = & 0\\
-f_{z} & = & -g\rho\end{array}.\label{eq:gravity body force}\end{equation}
-
-\end_inset
-
- This modifies eq.
- 
-\begin_inset LatexCommand \ref{eq:matrix form}
-
-\end_inset
-
- to 
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula \begin{equation}
-\left(\begin{array}{cc}
-K & G\\
-G^{T}\end{array}\right)\left(\begin{array}{c}
-v\\
-p\end{array}\right)=\left(\begin{array}{c}
-f\\
-0\end{array}\right).\label{eq:matrix form}\end{equation}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection
-Temperature
-\end_layout
-
-\begin_layout Standard
-Temperature is included by solving the energy equation
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula \begin{equation}
-\frac{dT}{dt}=\kappa\nabla^{2}T+Q,\label{eq:energy}\end{equation}
-
-\end_inset
-
- where 
-\begin_inset Formula $d/dt$
-\end_inset
-
- is the material time derivative (taken at a point moving with respect to
- the fluid), 
-\begin_inset Formula $T$
-\end_inset
-
- is the temperature, 
-\begin_inset Formula $\kappa$
-\end_inset
-
- is the thermal diffusivity, and 
-\begin_inset Formula $Q$
-\end_inset
-
- is the rate of energy production (e.g., from radiogenic sources).
- Note that eq.
- 
-\begin_inset LatexCommand \ref{eq:energy}
-
-\end_inset
-
- introduces time into the equation.
-\end_layout
-
-\begin_layout Subsection
-Surface Processes
-\end_layout
-
-\begin_layout Standard
-Gale takes an agnostic approach to surface processes such as erosion.
- Gale exposes a programming interface that allows us to modify the heights
- of the surface.
- See section 
-\begin_inset LatexCommand \ref{sec:Surface-Processes}
-
-\end_inset
-
- for details.
-\end_layout
-
-\begin_layout LyX-Code
-
-\end_layout
-
-\begin_layout Subsection
-Rheology
-\end_layout
-
-\begin_layout Standard
-Gale incorporates a number of different rheologies, as well as letting you
- create your own.
- For details on the existing Rheologies, see section 
-\begin_inset LatexCommand \ref{sec:Materials}
-
-\end_inset
-
-.
- To create your own rheology, see chapter 
-\begin_inset LatexCommand \ref{cha:Modifying-Gale}
-
-\end_inset
-
- for guidance.
-\end_layout
-
-\begin_layout Section
-Gale History
-\end_layout
-
-\begin_layout Standard
-Gale arose from discussions at an NSF-sponsored workshop on Tectonic Modeling
- held in Breckenridge, Colorado.
- At that workshop, members of the tectonics community advocated that CIG
- develop a new open-source software package based on the Arbitrary Lagrangian
- Eulerian (ALE) method for solving tectonic problems.
- The ALE method, as it is implemented in the tectonics community, was developed
- primarily at Dalhousie University in Canada.
- It solves a Stokes Flow problem on an Eulerian grid and uses a Lagrangian
- grid to track material properties and to integrate strain.
- This method has seen much use in lithosphere deformation problems such
- as orogenesis, rifting, subduction, as well as in coupling to surface erosion
- models and has been employed for deeper mantle dynamics problems.
- Gale is an open-source code that is at least as useful as SOPALE and MicroFEM
- for addressing these research areas, with the addition of 3D capability.
- In the future, Gale runs benchmarks such as extension and shortening, as
- well as the traditional subduction model as shown in Fig.
- 
-\begin_inset LatexCommand \ref{fig:General-subduction-model}
-
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Standard
-Walter Landry of CIG and Luke Hodkinson of the Victorian Partnership for
- Advanced Computing (VPAC) are the primary developers of Gale.
- Roger Buck, Robert Bialis, and Gus Correa of Columbia University provided
- valuable user testing.
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float figure
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Caption
-\begin_inset LatexCommand \label{fig:General-subduction-model}
-
-\end_inset
-
-General subduction model from Fullsack (1995).
- The basic subduction model can be modified by introducing isostasy and/or
- boundary mass fluxes.
- (a) Flexural or local isostasy.
- Every Eulerian column is displaced by the corresponding local or flexural
- deflection 
-\emph on
-w
-\emph default
- of the base.
- (b) Mass fluxes crossing the boundaries may be: (1) the tectonic flux 
-\emph on
-t
-\emph default
-
-\begin_inset Formula $^{\text{+}}$
-\end_inset
-
- into the domain, due to tectonic convergence; (2) the deposition flux 
-\begin_inset Formula $\text{e}^{+}$
-\end_inset
-
- onto the domain, due to surface processes; (3) the deposition flux 
-\begin_inset Formula $\text{e}^{-}$
-\end_inset
-
- from the domain, due to surface processes; (4) the crustal subduction flux
- 
-\begin_inset Formula $\text{cs}^{-}$
-\end_inset
-
- from the domain, due to the entrainment of crustal material from the subducting
- plate.
- 
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Graphics
-	filename images/GALE_image1.eps
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
- 
-\end_layout
-
-\begin_layout Chapter
-Installation and Getting Help
-\end_layout
-
-\begin_layout Section
-System Requirements
-\end_layout
-
-\begin_layout Standard
-Gale works on a variety of platforms.
- It requires Petsc, MPI, and libxml2 headers and development libraries.
- It also requires Python 2.2.1 or greater to build.
-\end_layout
-
-\begin_layout Standard
-Gale has been tested on workstations running Mac OS X 10.4.6 (G4 and G5);
- Windows 2000 and XP SP2; RedHat Fedora Core 5 (x86); OpenSuse 10.0 (x86);
- Gentoo (x86); Debian stable (x86 and AMD64), testing (x86), and unstable
- (x86).
- Gale has also been tested on clusters running Redhat 7.2 (x86) and RedHat
- Enterprise Linux 3 (EM64T).
-\end_layout
-
-\begin_layout Section
-Getting the Code
-\end_layout
-
-\begin_layout Standard
-Gale can be downloaded at 
-\begin_inset LatexCommand \htmlurl[CIG Software Packages: Gale]{www.geodynamics.org/cig/software/packages/long/gale/}
-
-\end_inset
-
- as a tar file or via the CIG Subversion software repository.
- To check whether you have a subversion client installed on your machine,
- type:
-\end_layout
-
-\begin_layout LyX-Code
-svn
-\end_layout
-
-\begin_layout Standard
-You should get a response that looks something like this:
-\end_layout
-
-\begin_layout LyX-Code
-Type 'svn help' for usage.
-\end_layout
-
-\begin_layout Standard
-Otherwise, you will need to download and install a Subversion client, available
- at the 
-\begin_inset LatexCommand \htmlurl[Subversion Website]{subversion.tigris.org/project_packages.html}
-
-\end_inset
-
-.
- Then the code can be checked out with the following command: 
-\end_layout
-
-\begin_layout LyX-Code
-svn checkout http://geodynamics.org/svn/cig/long/3D/Gale/trunk Gale
-\end_layout
-
-\begin_layout Section
-Installation
-\end_layout
-
-\begin_layout Standard
-Installation instructions are available in the tarball in the file INSTALL.
- For some platforms (Mac OS X, Windows, RedHat Fedora Core 5, OpenSuse 10.0,
- Debian stable, testing, and unstable) there are platform specific installation
- instructions.
- Generally, the hardest part is not installing Gale itself, but PETSc.
-\end_layout
-
-\begin_layout Section
-Support
-\end_layout
-
-\begin_layout Standard
-The primary point of support for Gale is the 
-\begin_inset LatexCommand \url[CIG Long-Term Crustal Dynamics Mailing List]{cig-long at geodynamics.org}
-
-\end_inset
-
-.
- Feel free to send questions, comments, feature requests, and bugs to the
- list.
- The mailing list is archived at
-\end_layout
-
-\begin_layout LyX-Code
-\begin_inset LatexCommand \htmlurl[cig-long Archives]{www.geodynamics.org/pipermail/cig-long/}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-You may also use the bug tracker
-\end_layout
-
-\begin_layout LyX-Code
-\begin_inset LatexCommand \htmlurl[Roundup]{geodynamics.org/roundup}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-to submit bugs.
-\end_layout
-
-\begin_layout Chapter
-Running Gale
-\end_layout
-
-\begin_layout Section
-Gale Usage
-\end_layout
-
-\begin_layout Subsection
-Usage
-\end_layout
-
-\begin_layout Standard
-If you downloaded binaries for your platform, you can run the Gale executable
- directly.
- For example
-\end_layout
-
-\begin_layout LyX-Code
-./Gale  extension.xml
-\end_layout
-
-\begin_layout Standard
-If you compiled Gale yourself, then you can run it from where you installed
- it.
- If running in parallel, then just prepend 
-\family typewriter
-mpirun
-\family default
- or 
-\family typewriter
-mpiexec
-\family default
-.
- The extension example should run for 500 time steps and generate a great
- deal of output in the 
-\family typewriter
-output.extension
-\family default
- directory.
- There are also rough examples of shortening and subduction.
-\end_layout
-
-\begin_layout Standard
-Gale uses PETSc for solvers, so you can easily change which solver to use.
- The default solver is preconditioned conjugate gradient.
- There are too many options of PETSc to go into it here.
- But as a simple example, to use a direct LU solve, simply append arguments
- to the command line
-\end_layout
-
-\begin_layout LyX-Code
-./Gale  extension.xml -pc_type lu -ksp_type preonly
-\end_layout
-
-\begin_layout Section
-Output Format
-\end_layout
-
-\begin_layout Standard
-The sample input files will produce a directory in which you will find a
- number of different output files.
- The default setting is to print once for every time step.
- You can change the frequency of that setting, e.g., have it print less frequently
-, by modifying 
-\family typewriter
-extension.xml
-\family default
- so the parameter 
-\family typewriter
-checkpointEvery
-\family default
- has a different value, e.g.:
-\end_layout
-
-\begin_layout LyX-Code
-<param name=
-\begin_inset Quotes erd
-\end_inset
-
-checkpointEvery
-\begin_inset Quotes erd
-\end_inset
-
->25</param>
-\end_layout
-
-\begin_layout Standard
-You can change the value to any number you want.
- 
-\end_layout
-
-\begin_layout Standard
-Also found in the output directory are a number of .dat and .txt files.
- Most of the .dat files are ASCII and self-explanatory, e.g., 
-\family typewriter
-PressureField.dat
-\family default
- contains pressure field output information.
- Inside each .dat file are found several columns of data:
-\end_layout
-
-\begin_layout LyX-Code
-
-\family typewriter
-0 0.0312539624080715 0.0109361134145122 0 -9.81467103200287
-\end_layout
-
-\begin_layout LyX-Code
-
-\family typewriter
-1 0.0937630718938361 0.0109356986189374 0 17.7373201951569
-\end_layout
-
-\begin_layout LyX-Code
-
-\family typewriter
-2 0.156270066350344 0.0109368543031399 0 -37.0281780188199
-\end_layout
-
-\begin_layout LyX-Code
-
-\family typewriter
-3 0.218780947570009 0.0109343376815161 0 45.6263762140766
-\end_layout
-
-\begin_layout LyX-Code
-
-\family typewriter
-4 0.28128858838265 0.010937987088561 0 -65.2132484518426 
-\end_layout
-
-\begin_layout Standard
-The first column (0,1,2,3, ...) is the node number, and the second, third,
- and fourth columns are the x, y, and z coordinates.
- The last column(s) show the value.
- Note: If performing a 2D run, you will still obtain the z data, but that
- can be ignored.
-\end_layout
-
-\begin_layout Standard
-The .txt files are the output of 
-\family typewriter
-DumpSwarm
-\family default
-, explained below.
-\end_layout
-
-\begin_layout Section
-Using 
-\family typewriter
-DumpSwarm
-\family default
- for Particle Information
-\end_layout
-
-\begin_layout Standard
-All of the particle information is output in the 
-\family typewriter
-materialSwarm.*.dat
-\family default
- files.
- Unfortunately, they are just a binary dump of the particle structures,
- so their format may vary depends on the machine architecture.
- To get the particle information in a more friendly format, we provide a
- plug-in called 
-\family typewriter
-DumpSwarm
-\family default
-.
- The 
-\family typewriter
-DumpSwarm
-\family default
- plugin is activated by adding the line
-\end_layout
-
-\begin_layout LyX-Code
-    <param>Underworld_DumpSwarm</param> 
-\end_layout
-
-\begin_layout Standard
-to the list of plugins.
- This line is already in the example input files.
- At present, it outputs the files 
-\family typewriter
-yielding.*.txt
-\family default
-.
- The format of the file is
-\end_layout
-
-\begin_layout LyX-Code
-m x y z
-\family typewriter
- yielded
-\end_layout
-
-\begin_layout Standard
-where 
-\family typewriter
-m
-\family default
- is the number of the material (in the examples, always 1), and 
-\family typewriter
-yielded
-\family default
- is a number between 
-\family typewriter
-0
-\family default
- and 
-\family typewriter
-1
-\family default
- indicating how much a material point has failed.
- If you want to print out some other property of the material, e.g., viscosity,
- you can modify 
-\family typewriter
-DumpSwarm
-\family default
- to provide that information.
- The source for the plugin is found in the directory
-\end_layout
-
-\begin_layout LyX-Code
-src/Underworld/plugins/Output/DumpSwarm/
-\end_layout
-
-\begin_layout Section
-Postprocessing
-\end_layout
-
-\begin_layout Standard
-Included in the 
-\family typewriter
-tools/
-\family default
- directory is a short C++ program, 
-\family typewriter
-viz.cxx
-\family default
-, that will convert the yielding.*.txt files into vtk files.
- These vtk files can be directly visualized in Mayavi <
-\begin_inset LatexCommand \url{http://mayavi.sourceforge.net/}
-
-\end_inset
-
-> or Paraview <
-\begin_inset LatexCommand \url{http://www.paraview.org/}
-
-\end_inset
-
->.
-\end_layout
-
-\begin_layout Chapter
-Modifying Gale
-\begin_inset LatexCommand \label{cha:Modifying-Gale}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Section
-Introduction
-\end_layout
-
-\begin_layout Standard
-If you wish to change material properties, here is a brief overview of how
- to modify the code.
- The following is currently lacking in many areas, but will be expanded
- and refined in future releases.
- 
-\end_layout
-
-\begin_layout Section
-Software Components of Gale
-\end_layout
-
-\begin_layout Standard
-Gale makes use of several physics libraries, including StGermain, StgFEM,
- PiCellerator, and Underworld.
- These are proven, capable, open-source finite element method libraries
- written by the Victorian Partnership for Advanced Computing (VPAC) and
- Louis Moresi's group at Monash University.
- See Fig 
-\begin_inset LatexCommand \ref{fig:Mapping-between-MicroFEM}
-
-\end_inset
-
-.
- Gale also makes use of PETSc, a suite of data structures and routines for
- the parallel solution of scientific applications modeled by partial differentia
-l equations.
- 
-\end_layout
-
-\begin_layout Subsection
-StGermain 
-\end_layout
-
-\begin_layout Standard
-StGermain provides an infrastructure that can be used to create reusable,
- collaborative computational development environments.
- It aims to provide the efficiency and style of coding near that of traditional
- HPC as well as new techniques and methods in scientific computing.
- Effectively, it is the application of contemporary software engineering
- on multi-disciplinary computational research.
- In particular, StGermain can be used in the development of computational
- finite element codes.
- It permits the interchanging of numerical schemes without having to change
- the problem description or the constitutive rules utilized.
- It also allows numerical schemes and constitutive rules to be reused for
- different problems in different disciplines.
- Scientists can then switch to new computational technologies as they become
- available.
- StGermain also capitalizes on the resources invested in software development
- on a research project, rendering that software effectively reusable for
- subsequent projects.
- In turn, intellectual property, skills and adaptability of the recipients
- develop over time.
- 
-\begin_inset LatexCommand \htmlurl[StGermain Web Site]{csd.vpac.org/twiki/bin/view/Stgermain/WebHome}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection
-PETSc
-\end_layout
-
-\begin_layout Standard
-PETSc, the Portable, Extensible Toolkit for Scientific Computation, is a
- suite of data structures and routines for the uni- and parallel-processor
- solution of large-scale scientific application problems modeled by partial
- differential equations.
- It employs the MPI standard for all message-passing communication.
- 
-\begin_inset LatexCommand \htmlurl[PETSc Web Site]{www-unix.mcs.anl.gov/petsc/petsc-as/}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float figure
-placement H
-wide false
-sideways false
-status collapsed
-
-\begin_layout Caption
-\begin_inset LatexCommand \label{fig:Mapping-between-MicroFEM}
-
-\end_inset
-
-Mapping between MicroFEM and Gale 
-\newline
-
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Graphics
-	filename images/GALE_imag.eps
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection
-StgFEM 
-\end_layout
-
-\begin_layout Standard
-StgFEM uses the StGermain philosophy of reusability and collaborative developmen
-t to create a finite element problem composer in terms of both the linear
- system to be solved and the finite element discretization of the problem
- domain.
- The composition can be described in XML and could be represented in a network
- diagram with an appropriate tool.
- StgFEM describes finite element systems for various formulations in a manner
- that can allow the underlying numerics to be interchanged.
- 
-\begin_inset LatexCommand \htmlurl[StgFEM Web Site]{csd.vpac.org/twiki/bin/view/Stgfem/WebHome}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection
-PiCellerator 
-\end_layout
-
-\begin_layout Standard
-PICellerator (Particle In Cellerator), a Lagrangian Integration Point Finite
- Element framework, is implemented as an integration scheme substitute for
- the default Gaussian scheme implemented in StgFEM.
- The PICellerator concept has since grown to become a general Lagrangian
- integration scheme framework and a Lagrangian constitutive rule framework.
- The PIC scheme is provided and other Arbitrary Lagrangian Eulerian schemes
- are in development.
- Constitutive rules are reusable across these schemes.
- 
-\begin_inset LatexCommand \htmlurl[PICellerator Web Site]{csd.vpac.org/twiki/bin/view/PICellerator/WebHome}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection
-UnderWorld 
-\end_layout
-
-\begin_layout Standard
-UnderWorld is a StGermain parallel modeling framework Geoscience research
- code which utilizes a Lagrangian particle-in-cell finite element scheme
- (the prototype of which is the Ellipsis code), visualised using gLucifer.
- UnderWorld (Monash University), StGermain (Victorian Partnership for Advanced
- Computing (VPAC)) and gLucifer (Monash University) are under development
- as part of the Australian Computational Earth Systems Simulator (ACcESS),
- an Australian Government National Research Facility, a node of which is
- located at the Australian Crustal Research Centre (ACRC) at Monash University
- (Clayton Campus).
- 
-\begin_inset LatexCommand \htmlurl[UnderWorld Web Site]{wasabi.maths.monash.edu.au/twiki/view/Software/Underworld}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Section
-System Description
-\end_layout
-
-\begin_layout Standard
-Gale uses StG_FEM to formulate implicit finite element systems, with the
- bulk of the information placed in a stiffness matrix and a force vector.
- Depending on the type of solver used, there may be several matrices and
- vectors.
- The stiffness matrix class has a member whose purpose is to assemble the
- entire matrix.
- It does this through the use of 
-\begin_inset Quotes eld
-\end_inset
-
-stiffness matrix terms.
-\begin_inset Quotes erd
-\end_inset
-
- The 
-\family typewriter
-StiffnessMatrixTerm
-\family default
- class provides an interface through which the elemental contributions to
- the matrix may be influenced.
- In typical fluid flow systems, the majority of the physics is applied to
- the model through constitutive laws which modify the stiffness matrix to
- reflect certain physical situations.
- The 
-\family typewriter
-ConstitutiveMatrix
-\family default
- class inherits from 
-\family typewriter
-StiffnessMatrixTerm
-\family default
-, providing an interface tailored to implementing material based continuum
- physics.
- 
-\end_layout
-
-\begin_layout Standard
-So, where do the actual physics take place? The answer is in the Rheology
- class, but first we need to look at the PIC (particle in cell) scheme.
- There are a number of benefits to using a PIC scheme, but the main use
- is to store material properties on each particle.
- We can then use these properties to drive our constitutive laws, in turn
- modifying the produced stiffness matrices.
- For each defined material in the domain, there may be a number of associated
- rheological laws.
- Whenever an element in the system is assembled, each stiffness matrix term
- is evaluated, implying that the constitutive matrix will be evaluated for
- each element.
- For each particle internal to an element, the 
-\family typewriter
-ConstitutiveMatrix
-\family default
- class will evaluate all associated rheologies, each rheology modifying
- the constitutive matrix.
- 
-\end_layout
-
-\begin_layout Standard
-Modifying the constitutive matrix takes place in the form of viscosity values.
- In this, probably the simplest of rheological laws, the 
-\family typewriter
-ModifyConstitutiveMatrix
-\family default
- method simply sets a specific viscosity value for the current element/material
- point tuple.
- 
-\end_layout
-
-\begin_layout Section
-Sample Rheologies 
-\end_layout
-
-\begin_layout Subsection
-Simple Viscous 
-\end_layout
-
-\begin_layout Standard
-This excerpt is taken from the file 
-\family typewriter
-src/Underworld/Rheology/src/MaterialViscosity.c
-\family default
-.
- It has been inherited from the Rheology class and thus possesses a virtual
- method named 
-\end_layout
-
-\begin_layout LyX-Code
-
-\family typewriter
-MaterialViscosity_ModifyConstitutiveMatrix
-\family default
- 
-\end_layout
-
-\begin_layout Standard
-which has been overridden to set the viscosity in the constitutive matrix,
- as follows: 
-\end_layout
-
-\begin_layout LyX-Code
-void _MaterialViscosity_ModifyConstitutiveMatrix( 
-\end_layout
-
-\begin_layout LyX-Code
-   void*                rheology, 
-\end_layout
-
-\begin_layout LyX-Code
-   ConstitutiveMatrix*  constitutiveMatrix, 
-\end_layout
-
-\begin_layout LyX-Code
-   MaterialPointsSwarm* swarm,
-\end_layout
-
-\begin_layout LyX-Code
-   Element_LocalIndex   lElement_I,
-\end_layout
-
-\begin_layout LyX-Code
-   MaterialPoint*       materialPoint,
-\end_layout
-
-\begin_layout LyX-Code
-   Coord                xi )
-\end_layout
-
-\begin_layout LyX-Code
-{
-\end_layout
-
-\begin_layout LyX-Code
-   MaterialViscosity* self = (MaterialViscosity*)rheology;
-\end_layout
-
-\begin_layout LyX-Code
-   ConstitutiveMatrix_SetIsotropicViscosity( constitutiveMatrix,
-\end_layout
-
-\begin_layout LyX-Code
-                                             self->eta0 );
-\end_layout
-
-\begin_layout LyX-Code
-}
-\end_layout
-
-\begin_layout Standard
-The parameters passed to this method provide access to the rheology class's
- members/methods, the constitutive matrix, the swarm (material points),
- the index of the element currently being assembled, the material point
- currently being evaluated, and the material point's elemental coordinates.
-\end_layout
-
-\begin_layout Chapter
-Cookbook Examples
-\end_layout
-
-\begin_layout Section
-Introduction
-\end_layout
-
-\begin_layout Section
-Cookbook 1: Title
-\end_layout
-
-\begin_layout Subsection
-Problem
-\end_layout
-
-\begin_layout Subsection
-Solution
-\end_layout
-
-\begin_layout Subsection
-Discussion
-\end_layout
-
-\begin_layout Chapter
-\start_of_appendix
-Input File Format
-\end_layout
-
-\begin_layout Section
-Structure
-\end_layout
-
-\begin_layout Standard
-The input files are XML files.
- This leverages a well known format to specify concepts like hierarchies,
- lists, parameters, and arbitrary structures.
- The entire document is placed withing a 
-\family typewriter
-StGermainData
-\family default
- structure.
-\end_layout
-
-\begin_layout LyX-Code
-<?xml version="1.0"?>
-\end_layout
-
-\begin_layout LyX-Code
-<StGermainData xmlns="http://www.vpac.org/StGermain/XML_IO_Handler/Jun2003">
-\end_layout
-
-\begin_layout LyX-Code
-...
-\end_layout
-
-\begin_layout LyX-Code
-</StGermainData>
-\end_layout
-
-\begin_layout Standard
-Within that structure, there are five main parts of every Gale input file:
- the components, the plugins, EulerDeform, Velocity Conditions, and the
- variables.
-\end_layout
-
-\begin_layout Subsection
-Components
-\begin_inset LatexCommand \label{sub:Components}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-The components section is separated off from the rest of the file with an
- enclosing 
-\family typewriter
-components
-\family default
- structure.
- This 
-\family typewriter
-components
-\family default
- structure is where most of the bulk of the file will be.
- It specifies things like what the mesh will be like, which material goes
- where, what the material properties are, what kind of solver to use, etc.
- Most of the ideas you need to specify will go into the components.
- When adding a new component, it is important to remember to put the new
- component inside the components structure.
- Otherwise Gale will (silently) not use that component.
- For example, an input file such as
-\end_layout
-
-\begin_layout LyX-Code
-<struct name="components">
-\end_layout
-
-\begin_layout LyX-Code
-  <struct name="conditionFunctions">
-\end_layout
-
-\begin_layout LyX-Code
-    <param name="Type">StgFEM_StandardConditionFunctions</param>
-\end_layout
-
-\begin_layout LyX-Code
-  </struct>
-\end_layout
-
-\begin_layout LyX-Code
-</struct>
-\end_layout
-
-\begin_layout Standard
-will correctly intialize 
-\family typewriter
-StgFEM_StandardConditionFunctions
-\family default
-, but the input file
-\end_layout
-
-\begin_layout LyX-Code
-<struct name="components">
-\end_layout
-
-\begin_layout LyX-Code
-</struct>
-\end_layout
-
-\begin_layout LyX-Code
-<struct name="conditionFunctions">
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="Type">StgFEM_StandardConditionFunctions</param>
-\end_layout
-
-\begin_layout LyX-Code
-</struct>
-\end_layout
-
-\begin_layout Standard
-will not.
-\end_layout
-
-\begin_layout Subsection
-Plugins
-\begin_inset LatexCommand \label{sub:Plugins}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-Gale also has the ability to load modules during runtime.
- To use these plugins, simply list them in a section outside of the 
-\family typewriter
-components
-\family default
- structure.
- For example, the following lines will enable the 
-\family typewriter
-DumpSwarm
-\family default
- and 
-\family typewriter
-EulerDeform
-\family default
- plugins
-\end_layout
-
-\begin_layout LyX-Code
-<list name="plugins">
-\end_layout
-
-\begin_layout LyX-Code
-  <param>Underworld_EulerDeform</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <param>Underworld_DumpSwarm</param>
-\end_layout
-
-\begin_layout LyX-Code
-</list> 
-\end_layout
-
-\begin_layout Standard
-Dynamically loading modules is, in general, difficult to get working on
- multiple platforms.
- To make things easier, Gale is bundled with a number of plugins compiled
- into the code and ready to use:
-\end_layout
-
-\begin_layout LyX-Code
-StgFEM_FrequentOutput
-\end_layout
-
-\begin_layout LyX-Code
-StgFEM_CPUTime
-\end_layout
-
-\begin_layout LyX-Code
-Underworld_MovingMesh
-\end_layout
-
-\begin_layout LyX-Code
-Underworld_Vrms
-\end_layout
-
-\begin_layout LyX-Code
-Underworld_EulerDeform
-\end_layout
-
-\begin_layout LyX-Code
-StgFEM_PrintFeVariableDiscreteValues
-\end_layout
-
-\begin_layout LyX-Code
-Underworld_DumpSwarm
-\end_layout
-
-\begin_layout Standard
-You can add additional plugins by modifying the list of static plugins in
- 
-\family typewriter
-src/Gale/src/main.c
-\family default
- and making sure that the plugin is compiled into the Gale executable.
-\end_layout
-
-\begin_layout Standard
-If you want to use dynamically loaded plugins, make sure that you compiled
- with shared libraries (use the 
-\family typewriter
---with-shared
-\family default
- option when compiling) and set your LD_LIBRARY_PATH environment variable
- appropriately.
-\end_layout
-
-\begin_layout Subsection
-EulerDeform
-\begin_inset LatexCommand \label{sub:EulerDeform}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-This section covers the input parameters of the 
-\family typewriter
-Underworld_EulerDeform
-\family default
- component.
- This is the component that allows the upper surface to move freely or stay
- rigidly in place.
- An example 
-\family typewriter
-EulerDeform
-\family default
- struct is
-\end_layout
-
-\begin_layout LyX-Code
-<struct name="EulerDeform">
-\end_layout
-
-\begin_layout LyX-Code
-  <list name="systems">
-\end_layout
-
-\begin_layout LyX-Code
-    <struct>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="mesh">mesh-constant</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="remesher">pressureRemesher</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="velocityField">VelocityField</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <list name="fields">
-\end_layout
-
-\begin_layout LyX-Code
-        <struct> 
-\end_layout
-
-\begin_layout LyX-Code
-          <param name="field">PressureField</param>
-\end_layout
-
-\begin_layout LyX-Code
-          <param name="variable">pressure</param>
-\end_layout
-
-\begin_layout LyX-Code
-        </struct>
-\end_layout
-
-\begin_layout LyX-Code
-      </list>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="mesh">mesh-linear</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="remesher">velocityRemesher</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="velocityField">VelocityField</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="wrapTop">True</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <list name="fields">
-\end_layout
-
-\begin_layout LyX-Code
-        <struct>
-\end_layout
-
-\begin_layout LyX-Code
-          <param name="field">VelocityField</param>
-\end_layout
-
-\begin_layout LyX-Code
-          <param name="variable">velocity</param>
-\end_layout
-
-\begin_layout LyX-Code
-        </struct>
-\end_layout
-
-\begin_layout LyX-Code
-      </list>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-  </list>
-\end_layout
-
-\begin_layout LyX-Code
-</struct>
-\end_layout
-
-\begin_layout Standard
-This tells Gale to remesh both the pressure and velocity field.
- 
-\family typewriter
-pressureRemesher
-\family default
-, 
-\family typewriter
-velocityRemesher
-\family default
-, 
-\family typewriter
-pressureField
-\family default
-, 
-\family typewriter
-velocityField
-\family default
-, 
-\family typewriter
-pressure
-\family default
-, and 
-\family typewriter
-velocity
-\family default
- are all components that must be defined earlier (see section 
-\begin_inset LatexCommand \ref{sub:Components}
-
-\end_inset
-
-).
- 
-\end_layout
-
-\begin_layout Standard
-Note the critical line
-\end_layout
-
-\begin_layout LyX-Code
-<param name="wrapTop">True</param>
-\end_layout
-
-\begin_layout Standard
-that tells Gale to make the top surface conform to the simulation.
- Other options (
-\family typewriter
-wrapBottom
-\family default
-, 
-\family typewriter
-wrapLeft
-\family default
-) are available, but untested.
- 
-\end_layout
-
-\begin_layout Standard
-Additionally, we can tell Gale to fix the positions of the boundaries.
- For example, if we are running a shortening model, normally Gale will move
- the boundaries inward as the simulation progresses.
- If different parts of the boundary are moving at different rates (such
- as if we were simulating one slab sliding over the other), then the side
- boundary would quickly become distorted and ruin the simulation.
- To fix the right boundary, set the variable 
-\family typewriter
-staticRight
-\family default
- to 
-\family typewriter
-True
-\end_layout
-
-\begin_layout LyX-Code
-<param name="staticRight">True</param>
-\end_layout
-
-\begin_layout Standard
-Similarly, we can independently set the left, top, bottom, front, and back
- boundaries.
-\end_layout
-
-\begin_layout Standard
-Note that we must have included 
-\family typewriter
-Underworld_EulerDeform
-\family default
- in the list of plugins (see section 
-\begin_inset LatexCommand \ref{sub:Plugins}
-
-\end_inset
-
-) in order for this section to have any effect.
-\end_layout
-
-\begin_layout Subsection
-Velocity Boundary Conditions
-\end_layout
-
-\begin_layout Standard
-This section specifies what the boundary conditions on the velocity will
- be.
- See section 
-\begin_inset LatexCommand \ref{sub:Velocity-Boundary-Conditions}
-
-\end_inset
-
- for more details.
-\end_layout
-
-\begin_layout Subsection
-Variables
-\begin_inset LatexCommand \label{sub:Variables}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-The last section is where we would place most of our numeric constants.
- For example, how many time steps, how often to print output, etc.
- We may also declare variables for convenience (e.g.
- the number of grid points) and use it elsewhere, such as in the components.
-\end_layout
-
-\begin_layout Standard
-The following are some of the more important variables:
-\end_layout
-
-\begin_layout Description
-dim The number of dimensions of the simulation.
- This can be either 2 or 3.
-\end_layout
-
-\begin_layout Description
-maxTimeSteps The number of timesteps to take.
-\end_layout
-
-\begin_layout Description
-outputEvery How often to print output to the screen.
-\end_layout
-
-\begin_layout Description
-dumpEvery How often to dump some information to files.
-\end_layout
-
-\begin_layout Description
-checkpointEvery How often to dump the complete state of the simulation to
- disk.
- This allows us to restart the simulation from the checkpoint.
-\end_layout
-
-\begin_layout Description
-outputPath What directory to put the output files in.
-\end_layout
-
-\begin_layout Description
-seed A random number seed.
- Random numbers are only used in a few, optional places, such as when laying
- down an initial set of particles.
-\end_layout
-
-\begin_layout Standard
-Also, if we use the basic components given in section 
-\begin_inset LatexCommand \ref{sec:Basic-Components}
-
-\end_inset
-
-, then we will need to specify 
-\family typewriter
-elementResI
-\family default
-, 
-\family typewriter
-elementResJ
-\family default
-, and 
-\family typewriter
-elementResK
-\family default
-.
- 
-\end_layout
-
-\begin_layout Section
-Basic Components
-\begin_inset LatexCommand \label{sec:Basic-Components}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-Gale is built on top of StGermain, which is a very general framework for
- scientific computation.
- Because StGermain is so general, we have to tell it fairly basic things
- that would be implicit in most codes.
- For example, we must tell StGermain that we want to set up a regular mesh
- and solve a finite element problem on it.
- This means that we have to include a number of components in every input
- file.
- These components are
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="geometry">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">MeshGeometry</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="mesh">mesh-linear</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="decomp">decomp-linear</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="sizeI">elementResI</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="sizeJ">elementResJ</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="sizeK">elementResK</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="sizeShift">+1</param>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="elementTopology">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">IJK26Topology</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="sizeI">elementResI</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="sizeJ">elementResJ</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="sizeK">elementResK</param>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="elementLayout">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">HexaEL</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Topology">elementTopology</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Geometry">geometry</param>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="bodyNodeTopology">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">IJK6Topology</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="sizeI">elementResI</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="sizeJ">elementResJ</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="sizeK">elementResK</param>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="bodyNodeLayout">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">BodyNL</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="ElementLayout">elementLayout</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Topology">bodyNodeTopology</param>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="decomp-constant">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">HexaMD</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="ElementLayout">elementLayout</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="NodeLayout">bodyNodeLayout</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="numPartitionedDims">numPartitionedDims</param>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="meshLayout-constant">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">MeshLayout</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="ElementLayout">elementLayout</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="NodeLayout">bodyNodeLayout</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="MeshDecomp">decomp-constant</param>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="mesh-constant">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">FiniteElement_Mesh</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="MeshLayout">meshLayout-constant</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="ElementSize">8</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="NodeSize">0</param>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="cornerNodeTopology">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">IJK6Topology</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="sizeI">elementResI</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="sizeJ">elementResJ</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="sizeK">elementResK</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="sizeShift">1</param>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="cornerNodeLayout">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">CornerNL</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="ElementLayout">elementLayout</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Topology">cornerNodeTopology</param>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="decomp-linear">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">HexaMD</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="ElementLayout">elementLayout</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="NodeLayout">cornerNodeLayout</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="numPartitionedDims">numPartitionedDims</param>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="meshLayout-linear">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">MeshLayout</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="ElementLayout">elementLayout</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="NodeLayout">cornerNodeLayout</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="MeshDecomp">decomp-linear</param>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="mesh-linear">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">FiniteElement_Mesh</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="MeshLayout">meshLayout-linear</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="ElementSize">8</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="NodeSize">0</param>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="velocity">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">Variable</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Rank">Vector</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Dependency">decomp-linear</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="DataType">Double</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Count">decomp-linear-nodeDomainCount</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="VectorComponentCount">dim</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <list name="names">
-\end_layout
-
-\begin_layout LyX-Code
-        <param>vx</param>
-\end_layout
-
-\begin_layout LyX-Code
-        <param>vy</param>
-\end_layout
-
-\begin_layout LyX-Code
-        <param>vz</param>
-\end_layout
-
-\begin_layout LyX-Code
-      </list>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="velocityBCs">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">CompositeVC</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Data">mesh-linear</param>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="velocityICs">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">CompositeVC</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Data">mesh-linear</param>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="velocityDofLayout">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">DofLayout</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Count">decomp-linear-nodeDomainCount</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="BaseVariableCount">dim</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <list name="BaseVariables">
-\end_layout
-
-\begin_layout LyX-Code
-        <param>vx</param>
-\end_layout
-
-\begin_layout LyX-Code
-        <param>vy</param>
-\end_layout
-
-\begin_layout LyX-Code
-        <param>vz</param>
-\end_layout
-
-\begin_layout LyX-Code
-      </list>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="VelocityField">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">FeVariable</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="FEMesh">mesh-linear</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="DofLayout">velocityDofLayout</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="BC">velocityBCs</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="IC">velocityICs</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="LinkedDofInfo">velocityLinkedDofs</param>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="VelocityMagnitudeField">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">OperatorFeVariable</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Operator">Magnitude</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="FeVariable">VelocityField</param>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="VelocityGradientsField">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">OperatorFeVariable</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Operator">Gradient</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="FeVariable">VelocityField</param>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="VelocityXXField">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">OperatorFeVariable</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Operator">TakeFirstComponent</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="FeVariable">VelocityField</param>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="VelocityYYField">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">OperatorFeVariable</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Operator">TakeSecondComponent</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="FeVariable">VelocityField</param>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="StrainRateField">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">OperatorFeVariable</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Operator">TensorSymmetricPart</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="FeVariable">VelocityGradientsField</param>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="VorticityField">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">OperatorFeVariable</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Operator">TensorAntisymmetricPart</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="FeVariable">VelocityGradientsField</param>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="StrainRateInvariantField">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">OperatorFeVariable</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Operator">SymmetricTensor_Invariant</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="FeVariable">StrainRateField</param>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="StrainRateXXField">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">OperatorFeVariable</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Operator">TakeFirstComponent</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="FeVariable">StrainRateField</param>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="StrainRateYYField">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">OperatorFeVariable</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Operator">TakeSecondComponent</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="FeVariable">StrainRateField</param>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="pressure">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">Variable</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Rank">Scalar</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Dependency">decomp-constant</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="DataType">Double</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Count">decomp-constant-nodeDomainCount</param>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="pressureDofLayout">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">DofLayout</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Count">decomp-constant-nodeDomainCount</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <list name="BaseVariables">
-\end_layout
-
-\begin_layout LyX-Code
-        <param>pressure</param>
-\end_layout
-
-\begin_layout LyX-Code
-      </list>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="PressureField">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">FeVariable</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="FEMesh">mesh-constant</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="GeometryMesh">mesh-linear</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="DofLayout">pressureDofLayout</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="LinkedDofInfo">pressureLinkedDofs</param>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="cellLayout">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">SingleCellLayout</param>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="particleLayout">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">GaussParticleLayout</param>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="gaussSwarm">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">IntegrationPointsSwarm</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="CellLayout">cellLayout</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="ParticleLayout">particleLayout</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="FiniteElement_Mesh">mesh-linear</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="TimeIntegrator">timeIntegrator</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="IntegrationPointMapper">gaussMapper</param>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="gaussMapper">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">GaussMapper</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="IntegrationPointsSwarm">gaussSwarm</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="MaterialPointsSwarm">gaussMaterialSwarm</param>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="backgroundLayout">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">BackgroundParticleLayout</param>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="gaussMaterialSwarm">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">MaterialPointsSwarm</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="CellLayout">cellLayout</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="ParticleLayout">backgroundLayout</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="FiniteElement_Mesh">mesh-linear</param>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="timeIntegrator">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">TimeIntegrator</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="order">1</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="simultaneous">t</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Context">context</param>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="elementCellLayout">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">ElementCellLayout</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Mesh">mesh-linear</param>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="discreteVoronoi">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">CellularAutomataVoronoi</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="resolution">10</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="diagonalNeighbours">true</param>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="weights">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">DiscreteVoronoiWeights</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="DiscreteVoronoi">discreteVoronoi</param>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="localLayout">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">MappedParticleLayout</param>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="picIntegrationPoints">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">IntegrationPointsSwarm</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="CellLayout">elementCellLayout</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="ParticleLayout">localLayout</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="FiniteElement_Mesh">mesh-linear</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="WeightsCalculator">weights</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="TimeIntegrator">timeIntegrator</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="IntegrationPointMapper">mapper</param>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="mapper">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">CoincidentMapper</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="IntegrationPointsSwarm">picIntegrationPoints</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="MaterialPointsSwarm">materialSwarm</param>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="materialSwarmParticleLayout">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">MeshParticleLayout</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="mesh">mesh-linear</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="cellParticleCount">particlesPerCell</param>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="materialSwarm">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">MaterialPointsSwarm</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="CellLayout">elementCellLayout</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="ParticleLayout">materialSwarmParticleLayout</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="FiniteElement_Mesh">mesh-linear</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="SplittingRoutine">splittingRoutine</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="RemovalRoutine">removalRoutine</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="EscapedRoutine">escapedRoutine</param>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="materialSwarmAdvector">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">SwarmAdvector</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Swarm">materialSwarm</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="TimeIntegrator">timeIntegrator</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="VelocityField">VelocityField</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="PeriodicBCsManager">periodicBCsManager</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="allowFallbackToFirstOrder">True</param>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="removalRoutine">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">DiscreteVoronoiRemove</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="idealParticleCount">particlesPerCell</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="DiscreteVoronoi">discreteVoronoi</param>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="splittingRoutine">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">ReseedSplitting</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="idealParticleCount">particlesPerCell</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="DiscreteVoronoi">discreteVoronoi</param>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="solutionVelocity">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">SolutionVector</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="FeVariable">VelocityField</param>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="solutionPressure">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">SolutionVector</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="FeVariable">PressureField</param>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="mom_force">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">ForceVector</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="FeVariable">VelocityField</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="ExtraInfo">context</param>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="cont_force">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">ForceVector</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="FeVariable">PressureField</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="ExtraInfo">context</param>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="k_matrix">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">StiffnessMatrix</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="RowVariable">VelocityField</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="ColumnVariable">VelocityField</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="RHS">mom_force</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="allowZeroElementContributions">False</param>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="constitutiveMatrix">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">ConstitutiveMatrixCartesian</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Swarm">picIntegrationPoints</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="StiffnessMatrix">k_matrix</param>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="g_matrix">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">StiffnessMatrix</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="RowVariable">VelocityField</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="ColumnVariable">PressureField</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="RHS">cont_force</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="allowZeroElementContributions">False</param>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="gradientStiffnessMatrixTerm">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">GradientStiffnessMatrixTerm</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Swarm">gaussSwarm</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="StiffnessMatrix">g_matrix</param>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="preconditioner">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">StiffnessMatrix</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="RowVariable">PressureField</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="ColumnVariable">PressureField</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="RHS">cont_force</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="allowZeroElementContributions">True</param>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="preconditionerTerm">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">UzawaPreconditionerTerm</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Swarm">picIntegrationPoints</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="StiffnessMatrix">preconditioner</param>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="uzawa">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">Stokes_SLE_UzawaSolver</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Preconditioner">preconditioner</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="tolerance">1.0e-5</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="maxIterations">5000</param>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="stokesEqn">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">Stokes_SLE</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="SLE_Solver">uzawa</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Context">context</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="StressTensorMatrix">k_matrix</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="GradientMatrix">g_matrix</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="DivergenceMatrix"></param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="CompressibilityMatrix">c_matrix</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="VelocityVector">solutionVelocity</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="PressureVector">solutionPressure</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="ForceVector">mom_force</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="ContinuityForceVector">cont_force</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="killNonConvergent">false</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="nonLinearMaxIterations">nonLinearMaxIterations</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="nonLinearTolerance">nonLinearTolerance</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="makeConvergenceFile">false</param>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout Standard
-These components will be more or less unchanged between input files.
- We will need to change some associated variables specifying the resolution:
- 
-\family typewriter
-elementResI
-\family default
-, 
-\family typewriter
-elementResJ
-\family default
-, 
-\family typewriter
-elementResK
-\family default
-.
-\end_layout
-
-\begin_layout Section
-Shapes
-\begin_inset LatexCommand \label{sec:Shapes}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-When setting up a simulation, Gale reads in shapes to determine what to
- put where.
- For example, we can create a simulation with different materials by creating
- different shapes and putting different materials in them.
- As a simple example, we can create 3D box
-\end_layout
-
-\begin_layout LyX-Code
-<struct name="simpleBox">
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="Type">Box</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="startX">0.0</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="endX">1.0</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="startY">0.0</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="endY">1.0</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="startZ">0.0</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="endZ">1.0</param>
-\end_layout
-
-\begin_layout LyX-Code
-</struct>
-\end_layout
-
-\begin_layout Standard
-We can perform operations on shapes to create new shapes.
- For example, if we also create a sphere
-\end_layout
-
-\begin_layout LyX-Code
-<struct name="simpleSphere">
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="Type">Sphere</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="radius">1.0</param>
-\end_layout
-
-\begin_layout LyX-Code
-</struct>
-\end_layout
-
-\begin_layout Standard
-then we can compose it with the box to create a new shape
-\end_layout
-
-\begin_layout LyX-Code
-<struct name="nonSphere">
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="Type">Intersection</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <list name="shapes">
-\end_layout
-
-\begin_layout LyX-Code
-    <param>simpleBox</param>
-\end_layout
-
-\begin_layout LyX-Code
-    <param>!simpleSphere</param>
-\end_layout
-
-\begin_layout LyX-Code
-  </list>
-\end_layout
-
-\begin_layout LyX-Code
-</struct>
-\end_layout
-
-\begin_layout Standard
-Note that the exclamation point 
-\begin_inset Quotes sld
-\end_inset
-
-!
-\begin_inset Quotes srd
-\end_inset
-
- in front of 
-\family typewriter
-simpleSphere
-\family default
- means 
-\begin_inset Quotes sld
-\end_inset
-
-not
-\begin_inset Quotes srd
-\end_inset
-
-.
- So 
-\family typewriter
-Intersection
-\family default
- creates a shape that is the intersection of the box and everywhere outside
- of the sphere.
- We can list an arbitrary number of shapes in 
-\family typewriter
-Intersection
-\family default
-.
- Also, we can use 
-\family typewriter
-Union
-\family default
- to create a shape that covers all of the input shapes.
-\end_layout
-
-\begin_layout Standard
-In addition, every shape accepts the translation variables 
-\family typewriter
-CentreX
-\family default
-, 
-\family typewriter
-CentreY
-\family default
-, and 
-\family typewriter
-CentreZ
-\family default
-, and the Euler angles 
-\family typewriter
-alpha
-\family default
-, 
-\family typewriter
-beta
-\family default
-, and 
-\family typewriter
-gamma
-\family default
-.
- So if we modify the Box example above to
-\end_layout
-
-\begin_layout LyX-Code
-<struct name="simpleBox">
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="Type">Box</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="CentreX">1.0</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="startX">0.0</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="endX">1.0</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="startY">0.0</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="endY">1.0</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="startZ">0.0</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="endZ">1.0</param>
-\end_layout
-
-\begin_layout LyX-Code
-</struct>
-\end_layout
-
-\begin_layout Standard
-then the box will actually span from 1 to 2.
-\end_layout
-
-\begin_layout Standard
-The Euler angles use the 
-\begin_inset Formula $y$
-\end_inset
-
- convention, first rotating about the original 
-\begin_inset Formula $z$
-\end_inset
-
- axis an angle 
-\begin_inset Formula $\gamma$
-\end_inset
-
-, then rotating around the new 
-\begin_inset Formula $y$
-\end_inset
-
- axis an angle 
-\begin_inset Formula $\beta$
-\end_inset
-
-, and finally a rotation around the new 
-\begin_inset Formula $z$
-\end_inset
-
- axis an angle 
-\begin_inset Formula $\alpha$
-\end_inset
-
-.
- Specifically, these rotations are expressed through the rotation matrix
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula \[
-R=\left(\begin{array}{ccc}
--\sin\alpha\sin\gamma+\cos\alpha\cos\beta\cos\gamma & \sin\alpha\cos\gamma+\cos\beta\sin\gamma\cos\alpha & -\cos\alpha\sin\beta\\
--\cos\alpha\sin\gamma-\cos\beta\cos\gamma\sin\alpha & \cos\alpha\cos\gamma-\cos\beta\sin\gamma\sin\alpha & \sin\alpha\sin\beta\\
-\sin\beta\cos\alpha & \sin\beta\sin\alpha & \cos\beta\end{array}\right).\]
-
-\end_inset
-
- So when Gale is trying to figure out whether a coordinate 
-\begin_inset Formula $(x,y,z)$
-\end_inset
-
- is inside a shape, it creates a new coordinate
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula \[
-\left(\begin{array}{c}
-x'\\
-y'\\
-z'\end{array}\right)=\left(\left(\begin{array}{c}
-x\\
-y\\
-z\end{array}\right)-\left(\begin{array}{c}
-CentreX\\
-CentreY\\
-CentreZ\end{array}\right)\right)R,\]
-
-\end_inset
-
- which it uses in the formulas below.
-\end_layout
-
-\begin_layout Standard
-Finally, you may tell Gale to invert the shape with the 
-\family typewriter
-invert
-\family default
- variable, making the inside the outside and vice versa.
-\end_layout
-
-\begin_layout Standard
-\begin_inset Tabular
-<lyxtabular version="3" rows="8" columns="2">
-<features>
-<column alignment="center" valignment="top" leftline="true" width="0">
-<column alignment="center" valignment="top" leftline="true" rightline="true" width="0">
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Defaults
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-CentreX
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-0
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-CentreY
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-0
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-CentreZ
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-0
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-alpha
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-0
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-beta
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-0
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-gamma
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-0
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-invert
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-False
-\end_layout
-
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection
-BelowCosinePlane 
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula \[
-y<offset+delta*\cos\left(\frac{\pi period}{180}*x+phase\right)\]
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\begin_inset Tabular
-<lyxtabular version="3" rows="5" columns="2">
-<features>
-<column alignment="center" valignment="top" leftline="true" width="0">
-<column alignment="center" valignment="top" leftline="true" rightline="true" width="0">
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Defaults
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-offset
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-0
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-delta
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-0.5
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-period
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-1
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-phase
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-0
-\end_layout
-
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-See also the notes for BelowPlane.
-\end_layout
-
-\begin_layout Subsection
-BelowPlane
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula \[
-y<offset\]
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-This shape also uses the variables 
-\begin_inset Formula $minX$
-\end_inset
-
-, 
-\begin_inset Formula $minY$
-\end_inset
-
-, 
-\begin_inset Formula $minZ$
-\end_inset
-
-, 
-\begin_inset Formula $maxX$
-\end_inset
-
-, 
-\begin_inset Formula $maxY$
-\end_inset
-
-, and 
-\begin_inset Formula $maxZ$
-\end_inset
-
-, which are only used when computing the volume of this shape.
-\end_layout
-
-\begin_layout Standard
-\begin_inset Tabular
-<lyxtabular version="3" rows="8" columns="2">
-<features>
-<column alignment="center" valignment="top" leftline="true" width="0">
-<column alignment="center" valignment="top" leftline="true" rightline="true" width="0">
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Defaults
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-offset
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-0
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-minX
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-0
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-minY
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-0
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-minZ
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-0
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-maxX
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-1
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-maxY
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-1
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-maxZ
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-1
-\end_layout
-
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection
-Box
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula \[
-\begin{array}{c}
-startX<x<endX\\
-startY<y<endY\\
-startZ<z<endZ\end{array}\]
-
-\end_inset
-
-Alternately, we can use widths, in which case 
-\begin_inset Formula \[
-\begin{array}{c}
-|x|<widthX/2\\
-|y|<widthY/2\\
-|z|<widthZ/2\end{array}.\]
-
-\end_inset
-
-You may mix and match these specification (e.g.
- use start/end for 
-\begin_inset Formula $x$
-\end_inset
-
-, and width for 
-\begin_inset Formula $y$
-\end_inset
-
-).
- If both are specified for one coordinate, Gale will use start and end.
- 
-\end_layout
-
-\begin_layout Standard
-\begin_inset Tabular
-<lyxtabular version="3" rows="4" columns="2">
-<features>
-<column alignment="center" valignment="top" leftline="true" width="0">
-<column alignment="center" valignment="top" leftline="true" rightline="true" width="0">
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Defaults
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-widthX
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-0
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-widthY
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-0
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-widthZ
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-0
-\end_layout
-
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection
-ConvexHull
-\end_layout
-
-\begin_layout Standard
-This shape is a convenience function for creating intersections of 
-\family typewriter
-BelowPlane
-\family default
-'s.
- The input is a list of vertices.
- From each vertex, Gale computes a vector and plane normal to this vector.
- The half spaces below the planes are then intersected to create a shape.
- At present, we may only use three vertices in 2D, and four vertices in
- 3D.
- As an example, the shape
-\end_layout
-
-\begin_layout LyX-Code
-<struct name="triangleShape">
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="Type">ConvexHull</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <list name="verticies">
-\end_layout
-
-\begin_layout LyX-Code
-    <asciidata>
-\end_layout
-
-\begin_layout LyX-Code
-      <columnDefinition name = "x" type="double"/>
-\end_layout
-
-\begin_layout LyX-Code
-      <columnDefinition name = "y" type="double"/>
-\end_layout
-
-\begin_layout LyX-Code
-                                      1.0      1.0
-\end_layout
-
-\begin_layout LyX-Code
-                                     -1.0      1.0
-\end_layout
-
-\begin_layout LyX-Code
-                                      0.0     -1.0
-\end_layout
-
-\begin_layout LyX-Code
-    </asciidata>
-\end_layout
-
-\begin_layout LyX-Code
-  </list>
-\end_layout
-
-\begin_layout LyX-Code
-</struct>
-\end_layout
-
-\begin_layout Standard
-creates a shape with vertices at (0,2), (4,-2), (-4,-2).
-\end_layout
-
-\begin_layout Subsection
-Cylinder
-\end_layout
-
-\begin_layout Standard
-This shape uses a variable 
-\begin_inset Formula $perpendicularAxis$
-\end_inset
-
- to determine which direction is perpendicular to the axis of the cylinder.
- This variable accepts any of (x, y, z, X, Y, Z, i, j, k, I, J, K, 0, 1,
- 2).
- For the case where 
-\begin_inset Formula $perpendicularAxis=z$
-\end_inset
-
-, then
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula \[
-\begin{array}{c}
-radius^{2}>x^{2}+y^{2}\\
-startX<x<endX\\
-startY<y<endY\\
-startZ<z<endZ\end{array}.\]
-
-\end_inset
-
- 
-\begin_inset Tabular
-<lyxtabular version="3" rows="8" columns="2">
-<features>
-<column alignment="center" valignment="top" leftline="true" width="0">
-<column alignment="center" valignment="top" leftline="true" rightline="true" width="0">
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Defaults
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-radius
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-0
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-startX
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-\begin_inset Formula $-\infty$
-\end_inset
-
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-startY
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-\begin_inset Formula $-\infty$
-\end_inset
-
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-startZ
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-\begin_inset Formula $-\infty$
-\end_inset
-
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-endX
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-\begin_inset Formula $\infty$
-\end_inset
-
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-endY
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-\begin_inset Formula $\infty$
-\end_inset
-
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-endZ
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-\begin_inset Formula $\infty$
-\end_inset
-
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection
-Everywhere
-\end_layout
-
-\begin_layout Standard
-This is a convenience shape simply meaning everywhere.
-\end_layout
-
-\begin_layout Subsection
-PolygonShape
-\end_layout
-
-\begin_layout Standard
-This is primarily a two dimensional shape.
- The input to this shape is a list of vertices.
- To figure out whether a point is inside the polygon, Gale adds up all of
- the angles of the vectors going to the vertices.
- If the point is inside the polygon, then the angles will sum to 
-\begin_inset Formula $\pm2\pi$
-\end_inset
-
-, depending on the direction we specify points.
- If the point is outside the polygon, then the angles sum to 0.
- A simple example is a triangle
-\end_layout
-
-\begin_layout LyX-Code
-    <struct name="triangleShape">
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="Type">PolygonShape</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <list name="verticies">
-\end_layout
-
-\begin_layout LyX-Code
-        <asciidata>
-\end_layout
-
-\begin_layout LyX-Code
-        <columnDefinition name = "x" type="double"/>
-\end_layout
-
-\begin_layout LyX-Code
-        <columnDefinition name = "y" type="double"/>
-\end_layout
-
-\begin_layout LyX-Code
-                                        0.0      0.0
-\end_layout
-
-\begin_layout LyX-Code
-                                        1.0      0.0
-\end_layout
-
-\begin_layout LyX-Code
-                                        1.0      1.0
-\end_layout
-
-\begin_layout LyX-Code
-        </asciidata>
-\end_layout
-
-\begin_layout LyX-Code
-      </list>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct>
-\end_layout
-
-\begin_layout Standard
-This creates a triangle with vertices at (0,0), (1,0), (1,1).
-\end_layout
-
-\begin_layout Standard
-We can extrude this shape into three dimensions by specifying startZ and
- endZ.
-\end_layout
-
-\begin_layout Standard
-\begin_inset Tabular
-<lyxtabular version="3" rows="3" columns="2">
-<features>
-<column alignment="center" valignment="top" leftline="true" width="0">
-<column alignment="center" valignment="top" leftline="true" rightline="true" width="0">
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Defaults
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-startZ
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-0
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-endZ
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-0
-\end_layout
-
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection
-Sphere
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula \[
-x^{2}+y^{2}+z^{2}<radius^{2}\]
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\begin_inset Tabular
-<lyxtabular version="3" rows="2" columns="2">
-<features>
-<column alignment="center" valignment="top" leftline="true" width="0">
-<column alignment="center" valignment="top" leftline="true" rightline="true" width="0">
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Defaults
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-radius
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-0
-\end_layout
-
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection
-Superellipsoid
-\end_layout
-
-\begin_layout Standard
-In two dimensions
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula \[
-\left(\frac{x}{radiusX}\right)^{2/epsilon1}+\left(\frac{y}{radiusY}\right)^{2/epsilon1}<1,\]
-
-\end_inset
-
-and in three dimensions
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula \[
-\left(\left(\frac{x}{radiusX}\right)^{2/epsilon2}+\left(\frac{y}{radiusY}\right)^{2/epsilon2}\right)^{epsilon2/epsilon1}+\left(\frac{z}{radiusZ}\right)^{2/epsilon1}<1.\]
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\begin_inset Tabular
-<lyxtabular version="3" rows="6" columns="2">
-<features>
-<column alignment="center" valignment="top" leftline="true" width="0">
-<column alignment="center" valignment="top" leftline="true" rightline="true" width="0">
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Defaults
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-radiusX
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-1
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-radiusY
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-1
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-radiusZ
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-1
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-epsilon1
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-1
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-epsilon2
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-1
-\end_layout
-
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Section
-Materials
-\begin_inset LatexCommand \label{sec:Materials}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-Gale supports two kinds of rheologies: viscous and yielding.
- We can combine these two rheologies to create a more realistic composite
- rheology.
- We then pair this composite rheology with a shape to actually lay down
- material on the grid.
- As a simple example, we can create a viscous rheology
-\end_layout
-
-\begin_layout LyX-Code
-<struct name="viscousRheology">
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="Type">MaterialViscosity</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="eta0">10.0</param>
-\end_layout
-
-\begin_layout LyX-Code
-</struct>
-\end_layout
-
-\begin_layout Standard
-and a Von Mises yielding rheology
-\end_layout
-
-\begin_layout LyX-Code
-<struct name="strainWeakening">
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="Type">StrainWeakening</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="TimeIntegrator">timeIntegrator</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="MaterialPointsSwarm">materialSwarm</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="softeningStrain">0.1</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="initialDamageFraction">0.0</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="initialDamageWavenumber">0.5</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="initialDamageFactor">0.5</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="healingRate">0.0</param>
-\end_layout
-
-\begin_layout LyX-Code
-</struct>
-\end_layout
-
-\begin_layout LyX-Code
-
-\end_layout
-
-\begin_layout LyX-Code
-<struct name="yieldingRheology">
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="Type">VonMises</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="cohesion">10.0</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="cohesionAfterSoftening">1.0</param>
-\end_layout
-
-\begin_layout LyX-Code
-</struct>
-\end_layout
-
-\begin_layout Standard
-and combine them together with 
-\family typewriter
-materialShape
-\family default
- (see section 
-\begin_inset LatexCommand \ref{sec:Shapes}
-
-\end_inset
-
- on how to create shapes)
-\end_layout
-
-\begin_layout LyX-Code
-<struct name="yieldingMaterial">
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="Type">RheologyMaterial</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="Shape">yieldingShape</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <list name="Rheology">
-\end_layout
-
-\begin_layout LyX-Code
-    <param>viscousRheology</param>
-\end_layout
-
-\begin_layout LyX-Code
-    <param>yieldingRheology</param>
-\end_layout
-
-\begin_layout LyX-Code
-  </list>
-\end_layout
-
-\begin_layout LyX-Code
-</struct>
-\end_layout
-
-\begin_layout Subsection
-Viscous
-\end_layout
-
-\begin_layout Subsubsection
-MaterialViscosity
-\end_layout
-
-\begin_layout Standard
-This is the simplest rheology.
- There is only one variable, the viscosity 
-\family typewriter
-eta0
-\family default
-.
-\end_layout
-
-\begin_layout Standard
-\begin_inset Tabular
-<lyxtabular version="3" rows="2" columns="2">
-<features>
-<column alignment="center" valignment="top" leftline="true" width="0">
-<column alignment="center" valignment="top" leftline="true" rightline="true" width="0">
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Defaults
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-eta0
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-1
-\end_layout
-
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsubsection
-Frank-Kamenetskii
-\end_layout
-
-\begin_layout Standard
-This is a temperature dependent viscosity
-\begin_inset Formula \[
-eta=eta0*\exp\left(-theta*T\right).\]
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\begin_inset Tabular
-<lyxtabular version="3" rows="3" columns="2">
-<features>
-<column alignment="center" valignment="top" leftline="true" width="0">
-<column alignment="center" valignment="top" leftline="true" rightline="true" width="0">
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Defaults
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-eta0
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-1
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-theta
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-0
-\end_layout
-
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection
-Yielding
-\end_layout
-
-\begin_layout Standard
-Yielding rheologies are a bit more complicated.
- 
-\end_layout
-
-\begin_layout Subsubsection
-StrainWeakening
-\end_layout
-
-\begin_layout Standard
-First we need to create a 
-\family typewriter
-StrainWeakening
-\family default
- component.
- 
-\family typewriter
-StrainWeakening
-\family default
- is mainly used to define an initial distribution of strain in a material
- and to calculate the accumulated strain on each particle.
- To that end, it requires a number of parameters.
-\end_layout
-
-\begin_layout Description
-TimeIntegrator This is the component used for time integration to accumulate
- strain.
- Given the standard components in section 
-\begin_inset LatexCommand \ref{sec:Basic-Components}
-
-\end_inset
-
-, this will be 
-\family typewriter
-timeIntegrator
-\family default
-.
-\end_layout
-
-\begin_layout Description
-MaterialPointsSwarm This is the swarm of particles that this rheology will
- tie itself to.
- Given the standard components in section 
-\begin_inset LatexCommand \ref{sec:Basic-Components}
-
-\end_inset
-
-, this will be 
-\family typewriter
-materialSwarm
-\family default
-.
-\end_layout
-
-\begin_layout Description
-healingRate With this parameter, accumulated strain can decrease.
- Specifically, the time derivative of accumulated strain becomes
-\begin_inset Formula \[
-\frac{\sigma_{yield}}{\eta}\left(\frac{\beta}{1-\beta}-healingRate\right),\]
-
-\end_inset
-
- where 
-\begin_inset Formula $\beta\equiv\sigma_{yield}/\sigma$
-\end_inset
-
-, 
-\begin_inset Formula $\sigma_{yield}$
-\end_inset
-
- is the yield stress, 
-\begin_inset Formula $\sigma$
-\end_inset
-
- is some measure of the current stress (e.g.
- the second invariant of the stress tensor), and 
-\begin_inset Formula $\eta$
-\end_inset
-
- is the isotropic viscosity.
- Note that the healing rate should be between 0 and 1.
-\end_layout
-
-\begin_layout Description
-softeningStrain The strain at which the material has fully yielded.
-\end_layout
-
-\begin_layout Description
-initialDamageFraction The chance that an individual material particle will
- have a non-zero initial strain.
-\end_layout
-
-\begin_layout Description
-initialDamageWaveNumber The wavenumber for the initial random strain.
- To avoid having initial strain on the edges of the box, this should be
- set to the inverse of the horizontal length of the box.
-\end_layout
-
-\begin_layout Description
-initialDamageFactor The maximum initial random strain for a particle is
- 
-\family typewriter
-initialDamageFactor
-\family default
-*
-\family typewriter
-softeningStrain
-\family default
-.
- 
-\end_layout
-
-\begin_layout Description
-randomSeed A random number seed used when computing which particles are
- initially yielded.
-\end_layout
-
-\begin_layout Description
-initialStrainShape If defined, the initial random strain will only occur
- within this shape (outside the shape the initial random strain will be
- zero).
-\end_layout
-
-\begin_layout Standard
-We can also define a strain weakening ratio 
-\begin_inset Formula $\alpha\equiv\min\left(1,\gamma/\gamma_{softening}\right)$
-\end_inset
-
-, where 
-\begin_inset Formula $\gamma$
-\end_inset
-
- is the accumulated strain, and 
-\begin_inset Formula $\gamma_{softening}$
-\end_inset
-
- is the softening strain.
- This allows us to define quantities like the effective cohesion 
-\begin_inset Formula $C_{effective}\equiv C_{pristine}\left(1-\alpha\right)+C_{yielded}\alpha$
-\end_inset
-
- and effective friction coefficient 
-\begin_inset Formula $\phi_{effective}=\phi_{pristine}\left(1-\alpha\right)+\phi_{yielded}\alpha$
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Standard
-\begin_inset Tabular
-<lyxtabular version="3" rows="10" columns="2">
-<features>
-<column alignment="center" valignment="top" leftline="true" width="0">
-<column alignment="center" valignment="top" leftline="true" rightline="true" width="0">
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Defaults
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-TimeIntegrator
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-none
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-MaterialPointsSwarm
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-none
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-healingRate
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-0
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-softeningStrain
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-\begin_inset Formula $\infty$
-\end_inset
-
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-initialDamageFraction
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-0
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-initialDamageWaveNumber
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
--1.0
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-initialDamageFactor
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-1.0
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-randomSeed
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-0
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-initialStrainShape
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-none
-\end_layout
-
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsubsection
-VonMises
-\end_layout
-
-\begin_layout Standard
-This is the simplest yielding rheology in Gale.
- The yielding stress is simply the effective cohesion, so this rheology
- only has a few input parameters.
- 
-\family typewriter
-cohesion
-\family default
- and 
-\family typewriter
-cohesionAfterSoftening
-\family default
- have the obvious meanings.
- 
-\family typewriter
-minimumYieldStress
-\family default
- sets an absolute minimum to the stress required to make the material yield.
-\end_layout
-
-\begin_layout Standard
-
-\family typewriter
-StrainRateSoftening
-\family default
- is a boolean variable that changes how the constitutive matrix is modified
- when the material has yielded.
- If 
-\family typewriter
-StrainRateSoftening
-\family default
- is 
-\family typewriter
-True
-\family default
-, then the viscosity is set to 
-\begin_inset Formula \[
-\eta_{effective}=2\sigma_{yield}^{2}\eta/\left(\sigma_{yield}^{2}+I_{2}^{2}\right),\]
-
-\end_inset
-
- where 
-\begin_inset Formula $I_{2}$
-\end_inset
-
- is the second invariant of the stress tensor.
- Otherwise the viscosity is set to
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula \[
-\eta_{effective}=\eta\sigma_{yield}/I_{2},\]
-
-\end_inset
-
- which essentially sets the stress of the particle to the yield stress.
-\end_layout
-
-\begin_layout Standard
-\begin_inset Tabular
-<lyxtabular version="3" rows="5" columns="2">
-<features>
-<column alignment="center" valignment="top" leftline="true" width="0">
-<column alignment="center" valignment="top" leftline="true" rightline="true" width="0">
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Defaults
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-cohesion
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-0
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-cohesionAfterSoftening
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-0
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-minimumYieldStress
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-0
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-StrainRateSoftening
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-False
-\end_layout
-
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsubsection
-DruckerPrager
-\end_layout
-
-\begin_layout Standard
-This rheology uses the same parameters as Von Mises, but also adds a friction
- coefficient that can soften.
- Specifically, the yield stress becomes
-\begin_inset Formula \[
-\sigma_{yield}=\alpha p+C_{p},\]
-
-\end_inset
-
-where 
-\begin_inset Formula \[
-\begin{array}{ccc}
-C_{p} & = & \frac{6C_{effective}\cos\phi_{effective}}{\sqrt{3}\left(3-\sin\phi_{effective}\right)}\\
-\alpha & = & \frac{6\sin\phi_{effective}}{\sqrt{3}\left(3-\sin\phi_{effective}\right)}\end{array},\]
-
-\end_inset
-
-and 
-\begin_inset Formula $p$
-\end_inset
-
- is the pressure.
- 
-\end_layout
-
-\begin_layout Standard
-\begin_inset Tabular
-<lyxtabular version="3" rows="3" columns="2">
-<features>
-<column alignment="center" valignment="top" leftline="true" width="0">
-<column alignment="center" valignment="top" leftline="true" rightline="true" width="0">
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Defaults
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-frictionCoefficient
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-0
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-frictionCoefficientAfterSoftening
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-0
-\end_layout
-
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-(See also VonMises)
-\end_layout
-
-\begin_layout Subsubsection
-MohrCoulomb
-\end_layout
-
-\begin_layout Standard
-This rheology is like Drucker-Prager, but it uses the actual normal stress
- instead of inferring a normal stress from the pressure.
- More explicitly, the yield shear stress is 
-\begin_inset Formula \[
-\sigma_{yield}=\sigma_{n}\tan\phi_{effective}+C_{effective}.\]
-
-\end_inset
-
- When the material is yielding, the viscosity is modified so that the stress
- on the particle is the yield stress.
-\end_layout
-
-\begin_layout Standard
-\begin_inset Tabular
-<lyxtabular version="3" rows="6" columns="2">
-<features>
-<column alignment="center" valignment="top" leftline="true" width="0">
-<column alignment="center" valignment="top" leftline="true" rightline="true" width="0">
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Defaults
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-cohesion
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-0
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-cohesionAfterSoftening
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-0
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-frictionCoefficient
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-0
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-frictionCoefficientAfterSoftening
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-0
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-minimumYieldStress
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-0
-\end_layout
-
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsubsection
-FaultingMoresiMulhaus2006
-\end_layout
-
-\begin_layout Standard
-This is a fairly complicated non-isotropic rheology.
- The full details can be found in Moresi and Mülhaus (2006), but essentially
- it keeps track of which direction a material is strained.
- To do so, it uses a component called 
-\family typewriter
-Director
-\family default
-.
- For the standard components given in section 
-\begin_inset LatexCommand \ref{sec:Basic-Components}
-
-\end_inset
-
-, this would be
-\end_layout
-
-\begin_layout LyX-Code
-<struct name="director">
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="Type">Director</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="TimeIntegrator">timeIntegrator</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="VelocityGradientsField">VelocityGradientsField</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="MaterialPointsSwarm">materialSwarm</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="initialDirectionX">0.0</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="initialDirectionY">1.0</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="initialDirectionZ">0.0</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="dontUpdate">True</param>
-\end_layout
-
-\begin_layout LyX-Code
-</struct>
-\end_layout
-
-\begin_layout Standard
-Otherwise, it adds one variable not present in 
-\family typewriter
-MohrCoulomb
-\family default
-: 
-\family typewriter
-ignoreOldOrientation
-\family default
-.
- This tells Gale whether it should check to see whether material will weaken
- further in the current direction, or it will try every direction equally
- each time step.
-\end_layout
-
-\begin_layout Standard
-\begin_inset Tabular
-<lyxtabular version="3" rows="7" columns="2">
-<features>
-<column alignment="center" valignment="top" leftline="true" width="0">
-<column alignment="center" valignment="top" leftline="true" rightline="true" width="0">
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-Defaults
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-cohesion
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-0
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-cohesionAfterSoftening
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-0
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-frictionCoefficient
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-0
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-frictionCoefficientAfterSoftening
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-0
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-minimumYieldStress
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-0
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-ignoreOldOrientation
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-False
-\end_layout
-
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Section
-Boundary Conditions
-\end_layout
-
-\begin_layout Standard
-Gale's computational domain is logically Eulerian.
- So in 2D, there are four boundaries: 
-\family typewriter
-right
-\family default
-, 
-\family typewriter
-left
-\family default
-, 
-\family typewriter
-top
-\family default
-, and 
-\family typewriter
-bottom
-\family default
-.
- 3D adds 
-\family typewriter
-front
-\family default
- and 
-\family typewriter
-back
-\family default
-.
- Note that the boundaries in the 
-\begin_inset Formula $z$
-\end_inset
-
- axis are 
-\family typewriter
-front
-\family default
- and 
-\family typewriter
-back
-\family default
-, not 
-\family typewriter
-top
-\family default
- and 
-\family typewriter
-bottom
-\family default
-.
- In many cases, this makes it simple to switch between 2D and 3D.
- When doing this, we may ignore the warning that the 
-\begin_inset Formula $z$
-\end_inset
-
- boundaries are empty in 2D.
-\end_layout
-
-\begin_layout Subsection
-Velocity Boundary Conditions
-\begin_inset LatexCommand \label{sub:Velocity-Boundary-Conditions}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-To impose boundary conditions on the velocity, we add a composite variable
- condition (CompositeVC) to the input file.
- Within that CompositeVC, add a list of conditions.
- Within each condition, we specify which boundary and what the velocity's
- value is.
- For example, to set the 
-\begin_inset Formula $y$
-\end_inset
-
- velocity on the bottom to zero, add
-\end_layout
-
-\begin_layout LyX-Code
-<struct name="velocityBCs">
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="type">CompositeVC</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <list name="vcList">
-\end_layout
-
-\begin_layout LyX-Code
-    <struct>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="type">WallVC</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="wall">bottom</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <list name="variables">
-\end_layout
-
-\begin_layout LyX-Code
-        <struct>
-\end_layout
-
-\begin_layout LyX-Code
-          <param name="name">vy</param>
-\end_layout
-
-\begin_layout LyX-Code
-          <param name="type">double</param>
-\end_layout
-
-\begin_layout LyX-Code
-          <param name="value">0</param>
-\end_layout
-
-\begin_layout LyX-Code
-        </struct>
-\end_layout
-
-\begin_layout LyX-Code
-      </list>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct> 
-\end_layout
-
-\begin_layout LyX-Code
-  </list>
-\end_layout
-
-\begin_layout LyX-Code
-</struct>
-\end_layout
-
-\begin_layout Standard
-If, instead, we set 
-\family typewriter
-vy
-\family default
- to a non-zero value, then the boundary will move as the simulation proceeds.
- If we want the sides to remain fixed, then we probably want flux boundaries,
- in which case we will also have to specify a few more things (see section
- 
-\begin_inset LatexCommand \ref{sub:Flux-Boundary-Conditions}
-
-\end_inset
-
-).
-\end_layout
-
-\begin_layout Standard
-We can also set the velocity to a function.
- For example, to also set the 
-\begin_inset Formula $x$
-\end_inset
-
- velocity to have a Gaussian distribution 
-\begin_inset Formula $\exp\left(-\left(\frac{x-0.5}{0.1}\right)^{2}\right)$
-\end_inset
-
-
-\end_layout
-
-\begin_layout LyX-Code
-<struct name="velocityBCs">
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="type">CompositeVC</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <list name="vcList">
-\end_layout
-
-\begin_layout LyX-Code
-    <struct>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="type">WallVC</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <param name="wall">bottom</param>
-\end_layout
-
-\begin_layout LyX-Code
-      <list name="variables">
-\end_layout
-
-\begin_layout LyX-Code
-        <struct>
-\end_layout
-
-\begin_layout LyX-Code
-          <param name="name">vy</param>
-\end_layout
-
-\begin_layout LyX-Code
-          <param name="type">double</param>
-\end_layout
-
-\begin_layout LyX-Code
-          <param name="value">0</param>
-\end_layout
-
-\begin_layout LyX-Code
-        </struct>
-\end_layout
-
-\begin_layout LyX-Code
-        <struct>
-\end_layout
-
-\begin_layout LyX-Code
-          <param name="name">vx</param>
-\end_layout
-
-\begin_layout LyX-Code
-          <param name="type">func</param>
-\end_layout
-
-\begin_layout LyX-Code
-          <param name="value">Gaussian</param>
-\end_layout
-
-\begin_layout LyX-Code
-        </struct>
-\end_layout
-
-\begin_layout LyX-Code
-      </list>
-\end_layout
-
-\begin_layout LyX-Code
-    </struct> 
-\end_layout
-
-\begin_layout LyX-Code
-  </list>
-\end_layout
-
-\begin_layout LyX-Code
-</struct>
-\end_layout
-
-\begin_layout LyX-Code
-<param name="GaussianHeight">1.0</param>
-\end_layout
-
-\begin_layout LyX-Code
-<param name="GaussianWidth">0.1</param>
-\end_layout
-
-\begin_layout LyX-Code
-<param name="GaussianCenter">0.5</param>
-\end_layout
-
-\begin_layout LyX-Code
-<param name="GaussianDim">0</param>
-\end_layout
-
-\begin_layout Standard
-Note that the parameters are separated out into the variables section (see
- Section 
-\begin_inset LatexCommand \ref{sub:Variables}
-
-\end_inset
-
-).
- In general, we can use any of the Standard Condition Functions (see Section
- 
-\begin_inset LatexCommand \ref{sec:Standard-Condition-Functions}
-
-\end_inset
-
-) to specify the velocities.
-\end_layout
-
-\begin_layout Subsection
-Flux Boundary Conditions
-\begin_inset LatexCommand \label{sub:Flux-Boundary-Conditions}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-Sometimes, we may wish to have material flow across the boundary instead
- of having the boundary move.
- A simple example would be like Figure 
-\begin_inset LatexCommand \ref{fig:General-subduction-model}
-
-\end_inset
-
-, where material flows in from the left and out through the bottom.
- There are three things that we must specify for this to work.
-\end_layout
-
-\begin_layout Enumerate
-The boundaries do not move.
- For the slab subduction model, we need to ensure that neither the bottom
- nor left boundaries move.
- We do this by specifying
-\newline
-
-\family typewriter
-<param name="staticBottom">True</param>
-\newline
-<param name="staticLeft">True</param>
-\family default
-
-\newline
-in EulerDeform (see section 
-\begin_inset LatexCommand \ref{sub:EulerDeform}
-
-\end_inset
-
-).
-\end_layout
-
-\begin_layout Enumerate
-Velocity conditions on the boundaries.
- Again, for slab subduction this involves inflow conditions on the left
- boundary and outflow conditions on bottom.
- See Section 
-\begin_inset LatexCommand \ref{sub:Velocity-Boundary-Conditions}
-
-\end_inset
-
- for details.
- The other boundaries have no-slip conditions.
-\end_layout
-
-\begin_layout Enumerate
-A region where new particles are created, not split from existing particles.
- When Gale advects material near an inflowing boundary, this leaves a vacuum.
- Normally, Gale creates new particles by cloning nearby particles.
- However, if the cloned particles have already undergone evolution (e.g.
- they were strained), then the new particles would no longer be pristine.
- To fix this, we can specify regions where particles should be created anew
- by adding something like
-\newline
-
-\family typewriter
-<param name="originalParticleShape">leftBoundaryShape</param>
-\family default
-
-\newline
-to the 
-\family typewriter
-ReseedSplitting
-\family default
- struct.
- An example of this is in the sample input file 
-\family typewriter
-subduction.xml
-\family default
-.
-\end_layout
-
-\begin_layout Subsection
-Stress Boundary Conditions
-\end_layout
-
-\begin_layout Standard
-If the nature of our problem is that stresses are specified on the boundary
- rather than velocities, we can specify those conditions using the 
-\family typewriter
-StressBC
-\family default
- component.
- For example, if we want to simulate an extension model that allows material
- to well up in the middle, then we would specify a constant stress on the
- bottom.
-\end_layout
-
-\begin_layout Standard
-StressBC is a component, so it must be inside the list of components (see
- Section 
-\begin_inset LatexCommand \ref{sub:Components}
-
-\end_inset
-
-), not outside the list like the velocity boundary conditions.
- For example, to specify the stress on the bottom boundary in the 
-\begin_inset Formula $y$
-\end_inset
-
- direction as a constant, add
-\end_layout
-
-\begin_layout LyX-Code
-<struct name="stressBC">
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="Type">StressBC</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="ForceVector">mom_force</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="Swarm">picIntegrationPoints</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="wall">bottom</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="y_type">double</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="y_value">1.0</param>
-\end_layout
-
-\begin_layout LyX-Code
-</struct>
-\end_layout
-
-\begin_layout Standard
-We can also use the Standard Condition Functions (see Section 
-\begin_inset LatexCommand \ref{sec:Standard-Condition-Functions}
-
-\end_inset
-
-), but due to technical issues, we must list Standard Condition Functions
- before StressBC in the list of components.
- So, for example, to add a stress condition to the left wall with a gaussian
- shape, the complete list of components would be
-\end_layout
-
-\begin_layout LyX-Code
-<struct name="conditionFunctions">
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="Type">StgFEM_StandardConditionFunctions</param>
-\end_layout
-
-\begin_layout LyX-Code
-</struct>
-\end_layout
-
-\begin_layout LyX-Code
-<struct name="stressBCBottom">
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="Type">StressBC</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="ForceVector">mom_force</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="Swarm">picIntegrationPoints</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="wall">bottom</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="y_type">double</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="y_value">1.0</param>
-\end_layout
-
-\begin_layout LyX-Code
-</struct>
-\end_layout
-
-\begin_layout LyX-Code
-<struct name="stressBCLeft">
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="Type">StressBC</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="ForceVector">mom_force</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="Swarm">picIntegrationPoints</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="wall">left</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="x_type">func</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="x_value">Gaussian</param>
-\end_layout
-
-\begin_layout LyX-Code
-</struct>
-\end_layout
-
-\begin_layout Standard
-And then in the list of variables (see Section 
-\begin_inset LatexCommand \ref{sub:Variables}
-
-\end_inset
-
-) we add the parameters for the Gaussian
-\end_layout
-
-\begin_layout LyX-Code
-<param name="GaussianHeight">1.0</param>
-\end_layout
-
-\begin_layout LyX-Code
-<param name="GaussianWidth">0.1</param>
-\end_layout
-
-\begin_layout LyX-Code
-<param name="GaussianCenter">0.5</param>
-\end_layout
-
-\begin_layout LyX-Code
-<param name="GaussianDim">0</param>
-\end_layout
-
-\begin_layout Section
-Deformed Upper Boundary
-\end_layout
-
-\begin_layout Standard
-Normally, Gale starts the simulation in a rectangular box.
- As the simulation proceeds, the boundaries can become distorted, in particular
- the upper boundary.
- However, we can also tell Gale to start with and initially deformed upper
- boundary by adding a 
-\family typewriter
-SurfaceAdaptor
-\family default
- component.
- A simple example is to make the surface a sinusoid
-\end_layout
-
-\begin_layout LyX-Code
-<struct name="surfaceAdaptor">
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="Type">SurfaceAdaptor</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="mesh">mesh-linear</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="sourceGenerator">cartesianGenerator</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="surfaceType">cosine</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <list name="origin">
-\end_layout
-
-\begin_layout LyX-Code
-    <param>0.0</param>
-\end_layout
-
-\begin_layout LyX-Code
-  </list>
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="amplitude">0.1</param>
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="frequency">6.28318530718</param>
-\end_layout
-
-\begin_layout LyX-Code
-</struct>
-\end_layout
-
-\begin_layout LyX-Code
-
-\end_layout
-
-\begin_layout Standard
-This sets the height of the surface to
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula \[
-h=h_{0}+amplitude*\cos\left(x*frequency\right),\]
-
-\end_inset
-
- where 
-\begin_inset Formula $h_{0}$
-\end_inset
-
- is the original height.
-\end_layout
-
-\begin_layout Standard
-The other supported functions are 
-\family typewriter
-sine
-\family default
- and 
-\family typewriter
-wedge
-\family default
-.
- 
-\family typewriter
-sine
-\family default
- takes the same arguments as the 
-\family typewriter
-cosine
-\family default
- example above.
- 
-\family typewriter
-wedge
-\family default
- takes two arguments, 
-\family typewriter
-offset
-\family default
- and 
-\family typewriter
-gradient
-\family default
-, and sets the height to
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula \[
-h=\left\{ \begin{array}{cc}
-h_{0} & x<offset\\
-h_{0}+gradient\left(x-offset\right) & x>offset\end{array}\right..\]
-
-\end_inset
-
- If you want to implement your own surface functions, look in 
-\family typewriter
-src/StGermain/Discretisation/Mesh/src/SurfaceAdaptor.c
-\family default
-.
-\end_layout
-
-\begin_layout Section
-Surface Processes
-\begin_inset LatexCommand \label{sec:Surface-Processes}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-Gale has a simple facility for modifying the upper surface during the simulation.
- The intent is to allow researchers to insert their own (complicated) surface
- process routines.
- To enable surface processes, we just add the component
-\end_layout
-
-\begin_layout LyX-Code
-<struct name="SurfaceProcess">
-\end_layout
-
-\begin_layout LyX-Code
-  <param name="mesh">mesh-linear</param>
-\end_layout
-
-\begin_layout LyX-Code
-</struct>
-\end_layout
-
-\begin_layout Standard
-There is an example in 
-\family typewriter
-surface_process.xml
-\family default
-.
- It currently implements simple diffusion.
- To insert your own routine, see the file 
-\end_layout
-
-\begin_layout LyX-Code
-src/Gale/plugins/SurfaceProcess/SurfaceProcess.c
-\end_layout
-
-\begin_layout Standard
-In particular, replace the code bracketed by
-\end_layout
-
-\begin_layout LyX-Code
-** SURFACE PROCESS CODE GOES HERE, SHOULD MODIFY THE HEIGHTS ONLY.
-\end_layout
-
-\begin_layout LyX-Code
-...
-\end_layout
-
-\begin_layout LyX-Code
-** END SURFACE PROCESS CODE.
-\end_layout
-
-\begin_layout Standard
-with your own code.
-\end_layout
-
-\begin_layout Section
-Standard Condition Functions
-\begin_inset LatexCommand \label{sec:Standard-Condition-Functions}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-Standard Condition Functions are simply functions that we can use to specify
- initial conditions and boundary conditions.
- At present, they take in a coordinate 
-\begin_inset Formula $(x,y,z)$
-\end_inset
-
- and output a function 
-\begin_inset Formula $f(x,y,z)$
-\end_inset
-
-.
- They are all defined in the directory 
-\family typewriter
-src/StgFEM/plugins/StandardConditionFunctions/
-\family default
-.
- For the following descriptions, the sides of the box are at 
-\begin_inset Formula $x_{min}$
-\end_inset
-
- and 
-\begin_inset Formula $x_{max}$
-\end_inset
-
-, and 
-\begin_inset Formula $L\equiv x_{max}-x_{min}$
-\end_inset
-
-, and all names with CamelCase capitalization are variables from the input
- file.
-\end_layout
-
-\begin_layout Description
-SolidBodyRotation Returns the coordinates rotated by 
-\family typewriter
-SolidBodyRotationOmega
-\family default
- around the z axis, centered at the coordinate (
-\family typewriter
-SolidBodyRotationCentreX
-\family default
-, 
-\family typewriter
-SolidBodyRotationY
-\family default
-, ).
- Specifically,
-\begin_inset Formula \[
-\begin{array}{ccc}
-f(x,y,z)_{x} & = & -SolidBodyRotationOmega(y-SolidBodyRotationCentreY)\\
-f(x,y,z)_{y} & = & SolidBodyRotationOmega(X-SolidBodyRotationCentreX)\end{array}\]
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Description
-PartialRotationX Returns the x component of SolidBodyRotation.
-\end_layout
-
-\begin_layout Description
-PartialRotationY Returns the y component of SolidBodyRotation.
-\end_layout
-
-\begin_layout Description
-SimpleShear 
-\begin_inset Formula $f(x,y,z)=SimpleShearFactor\left(y-SimpleShearCentreY\right)$
-\end_inset
-
-
-\end_layout
-
-\begin_layout Description
-Extension 
-\begin_inset Formula $f(x,y,z)=ExtensionFactor\left(x-ExtensionCentreY\right)$
-\end_inset
-
-
-\end_layout
-
-\begin_layout Description
-PartialLid_TopLayer Returns 0 if the x coordinate is within one grid point
- of the boundary, 1 otherwise.
-\end_layout
-
-\begin_layout Description
-LinearInterpolationLid 
-\begin_inset Formula $f(x,y,z)=bcLeftHandSideValue+\left(\frac{bcRightHandSideValue-bcLeftHandSideValue}{L}\right)x$
-\end_inset
-
-
-\end_layout
-
-\begin_layout Description
-Lid_RampWithCentralMax 
-\begin_inset Formula $f(x,y,z)=\left\{ \begin{array}{cc}
-2\left(x-x_{min}\right)/L & x<L/2+x_{min}\\
-1-2(x-x_{min}-L/2) & x>L/2+x_{min}\end{array}\right.$
-\end_inset
-
-
-\end_layout
-
-\begin_layout Description
-SinusoidalLid 
-\begin_inset Formula \[
-f(x,y,z)=\sin\left(\frac{\pi\left(x-x_{min}\right)}{L}sinusoidalLidWavenumber\right)\]
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Description
-CornerOnly Return 1 if the coordinate is on the right boundary.
-\end_layout
-
-\begin_layout Description
-TemperatureCosineHill Returns a hill defined by a cosine.
- Specifically, if we define pre-rotated coordinates
-\begin_inset Formula \[
-\begin{array}{ccc}
-x_{pre-rotate} & = & CosineHillCentreX-SolidBodyRotationCentreX\\
-y_{pre-rotate} & = & CosineHillCentreY-SolidBodyRotationCentreY\\
-z_{pre-rotate} & = & CosineHillCentreZ-SolidBodyRotationCentreZ\end{array},\]
-
-\end_inset
-
- and then rotate them around the z axis by the angle 
-\begin_inset Formula $\theta=SolidBodyRotationOmega*t$
-\end_inset
-
-
-\begin_inset Formula \[
-\begin{array}{ccc}
-x_{hill} & = & x_{pre-rotate}\cos\theta-y_{pre-rotate}\sin\theta\\
-y_{hill} & = & x_{pre-rotate}\sin\theta+y_{pre-rotate}\cos\theta\\
-z_{hill} & = & z_{pre-rotate}\end{array},\]
-
-\end_inset
-
- then
-\begin_inset Formula \[
-f(x,y,z)=\left\{ \begin{array}{cc}
-\frac{CosineHillHeight}{4}\cos\left(\frac{2\pi r}{CosineHillDiameter}\right) & r<CosineHillDiameter\\
-0 & r>CosineHillDiameter\end{array}\right.,\]
-
-\end_inset
-
- where 
-\begin_inset Formula $r$
-\end_inset
-
- is the distance from the center of the hill
-\begin_inset Formula \[
-r\equiv\sqrt{\left(x-x_{hill}\right)^{2}+\left(y-y_{hill}\right)^{2}+\left(z-z_{hill}\right)^{2}}.\]
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Description
-LinearWithSinusoidalPerturbation If we scale the 
-\begin_inset Formula $y$
-\end_inset
-
- coordinate
-\begin_inset Formula \[
-y_{scaled}=\left(y-y_{min}\right)/\left(y_{max}-y_{min}\right),\]
-
-\end_inset
-
- then this returns 
-\begin_inset Formula \[
-\begin{array}{ccc}
-f(x,y,z) & = & SinusoidalTempIC\_TopLayerBC\\
- &  & +\left(SinusoidalTempIC\_TopLayerBC-SinusoidalTempIC\_TopLayerBC\right)\left(1-y_{scaled}\right)\\
- &  & +SinusoidalTempIC\_PerturbationAmplitude\\
- &  & *\left(\cos\left(\pi x*SinusoidalTempIC\_HorizontalWaveNumber\right)\right.\\
- &  & +\left.sin\left(\pi ySinusoidalTempIC\_VerticalWaveNumber\right)\right)\end{array}.\]
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Description
-Trigonometry 
-\begin_inset Formula \[
-f(x,y,z)=1-\frac{\pi y}{2}\sin\left(\frac{\pi x}{x_{max}-x_{min}}\right).\]
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Description
-VelicTemperatureIC 
-\begin_inset Formula \[
-f(x,y,z)=sigma*\cos\left(\pi wavenumberX\left(\frac{x-x_{min}}{x_{max}-x_{min}}\right)\right)\sin\left(\pi\left(y-y_{min}\right)wavenumberY\right),\]
-
-\end_inset
-
-where the height of the box is constrained to 
-\begin_inset Formula $y_{max}-y_{min}=1$
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Description
-VelicTemperatureIC_SolB 
-\begin_inset Formula \[
-f(x,y,z)=sigma*\cos\left(\pi wavenumberX\left(\frac{x-x_{min}}{x_{max}-x_{min}}\right)\right)\sinh\left(\pi wavenumberY\left(\frac{y-y_{min}}{x-x_{min}}\right)\right),\]
-
-\end_inset
-
-where the height of the box is constrained to 
-\begin_inset Formula $y_{max}-y_{min}=1$
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Description
-AnalyticalTemperatureIC First, we define 
-\begin_inset Formula \[
-\begin{array}{ccc}
-x_{0} & \equiv & x-x_{min}\\
-y_{0} & \equiv & y-y_{min}\\
-L & \equiv & x_{max}-x_{min}\\
-H & \equiv & y_{max}-y_{min}\\
-\lambda & \equiv & L/H\end{array},\]
-
-\end_inset
-
-and then compute some intermediate quantities
-\begin_inset Formula \[
-\begin{array}{ccc}
-u_{0} & = & \frac{\lambda^{7/3}}{\left(1+\lambda^{4}\right)^{2/3}}\left(\frac{Ra}{2\sqrt{pi}}\right)^{2/3}\\
-v_{0} & = & u_{0}/\lambda\\
-Q & = & 2\sqrt{\lambda/\left(\pi u_{0}\right)}\\
-T_{u} & = & \frac{1}{2}erf(\left(\frac{1}{2}\left(1-y_{0}\right)\sqrt{u_{0}/x_{0}}\right)\\
-T_{l} & = & 1-\frac{1}{2}erf\left(\frac{1}{2}y_{0}\sqrt{u_{0}/\left(\lambda-x_{0}\right)}\right)\\
-T_{r} & = & \frac{1}{2}+\frac{1}{2}\left(Q/\sqrt{\pi}\right)\sqrt{v_{0}/\left(y_{0}+1\right)}\exp\left(-x_{0}^{2}v_{0}/\left(4y_{0}+4\right)\right)\\
-T_{s} & = & \frac{1}{2}-\frac{1}{2}\left(Q/\sqrt{\pi}\right)\sqrt{v_{0}/\left(2-y_{0}\right)}\exp\left(-\left(\lambda-x_{0}\right)^{2}v_{0}/\left(8-4y_{0}\right)\right)\\
-g & = & T_{u}+T_{l}+T_{r}+T_{s}-1.5\end{array}.\]
-
-\end_inset
-
- The result then is 
-\begin_inset Formula \[
-f(x,y,z)=\left\{ \begin{array}{cc}
-0 & g<0\\
-g & 0<g<1\\
-1 & g>1\end{array}\right..\]
-
-\end_inset
-
-Note that this requires the error function 
-\begin_inset Formula $erf$
-\end_inset
-
- which is not available on all platforms.
- 
-\end_layout
-
-\begin_layout Description
-SinusoidalExtension 
-\begin_inset Formula \[
-\begin{array}{ccc}
-f(x,y,z) & = & SinusoidalExtensionVelocity+SinusoidalExtensionAmplitude\\
- &  & *\cos\left(2\pi SinusoidalExtensionFrequency\left(t+dt-SinusoidalExtensionPhaseShift\right)\right)\end{array}\]
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Description
-StepFunction This function returns a ramp function in the axis prescribed
- by the integer 
-\begin_inset Formula $StepFunctionDim$
-\end_inset
-
-, where 
-\begin_inset Formula $0\Rightarrow x$
-\end_inset
-
-, 
-\begin_inset Formula $1\Rightarrow y$
-\end_inset
-
-, 
-\begin_inset Formula $2\Rightarrow z$
-\end_inset
-
-.
- Defining some convenient constants 
-\begin_inset Formula \[
-\begin{array}{ccc}
-w & = & coord[dim]\\
-w_{-} & = & StepFunctionLowerOffset\\
-w_{+} & = & StepFunctionUpperOffset\\
-V & = & StepFunctionValue\end{array},\]
-
-\end_inset
-
-then if 
-\begin_inset Formula $StepFunctionLessThan$
-\end_inset
-
- is 
-\family typewriter
-True
-\family default
-, then 
-\begin_inset Formula \[
-f(x,y,z)=\left\{ \begin{array}{cc}
-0 & w<w_{-}\\
-V\left(\frac{w-w_{-}}{w_{+}-w_{-}}\right) & w_{-}<w<w_{+}\\
-V & w_{+}<w\end{array}\right.,\]
-
-\end_inset
-
- otherwise it is reversed
-\begin_inset Formula \[
-f(x,y,z)=\left\{ \begin{array}{cc}
-V & w<w_{-}\\
-V\left(\frac{w_{+}-w}{w_{+}-w_{-}}\right) & w_{-}<w<w_{+}\\
-0 & w_{+}<w\end{array}\right.,\]
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Description
-StepFunctionProduct1 Using a similar scheme as StepFunction to specify the
- dimension with 
-\begin_inset Formula $StepFunctionProduct1Dim$
-\end_inset
-
-, 
-\begin_inset Formula \[
-f(x,y,z)=\left\{ \begin{array}{cc}
-0 & w<StepFunctionProduct1Start\\
-StepFunctionProduct1Value & StepFunctionProduct1Start<w<StepFunctionProduct1End\\
-0 & w>StepFunctionProduct1End\end{array}\right.\]
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Description
-StepFunctionProduct2 
-\end_layout
-
-\begin_layout Description
-StepFunctionProduct3
-\end_layout
-
-\begin_layout Description
-StepFunctionProduct4 These are the same as StepFunctionProduct1 except that
- they use different variables (e.g 
-\begin_inset Formula $StepFunctionProduct2Dim$
-\end_inset
-
- instead of 
-\begin_inset Formula $StepFunctionProduct1Dim$
-\end_inset
-
-).
-\end_layout
-
-\begin_layout Description
-Gaussian 
-\begin_inset Formula \[
-f(x,y,z)=\left(GaussianHeight\right)\exp\left[-\left(\frac{GaussianCenter-coord[dim]}{GaussianWidth}\right)^{2}\right]\]
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Section
-Parallel Options
-\end_layout
-
-\begin_layout Chapter
-Output File Format
-\end_layout
-
-\begin_layout Chapter
-Benchmarks
-\end_layout
-
-\begin_layout Standard
-CIG has worked with Susanne Buiter at NGU to improve the benchmark specification
-s (image available) including visco-elasto-plastic inclusion experiments.
- 
-\end_layout
-
-\begin_layout Subsection
-Relaxation of Topography
-\end_layout
-
-\begin_layout Subsection
-Traditional Subduction Model
-\end_layout
-
-\begin_layout Subsection
-Free Slip Base
-\end_layout
-
-\begin_layout Subsection
-Circular Inclusion
-\end_layout
-
-\begin_layout Subsection
-Compressional Wedge
-\end_layout
-
-\begin_layout Subsection
-Inward Translation of a Retaining Wall
-\end_layout
-
-\begin_layout Subsection
-0D and 1D Shear Tests
-\end_layout
-
-\begin_layout Chapter
-License
-\end_layout
-
-\begin_layout Standard
-\begin_inset ERT
-status collapsed
-
-\begin_layout Standard
-
-
-\backslash
-parindent 
-\end_layout
-
-\end_inset
-
-0in
-\end_layout
-
-\begin_layout Standard
-\align center
-Version 2, June 1991
-\end_layout
-
-\begin_layout Standard
-\align center
-Copyright 
-\begin_inset ERT
-status collapsed
-
-\begin_layout Standard
-
-
-\backslash
-copyright
-\end_layout
-
-\end_inset
-
-
-\begin_inset ERT
-status collapsed
-
-\begin_layout Standard
-
-
-\backslash
- 
-\end_layout
-
-\end_inset
-
-1989, 1991 Free Software Foundation, Inc.
-\end_layout
-
-\begin_layout Standard
-\align center
-\begin_inset ERT
-status collapsed
-
-\begin_layout Standard
-
-
-\backslash
-bigskip
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\align center
-51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
-\end_layout
-
-\begin_layout Standard
-\align center
-\begin_inset ERT
-status collapsed
-
-\begin_layout Standard
-
-
-\backslash
-bigskip
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\align center
-Everyone is permitted to copy and distribute verbatim copies of this license
- document, but changing it is not allowed.
- 
-\end_layout
-
-\begin_layout Standard
-\begin_inset ERT
-status collapsed
-
-\begin_layout Standard
-
-
-\backslash
-renewcommand{
-\backslash
-abstractname}{Preamble}
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-The licenses for most software are designed to take away your freedom to
- share and change it.
- By contrast, the GNU General Public License is intended to guarantee your
- freedom to share and change free software---to make sure the software is
- free for all its users.
- This General Public License applies to most of the Free Software Foundation's
- software and to any other program whose authors commit to using it.
- (Some other Free Software Foundation software is covered by the GNU Library
- General Public License instead.) You can apply it to your programs, too.
-\end_layout
-
-\begin_layout Standard
-When we speak of free software, we are referring to freedom, not price.
- Our General Public Licenses are designed to make sure that you have the
- freedom to distribute copies of free software (and charge for this service
- if you wish), that you receive source code or can get it if you want it,
- that you can change the software or use pieces of it in new free programs;
- and that you know you can do these things.
-\end_layout
-
-\begin_layout Standard
-To protect your rights, we need to make restrictions that forbid anyone
- to deny you these rights or to ask you to surrender the rights.
- These restrictions translate to certain responsibilities for you if you
- distribute copies of the software, or if you modify it.
-\end_layout
-
-\begin_layout Standard
-For example, if you distribute copies of such a program, whether gratis
- or for a fee, you must.
- Give the recipients all the rights that you have.
- You must make sure that they, too, receive or can get the source code.
- And you must show them these terms so they know their rights.
-\end_layout
-
-\begin_layout Standard
-We protect your rights with two steps: (1) copyright the software, and (2)
- offer you this license which gives you legal permission to copy, distribute
- and/or modify the software.
-\end_layout
-
-\begin_layout Standard
-Also, for each author's protection and ours, we want to make certain that
- everyone understands that there is no warranty for this free software.
- If the software is modified by someone else and passed on, we want its
- recipients to know that what they have is not the original, so that any
- problems introduced by others will not reflect on the original authors'
- reputations.
-\end_layout
-
-\begin_layout Standard
-Finally, any free program is threatened constantly by software patents.
- We wish to avoid the danger that redistributors of a free program will
- individually obtain patent licenses, in effect making the program proprietary.
- To prevent this, we have made it clear that any patent must be licensed
- for everyone's free use or not licensed at all.
-\end_layout
-
-\begin_layout Standard
-The precise terms and conditions for copying, distribution and modification
- follow.
- 
-\end_layout
-
-\begin_layout Standard
-\align center
-
-\shape smallcaps
-\size large
-GNU General Public License 
-\newline
-
-\begin_inset ERT
-status collapsed
-
-\begin_layout Standard
-
-
-\backslash
-vspace{3mm}
-\end_layout
-
-\end_inset
-
-Terms and Conditions For Copying, Distribution and Modification
-\end_layout
-
-\begin_layout Standard
-\begin_inset ERT
-status collapsed
-
-\begin_layout Standard
-
-
-\backslash
-addtocounter{enumi}{-1}
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-This License applies to any program or other work which contains a notice
- placed by the copyright holder saying it may be distributed under the terms
- of this General Public License.
- The 
-\begin_inset Quotes eld
-\end_inset
-
-Program
-\begin_inset Quotes erd
-\end_inset
-
-, below, refers to any such program or work, and a 
-\begin_inset Quotes eld
-\end_inset
-
-work based on the Program
-\begin_inset Quotes erd
-\end_inset
-
- means either the Program or any derivative work under copyright law: that
- is to say, a work containing the Program or a portion of it, either verbatim
- or with modifications and/or translated into another language.
- (Hereinafter, translation is included without limitation in the term 
-\begin_inset Quotes eld
-\end_inset
-
-modification
-\begin_inset Quotes erd
-\end_inset
-
-.) Each licensee is addressed as 
-\begin_inset Quotes eld
-\end_inset
-
-you
-\begin_inset Quotes erd
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Standard
-Activities other than copying, distribution and modification are not covered
- by this License; they are outside its scope.
- The act of running the Program is not restricted, and the output from the
- Program is covered only if its contents constitute a work based on the
- Program (independent of having been made by running the Program).
- Whether that is true depends on what the Program does.
-\end_layout
-
-\begin_layout Enumerate
-You may copy and distribute verbatim copies of the Program's source code
- as you receive it, in any medium, provided that you conspicuously and appropria
-tely publish on each copy an appropriate copyright notice and disclaimer
- of warranty; keep intact all the notices that refer to this License and
- to the absence of any warranty; and give any other recipients of the Program
- a copy of this License along with the Program.
-\end_layout
-
-\begin_deeper
-\begin_layout Standard
-You may charge a fee for the physical act of transferring a copy, and you
- may at your option offer warranty protection in exchange for a fee.
-\end_layout
-
-\begin_layout Standard
-You may modify your copy or copies of the Program or any portion of it,
- thus forming a work based on the Program, and copy and distribute such
- modifications or work under the terms of Section 1 above, provided that
- you also meet all of these conditions:
-\end_layout
-
-\end_deeper
-\begin_layout Standard
-You must cause the modified files to carry prominent notices stating that
- you changed the files and the date of any change.
-\end_layout
-
-\begin_layout Standard
-You must cause any work that you distribute or publish, that in whole or
- in part contains or is derived from the Program or any part thereof, to
- be licensed as a whole at no charge to all third parties under the terms
- of this License.
-\end_layout
-
-\begin_layout Enumerate
-If the modified program normally reads commands interactively when run,
- you must cause it, when started running for such interactive use in the
- most ordinary way, to print or display an announcement including an appropriate
- copyright notice and a notice that there is no warranty (or else, saying
- that you provide a warranty) and that users may redistribute the program
- under these conditions, and telling the user how to view a copy of this
- License.
- (Exception: if the Program itself is interactive but does not normally
- print such an announcement, your work based on the Program is not required
- to print an announcement.)
-\end_layout
-
-\begin_deeper
-\begin_layout Standard
-These requirements apply to the modified work as a whole.
- If identifiable sections of that work are not derived from the Program,
- and can be reasonably considered independent and separate works in themselves,
- then this License, and its terms, do not apply to those sections when you
- distribute them as separate works.
- But when you distribute the same sections as part of a whole which is a
- work based on the Program, the distribution of the whole must be on the
- terms of this License, whose permissions for other licensees extend to
- the entire whole, and thus to each and every part regardless of who wrote
- it.
-\end_layout
-
-\begin_layout Standard
-Thus, it is not the intent of this section to claim rights or contest your
- rights to work written entirely by you; rather, the intent is to exercise
- the right to control the distribution of derivative or collective works
- based on the Program.
-\end_layout
-
-\begin_layout Standard
-In addition, mere aggregation of another work not based on the Program with
- the Program (or with a work based on the Program) on a volume of a storage
- or distribution medium does not bring the other work under the scope of
- this License.
-\end_layout
-
-\end_deeper
-\begin_layout Enumerate
-You may copy and distribute the Program (or a work based on it, under Section
- 2) in object code or executable form under the terms of Sections 1 and
- 2 above provided that you also do one of the following:
-\end_layout
-
-\begin_deeper
-\begin_layout Standard
-Accompany it with the complete corresponding machine-readable source code,
- which must be distributed under the terms of Sections 1 and 2 above on
- a medium customarily used for software interchange; or,
-\end_layout
-
-\begin_layout Standard
-Accompany it with a written offer, valid for at least three years, to give
- any third party, for a charge no more than your cost of physically performing
- source distribution, a complete machine-readable copy of the corresponding
- source code, to be distributed under the terms of Sections 1 and 2 above
- on a medium customarily used for software interchange; or,
-\end_layout
-
-\begin_layout Standard
-Accompany it with the information you received as to the offer to distribute
- corresponding source code.
- (This alternative is allowed only for noncommercial distribution and only
- if you received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-\end_layout
-
-\begin_layout Standard
-The source code for a work means the preferred form of the work for making
- modifications to it.
- For an executable work, complete source code means all the source code
- for all modules it contains, plus any associated interface definition files,
- plus the scripts used to control compilation and installation of the executable.
- However, as a special exception, the source code distributed need not include
- anything that is normally distributed (in either source or binary form)
- with the major components (compiler, kernel, and so on) of the operating
- system on which the executable runs, unless that component itself accompanies
- the executable.
-\end_layout
-
-\begin_layout Standard
-If distribution of executable or object code is made by offering access
- to copy from a designated place, then offering equivalent access to copy
- the source code from the same place counts as distribution of the source
- code, even though third parties are not compelled to copy the source along
- with the object code.
-\end_layout
-
-\end_deeper
-\begin_layout Enumerate
-You may not copy, modify, sublicense, or distribute the Program except as
- expressly provided under this License.
- Any attempt otherwise to copy, modify, sublicense or distribute the Program
- is void, and will automatically terminate your rights under this License.
- However, parties who have received copies, or rights, from you under this
- License will not have their licenses terminated so long as such parties
- remain in full compliance.
-\end_layout
-
-\begin_layout Enumerate
-You are not required to accept this License, since you have not signed it.
- However, nothing else grants you permission to modify or distribute the
- Program or its derivative works.
- These actions are prohibited by law if you do not accept this License.
- Therefore, by modifying or distributing the Program (or any work based
- on the Program), you indicate your acceptance of this License to do so,
- and all its terms and conditions for copying, distributing or modifying
- the Program or works based on it.
-\end_layout
-
-\begin_layout Enumerate
-Each time you redistribute the Program (or any work based on the Program),
- the recipient automatically receives a license from the original licensor
- to copy, distribute or modify the Program subject to these terms and conditions.
- You may not impose any further restrictions on the recipients' exercise
- of the rights granted herein.
- You are not responsible for enforcing compliance by third parties to this
- License.
-\end_layout
-
-\begin_layout Enumerate
-If, as a consequence of a court judgment or allegation of patent infringement
- or for any other reason (not limited to patent issues), conditions are
- imposed on you (whether by court order, agreement or otherwise) that contradict
- the conditions of this License, they do not excuse you from the conditions
- of this License.
- If you cannot distribute so as to satisfy simultaneously your obligations
- under this License and any other pertinent obligations, then as a consequence
- you may not distribute the Program at all.
- For example, if a patent license would not permit royalty-free redistribution
- of the Program by all those who receive copies directly or indirectly through
- you, then the only way you could satisfy both it and this License would
- be to refrain entirely from distribution of the Program.
-\end_layout
-
-\begin_deeper
-\begin_layout Standard
-If any portion of this section is held invalid or unenforceable under any
- particular circumstance, the balance of the section is intended to apply
- and the section as a whole is intended to apply in other circumstances.
-\end_layout
-
-\begin_layout Standard
-It is not the purpose of this section to induce you to infringe any patents
- or other property right claims or to contest validity of any such claims;
- this section has the sole purpose of protecting the integrity of the free
- software distribution system, which is implemented by public license practices.
- Many people have made generous contributions to the wide range of software
- distributed through that system in reliance on consistent application of
- that system; it is up to the author/donor to decide if he or she is willing
- to distribute software through any other system and a licensee cannot impose
- that choice.
-\end_layout
-
-\begin_layout Standard
-This section is intended to make thoroughly clear what is believed to be
- a consequence of the rest of this License.
-\end_layout
-
-\end_deeper
-\begin_layout Enumerate
-If the distribution and/or use of the Program is restricted in certain countries
- either by patents or by copyrighted interfaces, the original copyright
- holder who places the Program under this License may add an explicit geographic
-al distribution limitation excluding those countries, so that distribution
- is permitted only in or among countries not thus excluded.
- In such case, this License incorporates the limitation as if written in
- the body of this License.
-\end_layout
-
-\begin_layout Enumerate
-The Free Software Foundation may publish revised and/or new versions of
- the General Public License from time to time.
- Such new versions will be similar in spirit to the present version, but
- may differ in detail to address new problems or concerns.
-\end_layout
-
-\begin_deeper
-\begin_layout Standard
-Each version is given a distinguishing version number.
- If the Program specifies a version number of this License which applies
- to it and 
-\begin_inset Quotes eld
-\end_inset
-
-any later version
-\begin_inset Quotes erd
-\end_inset
-
-, you have the option of following the terms and conditions either of that
- version or of any later version published by the Free Software Foundation.
- If the Program does not specify a version number of this License, you may
- choose any version ever published by the Free Software Foundation.
-\end_layout
-
-\end_deeper
-\begin_layout Enumerate
-If you wish to incorporate parts of the Program into other free programs
- whose distribution conditions are different, write to the author to ask
- for permission.
- For software which is copyrighted by the Free Software Foundation, write
- to the Free Software Foundation; we sometimes make exceptions for this.
- Our decision will be guided by the two goals of preserving the free status
- of all derivatives of our free software and of promoting the sharing and
- reuse of software generally.
-\end_layout
-
-\begin_deeper
-\begin_layout Standard
-\align center
-
-\shape smallcaps
-\size large
-No Warranty 
-\end_layout
-
-\end_deeper
-\begin_layout Enumerate
-
-\shape smallcaps
-Because the program is licensed free of charge, there is no warranty for
- the program, to the extent permitted by applicable law.
- Except when otherwise stated in writing the copyright holders and/or other
- parties provide the program 
-\begin_inset Quotes eld
-\end_inset
-
-as is
-\begin_inset Quotes erd
-\end_inset
-
- without warranty of any kind, either expressed or implied, including, but
- not limited to, the implied warranties of merchantability and fitness for
- a particular purpose.
- The entire risk as to the quality and performance of the program is with
- you.
- Should the program prove defective, you assume the cost of all necessary
- servicing, repair or correction.
-\end_layout
-
-\begin_layout Enumerate
-
-\shape smallcaps
-In no event unless required by applicable law or agreed to in writing will
- any copyright holder, or any other party who may modify and/or redistribute
- the program as permitted above, be liable to you for damages, including
- any general, special, incidental or consequential damages arising out of
- the use or inability to use the program (including but not limited to loss
- of data or data being rendered inaccurate or losses sustained by you or
- third parties or a failure of the program to operate with any other programs),
- even if such holder or other party has been advised of the possibility
- of such damages.
-\end_layout
-
-\begin_layout Standard
-\align center
-
-\shape smallcaps
-\size large
-End of Terms and Conditions
-\end_layout
-
-\begin_layout Standard
-\begin_inset ERT
-status collapsed
-
-\begin_layout Standard
-
-
-\backslash
-pagebreak[2]
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\align center
-
-\shape smallcaps
-\size large
-How to Apply These Terms to Your New Programs
-\end_layout
-
-\begin_layout Standard
-If you develop a new program, and you want it to be of the greatest possible
- use to the public, the best way to achieve this is to make it free software
- which everyone can redistribute and change under these terms.
-\end_layout
-
-\begin_layout Standard
-To do so, attach the following notices to the program.
- It is safest to attach them to the start of each source file to most effectivel
-y convey the exclusion of warranty; and each file should have at least the
- 
-\begin_inset Quotes eld
-\end_inset
-
-copyright
-\begin_inset Quotes erd
-\end_inset
-
- line and a pointer to where the full notice is found.
-\end_layout
-
-\begin_layout Quote
-<one line to give the program's name and a brief idea of what it does.> 
-\newline
-
- Copyright (C) <year> <name of author> 
-\newline
-
-\end_layout
-
-\begin_layout Quote
-This program is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the Free
- Software Foundation; either version 2 of the License, or (at your option)
- any later version.
-\end_layout
-
-\begin_layout Quote
-This program is distributed in the hope that it will be useful, but WITHOUT
- ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- FOR A PARTICULAR PURPOSE.
- See the GNU General Public License for more details.
-\end_layout
-
-\begin_layout Quote
-You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
- 
-\end_layout
-
-\begin_layout Standard
-Also add information on how to contact you by electronic and paper mail.
-\end_layout
-
-\begin_layout Standard
-If the program is interactive, make it output a short notice like this when
- it starts in an interactive mode:
-\end_layout
-
-\begin_layout Quote
-Gnomovision version 69, Copyright (C) <year> <name of author> 
-\newline
-Gnomovision
- comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- 
-\newline
-This is free software, and you are welcome to redistribute it under certain
- conditions; type `show c' for details.
- 
-\end_layout
-
-\begin_layout Standard
-The hypothetical commands 
-\family typewriter
-show w
-\family default
- and 
-\family typewriter
-show c
-\family default
- should show the appropriate parts of the General Public License.
- Of course, the commands you use may be called something other than 
-\family typewriter
-show w
-\family default
- and 
-\family typewriter
-show c
-\family default
-; they could even be mouse-clicks or menu items---whatever suits your program.
-\end_layout
-
-\begin_layout Standard
-You should also get your employer (if you work as a programmer) or your
- school, if any, to sign a 
-\begin_inset Quotes eld
-\end_inset
-
-copyright disclaimer
-\begin_inset Quotes erd
-\end_inset
-
- for the program, if necessary.
- Here is a sample; alter the names:
-\end_layout
-
-\begin_layout Quote
-Yoyodyne, Inc., hereby disclaims all copyright interest in the program 
-\newline
-`Gnomovisi
-on' (which makes passes at compilers) written by James Hacker.
- 
-\newline
-
-\end_layout
-
-\begin_layout Quote
-<signature of Ty Coon>, 1 April 1989 
-\newline
- Ty Coon, President of Vice 
-\end_layout
-
-\begin_layout Standard
-This General Public License does not permit incorporating your program into
- proprietary programs.
- If your program is a subroutine library, you may consider it more useful
- to permit linking proprietary applications with the library.
- If this is what you want to do, use the GNU Library General Public License
- instead of this License.
-\end_layout
-
-\begin_layout Bibliography
-
-\bibitem {key-1}
- S.
- Quenette, B.
- Appelbe, M.
- Gurnis, L.
- Hodkinson, L.
- Moresi, and P.
- Sunter, An Investigation into Design for Performance and Code Maintainability
- in High Performance Computing (2005), 
-\emph on
-ANZIAM J.
-\emph default
-, 46(e), C1001-C1016
-\end_layout
-
-\begin_layout Bibliography
-
-\bibitem {key-4}
-Moresi, L.
- N., F.
- Dufour, and H.-B.
- Mühlhaus (2003), A Lagrandian integration point finite element method for
- large deformation modeling of viscoelastic geomaterials, 
-\emph on
-J.
- Comp.
- Phys., 184
-\series bold
-,
-\series default
-\emph default
- 476-497.
-\end_layout
-
-\begin_layout Bibliography
-
-\bibitem {key-3}
- Moresi, L.N., and H.-B.
- Mühlhaus (2006), Anisotropic viscous models of large-deformation MohrCoulomb
- failure, 
-\emph on
-Philosophical Magazine, 86,
-\emph default
- 3287-3305.
-\end_layout
-
-\begin_layout Bibliography
-
-\bibitem {key-2}
- Moresi, L.N., and V.S.
- Solomatov (1995), Numerical investigation of 2D convection with extremely
- large viscosity variations, 
-\emph on
-Phys.
- Fluids,
-\emph default
- 
-\emph on
-7 (9),
-\emph default
- 2154-2162.
-\end_layout
-
-\end_body
-\end_document
+#LyX 1.4.3-4 created this file. For more info see http://www.lyx.org/
+\lyxformat 245
+\begin_document
+\begin_header
+\textclass book
+\begin_preamble
+\usepackage{hyperref}
+
+\let\myUrl\url
+\renewcommand{\url}[1]{(\myUrl{#1})}
+\end_preamble
+\language english
+\inputencoding auto
+\fontscheme default
+\graphics default
+\paperfontsize default
+\spacing single
+\papersize default
+\use_geometry true
+\use_amsmath 1
+\cite_engine basic
+\use_bibtopic false
+\paperorientation portrait
+\leftmargin 1in
+\topmargin 1in
+\rightmargin 1in
+\bottommargin 1in
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\defskip medskip
+\quotes_language swedish
+\papercolumns 1
+\papersides 2
+\paperpagestyle headings
+\tracking_changes false
+\output_changes true
+\end_header
+
+\begin_body
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset ERT
+status collapsed
+
+\begin_layout Standard
+
+
+\backslash
+thispagestyle{empty}
+\end_layout
+
+\end_inset
+
+
+\begin_inset Float figure
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Standard
+\noindent
+\begin_inset Graphics
+	filename gale_cover.pdf
+	width 75page%
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Title
+Gale
+\end_layout
+
+\begin_layout Author
+© California Institute of Technology
+\newline
+Walter Landry and Luke Hodkinson
+\newline
+Version
+ 1.0 
+\end_layout
+
+\begin_layout Date
+\begin_inset ERT
+status collapsed
+
+\begin_layout Standard
+
+
+\backslash
+today
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset LatexCommand \tableofcontents{}
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset FloatList figure
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status collapsed
+
+\begin_layout Standard
+
+
+\backslash
+raggedbottom
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+
+\newpage
+
+\end_layout
+
+\begin_layout Chapter
+Preface
+\end_layout
+
+\begin_layout Section
+Who will use Gale?
+\end_layout
+
+\begin_layout Standard
+The main audience for Gale is research scientists interested in tectonic
+ modeling.
+\end_layout
+
+\begin_layout Section
+Citation
+\end_layout
+
+\begin_layout Standard
+Computational Infrastructure for Geodynamics (CIG) is making this source
+ code available to you in the hope that the software will enhance your research
+ in geophysics.
+ The underlying C code for the finite element package was donated to CIG
+ in July of 2005.
+ A number of individuals have contributed a significant portion of their
+ careers toward the development of Gale.
+ It is essential that you recognize these individuals in the normal scientific
+ practice by making appropriate acknowledgements.
+ 
+\end_layout
+
+\begin_layout Standard
+The code is based on the method described in 
+\end_layout
+
+\begin_layout Itemize
+Moresi, L.N., F.
+ Dufour, and H.-B.
+ Mühlhaus (2003), A Lagrangian integration point finite element method for
+ large deformation modeling of viscoelastic geomaterials, 
+\emph on
+J.
+ Comp.
+ Phys., 184
+\series bold
+,
+\series default
+\emph default
+ 476-497.
+ 
+\end_layout
+
+\begin_layout Standard
+The code was originally developed by the Victorian Partnership for Advanced
+ Computing (VPAC) and Louis Moresi's group at Monash University.
+ Walter Landry of CIG and Luke Hodkinson of VPAC have enhanced the code
+ to satisfy the requirements of the long-term tectonics community.
+ Roger Buck, Gus Correa, and Robert Bialas from the Lamont-Doherty Earth
+ Observatory, Columbia University, provided valuable user testing.
+ The Gale team requests that in your oral presentations and in your paper
+ acknowledgements that you indicate your use of this code, the authors of
+ the code, 
+\begin_inset LatexCommand \htmlurl[CIG]{www.geodynamics.org}
+
+\end_inset
+
+, 
+\begin_inset LatexCommand \htmlurl[Victoria Partnership for Advanced Computing]{www.vpac.org}
+
+\end_inset
+
+, and 
+\begin_inset LatexCommand \htmlurl[Monash University]{www.monash.edu}
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Section
+Support
+\end_layout
+
+\begin_layout Standard
+Gale development is supported by a grant from the National Science Foundation
+ to CIG, managed by the Caltech Institute of Technology.
+ However, most of the software components below Gale have been developed
+ by the Victoria Partnership for Advanced Computing (VPAC) and Monash University.
+\end_layout
+
+\begin_layout Chapter
+Introduction
+\end_layout
+
+\begin_layout Section
+About Gale
+\end_layout
+
+\begin_layout Standard
+Gale is a parallel, two- or three-dimensional, implicit finite element code
+ focusing on orogenesis, rifting, and subduction with coupling to surface
+ erosion models.
+ Gale uses a hybrid particle-in-cell scheme which combines a deformable
+ mesh of computational points and a dense arrangement of mobile material
+ points.
+ The boundaries of the deformable mesh conform to the boundaries of the
+ material as the simulation progresses, but the interior is constrained
+ to remain as regular as possible.
+ The particles track history-dependent properties such as strain for strain-soft
+ening materials.
+ This allows Gale to simulate  problems with large deformations and irregular
+ boundaries.
+\end_layout
+
+\begin_layout Standard
+CIG has developed Gale in response to community demand by building on existing
+ work by VPAC and Louis Moresi's group at Monash University.
+ The code is being released under the GNU General Public License.
+\end_layout
+
+\begin_layout Section
+Gale Computational Approach and Governing Equations
+\end_layout
+
+\begin_layout Subsection
+Infrastructure
+\end_layout
+
+\begin_layout Standard
+Gale uses both a regular grid and particles for simulation.
+ The regular grid is used to solve differential equations, and particles
+ are used to record material properties (e.g., strain history).
+ Note that the regular grid can become distorted, since it may conform to
+ an uneven upper surface.
+\end_layout
+
+\begin_layout Subsection
+Basic Equations
+\end_layout
+
+\begin_layout Standard
+We can decompose the stress tensor 
+\begin_inset Formula $\sigma$
+\end_inset
+
+ into pressure 
+\begin_inset Formula $p$
+\end_inset
+
+ and deviatoric stress 
+\begin_inset Formula $\tau$
+\end_inset
+
+ 
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula \begin{equation}
+\sigma_{ij}=\tau_{ij}-p\delta_{ij},\label{eq:stress}\end{equation}
+
+\end_inset
+
+where 
+\begin_inset Formula $\delta$
+\end_inset
+
+ is the Kronecker delta.
+ In its simplest form, Gale solves a conservation equation for momentum
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula \begin{equation}
+\tau_{ij,j}-p_{,i}=0,\label{eq:simple momentum conservation}\end{equation}
+
+\end_inset
+
+subject to the continuity equation
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula \begin{equation}
+v_{i,i}=0,\label{eq:continuity}\end{equation}
+
+\end_inset
+
+where 
+\begin_inset Formula $v$
+\end_inset
+
+ is the velocity.
+ We use the convention that repeated indices (e.g., 
+\begin_inset Formula $v_{i,i}$
+\end_inset
+
+) imply a sum over all dimensions.
+ So in three dimensions
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula \begin{equation}
+v_{i,i}\equiv v_{x,x}+v_{y,y}+v_{z,z}.\label{eq:implicit summation}\end{equation}
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Note that there is no explicit time dependency (yet).
+ Gale simulates creeping flows, so acceleration terms are neglected and
+ material motion evolves through a series of equilibria.
+ If your boundary condition has a time component, then we may infer a time.
+ For example, if the boundaries move inwards at 1 mm/sec, then the solution
+ when the boundaries have moved 5 mm would correspond to 5 seconds.
+\end_layout
+
+\begin_layout Standard
+So far, these equations are very simple, taking no account of gravity or
+ temperature.
+ So this is mostly useful when simulating laboratory experiments.
+\end_layout
+
+\begin_layout Standard
+To solve eqs.
+ 
+\begin_inset LatexCommand \ref{eq:simple momentum conservation}
+
+\end_inset
+
+ and 
+\begin_inset LatexCommand \ref{eq:continuity}
+
+\end_inset
+
+, we assume a simple viscous material.
+ This allows us to write 
+\begin_inset Formula $\tau$
+\end_inset
+
+ in terms of the rate of strain tensor 
+\begin_inset Formula $D$
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula \begin{equation}
+\tau_{ij}=2\eta D_{ij}\equiv\eta\left(v_{i,j}+v_{j,i}\right),\label{eq:stress strain}\end{equation}
+
+\end_inset
+
+where 
+\begin_inset Formula $\eta$
+\end_inset
+
+ is the viscosity.
+ 
+\end_layout
+
+\begin_layout Standard
+Using standard finite-element techniques, we can represent eqs.
+ 
+\begin_inset LatexCommand \ref{eq:simple elliptic}
+
+\end_inset
+
+ and 
+\begin_inset LatexCommand \ref{eq:continuity}
+
+\end_inset
+
+ in matrix form as 
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula \begin{equation}
+\left(\begin{array}{cc}
+K & G\\
+G^{T}\end{array}\right)\left(\begin{array}{c}
+v\\
+p\end{array}\right)=\left(\begin{array}{c}
+0\\
+0\end{array}\right),\label{eq:matrix form}\end{equation}
+
+\end_inset
+
+where 
+\begin_inset Formula $G$
+\end_inset
+
+ is the simple gradient operator and 
+\begin_inset Formula $K$
+\end_inset
+
+ is a more complicated submatrix depending on material properties.
+\begin_inset Foot
+status open
+
+\begin_layout Standard
+At this point, it is common in many codes to introduce a penalty function
+ to make the right hand side of the continuity equation 
+\begin_inset LatexCommand \ref{eq:continuity}
+
+\end_inset
+
+ non-zero.
+ This would allow us to eliminate 
+\begin_inset Formula $p$
+\end_inset
+
+ from the equation, leading to a simpler set of equations.
+ However, this penalty function is non-physical and can cause spurious effects.
+\end_layout
+
+\end_inset
+
+ This implies the separate relations
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula \begin{equation}
+\begin{array}{ccc}
+Kv+Gp & = & 0\\
+G^{T}v & = & 0\end{array}.\label{eq:expanded matrix}\end{equation}
+
+\end_inset
+
+We can then eliminate velocity by premultiplying by 
+\begin_inset Formula $G^{T}K^{-1}$
+\end_inset
+
+ and using 
+\begin_inset Formula $G^{T}v=0$
+\end_inset
+
+ 
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula \begin{equation}
+G^{T}K^{-1}Gp=0.\label{eq:final simple elliptic}\end{equation}
+
+\end_inset
+
+This equation is solved using the Uzawa algorithm 
+\begin_inset LatexCommand \cite{key-2}
+
+\end_inset
+
+.
+ 
+\end_layout
+
+\begin_layout Subsection
+Gravity
+\end_layout
+
+\begin_layout Standard
+Gravity is accounted for by adding a body force term to eq.
+ 
+\begin_inset LatexCommand \ref{eq:simple momentum conservation}
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula \begin{equation}
+\tau_{ij,j}-p_{,i}=f_{i},\label{eq:body force}\end{equation}
+
+\end_inset
+
+where
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula \begin{equation}
+\begin{array}{ccc}
+f_{x} & = & 0\\
+f_{y} & = & 0\\
+f_{z} & = & -g\rho\end{array}.\label{eq:gravity body force}\end{equation}
+
+\end_inset
+
+ This modifies eq.
+ 
+\begin_inset LatexCommand \ref{eq:matrix form}
+
+\end_inset
+
+ to 
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula \begin{equation}
+\left(\begin{array}{cc}
+K & G\\
+G^{T}\end{array}\right)\left(\begin{array}{c}
+v\\
+p\end{array}\right)=\left(\begin{array}{c}
+f\\
+0\end{array}\right).\label{eq:matrix form}\end{equation}
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Temperature
+\end_layout
+
+\begin_layout Standard
+Temperature is included by solving the energy equation
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula \begin{equation}
+\frac{dT}{dt}=\kappa\nabla^{2}T+Q,\label{eq:energy}\end{equation}
+
+\end_inset
+
+ where 
+\begin_inset Formula $d/dt$
+\end_inset
+
+ is the material time derivative (taken at a point moving with respect to
+ the fluid), 
+\begin_inset Formula $T$
+\end_inset
+
+ is the temperature, 
+\begin_inset Formula $\kappa$
+\end_inset
+
+ is the thermal diffusivity, and 
+\begin_inset Formula $Q$
+\end_inset
+
+ is the rate of energy production (e.g., from radiogenic sources).
+ Note that eq.
+ 
+\begin_inset LatexCommand \ref{eq:energy}
+
+\end_inset
+
+ introduces time into the equation.
+\end_layout
+
+\begin_layout Subsection
+Surface Processes
+\end_layout
+
+\begin_layout Standard
+Gale takes an agnostic approach to surface processes such as erosion.
+ Gale exposes a programming interface that allows us to modify the heights
+ of the surface.
+ See Section 
+\begin_inset LatexCommand \ref{sec:Surface-Processes}
+
+\end_inset
+
+ for details.
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout Subsection
+Rheology
+\end_layout
+
+\begin_layout Standard
+Gale incorporates a number of different rheologies, as well as letting you
+ create your own.
+ For details on the existing Rheologies, see Section 
+\begin_inset LatexCommand \ref{sec:Materials}
+
+\end_inset
+
+.
+ To create your own rheology, see Chapter 
+\begin_inset LatexCommand \ref{cha:Modifying-Gale}
+
+\end_inset
+
+ for guidance.
+\end_layout
+
+\begin_layout Section
+Gale History
+\end_layout
+
+\begin_layout Standard
+Gale arose from discussions at an NSF-sponsored workshop on Tectonic Modeling
+ held in Breckenridge, Colorado.
+ At that workshop, members of the tectonics community advocated that CIG
+ develop a new open-source software package based on the Arbitrary Lagrangian
+ Eulerian (ALE) method for solving tectonic problems.
+ The ALE method, as it is implemented in the tectonics community, was developed
+ primarily at Dalhousie University in Canada.
+ It solves a Stokes Flow problem on an Eulerian grid and uses a Lagrangian
+ grid to track material properties and to integrate strain.
+ This method has seen much use in lithosphere deformation problems such
+ as orogenesis, rifting, subduction, as well as in coupling to surface erosion
+ models and has been employed for deeper mantle dynamics problems.
+ Gale is an open-source code that is at least as useful as SOPALE and MicroFEM
+ for addressing these research areas, with the addition of 3D capability.
+ In the future, Gale will run benchmarks such as extension and shortening,
+ as well as the traditional subduction model as shown in Fig.
+ 
+\begin_inset LatexCommand \ref{fig:General-subduction-model}
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Standard
+Walter Landry of CIG and Luke Hodkinson of the Victorian Partnership for
+ Advanced Computing (VPAC) are the primary developers of Gale.
+ Roger Buck, Robert Bialis, and Gus Correa of Lamont-Doherty Earth Observatory,
+ Columbia University, provided valuable user testing.
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float figure
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Caption
+\begin_inset LatexCommand \label{fig:General-subduction-model}
+
+\end_inset
+
+General subduction model from Fullsack (1995).
+ The basic subduction model can be modified by introducing isostasy and/or
+ boundary mass fluxes.
+ (a) Flexural or local isostasy.
+ Every Eulerian column is displaced by the corresponding local or flexural
+ deflection 
+\emph on
+w
+\emph default
+ of the base.
+ (b) Mass fluxes crossing the boundaries may be: (1) the tectonic flux 
+\emph on
+t
+\emph default
+
+\begin_inset Formula $^{\text{+}}$
+\end_inset
+
+ into the domain, due to tectonic convergence; (2) the deposition flux 
+\begin_inset Formula $\text{e}^{+}$
+\end_inset
+
+ onto the domain, due to surface processes; (3) the deposition flux 
+\begin_inset Formula $\text{e}^{-}$
+\end_inset
+
+ from the domain, due to surface processes; (4) the crustal subduction flux
+ 
+\begin_inset Formula $\text{cs}^{-}$
+\end_inset
+
+ from the domain, due to the entrainment of crustal material from the subducting
+ plate.
+ 
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Graphics
+	filename images/GALE_image1.eps
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+ 
+\end_layout
+
+\begin_layout Chapter
+Installation and Getting Help
+\end_layout
+
+\begin_layout Section
+System Requirements
+\end_layout
+
+\begin_layout Standard
+Gale works on a variety of platforms.
+ It requires PETSc, MPI, and libxml2 headers and development libraries.
+ It also requires Python 2.2.1 or greater to build.
+\end_layout
+
+\begin_layout Standard
+Gale has been tested on workstations running Mac OS X 10.4.6 (G4 and G5);
+ Windows 2000 and XP SP2; RedHat Fedora Core 5 (x86); OpenSuse 10.0 (x86);
+ Gentoo (x86); Debian stable (x86 and AMD64), testing (x86), and unstable
+ (x86).
+ Gale has also been tested on clusters running Redhat 7.2 (x86) and RedHat
+ Enterprise Linux 3 (EM64T).
+\end_layout
+
+\begin_layout Section
+Getting the Code
+\end_layout
+
+\begin_layout Standard
+Gale can be downloaded at 
+\begin_inset LatexCommand \htmlurl[CIG Software Packages: Gale]{www.geodynamics.org/cig/software/packages/long/gale/}
+
+\end_inset
+
+ as a tar file or via the CIG Subversion software repository.
+ To check whether you have a subversion client installed on your machine,
+ type:
+\end_layout
+
+\begin_layout LyX-Code
+svn
+\end_layout
+
+\begin_layout Standard
+You should get a response that looks something like this:
+\end_layout
+
+\begin_layout LyX-Code
+Type 'svn help' for usage.
+\end_layout
+
+\begin_layout Standard
+Otherwise, you will need to download and install a Subversion client, available
+ at the 
+\begin_inset LatexCommand \htmlurl[Subversion Website]{subversion.tigris.org/project_packages.html}
+
+\end_inset
+
+.
+ Then the code can be checked out with the following command: 
+\end_layout
+
+\begin_layout LyX-Code
+svn checkout http://geodynamics.org/svn/cig/long/3D/Gale/trunk Gale
+\end_layout
+
+\begin_layout Section
+Installation
+\end_layout
+
+\begin_layout Standard
+Installation instructions are available in the tarball in the file INSTALL.
+ For some platforms (Mac OS X, Windows, RedHat Fedora Core 5, OpenSuse 10.0,
+ Debian stable, testing, and unstable) there are platform specific installation
+ instructions.
+ Generally, the hardest part is not installing Gale itself, but PETSc.
+\end_layout
+
+\begin_layout Section
+Support
+\end_layout
+
+\begin_layout Standard
+The primary point of support for Gale is the 
+\begin_inset LatexCommand \url[CIG Long-Term Crustal Dynamics Mailing List]{cig-long at geodynamics.org}
+
+\end_inset
+
+.
+ Feel free to send questions, comments, feature requests, and bugs to the
+ list.
+ The mailing list is archived at
+\end_layout
+
+\begin_layout LyX-Code
+\begin_inset LatexCommand \htmlurl[cig-long Archives]{www.geodynamics.org/pipermail/cig-long/}
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+You may also use the bug tracker
+\end_layout
+
+\begin_layout LyX-Code
+\begin_inset LatexCommand \htmlurl[Roundup]{geodynamics.org/roundup}
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+to submit bugs.
+\end_layout
+
+\begin_layout Chapter
+Running Gale
+\end_layout
+
+\begin_layout Section
+Gale Usage
+\end_layout
+
+\begin_layout Subsection
+Usage
+\end_layout
+
+\begin_layout Standard
+If you downloaded binaries for your platform, you can run the Gale executable
+ directly.
+ For example
+\end_layout
+
+\begin_layout LyX-Code
+./Gale  extension.xml
+\end_layout
+
+\begin_layout Standard
+If you compiled Gale yourself, then you can run it from where you installed
+ it.
+ If running in parallel, then just prepend 
+\family typewriter
+mpirun
+\family default
+ or 
+\family typewriter
+mpiexec
+\family default
+.
+ The extension example should run for 500 time steps and generate a great
+ deal of output in the 
+\family typewriter
+output.extension
+\family default
+ directory.
+ There are also rough examples of shortening and subduction.
+\end_layout
+
+\begin_layout Standard
+Gale uses PETSc for solvers, so you can easily change which solver to use.
+ The default solver is preconditioned conjugate gradient.
+ There are too many options of PETSc to go into them here.
+ But as a simple example, to use a direct LU solve, simply append arguments
+ to the command line
+\end_layout
+
+\begin_layout LyX-Code
+./Gale  extension.xml -pc_type lu -ksp_type preonly
+\end_layout
+
+\begin_layout Section
+Output Format
+\end_layout
+
+\begin_layout Standard
+The sample input files will produce a directory in which you will find a
+ number of different output files.
+ The default setting is to print once for every time step.
+ You can change the frequency of that setting, e.g., have it print less frequently
+, by modifying 
+\family typewriter
+extension.xml
+\family default
+ so the parameter 
+\family typewriter
+checkpointEvery
+\family default
+ has a different value, e.g.:
+\end_layout
+
+\begin_layout LyX-Code
+<param name="checkpointEvery">25</param>
+\end_layout
+
+\begin_layout Standard
+You can change the value to any number you want.
+ 
+\end_layout
+
+\begin_layout Standard
+Also found in the output directory are a number of .dat and .txt files.
+ Most of the .dat files are ASCII and self-explanatory, e.g., 
+\family typewriter
+PressureField.dat
+\family default
+ contains pressure field output information.
+ Inside each .dat file are found several columns of data:
+\end_layout
+
+\begin_layout LyX-Code
+
+\family typewriter
+0 0.0312539624080715 0.0109361134145122 0 -9.81467103200287
+\end_layout
+
+\begin_layout LyX-Code
+
+\family typewriter
+1 0.0937630718938361 0.0109356986189374 0 17.7373201951569
+\end_layout
+
+\begin_layout LyX-Code
+
+\family typewriter
+2 0.156270066350344 0.0109368543031399 0 -37.0281780188199
+\end_layout
+
+\begin_layout LyX-Code
+
+\family typewriter
+3 0.218780947570009 0.0109343376815161 0 45.6263762140766
+\end_layout
+
+\begin_layout LyX-Code
+
+\family typewriter
+4 0.28128858838265 0.010937987088561 0 -65.2132484518426 
+\end_layout
+
+\begin_layout Standard
+The first column (0,1,2,3, ...) is the node number, and the second, third,
+ and fourth columns are the x, y, and z coordinates.
+ The last column(s) show the value.
+ Note: If performing a 2D run, you will still obtain the z data, but that
+ can be ignored.
+\end_layout
+
+\begin_layout Standard
+The .txt files are the output of 
+\family typewriter
+DumpSwarm
+\family default
+, explained below.
+\end_layout
+
+\begin_layout Section
+Using 
+\family typewriter
+DumpSwarm
+\family default
+ for Particle Information
+\end_layout
+
+\begin_layout Standard
+All of the particle information is output in the 
+\family typewriter
+materialSwarm.*.dat
+\family default
+ files.
+ Unfortunately, they are just a binary dump of the particle structures,
+ so their format may vary depending on the machine architecture.
+ To get the particle information in a more friendly format, we provide a
+ plug-in called 
+\family typewriter
+DumpSwarm
+\family default
+.
+ The 
+\family typewriter
+DumpSwarm
+\family default
+ plugin is activated by adding the line
+\end_layout
+
+\begin_layout LyX-Code
+    <param>Underworld_DumpSwarm</param> 
+\end_layout
+
+\begin_layout Standard
+to the list of plugins.
+ This line is already in the example input files.
+ At present, it outputs the files 
+\family typewriter
+yielding.*.txt
+\family default
+.
+ The format of the file is
+\end_layout
+
+\begin_layout LyX-Code
+m x y z
+\family typewriter
+ yielded
+\end_layout
+
+\begin_layout Standard
+where 
+\family typewriter
+m
+\family default
+ is the number of the material (in the examples, always 1), and 
+\family typewriter
+yielded
+\family default
+ is a number between 
+\family typewriter
+0
+\family default
+ and 
+\family typewriter
+1
+\family default
+ indicating how much a material point has failed.
+ If you want to print out some other property of the material, e.g., viscosity,
+ you can modify 
+\family typewriter
+DumpSwarm
+\family default
+ to provide that information.
+ The source for the plugin is found in the directory
+\end_layout
+
+\begin_layout LyX-Code
+src/Underworld/plugins/Output/DumpSwarm/
+\end_layout
+
+\begin_layout Section
+Postprocessing
+\end_layout
+
+\begin_layout Standard
+Included in the 
+\family typewriter
+tools/
+\family default
+ directory is a short C++ program, 
+\family typewriter
+viz.cxx
+\family default
+, that will convert the yielding.*.txt files into vtk files.
+ These vtk files can be directly visualized in 
+\begin_inset LatexCommand \htmlurl[MayaVi]{mayavi.sourceforge.net}
+
+\end_inset
+
+ or 
+\begin_inset LatexCommand \htmlurl[ParaView]{www.paraview.org}
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Chapter
+Modifying Gale
+\begin_inset LatexCommand \label{cha:Modifying-Gale}
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+Introduction
+\end_layout
+
+\begin_layout Standard
+If you wish to change material properties, here is a brief overview of how
+ to modify the code.
+ The following is currently lacking in many areas, but will be expanded
+ and refined in future releases.
+ 
+\end_layout
+
+\begin_layout Section
+Software Components of Gale
+\end_layout
+
+\begin_layout Standard
+Gale makes use of several physics libraries, including StGermain, StgFEM,
+ PiCellerator, and UnderWorld.
+ These are proven, capable, open-source finite element method libraries
+ written by the Victorian Partnership for Advanced Computing (VPAC) and
+ Louis Moresi's group at Monash University.
+ See Fig 
+\begin_inset LatexCommand \ref{fig:Mapping-between-MicroFEM}
+
+\end_inset
+
+.
+ Gale also makes use of PETSc, a suite of data structures and routines for
+ the parallel solution of scientific applications modeled by partial differentia
+l equations.
+ 
+\end_layout
+
+\begin_layout Subsection
+StGermain 
+\end_layout
+
+\begin_layout Standard
+StGermain provides an infrastructure that can be used to create reusable,
+ collaborative computational development environments.
+ It aims to provide the efficiency and style of coding near that of traditional
+ HPC as well as new techniques and methods in scientific computing.
+ Effectively, it is the application of contemporary software engineering
+ on multi-disciplinary computational research.
+ In particular, StGermain can be used in the development of computational
+ finite element codes.
+ It permits the interchanging of numerical schemes without having to change
+ the problem description or the constitutive rules utilized.
+ It also allows numerical schemes and constitutive rules to be reused for
+ different problems in different disciplines.
+ Scientists can then switch to new computational technologies as they become
+ available.
+ StGermain also capitalizes on the resources invested in software development
+ on a research project, rendering that software effectively reusable for
+ subsequent projects.
+ In turn, intellectual property, skills and adaptability of the recipients
+ develop over time.
+ 
+\begin_inset LatexCommand \htmlurl[StGermain Web Site]{csd.vpac.org/twiki/bin/view/Stgermain/WebHome}
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+PETSc
+\end_layout
+
+\begin_layout Standard
+PETSc, the Portable, Extensible Toolkit for Scientific Computation, is a
+ suite of data structures and routines for the uni- and parallel-processor
+ solution of large-scale scientific application problems modeled by partial
+ differential equations.
+ It employs the MPI standard for all message-passing communication.
+ 
+\begin_inset LatexCommand \htmlurl[PETSc Web Site]{www-unix.mcs.anl.gov/petsc/petsc-as/}
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float figure
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Caption
+\begin_inset LatexCommand \label{fig:Mapping-between-MicroFEM}
+
+\end_inset
+
+Mapping between MicroFEM and Gale 
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Graphics
+	filename images/GALE_imag.eps
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+StgFEM 
+\end_layout
+
+\begin_layout Standard
+StgFEM uses the StGermain philosophy of reusability and collaborative developmen
+t to create a finite element problem composer in terms of both the linear
+ system to be solved and the finite element discretization of the problem
+ domain.
+ The composition can be described in XML and could be represented in a network
+ diagram with an appropriate tool.
+ StgFEM describes finite element systems for various formulations in a manner
+ that can allow the underlying numerics to be interchanged.
+ 
+\begin_inset LatexCommand \htmlurl[StgFEM Web Site]{csd.vpac.org/twiki/bin/view/Stgfem/WebHome}
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+PiCellerator 
+\end_layout
+
+\begin_layout Standard
+PICellerator (Particle In Cellerator), a Lagrangian Integration Point Finite
+ Element framework, is implemented as an integration scheme substitute for
+ the default Gaussian scheme implemented in StgFEM.
+ The PICellerator concept has since grown to become a general Lagrangian
+ integration scheme framework and a Lagrangian constitutive rule framework.
+ The PIC scheme is provided and other Arbitrary Lagrangian Eulerian schemes
+ are in development.
+ Constitutive rules are reusable across these schemes.
+ 
+\begin_inset LatexCommand \htmlurl[PICellerator Web Site]{csd.vpac.org/twiki/bin/view/PICellerator/WebHome}
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+UnderWorld 
+\end_layout
+
+\begin_layout Standard
+UnderWorld is a StGermain parallel modeling framework Geoscience research
+ code which utilizes a Lagrangian particle-in-cell finite element scheme
+ (the prototype of which is the Ellipsis code), visualised using gLucifer.
+ UnderWorld (Monash University), StGermain (Victorian Partnership for Advanced
+ Computing or VPAC) and gLucifer (Monash University) are under development
+ as part of the Australian Computational Earth Systems Simulator (ACcESS),
+ an Australian Government National Research Facility, a node of which is
+ located at the Australian Crustal Research Centre (ACRC) at Monash University
+ (Clayton Campus).
+ 
+\begin_inset LatexCommand \htmlurl[UnderWorld Web Site]{wasabi.maths.monash.edu.au/twiki/view/Software/Underworld}
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+System Description
+\end_layout
+
+\begin_layout Standard
+Gale uses StG_FEM to formulate implicit finite element systems, with the
+ bulk of the information placed in a stiffness matrix and a force vector.
+ Depending on the type of solver used, there may be several matrices and
+ vectors.
+ The stiffness matrix class has a member whose purpose is to assemble the
+ entire matrix.
+ It does this through the use of 
+\begin_inset Quotes eld
+\end_inset
+
+stiffness matrix terms.
+\begin_inset Quotes erd
+\end_inset
+
+ The 
+\family typewriter
+StiffnessMatrixTerm
+\family default
+ class provides an interface through which the elemental contributions to
+ the matrix may be influenced.
+ In typical fluid flow systems, the majority of the physics is applied to
+ the model through constitutive laws which modify the stiffness matrix to
+ reflect certain physical situations.
+ The 
+\family typewriter
+ConstitutiveMatrix
+\family default
+ class inherits from 
+\family typewriter
+StiffnessMatrixTerm
+\family default
+, providing an interface tailored to implementing material based continuum
+ physics.
+ 
+\end_layout
+
+\begin_layout Standard
+So, where does the actual physics take place? The answer is in the Rheology
+ class, but first we need to look at the PIC (particle in cell) scheme.
+ There are a number of benefits to using a PIC scheme, but the main use
+ is to store material properties on each particle.
+ We can then use these properties to drive our constitutive laws, in turn
+ modifying the produced stiffness matrices.
+ For each defined material in the domain, there may be a number of associated
+ rheological laws.
+ Whenever an element in the system is assembled, each stiffness matrix term
+ is evaluated, implying that the constitutive matrix will be evaluated for
+ each element.
+ For each particle internal to an element, the 
+\family typewriter
+ConstitutiveMatrix
+\family default
+ class will evaluate all associated rheologies, each rheology modifying
+ the constitutive matrix.
+ 
+\end_layout
+
+\begin_layout Standard
+Modifying the constitutive matrix takes place in the form of viscosity values.
+ In this, probably the simplest of rheological laws, the 
+\family typewriter
+ModifyConstitutiveMatrix
+\family default
+ method simply sets a specific viscosity value for the current element/material
+ point tuple.
+ 
+\end_layout
+
+\begin_layout Section
+Sample Rheologies 
+\end_layout
+
+\begin_layout Subsection
+Simple Viscous 
+\end_layout
+
+\begin_layout Standard
+This excerpt is taken from the file 
+\family typewriter
+src/Underworld/Rheology/src/MaterialViscosity.c
+\family default
+.
+ It has been inherited from the Rheology class and thus possesses a virtual
+ method named 
+\end_layout
+
+\begin_layout LyX-Code
+
+\family typewriter
+MaterialViscosity_ModifyConstitutiveMatrix
+\family default
+ 
+\end_layout
+
+\begin_layout Standard
+which has been overridden to set the viscosity in the constitutive matrix,
+ as follows: 
+\end_layout
+
+\begin_layout LyX-Code
+void _MaterialViscosity_ModifyConstitutiveMatrix( 
+\end_layout
+
+\begin_layout LyX-Code
+   void*                rheology, 
+\end_layout
+
+\begin_layout LyX-Code
+   ConstitutiveMatrix*  constitutiveMatrix, 
+\end_layout
+
+\begin_layout LyX-Code
+   MaterialPointsSwarm* swarm,
+\end_layout
+
+\begin_layout LyX-Code
+   Element_LocalIndex   lElement_I,
+\end_layout
+
+\begin_layout LyX-Code
+   MaterialPoint*       materialPoint,
+\end_layout
+
+\begin_layout LyX-Code
+   Coord                xi )
+\end_layout
+
+\begin_layout LyX-Code
+{
+\end_layout
+
+\begin_layout LyX-Code
+   MaterialViscosity* self = (MaterialViscosity*)rheology;
+\end_layout
+
+\begin_layout LyX-Code
+   ConstitutiveMatrix_SetIsotropicViscosity( constitutiveMatrix,
+\end_layout
+
+\begin_layout LyX-Code
+                                             self->eta0 );
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout Standard
+The parameters passed to this method provide access to the rheology class's
+ members/methods, the constitutive matrix, the swarm (material points),
+ the index of the element currently being assembled, the material point
+ currently being evaluated, and the material point's elemental coordinates.
+\end_layout
+
+\begin_layout Chapter
+Cookbook Examples
+\end_layout
+
+\begin_layout Section
+Introduction
+\end_layout
+
+\begin_layout Section
+Cookbook 1: Title
+\end_layout
+
+\begin_layout Subsection
+Problem
+\end_layout
+
+\begin_layout Subsection
+Solution
+\end_layout
+
+\begin_layout Subsection
+Discussion
+\end_layout
+
+\begin_layout Chapter
+\start_of_appendix
+Input File Format
+\end_layout
+
+\begin_layout Section
+Structure
+\end_layout
+
+\begin_layout Standard
+The input files are XML files.
+ This leverages a well known format to specify concepts like hierarchies,
+ lists, parameters, and arbitrary structures.
+ The entire document is placed withing a 
+\family typewriter
+StGermainData
+\family default
+ structure.
+\end_layout
+
+\begin_layout LyX-Code
+<?xml version="1.0"?>
+\end_layout
+
+\begin_layout LyX-Code
+<StGermainData xmlns="http://www.vpac.org/StGermain/XML_IO_Handler/Jun2003">
+\end_layout
+
+\begin_layout LyX-Code
+...
+\end_layout
+
+\begin_layout LyX-Code
+</StGermainData>
+\end_layout
+
+\begin_layout Standard
+Within that structure, there are five main parts of every Gale input file:
+ the components, the plugins, EulerDeform, Velocity Conditions, and the
+ variables.
+\end_layout
+
+\begin_layout Subsection
+Components
+\begin_inset LatexCommand \label{sub:Components}
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The components section is separated off from the rest of the file with an
+ enclosing 
+\family typewriter
+components
+\family default
+ structure.
+ This 
+\family typewriter
+components
+\family default
+ structure is where the bulk of the file will be.
+ It specifies things like what the mesh will be like, which material goes
+ where, what the material properties are, what kind of solver to use, etc.
+ Most of the ideas you need to specify will go into the components.
+ When adding a new component, it is important to remember to put the new
+ component inside the components structure.
+ Otherwise Gale will (silently) not use that component.
+ For example, an input file such as
+\end_layout
+
+\begin_layout LyX-Code
+<struct name="components">
+\end_layout
+
+\begin_layout LyX-Code
+  <struct name="conditionFunctions">
+\end_layout
+
+\begin_layout LyX-Code
+    <param name="Type">StgFEM_StandardConditionFunctions</param>
+\end_layout
+
+\begin_layout LyX-Code
+  </struct>
+\end_layout
+
+\begin_layout LyX-Code
+</struct>
+\end_layout
+
+\begin_layout Standard
+will correctly intialize 
+\family typewriter
+StgFEM_StandardConditionFunctions
+\family default
+, but the input file
+\end_layout
+
+\begin_layout LyX-Code
+<struct name="components">
+\end_layout
+
+\begin_layout LyX-Code
+</struct>
+\end_layout
+
+\begin_layout LyX-Code
+<struct name="conditionFunctions">
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="Type">StgFEM_StandardConditionFunctions</param>
+\end_layout
+
+\begin_layout LyX-Code
+</struct>
+\end_layout
+
+\begin_layout Standard
+will not.
+\end_layout
+
+\begin_layout Subsection
+Plugins
+\begin_inset LatexCommand \label{sub:Plugins}
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Gale also has the ability to load modules during runtime.
+ To use these plugins, simply list them in a section outside of the 
+\family typewriter
+components
+\family default
+ structure.
+ For example, the following lines will enable the 
+\family typewriter
+DumpSwarm
+\family default
+ and 
+\family typewriter
+EulerDeform
+\family default
+ plugins
+\end_layout
+
+\begin_layout LyX-Code
+<list name="plugins">
+\end_layout
+
+\begin_layout LyX-Code
+  <param>Underworld_EulerDeform</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <param>Underworld_DumpSwarm</param>
+\end_layout
+
+\begin_layout LyX-Code
+</list> 
+\end_layout
+
+\begin_layout Standard
+Dynamically loading modules is, in general, difficult to get working on
+ multiple platforms.
+ To make things easier, Gale is bundled with a number of plugins compiled
+ into the code and ready to use:
+\end_layout
+
+\begin_layout LyX-Code
+StgFEM_FrequentOutput
+\end_layout
+
+\begin_layout LyX-Code
+StgFEM_CPUTime
+\end_layout
+
+\begin_layout LyX-Code
+Underworld_MovingMesh
+\end_layout
+
+\begin_layout LyX-Code
+Underworld_Vrms
+\end_layout
+
+\begin_layout LyX-Code
+Underworld_EulerDeform
+\end_layout
+
+\begin_layout LyX-Code
+StgFEM_PrintFeVariableDiscreteValues
+\end_layout
+
+\begin_layout LyX-Code
+Underworld_DumpSwarm
+\end_layout
+
+\begin_layout Standard
+You can add additional plugins by modifying the list of static plugins in
+ 
+\family typewriter
+src/Gale/src/main.c
+\family default
+ and making sure that the plugin is compiled into the Gale executable.
+\end_layout
+
+\begin_layout Standard
+If you want to use dynamically loaded plugins, make sure that you compiled
+ with shared libraries (use the 
+\family typewriter
+--with-shared
+\family default
+ option when compiling) and set your 
+\family typewriter
+LD_LIBRARY_PATH 
+\family default
+environment variable appropriately.
+\end_layout
+
+\begin_layout Subsection
+EulerDeform
+\begin_inset LatexCommand \label{sub:EulerDeform}
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+This section covers the input parameters of the 
+\family typewriter
+Underworld_EulerDeform
+\family default
+ component.
+ This is the component that allows the upper surface to move freely or stay
+ rigidly in place.
+ An example 
+\family typewriter
+EulerDeform
+\family default
+ struct is
+\end_layout
+
+\begin_layout LyX-Code
+<struct name="EulerDeform">
+\end_layout
+
+\begin_layout LyX-Code
+  <list name="systems">
+\end_layout
+
+\begin_layout LyX-Code
+    <struct>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="mesh">mesh-constant</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="remesher">pressureRemesher</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="velocityField">VelocityField</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <list name="fields">
+\end_layout
+
+\begin_layout LyX-Code
+        <struct> 
+\end_layout
+
+\begin_layout LyX-Code
+          <param name="field">PressureField</param>
+\end_layout
+
+\begin_layout LyX-Code
+          <param name="variable">pressure</param>
+\end_layout
+
+\begin_layout LyX-Code
+        </struct>
+\end_layout
+
+\begin_layout LyX-Code
+      </list>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="mesh">mesh-linear</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="remesher">velocityRemesher</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="velocityField">VelocityField</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="wrapTop">True</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <list name="fields">
+\end_layout
+
+\begin_layout LyX-Code
+        <struct>
+\end_layout
+
+\begin_layout LyX-Code
+          <param name="field">VelocityField</param>
+\end_layout
+
+\begin_layout LyX-Code
+          <param name="variable">velocity</param>
+\end_layout
+
+\begin_layout LyX-Code
+        </struct>
+\end_layout
+
+\begin_layout LyX-Code
+      </list>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+  </list>
+\end_layout
+
+\begin_layout LyX-Code
+</struct>
+\end_layout
+
+\begin_layout Standard
+This tells Gale to remesh both the pressure and velocity field.
+ 
+\family typewriter
+pressureRemesher
+\family default
+, 
+\family typewriter
+velocityRemesher
+\family default
+, 
+\family typewriter
+pressureField
+\family default
+, 
+\family typewriter
+velocityField
+\family default
+, 
+\family typewriter
+pressure
+\family default
+, and 
+\family typewriter
+velocity
+\family default
+ are all components that must be defined earlier (see Section 
+\begin_inset LatexCommand \ref{sub:Components}
+
+\end_inset
+
+).
+ 
+\end_layout
+
+\begin_layout Standard
+Note the critical line
+\end_layout
+
+\begin_layout LyX-Code
+<param name="wrapTop">True</param>
+\end_layout
+
+\begin_layout Standard
+that tells Gale to make the top surface conform to the simulation.
+ Other options (
+\family typewriter
+wrapBottom
+\family default
+, 
+\family typewriter
+wrapLeft
+\family default
+) are available, but untested.
+ 
+\end_layout
+
+\begin_layout Standard
+Additionally, we can tell Gale to fix the positions of the boundaries.
+ For example, if we are running a shortening model, normally Gale will move
+ the boundaries inward as the simulation progresses.
+ If different parts of the boundary are moving at different rates (such
+ as if we were simulating one slab sliding over the other), then the side
+ boundary would quickly become distorted and ruin the simulation.
+ To fix the right boundary, set the variable 
+\family typewriter
+staticRight
+\family default
+ to 
+\family typewriter
+True
+\end_layout
+
+\begin_layout LyX-Code
+<param name="staticRight">True</param>
+\end_layout
+
+\begin_layout Standard
+Similarly, we can independently set the left, top, bottom, front, and back
+ boundaries.
+\end_layout
+
+\begin_layout Standard
+Note that we must have included 
+\family typewriter
+Underworld_EulerDeform
+\family default
+ in the list of plugins (see Section 
+\begin_inset LatexCommand \ref{sub:Plugins}
+
+\end_inset
+
+) in order for this section to have any effect.
+\end_layout
+
+\begin_layout Subsection
+Velocity Boundary Conditions
+\end_layout
+
+\begin_layout Standard
+This section specifies what the boundary conditions on the velocity will
+ be.
+ See Section 
+\begin_inset LatexCommand \ref{sub:Velocity-Boundary-Conditions}
+
+\end_inset
+
+ for more details.
+\end_layout
+
+\begin_layout Subsection
+Variables
+\begin_inset LatexCommand \label{sub:Variables}
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The last section is where we would place most of our numeric constants.
+ For example, how many time steps, how often to print output, etc.
+ We may also declare variables for convenience (e.g., the number of grid points)
+ and use it elsewhere, such as in the components.
+\end_layout
+
+\begin_layout Standard
+The following are some of the more important variables:
+\end_layout
+
+\begin_layout Description
+dim The number of dimensions of the simulation.
+ This can be either 2 or 3.
+\end_layout
+
+\begin_layout Description
+maxTimeSteps The number of timesteps to take.
+\end_layout
+
+\begin_layout Description
+outputEvery How often to print output to the screen.
+\end_layout
+
+\begin_layout Description
+dumpEvery How often to dump some information to files.
+\end_layout
+
+\begin_layout Description
+checkpointEvery How often to dump the complete state of the simulation to
+ disk.
+ This allows us to restart the simulation from the checkpoint.
+\end_layout
+
+\begin_layout Description
+outputPath What directory to put the output files in.
+\end_layout
+
+\begin_layout Description
+seed A random number seed.
+ Random numbers are only used in a few optional places, such as when laying
+ down an initial set of particles.
+\end_layout
+
+\begin_layout Standard
+Also, if we use the basic components given in Section 
+\begin_inset LatexCommand \ref{sec:Basic-Components}
+
+\end_inset
+
+, then we will need to specify 
+\family typewriter
+elementResI
+\family default
+, 
+\family typewriter
+elementResJ
+\family default
+, and 
+\family typewriter
+elementResK
+\family default
+.
+ 
+\end_layout
+
+\begin_layout Section
+Basic Components
+\begin_inset LatexCommand \label{sec:Basic-Components}
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Gale is built on top of StGermain, which is a very general framework for
+ scientific computation.
+ Because StGermain is so general, we have to tell it fairly basic things
+ that would be implicit in most codes.
+ For example, we must tell StGermain that we want to set up a regular mesh
+ and solve a finite element problem on it.
+ This means that we have to include a number of components in every input
+ file.
+ These components are
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="geometry">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">MeshGeometry</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="mesh">mesh-linear</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="decomp">decomp-linear</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="sizeI">elementResI</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="sizeJ">elementResJ</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="sizeK">elementResK</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="sizeShift">+1</param>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="elementTopology">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">IJK26Topology</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="sizeI">elementResI</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="sizeJ">elementResJ</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="sizeK">elementResK</param>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="elementLayout">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">HexaEL</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Topology">elementTopology</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Geometry">geometry</param>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="bodyNodeTopology">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">IJK6Topology</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="sizeI">elementResI</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="sizeJ">elementResJ</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="sizeK">elementResK</param>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="bodyNodeLayout">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">BodyNL</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="ElementLayout">elementLayout</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Topology">bodyNodeTopology</param>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="decomp-constant">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">HexaMD</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="ElementLayout">elementLayout</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="NodeLayout">bodyNodeLayout</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="numPartitionedDims">numPartitionedDims</param>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="meshLayout-constant">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">MeshLayout</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="ElementLayout">elementLayout</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="NodeLayout">bodyNodeLayout</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="MeshDecomp">decomp-constant</param>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="mesh-constant">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">FiniteElement_Mesh</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="MeshLayout">meshLayout-constant</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="ElementSize">8</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="NodeSize">0</param>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="cornerNodeTopology">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">IJK6Topology</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="sizeI">elementResI</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="sizeJ">elementResJ</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="sizeK">elementResK</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="sizeShift">1</param>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="cornerNodeLayout">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">CornerNL</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="ElementLayout">elementLayout</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Topology">cornerNodeTopology</param>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="decomp-linear">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">HexaMD</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="ElementLayout">elementLayout</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="NodeLayout">cornerNodeLayout</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="numPartitionedDims">numPartitionedDims</param>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="meshLayout-linear">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">MeshLayout</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="ElementLayout">elementLayout</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="NodeLayout">cornerNodeLayout</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="MeshDecomp">decomp-linear</param>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="mesh-linear">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">FiniteElement_Mesh</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="MeshLayout">meshLayout-linear</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="ElementSize">8</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="NodeSize">0</param>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="velocity">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">Variable</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Rank">Vector</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Dependency">decomp-linear</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="DataType">Double</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Count">decomp-linear-nodeDomainCount</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="VectorComponentCount">dim</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <list name="names">
+\end_layout
+
+\begin_layout LyX-Code
+        <param>vx</param>
+\end_layout
+
+\begin_layout LyX-Code
+        <param>vy</param>
+\end_layout
+
+\begin_layout LyX-Code
+        <param>vz</param>
+\end_layout
+
+\begin_layout LyX-Code
+      </list>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="velocityBCs">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">CompositeVC</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Data">mesh-linear</param>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="velocityICs">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">CompositeVC</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Data">mesh-linear</param>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="velocityDofLayout">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">DofLayout</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Count">decomp-linear-nodeDomainCount</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="BaseVariableCount">dim</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <list name="BaseVariables">
+\end_layout
+
+\begin_layout LyX-Code
+        <param>vx</param>
+\end_layout
+
+\begin_layout LyX-Code
+        <param>vy</param>
+\end_layout
+
+\begin_layout LyX-Code
+        <param>vz</param>
+\end_layout
+
+\begin_layout LyX-Code
+      </list>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="VelocityField">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">FeVariable</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="FEMesh">mesh-linear</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="DofLayout">velocityDofLayout</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="BC">velocityBCs</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="IC">velocityICs</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="LinkedDofInfo">velocityLinkedDofs</param>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="VelocityMagnitudeField">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">OperatorFeVariable</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Operator">Magnitude</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="FeVariable">VelocityField</param>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="VelocityGradientsField">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">OperatorFeVariable</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Operator">Gradient</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="FeVariable">VelocityField</param>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="VelocityXXField">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">OperatorFeVariable</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Operator">TakeFirstComponent</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="FeVariable">VelocityField</param>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="VelocityYYField">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">OperatorFeVariable</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Operator">TakeSecondComponent</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="FeVariable">VelocityField</param>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="StrainRateField">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">OperatorFeVariable</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Operator">TensorSymmetricPart</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="FeVariable">VelocityGradientsField</param>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="VorticityField">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">OperatorFeVariable</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Operator">TensorAntisymmetricPart</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="FeVariable">VelocityGradientsField</param>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="StrainRateInvariantField">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">OperatorFeVariable</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Operator">SymmetricTensor_Invariant</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="FeVariable">StrainRateField</param>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="StrainRateXXField">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">OperatorFeVariable</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Operator">TakeFirstComponent</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="FeVariable">StrainRateField</param>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="StrainRateYYField">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">OperatorFeVariable</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Operator">TakeSecondComponent</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="FeVariable">StrainRateField</param>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="pressure">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">Variable</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Rank">Scalar</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Dependency">decomp-constant</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="DataType">Double</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Count">decomp-constant-nodeDomainCount</param>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="pressureDofLayout">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">DofLayout</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Count">decomp-constant-nodeDomainCount</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <list name="BaseVariables">
+\end_layout
+
+\begin_layout LyX-Code
+        <param>pressure</param>
+\end_layout
+
+\begin_layout LyX-Code
+      </list>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="PressureField">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">FeVariable</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="FEMesh">mesh-constant</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="GeometryMesh">mesh-linear</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="DofLayout">pressureDofLayout</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="LinkedDofInfo">pressureLinkedDofs</param>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="cellLayout">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">SingleCellLayout</param>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="particleLayout">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">GaussParticleLayout</param>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="gaussSwarm">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">IntegrationPointsSwarm</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="CellLayout">cellLayout</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="ParticleLayout">particleLayout</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="FiniteElement_Mesh">mesh-linear</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="TimeIntegrator">timeIntegrator</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="IntegrationPointMapper">gaussMapper</param>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="gaussMapper">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">GaussMapper</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="IntegrationPointsSwarm">gaussSwarm</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="MaterialPointsSwarm">gaussMaterialSwarm</param>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="backgroundLayout">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">BackgroundParticleLayout</param>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="gaussMaterialSwarm">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">MaterialPointsSwarm</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="CellLayout">cellLayout</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="ParticleLayout">backgroundLayout</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="FiniteElement_Mesh">mesh-linear</param>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="timeIntegrator">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">TimeIntegrator</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="order">1</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="simultaneous">t</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Context">context</param>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="elementCellLayout">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">ElementCellLayout</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Mesh">mesh-linear</param>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="discreteVoronoi">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">CellularAutomataVoronoi</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="resolution">10</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="diagonalNeighbours">true</param>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="weights">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">DiscreteVoronoiWeights</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="DiscreteVoronoi">discreteVoronoi</param>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="localLayout">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">MappedParticleLayout</param>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="picIntegrationPoints">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">IntegrationPointsSwarm</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="CellLayout">elementCellLayout</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="ParticleLayout">localLayout</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="FiniteElement_Mesh">mesh-linear</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="WeightsCalculator">weights</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="TimeIntegrator">timeIntegrator</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="IntegrationPointMapper">mapper</param>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="mapper">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">CoincidentMapper</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="IntegrationPointsSwarm">picIntegrationPoints</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="MaterialPointsSwarm">materialSwarm</param>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="materialSwarmParticleLayout">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">MeshParticleLayout</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="mesh">mesh-linear</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="cellParticleCount">particlesPerCell</param>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="materialSwarm">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">MaterialPointsSwarm</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="CellLayout">elementCellLayout</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="ParticleLayout">materialSwarmParticleLayout</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="FiniteElement_Mesh">mesh-linear</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="SplittingRoutine">splittingRoutine</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="RemovalRoutine">removalRoutine</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="EscapedRoutine">escapedRoutine</param>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="materialSwarmAdvector">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">SwarmAdvector</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Swarm">materialSwarm</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="TimeIntegrator">timeIntegrator</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="VelocityField">VelocityField</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="PeriodicBCsManager">periodicBCsManager</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="allowFallbackToFirstOrder">True</param>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="removalRoutine">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">DiscreteVoronoiRemove</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="idealParticleCount">particlesPerCell</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="DiscreteVoronoi">discreteVoronoi</param>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="splittingRoutine">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">ReseedSplitting</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="idealParticleCount">particlesPerCell</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="DiscreteVoronoi">discreteVoronoi</param>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="solutionVelocity">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">SolutionVector</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="FeVariable">VelocityField</param>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="solutionPressure">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">SolutionVector</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="FeVariable">PressureField</param>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="mom_force">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">ForceVector</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="FeVariable">VelocityField</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="ExtraInfo">context</param>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="cont_force">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">ForceVector</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="FeVariable">PressureField</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="ExtraInfo">context</param>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="k_matrix">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">StiffnessMatrix</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="RowVariable">VelocityField</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="ColumnVariable">VelocityField</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="RHS">mom_force</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="allowZeroElementContributions">False</param>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="constitutiveMatrix">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">ConstitutiveMatrixCartesian</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Swarm">picIntegrationPoints</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="StiffnessMatrix">k_matrix</param>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="g_matrix">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">StiffnessMatrix</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="RowVariable">VelocityField</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="ColumnVariable">PressureField</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="RHS">cont_force</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="allowZeroElementContributions">False</param>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="gradientStiffnessMatrixTerm">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">GradientStiffnessMatrixTerm</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Swarm">gaussSwarm</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="StiffnessMatrix">g_matrix</param>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="preconditioner">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">StiffnessMatrix</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="RowVariable">PressureField</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="ColumnVariable">PressureField</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="RHS">cont_force</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="allowZeroElementContributions">True</param>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="preconditionerTerm">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">UzawaPreconditionerTerm</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Swarm">picIntegrationPoints</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="StiffnessMatrix">preconditioner</param>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="uzawa">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">Stokes_SLE_UzawaSolver</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Preconditioner">preconditioner</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="tolerance">1.0e-5</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="maxIterations">5000</param>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="stokesEqn">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">Stokes_SLE</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="SLE_Solver">uzawa</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Context">context</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="StressTensorMatrix">k_matrix</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="GradientMatrix">g_matrix</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="DivergenceMatrix"></param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="CompressibilityMatrix">c_matrix</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="VelocityVector">solutionVelocity</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="PressureVector">solutionPressure</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="ForceVector">mom_force</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="ContinuityForceVector">cont_force</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="killNonConvergent">false</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="nonLinearMaxIterations">nonLinearMaxIterations</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="nonLinearTolerance">nonLinearTolerance</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="makeConvergenceFile">false</param>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout Standard
+These components will be more or less unchanged between input files.
+ We will need to change some associated variables specifying the resolution:
+ 
+\family typewriter
+elementResI
+\family default
+, 
+\family typewriter
+elementResJ
+\family default
+, and 
+\family typewriter
+elementResK
+\family default
+.
+\end_layout
+
+\begin_layout Section
+Shapes
+\begin_inset LatexCommand \label{sec:Shapes}
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+When setting up a simulation, Gale reads in shapes to determine what to
+ put where.
+ For example, we can create a simulation with different materials by creating
+ different shapes and putting different materials in them.
+ As a simple example, we can create 3D box
+\end_layout
+
+\begin_layout LyX-Code
+<struct name="simpleBox">
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="Type">Box</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="startX">0.0</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="endX">1.0</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="startY">0.0</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="endY">1.0</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="startZ">0.0</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="endZ">1.0</param>
+\end_layout
+
+\begin_layout LyX-Code
+</struct>
+\end_layout
+
+\begin_layout Standard
+We can perform operations on shapes to create new shapes.
+ For example, if we also create a sphere
+\end_layout
+
+\begin_layout LyX-Code
+<struct name="simpleSphere">
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="Type">Sphere</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="radius">1.0</param>
+\end_layout
+
+\begin_layout LyX-Code
+</struct>
+\end_layout
+
+\begin_layout Standard
+then we can compose it with the box to create a new shape
+\end_layout
+
+\begin_layout LyX-Code
+<struct name="nonSphere">
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="Type">Intersection</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <list name="shapes">
+\end_layout
+
+\begin_layout LyX-Code
+    <param>simpleBox</param>
+\end_layout
+
+\begin_layout LyX-Code
+    <param>!simpleSphere</param>
+\end_layout
+
+\begin_layout LyX-Code
+  </list>
+\end_layout
+
+\begin_layout LyX-Code
+</struct>
+\end_layout
+
+\begin_layout Standard
+Note that the exclamation point ``!'' in front of 
+\family typewriter
+simpleSphere
+\family default
+ means ``not.'' So 
+\family typewriter
+Intersection
+\family default
+ creates a shape that is the intersection of the box and everywhere outside
+ of the sphere.
+ We can list an arbitrary number of shapes in 
+\family typewriter
+Intersection
+\family default
+.
+ Also, we can use 
+\family typewriter
+Union
+\family default
+ to create a shape that covers all of the input shapes.
+\end_layout
+
+\begin_layout Standard
+In addition, every shape accepts the translation variables 
+\family typewriter
+CentreX
+\family default
+, 
+\family typewriter
+CentreY
+\family default
+, and 
+\family typewriter
+CentreZ
+\family default
+, and the Euler angles 
+\family typewriter
+alpha
+\family default
+, 
+\family typewriter
+beta
+\family default
+, and 
+\family typewriter
+gamma
+\family default
+.
+ So if we modify the Box example above to
+\end_layout
+
+\begin_layout LyX-Code
+<struct name="simpleBox">
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="Type">Box</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="CentreX">1.0</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="startX">0.0</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="endX">1.0</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="startY">0.0</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="endY">1.0</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="startZ">0.0</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="endZ">1.0</param>
+\end_layout
+
+\begin_layout LyX-Code
+</struct>
+\end_layout
+
+\begin_layout Standard
+then the box will actually span from 1 to 2.
+\end_layout
+
+\begin_layout Standard
+The Euler angles use the 
+\begin_inset Formula $y$
+\end_inset
+
+ convention, first rotating about the original 
+\begin_inset Formula $z$
+\end_inset
+
+ axis an angle 
+\begin_inset Formula $\gamma$
+\end_inset
+
+, then rotating around the new 
+\begin_inset Formula $y$
+\end_inset
+
+ axis an angle 
+\begin_inset Formula $\beta$
+\end_inset
+
+, and finally a rotation around the new 
+\begin_inset Formula $z$
+\end_inset
+
+ axis an angle 
+\begin_inset Formula $\alpha$
+\end_inset
+
+.
+ Specifically, these rotations are expressed through the rotation matrix
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula \[
+R=\left(\begin{array}{ccc}
+-\sin\alpha\sin\gamma+\cos\alpha\cos\beta\cos\gamma & \sin\alpha\cos\gamma+\cos\beta\sin\gamma\cos\alpha & -\cos\alpha\sin\beta\\
+-\cos\alpha\sin\gamma-\cos\beta\cos\gamma\sin\alpha & \cos\alpha\cos\gamma-\cos\beta\sin\gamma\sin\alpha & \sin\alpha\sin\beta\\
+\sin\beta\cos\alpha & \sin\beta\sin\alpha & \cos\beta\end{array}\right).\]
+
+\end_inset
+
+ So when Gale is trying to figure out whether a coordinate 
+\begin_inset Formula $(x,y,z)$
+\end_inset
+
+ is inside a shape, it creates a new coordinate
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula \[
+\left(\begin{array}{c}
+x'\\
+y'\\
+z'\end{array}\right)=\left(\left(\begin{array}{c}
+x\\
+y\\
+z\end{array}\right)-\left(\begin{array}{c}
+CentreX\\
+CentreY\\
+CentreZ\end{array}\right)\right)R,\]
+
+\end_inset
+
+ which it uses in the formulas below.
+\end_layout
+
+\begin_layout Standard
+Finally, you may tell Gale to invert the shape with the 
+\family typewriter
+invert
+\family default
+ variable, making the inside the outside and vice versa.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Tabular
+<lyxtabular version="3" rows="8" columns="2">
+<features>
+<column alignment="center" valignment="top" leftline="true" width="0">
+<column alignment="center" valignment="top" leftline="true" rightline="true" width="0">
+<row topline="true" bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+Defaults
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+CentreX
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+0
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+CentreY
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+0
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+CentreZ
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+0
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true" bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+alpha
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+0
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+beta
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+0
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+gamma
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+0
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+invert
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+False
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+BelowCosinePlane 
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula \[
+y<offset+delta*\cos\left(\frac{\pi period}{180}*x+phase\right)\]
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Tabular
+<lyxtabular version="3" rows="5" columns="2">
+<features>
+<column alignment="center" valignment="top" leftline="true" width="0">
+<column alignment="center" valignment="top" leftline="true" rightline="true" width="0">
+<row topline="true" bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+Defaults
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+offset
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+0
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+delta
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+0.5
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+period
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+1
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true" bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+phase
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+0
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\newline
+
+\newline
+See also the notes for BelowPlane.
+\end_layout
+
+\begin_layout Subsection
+BelowPlane
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula \[
+y<offset\]
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+This shape also uses the variables 
+\begin_inset Formula $minX$
+\end_inset
+
+, 
+\begin_inset Formula $minY$
+\end_inset
+
+, 
+\begin_inset Formula $minZ$
+\end_inset
+
+, 
+\begin_inset Formula $maxX$
+\end_inset
+
+, 
+\begin_inset Formula $maxY$
+\end_inset
+
+, and 
+\begin_inset Formula $maxZ$
+\end_inset
+
+, which are only used when computing the volume of this shape.
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Tabular
+<lyxtabular version="3" rows="8" columns="2">
+<features>
+<column alignment="center" valignment="top" leftline="true" width="0">
+<column alignment="center" valignment="top" leftline="true" rightline="true" width="0">
+<row topline="true" bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+Defaults
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+offset
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+0
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+minX
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+0
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+minY
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+0
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true" bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+minZ
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+0
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+maxX
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+1
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+maxY
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+1
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+maxZ
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+1
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Box
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula \[
+\begin{array}{c}
+startX<x<endX\\
+startY<y<endY\\
+startZ<z<endZ\end{array}\]
+
+\end_inset
+
+Alternately, we can use widths, in which case 
+\begin_inset Formula \[
+\begin{array}{c}
+|x|<widthX/2\\
+|y|<widthY/2\\
+|z|<widthZ/2\end{array}.\]
+
+\end_inset
+
+You may mix and match these specification (e.g., use start/end for 
+\begin_inset Formula $x$
+\end_inset
+
+, and width for 
+\begin_inset Formula $y$
+\end_inset
+
+).
+ If both are specified for one coordinate, Gale will use start and end.
+ 
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Tabular
+<lyxtabular version="3" rows="4" columns="2">
+<features>
+<column alignment="center" valignment="top" leftline="true" width="0">
+<column alignment="center" valignment="top" leftline="true" rightline="true" width="0">
+<row topline="true" bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+Defaults
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+widthX
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+0
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+widthY
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+0
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true" bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+widthZ
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+0
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+ConvexHull
+\end_layout
+
+\begin_layout Standard
+This shape is a convenience function for creating intersections of 
+\family typewriter
+BelowPlane
+\family default
+.
+ The input is a list of vertices.
+ From each vertex, Gale computes a vector and plane normal to this vector.
+ The half spaces below the planes are then intersected to create a shape.
+ At present, we may only use three vertices in 2D, and four vertices in
+ 3D.
+ As an example, the shape
+\end_layout
+
+\begin_layout LyX-Code
+<struct name="triangleShape">
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="Type">ConvexHull</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <list name="verticies">
+\end_layout
+
+\begin_layout LyX-Code
+    <asciidata>
+\end_layout
+
+\begin_layout LyX-Code
+      <columnDefinition name = "x" type="double"/>
+\end_layout
+
+\begin_layout LyX-Code
+      <columnDefinition name = "y" type="double"/>
+\end_layout
+
+\begin_layout LyX-Code
+                                      1.0      1.0
+\end_layout
+
+\begin_layout LyX-Code
+                                     -1.0      1.0
+\end_layout
+
+\begin_layout LyX-Code
+                                      0.0     -1.0
+\end_layout
+
+\begin_layout LyX-Code
+    </asciidata>
+\end_layout
+
+\begin_layout LyX-Code
+  </list>
+\end_layout
+
+\begin_layout LyX-Code
+</struct>
+\end_layout
+
+\begin_layout Standard
+creates a shape with vertices at (0,2), (4,-2), (-4,-2).
+\end_layout
+
+\begin_layout Subsection
+Cylinder
+\end_layout
+
+\begin_layout Standard
+This shape uses a variable 
+\begin_inset Formula $perpendicularAxis$
+\end_inset
+
+ to determine which direction is perpendicular to the axis of the cylinder.
+ This variable accepts any of (x, y, z, X, Y, Z, i, j, k, I, J, K, 0, 1,
+ 2).
+ For the case where 
+\begin_inset Formula $perpendicularAxis=z$
+\end_inset
+
+, then
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula \[
+\begin{array}{c}
+radius^{2}>x^{2}+y^{2}\\
+startX<x<endX\\
+startY<y<endY\\
+startZ<z<endZ\end{array}.\]
+
+\end_inset
+
+ 
+\begin_inset Tabular
+<lyxtabular version="3" rows="8" columns="2">
+<features>
+<column alignment="center" valignment="top" leftline="true" width="0">
+<column alignment="center" valignment="top" leftline="true" rightline="true" width="0">
+<row topline="true" bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+Defaults
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+radius
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+0
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+startX
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+\begin_inset Formula $-\infty$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+startY
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+\begin_inset Formula $-\infty$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true" bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+startZ
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+\begin_inset Formula $-\infty$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+endX
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+\begin_inset Formula $\infty$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+endY
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+\begin_inset Formula $\infty$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+endZ
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+\begin_inset Formula $\infty$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Everywhere
+\end_layout
+
+\begin_layout Standard
+This is a convenience shape simply meaning everywhere.
+\end_layout
+
+\begin_layout Subsection
+PolygonShape
+\end_layout
+
+\begin_layout Standard
+This is primarily a two-dimensional shape.
+ The input to this shape is a list of vertices.
+ To figure out whether a point is inside the polygon, Gale adds up all of
+ the angles of the vectors going to the vertices.
+ If the point is inside the polygon, then the angles will sum to 
+\begin_inset Formula $\pm2\pi$
+\end_inset
+
+, depending on the direction we specify points.
+ If the point is outside the polygon, then the angles sum to 0.
+ A simple example is a triangle
+\end_layout
+
+\begin_layout LyX-Code
+    <struct name="triangleShape">
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="Type">PolygonShape</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <list name="verticies">
+\end_layout
+
+\begin_layout LyX-Code
+        <asciidata>
+\end_layout
+
+\begin_layout LyX-Code
+        <columnDefinition name = "x" type="double"/>
+\end_layout
+
+\begin_layout LyX-Code
+        <columnDefinition name = "y" type="double"/>
+\end_layout
+
+\begin_layout LyX-Code
+                                        0.0      0.0
+\end_layout
+
+\begin_layout LyX-Code
+                                        1.0      0.0
+\end_layout
+
+\begin_layout LyX-Code
+                                        1.0      1.0
+\end_layout
+
+\begin_layout LyX-Code
+        </asciidata>
+\end_layout
+
+\begin_layout LyX-Code
+      </list>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct>
+\end_layout
+
+\begin_layout Standard
+This creates a triangle with vertices at (0,0), (1,0), (1,1).
+\end_layout
+
+\begin_layout Standard
+We can extrude this shape into three dimensions by specifying startZ and
+ endZ.
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Tabular
+<lyxtabular version="3" rows="3" columns="2">
+<features>
+<column alignment="center" valignment="top" leftline="true" width="0">
+<column alignment="center" valignment="top" leftline="true" rightline="true" width="0">
+<row topline="true" bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+Defaults
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+startZ
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+0
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true" bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+endZ
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+0
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Sphere
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula \[
+x^{2}+y^{2}+z^{2}<radius^{2}\]
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Tabular
+<lyxtabular version="3" rows="2" columns="2">
+<features>
+<column alignment="center" valignment="top" leftline="true" width="0">
+<column alignment="center" valignment="top" leftline="true" rightline="true" width="0">
+<row topline="true" bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+Defaults
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true" bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+radius
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+0
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Superellipsoid
+\end_layout
+
+\begin_layout Standard
+In two dimensions
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula \[
+\left(\frac{x}{radiusX}\right)^{2/epsilon1}+\left(\frac{y}{radiusY}\right)^{2/epsilon1}<1,\]
+
+\end_inset
+
+and in three dimensions
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula \[
+\left(\left(\frac{x}{radiusX}\right)^{2/epsilon2}+\left(\frac{y}{radiusY}\right)^{2/epsilon2}\right)^{epsilon2/epsilon1}+\left(\frac{z}{radiusZ}\right)^{2/epsilon1}<1.\]
+
+\end_inset
+
+
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Tabular
+<lyxtabular version="3" rows="6" columns="2">
+<features>
+<column alignment="center" valignment="top" leftline="true" width="0">
+<column alignment="center" valignment="top" leftline="true" rightline="true" width="0">
+<row topline="true" bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+Defaults
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+radiusX
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+1
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+radiusY
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+1
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+radiusZ
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+1
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true" bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+epsilon1
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+1
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+epsilon2
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+1
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+Materials
+\begin_inset LatexCommand \label{sec:Materials}
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Gale supports two kinds of rheologies: viscous and yielding.
+ We can combine these two rheologies to create a more realistic composite
+ rheology.
+ We then pair this composite rheology with a shape to actually lay down
+ material on the grid.
+ As a simple example, we can create a viscous rheology
+\end_layout
+
+\begin_layout LyX-Code
+<struct name="viscousRheology">
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="Type">MaterialViscosity</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="eta0">10.0</param>
+\end_layout
+
+\begin_layout LyX-Code
+</struct>
+\end_layout
+
+\begin_layout Standard
+and a Von Mises yielding rheology
+\end_layout
+
+\begin_layout LyX-Code
+<struct name="strainWeakening">
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="Type">StrainWeakening</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="TimeIntegrator">timeIntegrator</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="MaterialPointsSwarm">materialSwarm</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="softeningStrain">0.1</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="initialDamageFraction">0.0</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="initialDamageWavenumber">0.5</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="initialDamageFactor">0.5</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="healingRate">0.0</param>
+\end_layout
+
+\begin_layout LyX-Code
+</struct>
+\newline
+
+\newline
+<struct name="yieldingRheology">
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="Type">VonMises</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="cohesion">10.0</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="cohesionAfterSoftening">1.0</param>
+\end_layout
+
+\begin_layout LyX-Code
+</struct>
+\end_layout
+
+\begin_layout Standard
+and combine them together with 
+\family typewriter
+materialShape
+\family default
+ (see Section 
+\begin_inset LatexCommand \ref{sec:Shapes}
+
+\end_inset
+
+ on how to create shapes)
+\end_layout
+
+\begin_layout LyX-Code
+<struct name="yieldingMaterial">
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="Type">RheologyMaterial</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="Shape">yieldingShape</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <list name="Rheology">
+\end_layout
+
+\begin_layout LyX-Code
+    <param>viscousRheology</param>
+\end_layout
+
+\begin_layout LyX-Code
+    <param>yieldingRheology</param>
+\end_layout
+
+\begin_layout LyX-Code
+  </list>
+\end_layout
+
+\begin_layout LyX-Code
+</struct>
+\end_layout
+
+\begin_layout Subsection
+Viscous
+\end_layout
+
+\begin_layout Subsubsection
+MaterialViscosity
+\end_layout
+
+\begin_layout Standard
+This is the simplest rheology.
+ There is only one variable, the viscosity 
+\family typewriter
+eta0
+\family default
+.
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Tabular
+<lyxtabular version="3" rows="2" columns="2">
+<features>
+<column alignment="center" valignment="top" leftline="true" width="0">
+<column alignment="center" valignment="top" leftline="true" rightline="true" width="0">
+<row topline="true" bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+Defaults
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true" bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+eta0
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+1
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Frank-Kamenetskii
+\end_layout
+
+\begin_layout Standard
+This is a temperature dependent viscosity
+\begin_inset Formula \[
+eta=eta0*\exp\left(-theta*T\right).\]
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Tabular
+<lyxtabular version="3" rows="3" columns="2">
+<features>
+<column alignment="center" valignment="top" leftline="true" width="0">
+<column alignment="center" valignment="top" leftline="true" rightline="true" width="0">
+<row topline="true" bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+Defaults
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+eta0
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+1
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true" bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+theta
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+0
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Yielding
+\end_layout
+
+\begin_layout Standard
+Yielding rheologies are a bit more complicated.
+ 
+\end_layout
+
+\begin_layout Subsubsection
+StrainWeakening
+\end_layout
+
+\begin_layout Standard
+First we need to create a 
+\family typewriter
+StrainWeakening
+\family default
+ component.
+ 
+\family typewriter
+StrainWeakening
+\family default
+ is mainly used to define an initial distribution of strain in a material
+ and to calculate the accumulated strain on each particle.
+ To that end, it requires a number of parameters.
+\end_layout
+
+\begin_layout Description
+TimeIntegrator This is the component used for time integration to accumulate
+ strain.
+ Given the standard components in Section 
+\begin_inset LatexCommand \ref{sec:Basic-Components}
+
+\end_inset
+
+, this will be 
+\family typewriter
+timeIntegrator
+\family default
+.
+\end_layout
+
+\begin_layout Description
+MaterialPointsSwarm This is the swarm of particles that this rheology will
+ tie itself to.
+ Given the standard components in Section 
+\begin_inset LatexCommand \ref{sec:Basic-Components}
+
+\end_inset
+
+, this will be 
+\family typewriter
+materialSwarm
+\family default
+.
+\end_layout
+
+\begin_layout Description
+healingRate With this parameter, accumulated strain can decrease.
+ Specifically, the time derivative of accumulated strain becomes
+\begin_inset Formula \[
+\frac{\sigma_{yield}}{\eta}\left(\frac{\beta}{1-\beta}-healingRate\right),\]
+
+\end_inset
+
+ where 
+\begin_inset Formula $\beta\equiv\sigma_{yield}/\sigma$
+\end_inset
+
+, 
+\begin_inset Formula $\sigma_{yield}$
+\end_inset
+
+ is the yield stress, 
+\begin_inset Formula $\sigma$
+\end_inset
+
+ is some measure of the current stress (e.g., the second invariant of the
+ stress tensor), and 
+\begin_inset Formula $\eta$
+\end_inset
+
+ is the isotropic viscosity.
+ Note that the healing rate should be between 0 and 1.
+\end_layout
+
+\begin_layout Description
+softeningStrain The strain at which the material has fully yielded.
+\end_layout
+
+\begin_layout Description
+initialDamageFraction The chance that an individual material particle will
+ have a non-zero initial strain.
+\end_layout
+
+\begin_layout Description
+initialDamageWaveNumber The wavenumber for the initial random strain.
+ To avoid having initial strain on the edges of the box, this should be
+ set to the inverse of the horizontal length of the box.
+\end_layout
+
+\begin_layout Description
+initialDamageFactor The maximum initial random strain for a particle is
+ 
+\family typewriter
+initialDamageFactor
+\family default
+*
+\family typewriter
+softeningStrain
+\family default
+.
+ 
+\end_layout
+
+\begin_layout Description
+randomSeed A random number seed used when computing which particles are
+ initially yielded.
+\end_layout
+
+\begin_layout Description
+initialStrainShape If defined, the initial random strain will only occur
+ within this shape (outside the shape the initial random strain will be
+ zero).
+\end_layout
+
+\begin_layout Standard
+We can also define a strain weakening ratio 
+\begin_inset Formula $\alpha\equiv\min\left(1,\gamma/\gamma_{softening}\right)$
+\end_inset
+
+, where 
+\begin_inset Formula $\gamma$
+\end_inset
+
+ is the accumulated strain, and 
+\begin_inset Formula $\gamma_{softening}$
+\end_inset
+
+ is the softening strain.
+ This allows us to define quantities like the effective cohesion 
+\begin_inset Formula $C_{effective}\equiv C_{pristine}\left(1-\alpha\right)+C_{yielded}\alpha$
+\end_inset
+
+ and effective friction coefficient 
+\begin_inset Formula $\phi_{effective}=\phi_{pristine}\left(1-\alpha\right)+\phi_{yielded}\alpha$
+\end_inset
+
+.
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Tabular
+<lyxtabular version="3" rows="10" columns="2">
+<features>
+<column alignment="center" valignment="top" leftline="true" width="0">
+<column alignment="center" valignment="top" leftline="true" rightline="true" width="0">
+<row topline="true" bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+Defaults
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+TimeIntegrator
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+none
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+MaterialPointsSwarm
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+none
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+healingRate
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+0
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+softeningStrain
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+\begin_inset Formula $\infty$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+initialDamageFraction
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+0
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+initialDamageWaveNumber
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+-1.0
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+initialDamageFactor
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+1.0
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+randomSeed
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+0
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true" bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+initialStrainShape
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+none
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+VonMises
+\end_layout
+
+\begin_layout Standard
+This is the simplest yielding rheology in Gale.
+ The yielding stress is simply the effective cohesion, so this rheology
+ only has a few input parameters.
+ 
+\family typewriter
+cohesion
+\family default
+ and 
+\family typewriter
+cohesionAfterSoftening
+\family default
+ have the obvious meanings.
+ 
+\family typewriter
+minimumYieldStress
+\family default
+ sets an absolute minimum to the stress required to make the material yield.
+\end_layout
+
+\begin_layout Standard
+
+\family typewriter
+StrainRateSoftening
+\family default
+ is a Boolean variable that changes how the constitutive matrix is modified
+ when the material has yielded.
+ If 
+\family typewriter
+StrainRateSoftening
+\family default
+ is 
+\family typewriter
+True
+\family default
+, then the viscosity is set to 
+\begin_inset Formula \[
+\eta_{effective}=2\sigma_{yield}^{2}\eta/\left(\sigma_{yield}^{2}+I_{2}^{2}\right),\]
+
+\end_inset
+
+ where 
+\begin_inset Formula $I_{2}$
+\end_inset
+
+ is the second invariant of the stress tensor.
+ Otherwise the viscosity is set to
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula \[
+\eta_{effective}=\eta\sigma_{yield}/I_{2},\]
+
+\end_inset
+
+ which essentially sets the stress of the particle to the yield stress.
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Tabular
+<lyxtabular version="3" rows="5" columns="2">
+<features>
+<column alignment="center" valignment="top" leftline="true" width="0">
+<column alignment="center" valignment="top" leftline="true" rightline="true" width="0">
+<row topline="true" bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+Defaults
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+cohesion
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+0
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+cohesionAfterSoftening
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+0
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+minimumYieldStress
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+0
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true" bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+StrainRateSoftening
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+False
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+DruckerPrager
+\end_layout
+
+\begin_layout Standard
+This rheology uses the same parameters as Von Mises, but also adds a friction
+ coefficient that can soften.
+ Specifically, the yield stress becomes
+\begin_inset Formula \[
+\sigma_{yield}=\alpha p+C_{p},\]
+
+\end_inset
+
+where 
+\begin_inset Formula \[
+\begin{array}{ccc}
+C_{p} & = & \frac{6C_{effective}\cos\phi_{effective}}{\sqrt{3}\left(3-\sin\phi_{effective}\right)}\\
+\alpha & = & \frac{6\sin\phi_{effective}}{\sqrt{3}\left(3-\sin\phi_{effective}\right)}\end{array},\]
+
+\end_inset
+
+and 
+\begin_inset Formula $p$
+\end_inset
+
+ is the pressure.
+ 
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Tabular
+<lyxtabular version="3" rows="3" columns="2">
+<features>
+<column alignment="center" valignment="top" leftline="true" width="0">
+<column alignment="center" valignment="top" leftline="true" rightline="true" width="0">
+<row topline="true" bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+Defaults
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+frictionCoefficient
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+0
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true" bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+frictionCoefficientAfterSoftening
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+0
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\newline
+
+\end_layout
+
+\begin_layout Standard
+(See also VonMises)
+\end_layout
+
+\begin_layout Subsubsection
+MohrCoulomb
+\end_layout
+
+\begin_layout Standard
+This rheology is like Drucker-Prager, but it uses the actual normal stress
+ instead of inferring a normal stress from the pressure.
+ More explicitly, the yield shear stress is 
+\begin_inset Formula \[
+\sigma_{yield}=\sigma_{n}\tan\phi_{effective}+C_{effective}.\]
+
+\end_inset
+
+ When the material is yielding, the viscosity is modified so that the stress
+ on the particle is the yield stress.
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Tabular
+<lyxtabular version="3" rows="6" columns="2">
+<features>
+<column alignment="center" valignment="top" leftline="true" width="0">
+<column alignment="center" valignment="top" leftline="true" rightline="true" width="0">
+<row topline="true" bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+Defaults
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+cohesion
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+0
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+cohesionAfterSoftening
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+0
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+frictionCoefficient
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+0
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+frictionCoefficientAfterSoftening
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+0
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true" bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+minimumYieldStress
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+0
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+FaultingMoresiMulhaus2006
+\end_layout
+
+\begin_layout Standard
+This is a fairly complicated non-isotropic rheology.
+ The full details can be found in Moresi and Mülhaus (2006), but essentially
+ it keeps track of which direction a material is strained.
+ To do so, it uses a component called 
+\family typewriter
+Director
+\family default
+.
+ For the standard components given in Section 
+\begin_inset LatexCommand \ref{sec:Basic-Components}
+
+\end_inset
+
+, this would be
+\end_layout
+
+\begin_layout LyX-Code
+<struct name="director">
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="Type">Director</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="TimeIntegrator">timeIntegrator</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="VelocityGradientsField">VelocityGradientsField</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="MaterialPointsSwarm">materialSwarm</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="initialDirectionX">0.0</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="initialDirectionY">1.0</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="initialDirectionZ">0.0</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="dontUpdate">True</param>
+\end_layout
+
+\begin_layout LyX-Code
+</struct>
+\end_layout
+
+\begin_layout Standard
+Otherwise, it adds one variable not present in 
+\family typewriter
+MohrCoulomb
+\family default
+: 
+\family typewriter
+ignoreOldOrientation
+\family default
+.
+ This tells Gale whether it should check to see whether material will weaken
+ further in the current direction, or it will try every direction equally
+ each time step.
+\newline
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Tabular
+<lyxtabular version="3" rows="7" columns="2">
+<features>
+<column alignment="center" valignment="top" leftline="true" width="0">
+<column alignment="center" valignment="top" leftline="true" rightline="true" width="0">
+<row topline="true" bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+Defaults
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+cohesion
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+0
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+cohesionAfterSoftening
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+0
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+frictionCoefficient
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+0
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+frictionCoefficientAfterSoftening
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+0
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+minimumYieldStress
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+0
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true" bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+ignoreOldOrientation
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+False
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+Boundary Conditions
+\end_layout
+
+\begin_layout Standard
+Gale's computational domain is logically Eulerian.
+ So in 2D, there are four boundaries: 
+\family typewriter
+right
+\family default
+, 
+\family typewriter
+left
+\family default
+, 
+\family typewriter
+top
+\family default
+, and 
+\family typewriter
+bottom
+\family default
+.
+ 3D adds 
+\family typewriter
+front
+\family default
+ and 
+\family typewriter
+back
+\family default
+.
+ Note that the boundaries in the 
+\begin_inset Formula $z$
+\end_inset
+
+ axis are 
+\family typewriter
+front
+\family default
+ and 
+\family typewriter
+back
+\family default
+, not 
+\family typewriter
+top
+\family default
+ and 
+\family typewriter
+bottom
+\family default
+.
+ In many cases, this makes it simple to switch between 2D and 3D.
+ When doing this, we may ignore the warning that the 
+\begin_inset Formula $z$
+\end_inset
+
+ boundaries are empty in 2D.
+\end_layout
+
+\begin_layout Subsection
+Velocity Boundary Conditions
+\begin_inset LatexCommand \label{sub:Velocity-Boundary-Conditions}
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+To impose boundary conditions on the velocity, we add a composite variable
+ condition (CompositeVC) to the input file.
+ Within that CompositeVC, add a list of conditions.
+ Within each condition, we specify which boundary and what the velocity's
+ value is.
+ For example, to set the 
+\begin_inset Formula $y$
+\end_inset
+
+ velocity on the bottom to zero, add
+\end_layout
+
+\begin_layout LyX-Code
+<struct name="velocityBCs">
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="type">CompositeVC</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <list name="vcList">
+\end_layout
+
+\begin_layout LyX-Code
+    <struct>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="type">WallVC</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="wall">bottom</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <list name="variables">
+\end_layout
+
+\begin_layout LyX-Code
+        <struct>
+\end_layout
+
+\begin_layout LyX-Code
+          <param name="name">vy</param>
+\end_layout
+
+\begin_layout LyX-Code
+          <param name="type">double</param>
+\end_layout
+
+\begin_layout LyX-Code
+          <param name="value">0</param>
+\end_layout
+
+\begin_layout LyX-Code
+        </struct>
+\end_layout
+
+\begin_layout LyX-Code
+      </list>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct> 
+\end_layout
+
+\begin_layout LyX-Code
+  </list>
+\end_layout
+
+\begin_layout LyX-Code
+</struct>
+\end_layout
+
+\begin_layout Standard
+If, instead, we set 
+\family typewriter
+vy
+\family default
+ to a non-zero value, then the boundary will move as the simulation proceeds.
+ If we want the sides to remain fixed, then we probably want flux boundaries,
+ in which case we will also have to specify a few more things (see Section
+ 
+\begin_inset LatexCommand \ref{sub:Flux-Boundary-Conditions}
+
+\end_inset
+
+).
+\end_layout
+
+\begin_layout Standard
+We can also set the velocity to a function.
+ For example, to also set the 
+\begin_inset Formula $x$
+\end_inset
+
+ velocity to have a Gaussian distribution 
+\begin_inset Formula $\exp\left(-\left(\frac{x-0.5}{0.1}\right)^{2}\right)$
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+<struct name="velocityBCs">
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="type">CompositeVC</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <list name="vcList">
+\end_layout
+
+\begin_layout LyX-Code
+    <struct>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="type">WallVC</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <param name="wall">bottom</param>
+\end_layout
+
+\begin_layout LyX-Code
+      <list name="variables">
+\end_layout
+
+\begin_layout LyX-Code
+        <struct>
+\end_layout
+
+\begin_layout LyX-Code
+          <param name="name">vy</param>
+\end_layout
+
+\begin_layout LyX-Code
+          <param name="type">double</param>
+\end_layout
+
+\begin_layout LyX-Code
+          <param name="value">0</param>
+\end_layout
+
+\begin_layout LyX-Code
+        </struct>
+\end_layout
+
+\begin_layout LyX-Code
+        <struct>
+\end_layout
+
+\begin_layout LyX-Code
+          <param name="name">vx</param>
+\end_layout
+
+\begin_layout LyX-Code
+          <param name="type">func</param>
+\end_layout
+
+\begin_layout LyX-Code
+          <param name="value">Gaussian</param>
+\end_layout
+
+\begin_layout LyX-Code
+        </struct>
+\end_layout
+
+\begin_layout LyX-Code
+      </list>
+\end_layout
+
+\begin_layout LyX-Code
+    </struct> 
+\end_layout
+
+\begin_layout LyX-Code
+  </list>
+\end_layout
+
+\begin_layout LyX-Code
+</struct>
+\end_layout
+
+\begin_layout LyX-Code
+<param name="GaussianHeight">1.0</param>
+\end_layout
+
+\begin_layout LyX-Code
+<param name="GaussianWidth">0.1</param>
+\end_layout
+
+\begin_layout LyX-Code
+<param name="GaussianCenter">0.5</param>
+\end_layout
+
+\begin_layout LyX-Code
+<param name="GaussianDim">0</param>
+\end_layout
+
+\begin_layout Standard
+Note that the parameters are separated out into the variables section (see
+ Section 
+\begin_inset LatexCommand \ref{sub:Variables}
+
+\end_inset
+
+).
+ In general, we can use any of the Standard Condition Functions (see Section
+ 
+\begin_inset LatexCommand \ref{sec:Standard-Condition-Functions}
+
+\end_inset
+
+) to specify the velocities.
+\end_layout
+
+\begin_layout Subsection
+Flux Boundary Conditions
+\begin_inset LatexCommand \label{sub:Flux-Boundary-Conditions}
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Sometimes, we may wish to have material flow across the boundary instead
+ of having the boundary move.
+ A simple example would be like Figure 
+\begin_inset LatexCommand \ref{fig:General-subduction-model}
+
+\end_inset
+
+, where material flows in from the left and out through the bottom.
+ There are three things that we must specify for this to work.
+\end_layout
+
+\begin_layout Enumerate
+
+\series bold
+The boundaries do not move.
+ 
+\series default
+For the slab subduction model, we need to ensure that neither the bottom
+ nor left boundaries move.
+ We do this by specifying
+\end_layout
+
+\begin_deeper
+\begin_layout LyX-Code
+
+\family typewriter
+<param name="staticBottom">True</param>
+\newline
+<param name="staticLeft">True</param>
+\end_layout
+
+\begin_layout Standard
+in EulerDeform (see Section 
+\begin_inset LatexCommand \ref{sub:EulerDeform}
+
+\end_inset
+
+).
+\end_layout
+
+\end_deeper
+\begin_layout Enumerate
+
+\series bold
+Velocity conditions on the boundaries.
+
+\series default
+ Again, for slab subduction this involves inflow conditions on the left
+ boundary and outflow conditions on bottom.
+ See Section 
+\begin_inset LatexCommand \ref{sub:Velocity-Boundary-Conditions}
+
+\end_inset
+
+ for details.
+ The other boundaries have no-slip conditions.
+\end_layout
+
+\begin_layout Enumerate
+
+\series bold
+A region where new particles are created, not split from existing particles.
+
+\series default
+ When Gale advects material near an inflowing boundary, this leaves a vacuum.
+ Normally, Gale creates new particles by cloning nearby particles.
+ However, if the cloned particles have already undergone evolution (e.g.,
+ they were strained), then the new particles would no longer be pristine.
+ To fix this, we can specify regions where particles should be created anew
+ by adding something like
+\end_layout
+
+\begin_deeper
+\begin_layout LyX-Code
+
+\family typewriter
+<param name="originalParticleShape">leftBoundaryShape</param>
+\end_layout
+
+\begin_layout Standard
+to the 
+\family typewriter
+ReseedSplitting
+\family default
+ struct.
+ An example of this is in the sample input file 
+\family typewriter
+subduction.xml
+\family default
+.
+\end_layout
+
+\end_deeper
+\begin_layout Subsection
+Stress Boundary Conditions
+\end_layout
+
+\begin_layout Standard
+If the nature of our problem is that stresses are specified on the boundary
+ rather than velocities, we can specify those conditions using the 
+\family typewriter
+StressBC
+\family default
+ component.
+ For example, if we want to simulate an extension model that allows material
+ to well up in the middle, then we would specify a constant stress on the
+ bottom.
+\end_layout
+
+\begin_layout Standard
+StressBC is a component, so it must be inside the list of components (see
+ Section 
+\begin_inset LatexCommand \ref{sub:Components}
+
+\end_inset
+
+), not outside the list like the velocity boundary conditions.
+ For example, to specify the stress on the bottom boundary in the 
+\begin_inset Formula $y$
+\end_inset
+
+ direction as a constant, add
+\end_layout
+
+\begin_layout LyX-Code
+<struct name="stressBC">
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="Type">StressBC</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="ForceVector">mom_force</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="Swarm">picIntegrationPoints</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="wall">bottom</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="y_type">double</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="y_value">1.0</param>
+\end_layout
+
+\begin_layout LyX-Code
+</struct>
+\end_layout
+
+\begin_layout Standard
+We can also use the Standard Condition Functions (see Section 
+\begin_inset LatexCommand \ref{sec:Standard-Condition-Functions}
+
+\end_inset
+
+), but due to technical issues, we must list Standard Condition Functions
+ before StressBC in the list of components.
+ So, for example, to add a stress condition to the left wall with a Gaussian
+ shape, the complete list of components would be
+\end_layout
+
+\begin_layout LyX-Code
+<struct name="conditionFunctions">
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="Type">StgFEM_StandardConditionFunctions</param>
+\end_layout
+
+\begin_layout LyX-Code
+</struct>
+\end_layout
+
+\begin_layout LyX-Code
+<struct name="stressBCBottom">
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="Type">StressBC</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="ForceVector">mom_force</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="Swarm">picIntegrationPoints</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="wall">bottom</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="y_type">double</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="y_value">1.0</param>
+\end_layout
+
+\begin_layout LyX-Code
+</struct>
+\end_layout
+
+\begin_layout LyX-Code
+<struct name="stressBCLeft">
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="Type">StressBC</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="ForceVector">mom_force</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="Swarm">picIntegrationPoints</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="wall">left</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="x_type">func</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="x_value">Gaussian</param>
+\end_layout
+
+\begin_layout LyX-Code
+</struct>
+\end_layout
+
+\begin_layout Standard
+And then in the list of variables (see Section 
+\begin_inset LatexCommand \ref{sub:Variables}
+
+\end_inset
+
+) we add the parameters for the Gaussian:
+\end_layout
+
+\begin_layout LyX-Code
+<param name="GaussianHeight">1.0</param>
+\end_layout
+
+\begin_layout LyX-Code
+<param name="GaussianWidth">0.1</param>
+\end_layout
+
+\begin_layout LyX-Code
+<param name="GaussianCenter">0.5</param>
+\end_layout
+
+\begin_layout LyX-Code
+<param name="GaussianDim">0</param>
+\end_layout
+
+\begin_layout Section
+Deformed Upper Boundary
+\end_layout
+
+\begin_layout Standard
+Normally, Gale starts the simulation in a rectangular box.
+ As the simulation proceeds, the boundaries can become distorted, in particular
+ the upper boundary.
+ However, we can also tell Gale to start with an initially deformed upper
+ boundary by adding a 
+\family typewriter
+SurfaceAdaptor
+\family default
+ component.
+ A simple example is to make the surface a sinusoid
+\end_layout
+
+\begin_layout LyX-Code
+<struct name="surfaceAdaptor">
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="Type">SurfaceAdaptor</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="mesh">mesh-linear</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="sourceGenerator">cartesianGenerator</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="surfaceType">cosine</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <list name="origin">
+\end_layout
+
+\begin_layout LyX-Code
+    <param>0.0</param>
+\end_layout
+
+\begin_layout LyX-Code
+  </list>
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="amplitude">0.1</param>
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="frequency">6.28318530718</param>
+\end_layout
+
+\begin_layout LyX-Code
+</struct>
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout Standard
+This sets the height of the surface to
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula \[
+h=h_{0}+amplitude*\cos\left(x*frequency\right),\]
+
+\end_inset
+
+ where 
+\begin_inset Formula $h_{0}$
+\end_inset
+
+ is the original height.
+\end_layout
+
+\begin_layout Standard
+The other supported functions are 
+\family typewriter
+sine
+\family default
+ and 
+\family typewriter
+wedge
+\family default
+.
+ 
+\family typewriter
+sine
+\family default
+ takes the same arguments as the 
+\family typewriter
+cosine
+\family default
+ example above.
+ 
+\family typewriter
+wedge
+\family default
+ takes two arguments, 
+\family typewriter
+offset
+\family default
+ and 
+\family typewriter
+gradient
+\family default
+, and sets the height to
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula \[
+h=\left\{ \begin{array}{cc}
+h_{0} & x<offset\\
+h_{0}+gradient\left(x-offset\right) & x>offset\end{array}\right..\]
+
+\end_inset
+
+ If you want to implement your own surface functions, look in
+\end_layout
+
+\begin_layout LyX-Code
+
+\family typewriter
+src/StGermain/Discretisation/Mesh/src/SurfaceAdaptor.c
+\end_layout
+
+\begin_layout Section
+Surface Processes
+\begin_inset LatexCommand \label{sec:Surface-Processes}
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Gale has a simple facility for modifying the upper surface during the simulation.
+ The intent is to allow researchers to insert their own (complicated) surface
+ process routines.
+ To enable surface processes, we just add the component
+\end_layout
+
+\begin_layout LyX-Code
+<struct name="SurfaceProcess">
+\end_layout
+
+\begin_layout LyX-Code
+  <param name="mesh">mesh-linear</param>
+\end_layout
+
+\begin_layout LyX-Code
+</struct>
+\end_layout
+
+\begin_layout Standard
+There is an example in 
+\family typewriter
+surface_process.xml
+\family default
+.
+ It currently implements simple diffusion.
+ To insert your own routine, see the file 
+\end_layout
+
+\begin_layout LyX-Code
+src/Gale/plugins/SurfaceProcess/SurfaceProcess.c
+\end_layout
+
+\begin_layout Standard
+In particular, replace the code bracketed by
+\end_layout
+
+\begin_layout LyX-Code
+** SURFACE PROCESS CODE GOES HERE, SHOULD MODIFY THE HEIGHTS ONLY.
+\end_layout
+
+\begin_layout LyX-Code
+...
+\end_layout
+
+\begin_layout LyX-Code
+** END SURFACE PROCESS CODE.
+\end_layout
+
+\begin_layout Standard
+with your own code.
+\end_layout
+
+\begin_layout Section
+Standard Condition Functions
+\begin_inset LatexCommand \label{sec:Standard-Condition-Functions}
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Standard Condition Functions are simply functions that we can use to specify
+ initial conditions and boundary conditions.
+ At present, they take in a coordinate 
+\begin_inset Formula $(x,y,z)$
+\end_inset
+
+ and output a function 
+\begin_inset Formula $f(x,y,z)$
+\end_inset
+
+.
+ They are all defined in the directory 
+\family typewriter
+src/StgFEM/plugins/StandardConditionFunctions/
+\family default
+.
+ For the following descriptions, the sides of the box are at 
+\begin_inset Formula $x_{min}$
+\end_inset
+
+ and 
+\begin_inset Formula $x_{max}$
+\end_inset
+
+, and 
+\begin_inset Formula $L\equiv x_{max}-x_{min}$
+\end_inset
+
+, and all names with CamelCase capitalization are variables from the input
+ file.
+\end_layout
+
+\begin_layout Description
+SolidBodyRotation Returns the coordinates rotated by 
+\family typewriter
+SolidBodyRotationOmega
+\family default
+ around the z axis, centered at the coordinate (
+\family typewriter
+SolidBodyRotationCentreX
+\family default
+, 
+\family typewriter
+SolidBodyRotationY
+\family default
+, ).
+ Specifically,
+\begin_inset Formula \[
+\begin{array}{ccc}
+f(x,y,z)_{x} & = & -SolidBodyRotationOmega(y-SolidBodyRotationCentreY)\\
+f(x,y,z)_{y} & = & SolidBodyRotationOmega(X-SolidBodyRotationCentreX)\end{array}\]
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Description
+PartialRotationX Returns the x component of SolidBodyRotation.
+\end_layout
+
+\begin_layout Description
+PartialRotationY Returns the y component of SolidBodyRotation.
+\end_layout
+
+\begin_layout Description
+SimpleShear 
+\begin_inset Formula $f(x,y,z)=SimpleShearFactor\left(y-SimpleShearCentreY\right)$
+\end_inset
+
+
+\end_layout
+
+\begin_layout Description
+Extension 
+\begin_inset Formula $f(x,y,z)=ExtensionFactor\left(x-ExtensionCentreY\right)$
+\end_inset
+
+
+\end_layout
+
+\begin_layout Description
+PartialLid_TopLayer Returns 0 if the x coordinate is within one grid point
+ of the boundary; 1 otherwise.
+\end_layout
+
+\begin_layout Description
+LinearInterpolationLid 
+\begin_inset Formula $f(x,y,z)=bcLeftHandSideValue+\left(\frac{bcRightHandSideValue-bcLeftHandSideValue}{L}\right)x$
+\end_inset
+
+
+\end_layout
+
+\begin_layout Description
+Lid_RampWithCentralMax 
+\begin_inset Formula $f(x,y,z)=\left\{ \begin{array}{cc}
+2\left(x-x_{min}\right)/L & x<L/2+x_{min}\\
+1-2(x-x_{min}-L/2) & x>L/2+x_{min}\end{array}\right.$
+\end_inset
+
+
+\end_layout
+
+\begin_layout Description
+SinusoidalLid 
+\begin_inset Formula \[
+f(x,y,z)=\sin\left(\frac{\pi\left(x-x_{min}\right)}{L}sinusoidalLidWavenumber\right)\]
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Description
+CornerOnly Return 1 if the coordinate is on the right boundary.
+\end_layout
+
+\begin_layout Description
+TemperatureCosineHill Returns a hill defined by a cosine.
+ Specifically, if we define pre-rotated coordinates
+\begin_inset Formula \[
+\begin{array}{ccc}
+x_{pre-rotate} & = & CosineHillCentreX-SolidBodyRotationCentreX\\
+y_{pre-rotate} & = & CosineHillCentreY-SolidBodyRotationCentreY\\
+z_{pre-rotate} & = & CosineHillCentreZ-SolidBodyRotationCentreZ\end{array},\]
+
+\end_inset
+
+ and then rotate them around the z axis by the angle 
+\begin_inset Formula $\theta=SolidBodyRotationOmega*t$
+\end_inset
+
+
+\begin_inset Formula \[
+\begin{array}{ccc}
+x_{hill} & = & x_{pre-rotate}\cos\theta-y_{pre-rotate}\sin\theta\\
+y_{hill} & = & x_{pre-rotate}\sin\theta+y_{pre-rotate}\cos\theta\\
+z_{hill} & = & z_{pre-rotate}\end{array},\]
+
+\end_inset
+
+ then
+\begin_inset Formula \[
+f(x,y,z)=\left\{ \begin{array}{cc}
+\frac{CosineHillHeight}{4}\cos\left(\frac{2\pi r}{CosineHillDiameter}\right) & r<CosineHillDiameter\\
+0 & r>CosineHillDiameter\end{array}\right.,\]
+
+\end_inset
+
+ where 
+\begin_inset Formula $r$
+\end_inset
+
+ is the distance from the center of the hill
+\begin_inset Formula \[
+r\equiv\sqrt{\left(x-x_{hill}\right)^{2}+\left(y-y_{hill}\right)^{2}+\left(z-z_{hill}\right)^{2}}.\]
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Description
+LinearWithSinusoidalPerturbation If we scale the 
+\begin_inset Formula $y$
+\end_inset
+
+ coordinate
+\begin_inset Formula \[
+y_{scaled}=\left(y-y_{min}\right)/\left(y_{max}-y_{min}\right),\]
+
+\end_inset
+
+ then this returns 
+\begin_inset Formula \[
+\begin{array}{ccc}
+f(x,y,z) & = & SinusoidalTempIC\_TopLayerBC\\
+ &  & +\left(SinusoidalTempIC\_TopLayerBC-SinusoidalTempIC\_TopLayerBC\right)\left(1-y_{scaled}\right)\\
+ &  & +SinusoidalTempIC\_PerturbationAmplitude\\
+ &  & *\left(\cos\left(\pi x*SinusoidalTempIC\_HorizontalWaveNumber\right)\right.\\
+ &  & +\left.sin\left(\pi ySinusoidalTempIC\_VerticalWaveNumber\right)\right)\end{array}.\]
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Description
+Trigonometry 
+\begin_inset Formula \[
+f(x,y,z)=1-\frac{\pi y}{2}\sin\left(\frac{\pi x}{x_{max}-x_{min}}\right).\]
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Description
+VelicTemperatureIC 
+\begin_inset Formula \[
+f(x,y,z)=sigma*\cos\left(\pi wavenumberX\left(\frac{x-x_{min}}{x_{max}-x_{min}}\right)\right)\sin\left(\pi\left(y-y_{min}\right)wavenumberY\right),\]
+
+\end_inset
+
+where the height of the box is constrained to 
+\begin_inset Formula $y_{max}-y_{min}=1$
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Description
+VelicTemperatureIC_SolB 
+\begin_inset Formula \[
+f(x,y,z)=sigma*\cos\left(\pi wavenumberX\left(\frac{x-x_{min}}{x_{max}-x_{min}}\right)\right)\sinh\left(\pi wavenumberY\left(\frac{y-y_{min}}{x-x_{min}}\right)\right),\]
+
+\end_inset
+
+where the height of the box is constrained to 
+\begin_inset Formula $y_{max}-y_{min}=1$
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Description
+AnalyticalTemperatureIC First, we define 
+\begin_inset Formula \[
+\begin{array}{ccc}
+x_{0} & \equiv & x-x_{min}\\
+y_{0} & \equiv & y-y_{min}\\
+L & \equiv & x_{max}-x_{min}\\
+H & \equiv & y_{max}-y_{min}\\
+\lambda & \equiv & L/H\end{array},\]
+
+\end_inset
+
+and then compute some intermediate quantities
+\begin_inset Formula \[
+\begin{array}{ccc}
+u_{0} & = & \frac{\lambda^{7/3}}{\left(1+\lambda^{4}\right)^{2/3}}\left(\frac{Ra}{2\sqrt{pi}}\right)^{2/3}\\
+v_{0} & = & u_{0}/\lambda\\
+Q & = & 2\sqrt{\lambda/\left(\pi u_{0}\right)}\\
+T_{u} & = & \frac{1}{2}erf(\left(\frac{1}{2}\left(1-y_{0}\right)\sqrt{u_{0}/x_{0}}\right)\\
+T_{l} & = & 1-\frac{1}{2}erf\left(\frac{1}{2}y_{0}\sqrt{u_{0}/\left(\lambda-x_{0}\right)}\right)\\
+T_{r} & = & \frac{1}{2}+\frac{1}{2}\left(Q/\sqrt{\pi}\right)\sqrt{v_{0}/\left(y_{0}+1\right)}\exp\left(-x_{0}^{2}v_{0}/\left(4y_{0}+4\right)\right)\\
+T_{s} & = & \frac{1}{2}-\frac{1}{2}\left(Q/\sqrt{\pi}\right)\sqrt{v_{0}/\left(2-y_{0}\right)}\exp\left(-\left(\lambda-x_{0}\right)^{2}v_{0}/\left(8-4y_{0}\right)\right)\\
+g & = & T_{u}+T_{l}+T_{r}+T_{s}-1.5\end{array}.\]
+
+\end_inset
+
+ The result then is 
+\begin_inset Formula \[
+f(x,y,z)=\left\{ \begin{array}{cc}
+0 & g<0\\
+g & 0<g<1\\
+1 & g>1\end{array}\right..\]
+
+\end_inset
+
+Note that this requires the error function 
+\begin_inset Formula $erf$
+\end_inset
+
+ which is not available on all platforms.
+ 
+\end_layout
+
+\begin_layout Description
+SinusoidalExtension 
+\begin_inset Formula \[
+\begin{array}{ccc}
+f(x,y,z) & = & SinusoidalExtensionVelocity+SinusoidalExtensionAmplitude\\
+ &  & *\cos\left(2\pi SinusoidalExtensionFrequency\left(t+dt-SinusoidalExtensionPhaseShift\right)\right)\end{array}\]
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Description
+StepFunction This function returns a ramp function in the axis prescribed
+ by the integer 
+\begin_inset Formula $StepFunctionDim$
+\end_inset
+
+, where 
+\begin_inset Formula $0\Rightarrow x$
+\end_inset
+
+, 
+\begin_inset Formula $1\Rightarrow y$
+\end_inset
+
+, 
+\begin_inset Formula $2\Rightarrow z$
+\end_inset
+
+.
+ Defining some convenient constants 
+\begin_inset Formula \[
+\begin{array}{ccc}
+w & = & coord[dim]\\
+w_{-} & = & StepFunctionLowerOffset\\
+w_{+} & = & StepFunctionUpperOffset\\
+V & = & StepFunctionValue\end{array},\]
+
+\end_inset
+
+then if 
+\begin_inset Formula $StepFunctionLessThan$
+\end_inset
+
+ is 
+\family typewriter
+True
+\family default
+, then 
+\begin_inset Formula \[
+f(x,y,z)=\left\{ \begin{array}{cc}
+0 & w<w_{-}\\
+V\left(\frac{w-w_{-}}{w_{+}-w_{-}}\right) & w_{-}<w<w_{+}\\
+V & w_{+}<w\end{array}\right.,\]
+
+\end_inset
+
+ otherwise it is reversed
+\begin_inset Formula \[
+f(x,y,z)=\left\{ \begin{array}{cc}
+V & w<w_{-}\\
+V\left(\frac{w_{+}-w}{w_{+}-w_{-}}\right) & w_{-}<w<w_{+}\\
+0 & w_{+}<w\end{array}\right.,\]
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Description
+StepFunctionProduct1 Using a similar scheme as StepFunction to specify the
+ dimension with 
+\newline
+
+\begin_inset Formula $StepFunctionProduct1Dim$
+\end_inset
+
+, 
+\begin_inset Formula \[
+f(x,y,z)=\left\{ \begin{array}{cc}
+0 & w<StepFunctionProduct1Start\\
+StepFunctionProduct1Value & StepFunctionProduct1Start<w<StepFunctionProduct1End\\
+0 & w>StepFunctionProduct1End\end{array}\right.\]
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Description
+StepFunctionProduct2 
+\end_layout
+
+\begin_layout Description
+StepFunctionProduct3
+\end_layout
+
+\begin_layout Description
+StepFunctionProduct4 These are the same as StepFunctionProduct1 except that
+ they use different variables (e.g., 
+\begin_inset Formula $StepFunctionProduct2Dim$
+\end_inset
+
+ instead of 
+\begin_inset Formula $StepFunctionProduct1Dim$
+\end_inset
+
+).
+\end_layout
+
+\begin_layout Description
+Gaussian 
+\begin_inset Formula \[
+f(x,y,z)=\left(GaussianHeight\right)\exp\left[-\left(\frac{GaussianCenter-coord[dim]}{GaussianWidth}\right)^{2}\right]\]
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+Parallel Options
+\end_layout
+
+\begin_layout Chapter
+Output File Format
+\end_layout
+
+\begin_layout Chapter
+Benchmarks
+\end_layout
+
+\begin_layout Standard
+CIG has worked with Susanne Buiter at NGU to improve the benchmark specification
+s (image available) including visco-elasto-plastic inclusion experiments.
+ 
+\end_layout
+
+\begin_layout Subsection
+Relaxation of Topography
+\end_layout
+
+\begin_layout Subsection
+Traditional Subduction Model
+\end_layout
+
+\begin_layout Subsection
+Free Slip Base
+\end_layout
+
+\begin_layout Subsection
+Circular Inclusion
+\end_layout
+
+\begin_layout Subsection
+Compressional Wedge
+\end_layout
+
+\begin_layout Subsection
+Inward Translation of a Retaining Wall
+\end_layout
+
+\begin_layout Subsection
+0D and 1D Shear Tests
+\end_layout
+
+\begin_layout Chapter
+License 
+\end_layout
+
+\begin_layout Standard
+
+\series bold
+GNU GENERAL PUBLIC LICENSE Version 2, June 1991.
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+\series default
+ 
+\newline
+
+\series medium
+Everyone is permitted to copy and distribute verbatim copies of this license
+ document, but changing it is not allowed.
+\end_layout
+
+\begin_layout Section*
+Preamble
+\end_layout
+
+\begin_layout Standard
+The licenses for most software are designed to take away your freedom to
+ share and change it.
+ By contrast, the GNU General Public License is intended to guarantee your
+ freedom to share and change free software -- to make sure the software
+ is free for all its users.
+ This General Public License applies to most of the Free Software Foundation's
+ software and to any other program whose authors commit to using it.
+ (Some other Free Software Foundation software is covered by the GNU Library
+ General Public License instead.) You can apply it to your programs, too.
+\end_layout
+
+\begin_layout Standard
+When we speak of free software, we are referring to freedom, not price.
+ Our General Public Licenses are designed to make sure that you have the
+ freedom to distribute copies of free software (and charge for this service
+ if you wish), that you receive source code or can get it if you want it,
+ that you can change the software or use pieces of it in new free programs;
+ and that you know you can do these things.
+\end_layout
+
+\begin_layout Standard
+To protect your rights, we need to make restrictions that forbid anyone
+ to deny you these rights or to ask you to surrender the rights.
+ These restrictions translate to certain responsibilities for you if you
+ distribute copies of the software, or if you modify it.
+\end_layout
+
+\begin_layout Standard
+For example, if you distribute copies of such a program, whether gratis
+ or for a fee, you must give the recipients all the rights that you have.
+ You must make sure that they, too, receive or can get the source code.
+ And you must show them these terms so they know their rights.
+\end_layout
+
+\begin_layout Standard
+We protect your rights with two steps:
+\end_layout
+
+\begin_layout Enumerate
+Copyright the software, and 
+\end_layout
+
+\begin_layout Enumerate
+Offer you this license which gives you legal permission to copy, distribute
+ and/or modify the software.
+\end_layout
+
+\begin_layout Standard
+Also, for each author's protection and ours, we want to make certain that
+ everyone understands that there is no warranty for this free software.
+ If the software is modified by someone else and passed on, we want its
+ recipients to know that what they have is not the original, so that any
+ problems introduced by others will not reflect on the original authors'
+ reputations.
+\end_layout
+
+\begin_layout Standard
+Finally, any free program is threatened constantly by software patents.
+ We wish to avoid the danger that redistributors of a free program will
+ individually obtain patent licenses, in effect making the program proprietary.
+ To prevent this, we have made it clear that any patent must be licensed
+ for everyone's free use or not licensed at all.
+ 
+\end_layout
+
+\begin_layout Standard
+The precise terms and conditions for copying, distribution and modification
+ follow.
+\end_layout
+
+\begin_layout Section*
+GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION
+ AND MODIFICATION 
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status collapsed
+
+\begin_layout Standard
+
+
+\backslash
+begin{itemize}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status collapsed
+
+\begin_layout Standard
+
+
+\backslash
+item[0.]
+\end_layout
+
+\end_inset
+
+This License applies to any program or other work which contains a notice
+ placed by the copyright holder saying it may be distributed under the terms
+ of this General Public License.
+ The "Program" below refers to any such program or work, and a "work based
+ on the Program" means either the Program or any derivative work under copyright
+ law: that is to say, a work containing the Program or a portion of it,
+ either verbatim or with modifications and/or translated into another language.
+ (Hereinafter, translation is included without limitation in the term "modificat
+ion.") Each licensee is addressed as "you."
+\newline
+
+\newline
+Activities other than copying,
+ distribution and modification are not covered by this License; they are
+ outside its scope.
+ The act of running the Program is not restricted, and the output from the
+ Program is covered only if its contents constitute a work based on the
+ Program (independent of having been made by running the Program).
+ Whether that is true depends on what the Program does.
+ 
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status collapsed
+
+\begin_layout Standard
+
+
+\backslash
+end{itemize}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Enumerate
+You may copy and distribute verbatim copies of the Program's source code
+ as you receive it, in any medium, provided that you conspicuously and appropria
+tely publish on each copy an appropriate copyright notice and disclaimer
+ of warranty; keep intact all the notices that refer to this License and
+ to the absence of any warranty; and give any other recipients of the Program
+ a copy of this License along with the Program.
+ 
+\end_layout
+
+\begin_deeper
+\begin_layout Standard
+You may charge a fee for the physical act of transferring a copy, and you
+ may at your option offer warranty protection in exchange for a fee.
+ 
+\end_layout
+
+\end_deeper
+\begin_layout Enumerate
+You may modify your copy or copies of the Program or any portion of it,
+ thus forming a work based on the Program, and copy and distribute such
+ modifications or work under the terms of Section 1 above, provided that
+ you also meet all of these conditions: 
+\end_layout
+
+\begin_deeper
+\begin_layout Enumerate
+You must cause the modified files to carry prominent notices stating that
+ you changed the files and the date of any change.
+ 
+\end_layout
+
+\begin_layout Enumerate
+You must cause any work that you distribute or publish, that in whole or
+ in part contains or is derived from the Program or any part thereof, to
+ be licensed as a whole at no charge to all third parties under the terms
+ of this License.
+ 
+\end_layout
+
+\begin_layout Enumerate
+If the modified program normally reads commands interactively when run,
+ you must cause it, when started running for such interactive use in the
+ most ordinary way, to print or display an announcement including an appropriate
+ copyright notice and a notice that there is no warranty (or else, saying
+ that you provide a warranty) and that users may redistribute the program
+ under these conditions, and telling the user how to view a copy of this
+ License.
+ (Exception: if the Program itself is interactive but does not normally
+ print such an announcement, your work based on the Program is not required
+ to print an announcement.) 
+\end_layout
+
+\begin_layout Standard
+These requirements apply to the modified work as a whole.
+ If identifiable sections of that work are not derived from the Program,
+ and can be reasonably considered independent and separate works in themselves,
+ then this License, and its terms, do not apply to those sections when you
+ distribute them as separate works.
+ But when you distribute the same sections as part of a whole which is a
+ work based on the Program, the distribution of the whole must be on the
+ terms of this License, whose permissions for other licensees extend to
+ the entire whole, and thus to each and every part regardless of who wrote
+ it.
+ 
+\end_layout
+
+\begin_layout Standard
+Thus, it is not the intent of this section to claim rights or contest your
+ rights to work written entirely by you; rather, the intent is to exercise
+ the right to control the distribution of derivative or collective works
+ based on the Program.
+ 
+\end_layout
+
+\begin_layout Standard
+In addition, mere aggregation of another work not based on the Program with
+ the Program (or with a work based on the Program) on a volume of a storage
+ or distribution medium does not bring the other work under the scope of
+ this License.
+ 
+\end_layout
+
+\end_deeper
+\begin_layout Enumerate
+You may copy and distribute the Program (or a work based on it, under Section
+ 2) in object code or executable form under the terms of Sections 1 and
+ 2 above provided that you also do one of the following: 
+\end_layout
+
+\begin_deeper
+\begin_layout Enumerate
+Accompany it with the complete corresponding machine-readable source code,
+ which must be distributed under the terms of Sections 1 and 2 above on
+ a medium customarily used for software interchange; or, 
+\end_layout
+
+\begin_layout Enumerate
+Accompany it with a written offer, valid for at least three years, to give
+ any third party, for a charge no more than your cost of physically performing
+ source distribution, a complete machine-readable copy of the corresponding
+ source code, to be distributed under the terms of Sections 1 and 2 above
+ on a medium customarily used for software interchange; or, 
+\end_layout
+
+\begin_layout Enumerate
+Accompany it with the information you received as to the offer to distribute
+ corresponding source code.
+ (This alternative is allowed only for noncommercial distribution and only
+ if you received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.) 
+\end_layout
+
+\begin_layout Standard
+The source code for a work means the preferred form of the work for making
+ modifications to it.
+ For an executable work, complete source code means all the source code
+ for all modules it contains, plus any associated interface definition files,
+ plus the scripts used to control compilation and installation of the executable.
+ However, as a special exception, the source code distributed need not include
+ anything that is normally distributed (in either source or binary form)
+ with the major components (compiler, kernel, and so on) of the operating
+ system on which the executable runs, unless that component itself accompanies
+ the executable.
+\end_layout
+
+\begin_layout Standard
+If distribution of executable or object code is made by offering access
+ to copy from a designated place, then offering equivalent access to copy
+ the source code from the same place counts as distribution of the source
+ code, even though third parties are not compelled to copy the source along
+ with the object code.
+ 
+\end_layout
+
+\end_deeper
+\begin_layout Enumerate
+You may not copy, modify, sublicense, or distribute the Program except as
+ expressly provided under this License.
+ Any attempt otherwise to copy, modify, sublicense or distribute the Program
+ is void, and will automatically terminate your rights under this License.
+ However, parties who have received copies, or rights, from you under this
+ License will not have their licenses terminated so long as such parties
+ remain in full compliance.
+ 
+\end_layout
+
+\begin_layout Enumerate
+You are not required to accept this License, since you have not signed it.
+ However, nothing else grants you permission to modify or distribute the
+ Program or its derivative works.
+ These actions are prohibited by law if you do not accept this License.
+ Therefore, by modifying or distributing the Program (or any work based
+ on the Program), you indicate your acceptance of this License to do so,
+ and all its terms and conditions for copying, distributing or modifying
+ the Program or works based on it.
+ 
+\end_layout
+
+\begin_layout Enumerate
+Each time you redistribute the Program (or any work based on the Program),
+ the recipient automatically receives a license from the original licensor
+ to copy, distribute or modify the Program subject to these terms and conditions.
+ You may not impose any further restrictions on the recipients' exercise
+ of the rights granted herein.
+ You are not responsible for enforcing compliance by third parties to this
+ License.
+ 
+\end_layout
+
+\begin_layout Enumerate
+If, as a consequence of a court judgment or allegation of patent infringement
+ or for any other reason (not limited to patent issues), conditions are
+ imposed on you (whether by court order, agreement or otherwise) that contradict
+ the conditions of this License, they do not excuse you from the conditions
+ of this License.
+ If you cannot distribute so as to satisfy simultaneously your obligations
+ under this License and any other pertinent obligations, then as a consequence
+ you may not distribute the Program at all.
+ For example, if a patent license would not permit royalty-free redistribution
+ of the Program by all those who receive copies directly or indirectly through
+ you, then the only way you could satisfy both it and this License would
+ be to refrain entirely from distribution of the Program.
+\end_layout
+
+\begin_deeper
+\begin_layout Standard
+If any portion of this section is held invalid or unenforceable under any
+ particular circumstance, the balance of the section is intended to apply
+ and the section as a whole is intended to apply in other circumstances.
+\end_layout
+
+\begin_layout Standard
+It is not the purpose of this section to induce you to infringe any patents
+ or other property right claims or to contest validity of any such claims;
+ this section has the sole purpose of protecting the integrity of the free
+ software distribution system, which is implemented by public license practices.
+ Many people have made generous contributions to the wide range of software
+ distributed through that system in reliance on consistent application of
+ that system; it is up to the author/donor to decide if he or she is willing
+ to distribute software through any other system and a licensee cannot impose
+ that choice.
+ 
+\end_layout
+
+\begin_layout Standard
+This section is intended to make thoroughly clear what is believed to be
+ a consequence of the rest of this License.
+ 
+\end_layout
+
+\end_deeper
+\begin_layout Enumerate
+If the distribution and/or use of the Program is restricted in certain countries
+ either by patents or by copyrighted interfaces, the original copyright
+ holder who places the Program under this License may add an explicit geographic
+al distribution limitation excluding those countries, so that distribution
+ is permitted only in or among countries not thus excluded.
+ In such case, this License incorporates the limitation as if written in
+ the body of this License.
+ 
+\end_layout
+
+\begin_layout Enumerate
+The Free Software Foundation may publish revised and/or new versions of
+ the General Public License from time to time.
+ Such new versions will be similar in spirit to the present version, but
+ may differ in detail to address new problems or concerns.
+ 
+\end_layout
+
+\begin_deeper
+\begin_layout Standard
+Each version is given a distinguishing version number.
+ If the Program specifies a version number of this License which applies
+ to it and "any later version," you have the option of following the terms
+ and conditions either of that version or of any later version published
+ by the Free Software Foundation.
+ If the Program does not specify a version number of this License, you may
+ choose any version ever published by the Free Software Foundation.
+\end_layout
+
+\end_deeper
+\begin_layout Enumerate
+If you wish to incorporate parts of the Program into other free programs
+ whose distribution conditions are different, write to the author to ask
+ for permission.
+ For software which is copyrighted by the Free Software Foundation, write
+ to the Free Software Foundation; we sometimes make exceptions for this.
+ Our decision will be guided by the two goals of preserving the free status
+ of all derivatives of our free software and of promoting the sharing and
+ reuse of software generally.
+ 
+\end_layout
+
+\begin_layout Subsection*
+NO WARRANTY 
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status collapsed
+
+\begin_layout Standard
+
+
+\backslash
+begin{itemize}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status collapsed
+
+\begin_layout Standard
+
+
+\backslash
+item[11.]
+\end_layout
+
+\end_inset
+
+BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR
+ THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+ EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER
+ PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
+ EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH
+ YOU.
+ SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY
+ SERVICING, REPAIR OR CORRECTION.
+ 
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status collapsed
+
+\begin_layout Standard
+
+
+\backslash
+item[12.]
+\end_layout
+
+\end_inset
+
+IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL
+ ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE
+ THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING
+ ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF
+ THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS
+ OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR
+ THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+ EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY
+ OF SUCH DAMAGES.
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status collapsed
+
+\begin_layout Standard
+
+
+\backslash
+end{itemize}
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section*
+END OF TERMS AND CONDITIONS 
+\end_layout
+
+\begin_layout Subsection*
+How to Apply These Terms to Your New Programs
+\end_layout
+
+\begin_layout Standard
+If you develop a new program, and you want it to be of the greatest possible
+ use to the public, the best way to achieve this is to make it free software
+ which everyone can redistribute and change under these terms.
+ 
+\end_layout
+
+\begin_layout Standard
+To do so, attach the following notices to the program.
+ It is safest to attach them to the start of each source file to most effectivel
+y convey the exclusion of warranty; and each file should have at least the
+ "copyright" line and a pointer to where the full notice is found.
+ For example:
+\end_layout
+
+\begin_layout Quote
+One line to give the program's name and a brief idea of what it does.
+ Copyright 
+\size footnotesize
+© (
+\size default
+year) (name of author) 
+\end_layout
+
+\begin_layout Quote
+This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the Free
+ Software Foundation; either version 2 of the License, or (at your option)
+ any later version.
+ 
+\end_layout
+
+\begin_layout Quote
+This program is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+ FOR A PARTICULAR PURPOSE.
+ See the GNU General Public License for more details.
+ 
+\end_layout
+
+\begin_layout Quote
+You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 
+\end_layout
+
+\begin_layout Standard
+Also add information on how to contact you by electronic and paper mail.
+ 
+\end_layout
+
+\begin_layout Standard
+If the program is interactive, make it output a short notice like this when
+ it starts in an interactive mode: 
+\end_layout
+
+\begin_layout Quote
+Gnomovision version 69, Copyright © year name of author Gnomovision comes
+ with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it under certain
+ conditions; type `show c' for details.
+ 
+\end_layout
+
+\begin_layout Standard
+The hypothetical commands `show w' and `show c' should show the appropriate
+ parts of the General Public License.
+ Of course, the commands you use may be called something other than `show
+ w' and `show c'; they could even be mouse-clicks or menu items -- whatever
+ suits your program.
+ 
+\end_layout
+
+\begin_layout Standard
+You should also get your employer (if you work as a programmer) or your
+ school, if any, to sign a "copyright disclaimer" for the program, if necessary.
+ Here is a sample; alter the names: 
+\end_layout
+
+\begin_layout Quote
+Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovisi
+on' (which makes passes at compilers) written by James Hacker.
+ 
+\end_layout
+
+\begin_layout Quote
+(signature of Ty Coon)
+\newline
+1 April 1989 
+\newline
+Ty Coon, President of Vice 
+\end_layout
+
+\begin_layout Standard
+This General Public License does not permit incorporating your program into
+ proprietary programs.
+ If your program is a subroutine library, you may consider it more useful
+ to permit linking proprietary applications with the library.
+ If this is what you want to do, use the GNU Library General Public License
+ instead of this License.
+\end_layout
+
+\begin_layout Bibliography
+
+\bibitem {key-1}
+ Quenette, S., B.
+ Appelbe, M.
+ Gurnis, L.
+ Hodkinson, L.
+ Moresi, and P.
+ Sunter (2005), An Investigation into Design for Performance and Code Maintainab
+ility in High Performance Computing, 
+\emph on
+ANZIAM J.
+\emph default
+, 46(e), C1001-C1016.
+\end_layout
+
+\begin_layout Bibliography
+
+\bibitem {key-4}
+Moresi, L.N., F.
+ Dufour, and H.-B.
+ Mühlhaus (2003), A Lagrandian integration point finite element method for
+ large deformation modeling of viscoelastic geomaterials, 
+\emph on
+J.
+ Comp.
+ Phys., 184
+\series bold
+,
+\series default
+\emph default
+ 476-497.
+\end_layout
+
+\begin_layout Bibliography
+
+\bibitem {key-3}
+ Moresi, L.N., and H.-B.
+ Mühlhaus (2006), Anisotropic viscous models of large-deformation MohrCoulomb
+ failure, 
+\emph on
+Philosophical Magazine, 86,
+\emph default
+ 3287-3305.
+\end_layout
+
+\begin_layout Bibliography
+
+\bibitem {key-2}
+ Moresi, L.N., and V.S.
+ Solomatov (1995), Numerical investigation of 2D convection with extremely
+ large viscosity variations, 
+\emph on
+Phys.
+ Fluids,
+\emph default
+ 
+\emph on
+7 (9),
+\emph default
+ 2154-2162.
+\end_layout
+
+\end_body
+\end_document



More information about the cig-commits mailing list