[cig-commits] [commit] master: Sync'ing changes from desktop before committing changes on laptop (a312969)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Fri May 9 15:25:12 PDT 2014


Repository : https://github.com/geodynamics/cigma

On branch  : master
Link       : https://github.com/geodynamics/cigma/compare/65c02138d3ae8b87c088cc14fe4f98e21e3f0805...a26f592c25c89a40622404999ba1effcdf6df9e3

>---------------------------------------------------------------

commit a3129696ad8e1556acb995a8d6cb4ca09274d977
Author: Luis Armendariz <luis>
Date:   Wed Oct 15 08:43:42 2008 +0000

    Sync'ing changes from desktop before committing changes on laptop


>---------------------------------------------------------------

a3129696ad8e1556acb995a8d6cb4ca09274d977
 appendix/appendix.lyx             | 352 ++++++++++++++++++++++++++++++++++++++
 cigma.lyx                         |  22 +--
 error_analysis/error_analysis.lyx | 310 +++++++++++++++++++++++++++++++--
 formats/formats.lyx               |  24 ++-
 integration/integration.lyx       |  24 +--
 interpolation/interpolation.lyx   | 180 +++++++++++--------
 introduction/introduction.lyx     |  27 +++
 nocover.lyx                       |   9 +
 running/running.lyx               |  47 ++++-
 9 files changed, 868 insertions(+), 127 deletions(-)

diff --git a/appendix/appendix.lyx b/appendix/appendix.lyx
index ee4865f..1cc7e75 100644
--- a/appendix/appendix.lyx
+++ b/appendix/appendix.lyx
@@ -2120,5 +2120,357 @@ The final global residual may be obtained by simply summing over each element
 
 \end_layout
 
+\begin_layout Chapter
+Numerical Integration
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status collapsed
+
+\begin_layout Standard
+
+
+\backslash
+mynote{
+\end_layout
+
+\begin_layout Standard
+
+Go over numerical integration in 2d and 3d.
+\end_layout
+
+\begin_layout Standard
+
+Required order of numerical integration.
+\end_layout
+
+\begin_layout Standard
+
+Give references to defining your own points here.
+ Explain how to use the scripts here.
+\end_layout
+
+\begin_layout Standard
+
+For each element, give the default quadrature rule employed and its order
+ of accuracy.
+\end_layout
+
+\begin_layout Standard
+
+Give more examples of quadrature rules.
+\end_layout
+
+\begin_layout Standard
+
+\end_layout
+
+\begin_layout Standard
+
+Mention tabulation of shape function values here.
+\end_layout
+
+\begin_layout Standard
+
+\end_layout
+
+\begin_layout Standard
+
+References to mention here:
+\end_layout
+
+\begin_layout Standard
+
+  FIAT homepage
+\end_layout
+
+\begin_layout Standard
+
+  FILIPPA mathematica notebooks
+\end_layout
+
+\begin_layout Standard
+
+  Encyclopedia of Cubature Formulas (url?)
+\end_layout
+
+\begin_layout Standard
+
+}
+\end_layout
+
+\end_inset
+
+
+\begin_inset Note Note
+status collapsed
+
+\begin_layout Standard
+The core concepts to get across in this chapter are the following:
+\end_layout
+
+\begin_layout Enumerate
+Each element in Cigma is assigned a default quadrature rule
+\end_layout
+
+\begin_layout Enumerate
+Explain briefly how quadrature rules are obtained (product rules)
+\end_layout
+
+\begin_layout Enumerate
+Error bound on integration (dependent on the discretization size h, and
+ the order of integration q).
+\end_layout
+
+\begin_layout Enumerate
+How to obtain more quadrature rules (encyclopedia website, FIAT, mathematica
+ scripts -- don't forget to mention caveat about using rules that use different
+ reference cells -- points transform according to map, while weights are
+ multiplied by the appropriate jacobian factor).
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+In order to calculate the 
+\begin_inset Formula $L_{2}$
+\end_inset
+
+ norm integral from Chapter 3, we must resort to numerical integration.
+ If we integrate over a mesh which does not match the underlying discretization
+ of the functions being compared, you may need to increase the accuracy
+ of the integration.
+ In this chapter we give a brief overview of the quadrature rules available,
+ and how you may create your own.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Note Note
+status collapsed
+
+\begin_layout Standard
+Define integration rule.
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+In general, we may define an integration rule as a set of points with associated
+ weights for which we may approximate an integration procedure by a simple
+ weighed sum
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula \[
+\int_{\Omega}\ F(\vec{x})\ d\vec{x}=\sum_{q=1}^{Q}w_{q}F(\vec{x}_{q})+R\]
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+It is possible to integrate, but the remainder 
+\begin_inset Formula $R$
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+Gaussian Quadrature
+\end_layout
+
+\begin_layout Standard
+\begin_inset Note Note
+status open
+
+\begin_layout Standard
+Hughes, pg 143
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The general Gaussian quadrature rule with 
+\begin_inset Formula $Q$
+\end_inset
+
+ integration points is given in Hughes, page 143,
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula \[
+\int_{-1}^{1}F(\xi)\ d\xi=\sum_{q=1}^{Q}w_{q}F(\xi_{q})\]
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula \begin{eqnarray*}
+w_{i} & = & \frac{2}{(1-\xi_{i}^{2})P_{Q}'(\xi_{i})^{2}}\\
+R & = & \frac{2^{2Q+1}(Q!)^{4}}{(2Q+1)[(2Q)!]^{3}}F^{(2Q)}(\bar{\xi})\end{eqnarray*}
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+where 
+\begin_inset Formula $\xi_{i}$
+\end_inset
+
+ is the 
+\begin_inset Formula $i$
+\end_inset
+
+-th zero of the Legendre Polynomial 
+\begin_inset Formula $P_{Q}(\xi)$
+\end_inset
+
+, and 
+\begin_inset Formula $P_{Q}^{'}$
+\end_inset
+
+ denotes the derivative of 
+\begin_inset Formula $P_{Q}$
+\end_inset
+
+.
+ The Legendre polynomials are defined by
+\begin_inset Formula \[
+P_{Q}(\xi)=\frac{1}{2^{Q}Q!}\frac{d^{Q}}{d\xi^{Q}}(\xi^{2}-1)^{Q}\]
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+In multiple dimensions, we simply use a different one-dimensional Gaussian
+ rule on each direction.
+ For two dimensions, this becomes
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula \[
+\int_{-1}^{1}\int_{-1}^{1}\ F(\xi,\eta)\ d\xi d\eta\cong\sum_{q_{1}=1}^{Q_{1}}\sum_{q_{2}=1}^{Q_{2}}w_{q_{1}}w_{q_{2}}F(\xi_{q_{1}},\eta_{q_{2}})\]
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+and similarly for three dimensions
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula \[
+\int_{-1}^{1}\int_{-1}^{1}\int_{-1}^{1}\ F(\xi,\eta,\zeta)\ d\xi d\eta d\zeta\cong\sum_{q_{1}=1}^{Q_{1}}\sum_{q_{2}=1}^{Q_{2}}\sum_{q_{3}=1}^{Q_{3}}w_{q_{1}}w_{q_{2}}w_{q_{3}}F(\xi_{q_{1}},\eta_{q_{2}},\zeta_{q_{3}})\]
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Note Note
+status open
+
+\begin_layout Section
+Quadrilaterals and Hexahedra
+\end_layout
+
+\begin_layout Standard
+\begin_inset Note Note
+status open
+
+\begin_layout Standard
+Since these two are very similar, keep them together.
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+For the reference quadrilateral and hexahedral elements, we can use the
+ 
+\end_layout
+
+\begin_layout Standard
+For quadrilaterals, we use the same reference region 
+\begin_inset Formula $[-1,1]\times[-1,1]$
+\end_inset
+
+ as in Section 4.X.
+\end_layout
+
+\begin_layout Standard
+The reference region for this geometry is 
+\begin_inset Formula $[-1,1]\times[-1,1]\times[-1,1]$
+\end_inset
+
+, as in Section 4.X.
+ 
+\end_layout
+
+\begin_layout Section
+Triangles and Tetrahedra
+\end_layout
+
+\begin_layout Standard
+To easily obtain high order accuracy quadrature rules for triangles, we
+ can re-use the same rules for quadrilaterals by collapsing two of the nodes
+ of the quadrilateral.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Note Note
+status open
+
+\begin_layout Standard
+Fig.
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Similar to the triangle
+\end_layout
+
+\begin_layout Section
+Other Integration Rules
+\end_layout
+
+\begin_layout Standard
+The integration points given in this section were obtained by using the
+ FIAT Python module.
+ 
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
 \end_body
 \end_document
diff --git a/cigma.lyx b/cigma.lyx
index 0dd679a..2e7568d 100644
--- a/cigma.lyx
+++ b/cigma.lyx
@@ -73,7 +73,7 @@ thispagestyle{empty}
 placement H
 wide false
 sideways false
-status collapsed
+status open
 
 \begin_layout Standard
 \begin_inset Graphics
@@ -161,7 +161,7 @@ raggedbottom
 
 \begin_layout Standard
 \begin_inset ERT
-status open
+status collapsed
 
 \begin_layout Standard
 
@@ -261,15 +261,6 @@ preview false
 \end_layout
 
 \begin_layout Standard
-\begin_inset Include \include{integration/integration.lyx}
-preview false
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
 \begin_inset Include \include{formats/formats.lyx}
 preview false
 
@@ -288,15 +279,6 @@ preview false
 \end_layout
 
 \begin_layout Standard
-\begin_inset Include \include{examples/examples.lyx}
-preview false
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
 \start_of_appendix
 \begin_inset ERT
 status collapsed
diff --git a/error_analysis/error_analysis.lyx b/error_analysis/error_analysis.lyx
index ce65d45..4d25b29 100644
--- a/error_analysis/error_analysis.lyx
+++ b/error_analysis/error_analysis.lyx
@@ -282,8 +282,8 @@ Functions
 \end_layout
 
 \begin_layout Standard
-The functions being compared that we discuss in this manual are assumed
- to be defined in a common region of space which we denote by 
+The functions that we discuss in this manual are assumed to be defined in
+ a common region of space denoted by 
 \begin_inset Formula $\Omega$
 \end_inset
 
@@ -292,7 +292,7 @@ The functions being compared that we discuss in this manual are assumed
 \begin_inset Formula $\Omega$
 \end_inset
 
- are denoted by 
+ are written as 
 \begin_inset Formula $\vec{x}$
 \end_inset
 
@@ -332,7 +332,7 @@ Integral Approximations
 
 \begin_layout Standard
 \begin_inset Note Note
-status open
+status collapsed
 
 \begin_layout Standard
 Briefer discussion here.
@@ -454,7 +454,7 @@ local coordinate system
 
 \begin_layout Standard
 \begin_inset Note Note
-status open
+status collapsed
 
 \begin_layout Standard
 FIGURE refmap.png: 
@@ -479,7 +479,7 @@ Omega_i
 Note that a given discretization may contain cells of different shapes,
  which would require us to define an appropriate number of reference cells
  for each type of cell.
- However, for the purposes of this manual, we may restrict the discussions
+ However, for the purposes of this manual we may restrict the discussions
  in this manuals, without any loss of generality, to discretizations consisting
  of a single geometric shape.
  (XXX: reword this last sentence)
@@ -750,7 +750,7 @@ Global Error Measure
 
 \begin_layout Standard
 \begin_inset Note Note
-status collapsed
+status open
 
 \begin_layout Standard
 Suppose the domain 
@@ -1048,6 +1048,281 @@ In this section we show the formula used by Cigma to compute the
 .
 \end_layout
 
+\begin_layout Standard
+Suppose the domain 
+\begin_inset Formula $\Omega$
+\end_inset
+
+ into an appropriate set of cells 
+\begin_inset Formula $\Omega_{1},\Omega_{2},\ldots,\Omega_{n_{el}}$
+\end_inset
+
+, we can compute the global error 
+\begin_inset Formula $\varepsilon^{2}$
+\end_inset
+
+ as a sum over localized cell contributions, 
+\begin_inset Formula $\varepsilon^{2}=\sum_{e}\varepsilon_{e}^{2}$
+\end_inset
+
+, where each cell residual 
+\begin_inset Formula $\varepsilon_{e}^{2}$
+\end_inset
+
+ is given by
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula \begin{eqnarray*}
+\varepsilon_{e}^{2} & = & \int_{\Omega_{e}}||u(\vec{x})-v(\vec{x})||^{2}d\vec{x}\end{eqnarray*}
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+In general, we won't be able to integrate each cell residual 
+\begin_inset Formula $\varepsilon_{e}^{2}$
+\end_inset
+
+ exactly since either of the functions 
+\begin_inset Formula $u$
+\end_inset
+
+ and 
+\begin_inset Formula $v$
+\end_inset
+
+ may have an incompatible representation relative to the finite element
+ space on each domain 
+\begin_inset Formula $\Omega_{e}$
+\end_inset
+
+.
+ However, we can still calculate an approximation of each cell residual
+ by applying an appropriate quadrature rule with a tolerable truncation
+ error 
+\begin_inset LatexCommand cite
+key "Encyclopaedia of Cubature Formulas 2005"
+
+\end_inset
+
+.
+ 
+\end_layout
+
+\begin_layout Standard
+To obtain an approximation to the integral of a function 
+\begin_inset Formula $F(\vec{x})$
+\end_inset
+
+ over a cell 
+\begin_inset Formula $\Omega_{e}$
+\end_inset
+
+, we simply apply the quadrature rule with weights 
+\begin_inset Formula $w_{e,1},w_{e,2},\ldots,w_{e,n_{Q}}$
+\end_inset
+
+ and integration points 
+\begin_inset Formula $\vec{x}_{e,1},\vec{x}_{e,2},\ldots,\vec{x}_{e,n_{Q}}$
+\end_inset
+
+ appropriate for the physical element 
+\begin_inset Formula $\Omega_{e}$
+\end_inset
+
+:
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula \[
+\int_{\Omega_{e}}\ F(\vec{x})\ d\vec{x}=\sum_{q=1}^{n_{Q}}w_{e,q}F(\vec{x}_{e,q})\]
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Applying this quadrature rule directly over the entire physical domain 
+\begin_inset Formula $\Omega=\cup\Omega_{e}$
+\end_inset
+
+ gives us 
+\begin_inset Formula \[
+\int_{\Omega}\ F(\vec{x})\ d\vec{x}=\sum_{e=1}^{n_{el}}\sum_{q=1}^{n_{Q}}w_{e,q}F(\vec{x}_{e,q})\]
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+For efficiency reasons, it is undesirable in finite element applications
+ to perform calculations in a global coordinate system.
+ To avoid duplication of work, shape function evaluations may be performed
+ once on a reference cell 
+\begin_inset Formula $\hat{\Omega}$
+\end_inset
+
+ and then transformed back into the corresponding physical cell 
+\begin_inset Formula $\Omega_{e}$
+\end_inset
+
+ as needed.
+\end_layout
+
+\begin_layout Standard
+To compute integrals of 
+\begin_inset Formula $F$
+\end_inset
+
+ in a reference coordinate system, we need to apply a change of variables:
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula \[
+\int_{\Omega_{e}}\ F(\vec{x})\ d\vec{x}=\int_{\hat{\Omega}}\ F(\vec{x}_{e}(\vec{\xi}))J_{e}(\vec{\xi})\ d\vec{\xi}\]
+
+\end_inset
+
+where 
+\color none
+the additional factor 
+\begin_inset Formula $J_{e}(\vec{\xi})=\det\left[\frac{d\vec{x}_{e}}{d\vec{\xi}}\right]$
+\end_inset
+
+ is the Jacobian determinant of the reference map 
+\begin_inset Formula $\vec{x}_{e}(\vec{\xi}):\hat{\Omega}\to\Omega_{e}$
+\end_inset
+
+.
+ This map describes how the physical points 
+\begin_inset Formula $\vec{x}\in\Omega_{e}$
+\end_inset
+
+ are transformed from the reference points 
+\begin_inset Formula $\vec{\xi}\in\hat{\Omega}$
+\end_inset
+
+.
+ Put another way, the inverse reference map 
+\color inherit
+
+\begin_inset Formula $\vec{\xi}=\vec{x}_{e}^{-1}(\vec{x})$
+\end_inset
+
+ tells us how the physical domain 
+\begin_inset Formula $\Omega_{e}$
+\end_inset
+
+ maps into the reference cell 
+\begin_inset Formula $\hat{\Omega}$
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Standard
+At this point, we can assume without loss of generality that every physical
+ cell 
+\begin_inset Formula $\Omega_{e}$
+\end_inset
+
+ can be derived from a single reference cell 
+\begin_inset Formula $\hat{\Omega}$
+\end_inset
+
+, so that our quadrature rule becomes simply a set of weights 
+\begin_inset Formula $w_{1},\ldots,w_{n_{Q}}$
+\end_inset
+
+ and points 
+\begin_inset Formula $\vec{\xi}_{1},\ldots,\vec{\xi}_{n_{Q}}$
+\end_inset
+
+ over 
+\begin_inset Formula $\hat{\Omega}$
+\end_inset
+
+.
+ After changing variables, we end up with the final form of the quadrature
+ rule that we can use to integrate the global residual field:
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula \[
+\int_{\hat{\Omega}}\ F(\vec{x}_{e}(\vec{\xi}))J_{e}(\vec{\xi})\ d\vec{\xi}=\sum_{q=1}^{n_{Q}}w_{q}F(\vec{x}_{e}(\vec{\xi}_{q}))J_{e}(\vec{\xi}_{q})\]
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+If we let 
+\begin_inset Formula $F(\vec{x})=||u(\vec{x})-v(\vec{x})||^{2}$
+\end_inset
+
+ in the above expression, we can find the cell residual contribution over
+ 
+\begin_inset Formula $\Omega_{e}$
+\end_inset
+
+ from
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula \begin{eqnarray*}
+\varepsilon_{e}^{2} & = & \int_{\Omega_{e}}\ ||u(\vec{x})-v(\vec{x})||^{2}\ d\vec{x}\\
+ & = & \int_{\hat{\Omega}}\ ||u(\vec{x}_{e}(\vec{\xi}))-v(\vec{x}_{e}(\vec{\xi}))||^{2}J_{e}(\vec{\xi})\ d\vec{\xi}\\
+ & = & \sum_{q=1}^{\mathrm{n_{Q}}}w_{q}||u(\vec{x}_{e}(\vec{\xi}_{q}))-v(\vec{x}_{e}(\vec{\xi}_{q}))||^{2}J_{e}(\vec{\xi}_{q})\end{eqnarray*}
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The global error 
+\begin_inset Formula $\varepsilon=\sqrt{\sum_{e}\varepsilon_{e}^{2}}$
+\end_inset
+
+ is then approximated by the expression
+\end_layout
+
+\begin_layout Standard
+\begin_inset Box Boxed
+position "t"
+hor_pos "c"
+has_inner_box 1
+inner_pos "t"
+use_parbox 0
+width "100text%"
+special "none"
+height "1in"
+height_special "totalheight"
+status open
+
+\begin_layout Standard
+\begin_inset Formula \begin{eqnarray*}
+\varepsilon & = & \sqrt{\sum_{e=1}^{\mathrm{n_{el}}}\sum_{q=1}^{\mathrm{n_{Q}}}w_{q}||u(\vec{x}_{e}(\vec{\xi}_{q}))-v(\vec{x}_{e}(\vec{\xi}_{q}))||^{2}J_{e}(\vec{\xi}_{q})}\end{eqnarray*}
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\newline
+We use this final form to calculate the global and localized errors on arbitrary
+ discretizations.
+\end_layout
+
 \begin_layout Section
 Comparing Residuals
 \end_layout
@@ -1150,7 +1425,7 @@ Even if the exact solution
 \end_inset
 
  on discrete meshes, we may calculate a convergence rate by using the standard
- error estimate you will find in textbooks: 
+ error estimate 
 \begin_inset Formula $||u-u_{h}||_{p}\leq Ch^{\alpha},$
 \end_inset
 
@@ -1167,6 +1442,7 @@ where
 \end_inset
 
 .
+ This error bound holds problems
 \end_layout
 
 \begin_layout Section
@@ -1191,10 +1467,20 @@ Give URLs for benchmark repositories on CIG svn tree.
 \end_layout
 
 \begin_layout Standard
-One of our goals is to provide As we saw in Section 3.5, it is easier to
- calculate the convergence rate on a sequence of meshes if we have access
- to the exact solution.
- Since one of our goals is to provide 
+As we saw in Section 3.5, it is easier to calculate the convergence rate
+ on a sequence of meshes if we have access to the exact solution.
+ 
+\begin_inset Note Note
+status open
+
+\begin_layout Standard
+Since one of our goals is to provide an easy means of calculating these
+ comparisons,
+\end_layout
+
+\end_inset
+
+
 \end_layout
 
 \end_body
diff --git a/formats/formats.lyx b/formats/formats.lyx
index 6e20d95..9b9aeb4 100644
--- a/formats/formats.lyx
+++ b/formats/formats.lyx
@@ -3228,16 +3228,16 @@ VTK
 \end_layout
 
 \begin_layout Standard
-VTK files are typically
-\end_layout
+\begin_inset Note Note
+status open
 
 \begin_layout Standard
-In the current version of Cigma, data
+VTK files are typically designed for visualization purposes, 
 \end_layout
 
-\begin_layout Standard
-You can still compare various unstructured grids with different element
- types to each other.
+\end_inset
+
+
 \end_layout
 
 \begin_layout Standard
@@ -3312,7 +3312,7 @@ Output Files
 
 \begin_layout Standard
 \begin_inset Note Note
-status open
+status collapsed
 
 \begin_layout Standard
 Depending on the particular operation you perform, there are three different
@@ -3335,5 +3335,15 @@ Depending on the particular operation you perform, there are three different
 
 \end_layout
 
+\begin_layout Standard
+Depending on the particular operation you perform, there are three different
+ kinds of output files.
+ The output format for residuals consists simply of a list of scalars for
+ each element in the discretization, stored using the legacy VTK file format
+ in the Cell Data section of the output file.
+ Note that this output consists of the squared values of the local residuals,
+ so further post-processing will be necessary.
+\end_layout
+
 \end_body
 \end_document
diff --git a/integration/integration.lyx b/integration/integration.lyx
index 1af9464..44e15b3 100644
--- a/integration/integration.lyx
+++ b/integration/integration.lyx
@@ -122,7 +122,7 @@ References to mention here:
 
 
 \begin_inset Note Note
-status open
+status collapsed
 
 \begin_layout Standard
 The core concepts to get across in this chapter are the following:
@@ -172,7 +172,7 @@ In order to calculate the
 
 \begin_layout Standard
 \begin_inset Note Note
-status open
+status collapsed
 
 \begin_layout Standard
 Define integration rule.
@@ -212,7 +212,7 @@ Gaussian Quadrature
 
 \begin_layout Standard
 \begin_inset Note Note
-status open
+status collapsed
 
 \begin_layout Standard
 Hughes, pg 143
@@ -349,7 +349,7 @@ The reference region for this geometry is
 \end_layout
 
 \begin_layout Section
-Triangles
+Triangles and Tetrahedra
 \end_layout
 
 \begin_layout Standard
@@ -372,14 +372,6 @@ Fig.
 \end_layout
 
 \begin_layout Section
-Tetrahedra
-\end_layout
-
-\begin_layout Standard
-Similar to the triangle
-\end_layout
-
-\begin_layout Section
 Other Integration Rules
 \end_layout
 
@@ -389,5 +381,13 @@ The integration points given in this section were obtained by using the
  
 \end_layout
 
+\begin_layout Standard
+(XXX: here, insert and explain the example script 
+\family typewriter
+src/fiat_rules.py
+\family default
+)
+\end_layout
+
 \end_body
 \end_document
diff --git a/interpolation/interpolation.lyx b/interpolation/interpolation.lyx
index 972caed..4cd2b2b 100644
--- a/interpolation/interpolation.lyx
+++ b/interpolation/interpolation.lyx
@@ -44,7 +44,7 @@
 
 \begin_layout Standard
 \begin_inset ERT
-status open
+status collapsed
 
 \begin_layout Standard
 
@@ -256,12 +256,14 @@ Local Functions
 \end_layout
 
 \begin_layout Standard
-Defined locally over a discretization of the domain of interest.
- Over each discretization element, we define a local coordinate system.
+Typically, as a result of numerical simulations, your function will be defined
+ locally on a discretization of the domain of interest.
+ Each discretization element defines a local coordinate system.
  Since the integration points are defined on a global coordinate system,
  we might have to invert the appropriate reference map after running a search
  through each discretization cell, followed by a newton-iteration to convert
  into the local coordinates, followed by an interior test.
+ (XXX: Insert workfile1.lyx in this section)
 \end_layout
 
 \begin_layout Subsection
@@ -293,7 +295,7 @@ A set of cells which partition the domain.
  together with a set of connectivity rules.
  This set of node points will have a number of degrees of freedom associated
  with them.
- An interpolation function can be.
+ An interpolation
 \end_layout
 
 \begin_layout Subsection
@@ -319,7 +321,8 @@ Once we arrive at a solution on a cell
 \begin_inset Formula $\Omega_{e}$
 \end_inset
 
-, we can define an interpolant function that will give us
+, we can define an interpolant function that will give us the value of our
+ function on any point in the interior of the cell.
 \end_layout
 
 \begin_layout Subsection
@@ -337,11 +340,12 @@ Reference domain.
 
 \end_inset
 
-
+Fig.
+ elts.jpg
 \end_layout
 
 \begin_layout Subsection
-Tetrahedra
+Triangles and Tetrahedra
 \end_layout
 
 \begin_layout Standard
@@ -361,7 +365,7 @@ Reference domain.
 \end_layout
 
 \begin_layout Subsection
-Hexahedron
+Quadrilateral and Hexahedral Elements
 \end_layout
 
 \begin_layout Standard
@@ -388,6 +392,8 @@ Global Functions
 These functions are given explicitly on a domain.
  They may be defined explicitly, in the source code, or may also be defined
  by a global set of basis functions (such as spherical harmonics).
+ Either way, they will be associated with a callback function that Cigma
+ will evaluate whenever necessary.
 \end_layout
 
 \begin_layout Subsection
@@ -846,7 +852,7 @@ cylinder_rel.non_newt_mat.stress
 
 \begin_layout Standard
 \begin_inset Note Note
-status open
+status collapsed
 
 \begin_layout Standard
 By default, we compile a number of functions into Cigma.
@@ -873,7 +879,6 @@ By default, we compile a number of functions into Cigma.
 \newline
 There are two
  basic functions that are available, listed in the table below.
- 
 \end_layout
 
 \begin_layout Standard
@@ -1043,6 +1048,72 @@ Vector field in 2-dimensions
 \newline
 
 \newline
+We can also calculate the initial step of the strike-slip benchmark (no
+ gravity) discussed in Chapter X.
+ This is based on the Okada (1992) dislocation code[?].
+\end_layout
+
+\begin_layout Standard
+\begin_inset Tabular
+<lyxtabular version="3" rows="3" columns="1">
+<features>
+<column alignment="left" valignment="top" leftline="true" rightline="true" width="0">
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+
+\family typewriter
+strikeslip.disloc3d.displacement
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+
+\family typewriter
+strikeslip.disloc3d.velocity
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row topline="true" bottomline="true">
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Standard
+
+\family typewriter
+strikeslip.disloc3d.stress
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\newline
+
+\newline
+The full list of all pre-defined functions which are available by name are
+ given in the appendix.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Note Note
+status collapsed
+
+\begin_layout Standard
 Cylinder extension case (maxwell and non-newtonian materials)
 \end_layout
 
@@ -1257,66 +1328,10 @@ circular_inclusion.pressure
 \end_inset
 
 
-\newline
-
-\newline
-We can also calculate the initial step of the strike-slip benchmark (no
- gravity) discussed in Chapter 8.
- This is based on the Okada (1992) dislocation code.
-\end_layout
-
-\begin_layout Standard
-\begin_inset Tabular
-<lyxtabular version="3" rows="3" columns="1">
-<features>
-<column alignment="left" valignment="top" leftline="true" rightline="true" width="0">
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\family typewriter
-strikeslip.disloc3d.displacement
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\family typewriter
-strikeslip.disloc3d.velocity
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row topline="true" bottomline="true">
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Standard
-
-\family typewriter
-strikeslip.disloc3d.stress
 \end_layout
 
 \end_inset
-</cell>
-</row>
-</lyxtabular>
 
-\end_inset
-
-
-\newline
-
-\newline
 
 \end_layout
 
@@ -1326,7 +1341,7 @@ Defining Your Own Global Function
 
 \begin_layout Standard
 \begin_inset Note Note
-status open
+status collapsed
 
 \begin_layout Standard
 Show example subclass of cigma::Function.
@@ -1352,11 +1367,11 @@ src/core/functions/
 \family typewriter
 cigma::Function
 \family default
- which interfaces to your definition.
+ which interfaces to your function.
 \end_layout
 
 \begin_layout Enumerate
-Add any new source and header files into the 
+Add the new source and header files into the 
 \family typewriter
 libcigma_a_SOURCES
 \family default
@@ -1366,23 +1381,40 @@ src/Makefile.am
 \family default
 , following the examples given in the section that refers to the 
 \family typewriter
-Zero.h
+ZeroFunction.h
 \family default
  and 
 \family typewriter
-Zero.cpp
+ZeroFunction.cpp
 \family default
  files.
 \end_layout
 
 \begin_layout Enumerate
 Instantiate your function and insert it into the appropriate map object
- in src/core/functions/FunctionRegistry.cpp, again following the examples
- already in the file.
+ in 
+\family typewriter
+src/core/functions/FunctionRegistry.cpp
+\family default
+, again following the examples already in the file.
+ It is in this file where you will give a unique name to your function,
+ for use in the command line.
 \end_layout
 
 \begin_layout Standard
-XXX: copy example src/core/functions/Test.cpp::TestCube here
+Other examples to examine are located at 
+\family typewriter
+TestFunctions.cpp
+\family default
+ and in 
+\family typewriter
+StrikeslipFunctions.cpp
+\family default
+ in the 
+\family typewriter
+src/core/functions/
+\family default
+ directory.
 \end_layout
 
 \end_body
diff --git a/introduction/introduction.lyx b/introduction/introduction.lyx
index 21d7568..8a0aa79 100644
--- a/introduction/introduction.lyx
+++ b/introduction/introduction.lyx
@@ -115,6 +115,33 @@ CIG has developed Cigma in response to demand from the short-term tectonics
  their finite element codes.
  The long-term goal for Cigma, however, is for it to be used for nearly
  all geodynamics modeling codes.
+ Cigma relies on a number of libraries.
+ The 
+\begin_inset LatexCommand htmlurl
+name "FInite element Automatic Tabulator (FIAT)"
+target "www.fenics.org/wiki/FIAT"
+
+\end_inset
+
+ Python Library supports generation of arbitrary order instances of the
+ Lagrange elements on lines, triangles, and tetrahedra.
+ It can also generate higher order instances of Jacobi-type quadrature rules
+ on the same element shapes.
+ The 
+\begin_inset LatexCommand htmlurl
+name "Approximate Nearest Neighbor (ANN)"
+target "www.cs.umd.edu/~mount/ANN/"
+
+\end_inset
+
+ Library, written in C++, supports data structures and algorithms for both
+ exact and nearest-neighbor searching in arbitrarily high dimensions.
+\end_layout
+
+\begin_layout Standard
+Both of these libraries extend and generalize Cigma's functionality so it
+ can handle other types of elements, and provide the ability to compare
+ vector fields.
 \end_layout
 
 \begin_layout Standard
diff --git a/nocover.lyx b/nocover.lyx
index cfcdb97..946810c 100644
--- a/nocover.lyx
+++ b/nocover.lyx
@@ -166,6 +166,15 @@ status collapsed
 \end_layout
 
 \begin_layout Standard
+\begin_inset Include \include{appendix/appendix.lyx}
+preview false
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
 \begin_inset Note Note
 status open
 
diff --git a/running/running.lyx b/running/running.lyx
index 49aca93..9c3ba36 100644
--- a/running/running.lyx
+++ b/running/running.lyx
@@ -349,8 +349,51 @@ Data Paths
 \end_layout
 
 \begin_layout Standard
-In the previous chapter we studied the layout.
- Now throughout this chapter we will reference..
+\begin_inset Note Note
+status open
+
+\begin_layout Standard
+XXX
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+In Chapter 6, we described the layout used in the various file formats.
+ To refer to a particular array on the command line you can use the string
+ 
+\series bold
+A:B
+\series default
+, to refer to stored in a file 
+\series bold
+A
+\series default
+, you can refer to a particular named array 
+\series bold
+B
+\series default
+ by using the string 
+\series bold
+A:B
+\series default
+, with the colon character `:' serving as a separator between the two paths.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Note Note
+status open
+
+\begin_layout Standard
+For example, a VTK file named 
+\end_layout
+
+\end_inset
+
+
 \end_layout
 
 \begin_layout Section



More information about the CIG-COMMITS mailing list