[cig-commits] [commit] master: Added changes to Chapter 5 * More detailed description of `compare' command. * Added description of new commands `list' and `copy'. * Moved section on input files to Chapter 4. (28944ac)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Fri May 9 15:23:22 PDT 2014


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

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

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

commit 28944ac3aa6ed98675360ad0de8438ae802c26e7
Author: Luis Armendariz <luis>
Date:   Sat Jan 19 01:51:11 2008 +0000

    Added changes to Chapter 5
     * More detailed description of `compare' command.
     * Added description of new commands `list' and `copy'.
     * Moved section on input files to Chapter 4.


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

28944ac3aa6ed98675360ad0de8438ae802c26e7
 cigma.lyx | 867 ++++++++++++++++++++++++++++++++++++++++++++++++++------------
 1 file changed, 705 insertions(+), 162 deletions(-)

diff --git a/cigma.lyx b/cigma.lyx
index 4476794..80a9570 100644
--- a/cigma.lyx
+++ b/cigma.lyx
@@ -304,7 +304,7 @@ cig-cs
 \end_layout
 
 \begin_layout Section
-Installation from Source
+Installating from Source
 \end_layout
 
 \begin_layout Standard
@@ -370,13 +370,34 @@ $ sudo make install
 \end_layout
 
 \begin_layout Subsection
+VTK
+\end_layout
+
+\begin_layout Standard
+VTK is available from Kitware Inc (http://www.vtk.org/get-software.php).
+ If you obtain the binaries from a package manager, make sure to install
+ the associated development headers along with the library.
+ To enable VTK support in Cigma, use the following flags in the configure
+ step:
+\end_layout
+
+\begin_layout Standard
+TODO: (tt font)
+\end_layout
+
+\begin_layout Standard
+./configure --with-vtk=/path/to/vtk
+\end_layout
+
+\begin_layout Subsection
 PyTables
 \end_layout
 
 \begin_layout Standard
 PyTables is a Python extension module that builds on top of the HDF5 library.
- It provides a convenient scripting interface to manipulate HDF5 files.
- It is available from 
+ It provides a convenient scripting interface to manipulate HDF5 files,
+ which can be used to manipulate the input/output files created by Cigma.
+ PyTables is available for download from 
 \begin_inset LatexCommand \htmlurl[PyTables]{www.pytables.org}
 
 \end_inset
@@ -390,11 +411,11 @@ To install this extension from source, download the latest stable version
 \end_layout
 
 \begin_layout LyX-Code
-$ tar xvfz pytables-2.0
+$ tar xvfz pytables-2.x
 \end_layout
 
 \begin_layout LyX-Code
-$ cd pytables-2.0
+$ cd pytables-2.x
 \end_layout
 
 \begin_layout LyX-Code
@@ -450,10 +471,6 @@ With HFDFView, you can view the internal file hierarchy in a tree structure,
 
 \end_layout
 
-\begin_layout Standard
-
-\end_layout
-
 \begin_layout Chapter
 Error Analysis
 \end_layout
@@ -751,7 +768,7 @@ tet4
 placement H
 wide false
 sideways false
-status open
+status collapsed
 
 \begin_layout Caption
 Reference tetrahedral element
@@ -797,51 +814,520 @@ hex8
 \end_layout
 
 \begin_layout Standard
-\noindent
-\align center
-\begin_inset Float figure
-placement H
-wide false
-sideways false
-status open
+\noindent
+\align center
+\begin_inset Float figure
+placement H
+wide false
+sideways false
+status collapsed
+
+\begin_layout Caption
+Reference hexahedral element
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Graphics
+	filename figures/reference-hex8.png
+	lyxscale 35
+	width 35page%
+
+\end_inset
+
+
+\begin_inset Formula \begin{eqnarray*}
+HN_{a} & = & \frac{1}{8}\left(1-x\right)\left(1-y\right)\left(1-z\right)\\
+HN_{b} & = & \frac{1}{8}\left(1+x\right)\left(1-y\right)\left(1-z\right)\\
+HN_{c} & = & \frac{1}{8}\left(1-x\right)\left(1+y\right)\left(1-z\right)\\
+HN_{d} & = & \frac{1}{8}\left(1+x\right)\left(1+y\right)\left(1-z\right)\\
+HN_{e} & = & \frac{1}{8}\left(1-x\right)\left(1-y\right)\left(1+z\right)\\
+HN_{f} & = & \frac{1}{8}\left(1+x\right)\left(1-y\right)\left(1+z\right)\\
+HN_{g} & = & \frac{1}{8}\left(1-x\right)\left(1+y\right)\left(1+z\right)\\
+HN_{h} & = & \frac{1}{8}\left(1+x\right)\left(1+y\right)\left(1+z\right)\end{eqnarray*}
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+Input Formats
+\end_layout
+
+\begin_layout Standard
+The underlying data storage format for Cigma is HDF5, although VTK files
+ can also be specified as input if the VTK development libraries are installed
+ when you configure and compile Cigma.
+ As described in Chapter 5 (TODO: insert ref), you can easily examine the
+ structure of an input file by using the (TODO: tt)`cigma list' command,
+ which will simply reveal the names and dimensions of all datasets inside
+ the specified file.
+\end_layout
+
+\begin_layout Subsection
+HDF5
+\end_layout
+
+\begin_layout Standard
+The Hierarchical Data Format (HDF) is a portable file format developed at
+ the 
+\begin_inset LatexCommand \htmlurl[National Center for Supercomputing Applications (NCSA)]{hdf.ncsa.uiuc.edu/HDF5}
+
+\end_inset
+
+.
+ It is designed for storing, retrieving, analyzing, visualizing, and converting
+ scientific data.
+ The current and most popular version is HDF5, which stores multi-dimensional
+ arrays together with ancillary data in a portable self-describing format.
+ It uses a hierarchical structure that provides application programmers
+ with a host of options for organizing how data is stored in HDF5 files.
+\end_layout
+
+\begin_layout Standard
+HDF5 files are organized in a hierarchical structure, similar to a UNIX
+ file system.
+ Two types of primary objects, groups and datasets, are stored in this structure.
+ A group contains instances of zero or more groups or datasets, while a
+ dataset stores a multi-dimensional array of data elements.
+ Both kinds of objects are accompanied by supporting metadata known as attribute
+s.
+\end_layout
+
+\begin_layout Standard
+A dataset is physically stored in two parts: a header and a data array.
+ The header contains miscellaneous metadata describing the dataset as well
+ as information that is needed to interpret the array portion of the dataset.
+ Essentially, it includes the name, datatype, dataspace, and storage layout
+ of the dataset.
+ The name is a text string identifying the dataset.
+ The datatype describes the type of the data array elements.
+ The dataspace defines the dimensionality of the dataset, i.e., the size and
+ shape of the multi-dimensional array.
+\end_layout
+
+\begin_layout Standard
+Using HDF5 datasets in Cigma allows us to avoid having to convert between
+ too many distinct formats.
+ Moreover, due to the amount of disk I/O, large finite element meshes can
+ be handled more efficiently in binary format.
+ A typical Cigma HDF5 file has the following structure:
+\end_layout
+
+\begin_layout LyX-Code
+model.h5
+\end_layout
+
+\begin_layout LyX-Code
+
+\backslash
+__ model
+\end_layout
+
+\begin_layout LyX-Code
+    |__ mesh
+\end_layout
+
+\begin_layout LyX-Code
+    |   |__ coordinates    [nno x nsd]
+\end_layout
+
+\begin_layout LyX-Code
+    |   
+\backslash
+__ connectivity   [nel x ndof]
+\end_layout
+
+\begin_layout LyX-Code
+    
+\backslash
+__ variables
+\end_layout
+
+\begin_layout LyX-Code
+        
+\backslash
+__ velocity
+\end_layout
+
+\begin_layout LyX-Code
+            
+\backslash
+__ step00010  [nno x ndim]
+\end_layout
+
+\begin_layout Standard
+You have a certain amount of flexibility in grouping your own data.
+ Generally, Cigma will only require you to specify the path to a specific
+ field dataset, along with a small amount of metadata on your field and
+ mesh datasets, described below:
+\end_layout
+
+\begin_layout Description
+MeshID an identifier assigned for use in linking child datasets to their
+ parent mesh.
+\end_layout
+
+\begin_layout Description
+MeshLocation points to the HDF5 group which contains the appropriate coordinates
+ and connectivity datasets.
+\end_layout
+
+\begin_layout Description
+FunctionSpace string identifier to determine which shape functions to use
+ for interpolating values inside the element (e.g., tet4, hex8, quad4, tri3,
+ ...).
+\end_layout
+
+\begin_layout Description
+DatasetType string identifier for classifying the type of data contained
+ in the dataset (e.g., points, connectivity, degrees of freedom, quadrature
+ rules, global quadrature points, global field values).
+\end_layout
+
+\begin_layout Subsection
+VTK Files
+\end_layout
+
+\begin_layout Standard
+The Visualization Toolkit (VTK) is a popular open source graphics library
+ for scientific visualizations.
+\end_layout
+
+\begin_layout Subsection
+Text Files
+\end_layout
+
+\begin_layout Standard
+Importing and exporting data into simple text can be accomplished with the
+ (TODO:tt)`cigma copy' command.
+ The format is always in table form, with the dimensions specified in the
+ first line.
+ For example:
+\newline
+Mesh coordinates can be specified in the following format
+\end_layout
+
+\begin_layout LyX-Code
+nno nsd
+\end_layout
+
+\begin_layout LyX-Code
+1 x1 y1 z1
+\end_layout
+
+\begin_layout LyX-Code
+2 x2 y2 z2
+\end_layout
+
+\begin_layout LyX-Code
+3 x3 y3 z3
+\end_layout
+
+\begin_layout LyX-Code
+...
+\end_layout
+
+\begin_layout Standard
+Mesh connectivity with 
+\end_layout
+
+\begin_layout LyX-Code
+nel ndofs
+\end_layout
+
+\begin_layout LyX-Code
+1 node_1 node_2 node_3 node_4 ...
+\end_layout
+
+\begin_layout LyX-Code
+2 node_1 node_2 node_3 node_4 ...
+\end_layout
+
+\begin_layout LyX-Code
+3 node_1 node_2 node_3 node_4 ...
+\end_layout
+
+\begin_layout LyX-Code
+...
+\end_layout
+
+\begin_layout Standard
+A generic field with 
+\family typewriter
+ndim
+\family default
+ components (i.e., scalar, vector, or tensor) is specified by
+\end_layout
+
+\begin_layout LyX-Code
+num ndim
+\end_layout
+
+\begin_layout LyX-Code
+1 f1 f2 f3 ..
+\end_layout
+
+\begin_layout LyX-Code
+2 f1 f2 f3 ..
+\end_layout
+
+\begin_layout LyX-Code
+...
+\end_layout
+
+\begin_layout Standard
+In this last case, the number of rows could refer to either (TODO:tt)nno
+ or (TODO:tt)nel, depending on whether the field is node-based or cell-based.
+\end_layout
+
+\begin_layout Chapter
+Running Cigma
+\end_layout
+
+\begin_layout Standard
+Cigma is designed to be scriptable, and thus all operations can be specified
+ as command line arguments given to a single executable called (TODO: tt
+ font)`cigma'.
+ The available commands can be listed with (TODO: tt)`cigma --help', and
+ help on a specific command can be obtained with (TODO: tt-font)`cigma help
+ <command>'.
+\end_layout
+
+\begin_layout Standard
+Since Cigma is used for obtaining error estimates between arbitrary fields,
+ its primary operation involves the (TODO: tt)compare command.
+ You will need to provide two datasets describing each of the two fields,
+ along with an integration rule and a mesh over which to integrate, although
+ these last two will have reasonable defaults if they are not specified.
+\end_layout
+
+\begin_layout Standard
+Specifying the complete path to a dataset consists of the special form 
+\family typewriter
+\series bold
+filepath:dataset
+\family default
+\series default
+, a colon-delimited pair of file path and dataset path.
+\end_layout
+
+\begin_layout Section
+Listing Data
+\end_layout
+
+\begin_layout Standard
+Since Cigma relies so much on being able to specify dataset paths, we have
+ provided a command called (TODO:tt)list for viewing the structure of input
+ file.
+ Its usage is very simple:
+\newline
+
+\end_layout
+
+\begin_layout Standard
+To view the structure of an HDF5 file:
+\end_layout
+
+\begin_layout LyX-Code
+$ 
+\series bold
+cigma list file.h5
+\end_layout
+
+\begin_layout LyX-Code
+/mesh/coordinates           Dataset {119827, 3}
+\end_layout
+
+\begin_layout LyX-Code
+/mesh/connectivity          Dataset {661929, 4}
+\end_layout
+
+\begin_layout LyX-Code
+/vars/displacement/step0    Dataset {119827, 3}
+\end_layout
+
+\begin_layout LyX-Code
+/residuals/comparison0      Dataset {661929, 1}
+\end_layout
+
+\begin_layout Standard
+If VTK support is enabled, you can view the structure of a VTK file with:
+\end_layout
+
+\begin_layout LyX-Code
+$ 
+\series bold
+cigma list file.vtk
+\end_layout
+
+\begin_layout LyX-Code
+Reading file.vtk
+\end_layout
+
+\begin_layout LyX-Code
+Points = 119827
+\end_layout
+
+\begin_layout LyX-Code
+Cells = 661929
+\end_layout
+
+\begin_layout LyX-Code
+PointDataArray[0] = displacements_t0 (119827 x 3)
+\end_layout
+
+\begin_layout Section
+Converting Data
+\end_layout
+
+\begin_layout Standard
+In order to easily move data into and out of the HDF5 format, you can use
+ the (TODO:tt)`cigma copy' command.
+ By default, it relies on the file extension to detect what format to use
+ when reading or writing data.
+ Various examples are given below.
+ (TODO: tt-font for commands below)
+\newline
+
+\end_layout
+
+\begin_layout Standard
+Usage is typically
+\end_layout
+
+\begin_layout Standard
+cigma copy <source-path> <destination-path>
+\end_layout
+
+\begin_layout Standard
+cigma copy --source=<path> --destination=<path>
+\end_layout
+
+\begin_layout Standard
+cigma copy -s <path> -d <path>
+\newline
+
+\end_layout
+
+\begin_layout Standard
+To dump the mesh information into a text file:
+\end_layout
+
+\begin_layout Standard
+cigma copy --source=file.h5:/model/mesh/coords --destination=model-coords.txt
+\end_layout
+
+\begin_layout Standard
+cigma copy --source=file.h5:/model/mesh/connect --destination=model-connect.txt
+\newline
+
+\end_layout
+
+\begin_layout Standard
+To import a scalar field pressure0 from a VTK file into an HDF5 file:
+\end_layout
+
+\begin_layout Standard
+cigma copy --source=file.vtk:pressure0 --destination=file.h5:/model/variables/pres
+sure/t0
+\newline
+
+\end_layout
+
+\begin_layout Standard
+To import a vector field called displacement15 from a VTK file into an HDF5
+ file
+\end_layout
+
+\begin_layout Standard
+cigma copy --source=file.vtk:displacement15 --destination=file.h5:/model/variables
+/displacement/t15
+\newline
+
+\end_layout
+
+\begin_layout Standard
+To convert residual data into VTK file, and then into ASCII.
+\end_layout
+
+\begin_layout Standard
+cigma copy --source=file.h5:/model/residuals/pressure0 --destination=pressure0-re
+siduals.vtk
+\end_layout
+
+\begin_layout Standard
+cigma copy --source=pressure0-residuals.vtk --destination=residuals.txt
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout Section
+Metadata
+\end_layout
+
+\begin_layout Standard
+As described in a previous chapter on the HDF5 input files, you can attach
+ arbitrary metadata to any number of your datasets or groups.
+ Cigma will make use of a few reserved attributes to determine which mesh
+ and shape functions to use on a particular dataset, but in general you
+ are free to assign your own
+\newline
 
-\begin_layout Caption
-Reference hexahedral element
 \end_layout
 
 \begin_layout Standard
-\noindent
-\align center
-\begin_inset Graphics
-	filename figures/reference-hex8.png
-	lyxscale 35
-	width 35page%
+Usage is typically: (TODO:format)
+\end_layout
 
-\end_inset
+\begin_layout Standard
+cigma set <target-object-path> <attribute-name>[:<type>] <value>
+\end_layout
 
+\begin_layout Standard
+cigma get <target-object-path> [<attribute>]
+\newline
 
-\begin_inset Formula \begin{eqnarray*}
-HN_{a} & = & \frac{1}{8}\left(1-x\right)\left(1-y\right)\left(1-z\right)\\
-HN_{b} & = & \frac{1}{8}\left(1+x\right)\left(1-y\right)\left(1-z\right)\\
-HN_{c} & = & \frac{1}{8}\left(1-x\right)\left(1+y\right)\left(1-z\right)\\
-HN_{d} & = & \frac{1}{8}\left(1+x\right)\left(1+y\right)\left(1-z\right)\\
-HN_{e} & = & \frac{1}{8}\left(1-x\right)\left(1-y\right)\left(1+z\right)\\
-HN_{f} & = & \frac{1}{8}\left(1+x\right)\left(1-y\right)\left(1+z\right)\\
-HN_{g} & = & \frac{1}{8}\left(1-x\right)\left(1+y\right)\left(1+z\right)\\
-HN_{h} & = & \frac{1}{8}\left(1+x\right)\left(1+y\right)\left(1+z\right)\end{eqnarray*}
+\end_layout
 
-\end_inset
+\begin_layout Standard
+For example, (TODO: format)
+\end_layout
 
+\begin_layout Standard
+cigma set --target=file.h5:/model/ --attribute=AUTHOR --value='John Doe'
+\end_layout
 
+\begin_layout Standard
+cigma set --target=file.h5:/model/vars/pressure --attribute=Units --value=MPa
 \end_layout
 
-\end_inset
+\begin_layout Standard
+cigma set --target=file.h5:/model/vars/pressure/t10 --attribute=Step:int32
+ --value=10 
+\end_layout
 
+\begin_layout Standard
+cigma set --target=file.h5:/model/vars/pressure/t10 --attribute=MeshID:int32
+ --value=1234
+\end_layout
 
+\begin_layout Standard
+cigma set --target=file.h5:/model/vars/pressure/t10 --attribute=FunctionSpace
+ --value=tet4
 \end_layout
 
-\begin_layout Chapter
-Running Cigma
+\begin_layout LyX-Code
+
 \end_layout
 
 \begin_layout Section
@@ -852,31 +1338,25 @@ Comparing Two Fields
 Comparing two arbitrary finite element fields can be accomplished with the
  
 \family typewriter
-cigma-compare
-\family default
- command line utility, which takes a number of arguments in order to facilitate
- writing shell scripts.
- The comparisons always take place using the mesh of the first field.
- Note that the first and second arguments take the special form 
-\family typewriter
-\series bold
-filename:dataset
+`cigma compare'
 \family default
-\series default
-.
+ command line utility.
+ By default, the comparison will take place over the elements in the mesh
+ of the first field.
  Finally, the square of each of the local residual values are written to
  the specified VTK output file as cell-based scalars.
+\newline
+
 \end_layout
 
 \begin_layout Standard
-To use a quadrature rule for the field comparisons, you can specify arguments
- similar to the following
+A basic comparison can be as simple as specifying the following arguments:
 \end_layout
 
 \begin_layout LyX-Code
 
 \series bold
-cigma-compare --output=squared-residuals.vtk   
+cigma compare --output=squared-residuals.vtk   
 \backslash
 
 \end_layout
@@ -893,6 +1373,21 @@ cigma-compare --output=squared-residuals.vtk
 
 \series bold
               --second=field2.h5:/field2/stepN
+\end_layout
+
+\begin_layout Subsection
+Specifying a Mesh
+\end_layout
+
+\begin_layout Standard
+To override the mesh used in the integration, you can specify an extra argument
+ providing the location of the mesh:
+\end_layout
+
+\begin_layout LyX-Code
+
+\series bold
+cigma compare --mesh=mesh.h5:/model/mesh/   
 \backslash
 
 \end_layout
@@ -900,19 +1395,18 @@ cigma-compare --output=squared-residuals.vtk
 \begin_layout LyX-Code
 
 \series bold
-              --rule=qr.h5:/path/to/rule
+              [...]
 \end_layout
 
 \begin_layout Standard
-Alternatively, to perform a pointwise comparison at random sample points
- inside each element in the first mesh, you can use arguments similar to
- the following
+You can also specify the coordinates and connectivity arrays separately,
+ in case they reside in separate files.
 \end_layout
 
 \begin_layout LyX-Code
 
 \series bold
-cigma-compare --output=squared-residuals.vtk   
+cigma compare --mesh-coordinates=file1.h5:/model/mesh/coordinates    
 \backslash
 
 \end_layout
@@ -920,7 +1414,7 @@ cigma-compare --output=squared-residuals.vtk
 \begin_layout LyX-Code
 
 \series bold
-              --first=field1.h5:/field1/stepN  
+              --mesh-connectivity=file2.h5:/model/mesh/connectivity  
 \backslash
 
 \end_layout
@@ -928,7 +1422,23 @@ cigma-compare --output=squared-residuals.vtk
 \begin_layout LyX-Code
 
 \series bold
-              --second=field2.h5:/field2/stepN 
+              [...]
+\end_layout
+
+\begin_layout Subsection
+Specifying a Quadrature Rule
+\end_layout
+
+\begin_layout Standard
+If you wish to specify your own quadrature rule, you will have to provide
+ the quadrature weights and points in the appropriate reference element.
+ This can be done with the following additional argument:
+\end_layout
+
+\begin_layout LyX-Code
+
+\series bold
+cigma compare --rule=quadrature-rules.h5:/path/to/rule  
 \backslash
 
 \end_layout
@@ -936,204 +1446,237 @@ cigma-compare --output=squared-residuals.vtk
 \begin_layout LyX-Code
 
 \series bold
-              --samples-per-element=1
+              [...]
+\end_layout
+
+\begin_layout Standard
+You may also specify the location of the points and weights separately:
 \end_layout
 
 \begin_layout LyX-Code
 
+\series bold
+cigma compare --rule-points=file.h5:/path/to/rule/points    
+\backslash
+
 \end_layout
 
-\begin_layout Section
-Input Format
+\begin_layout LyX-Code
+
+\series bold
+              --rule-weights=file.h5:/path/to/rule/weights  
+\backslash
+
 \end_layout
 
-\begin_layout Standard
-The Hierarchical Data Format (HDF) is a portable file format developed at
- the 
-\begin_inset LatexCommand \htmlurl[National Center for Supercomputing Applications (NCSA)]{hdf.ncsa.uiuc.edu/HDF5}
+\begin_layout LyX-Code
 
-\end_inset
+\series bold
+              [...]
+\end_layout
+
+\begin_layout LyX-Code
 
-.
- It is designed for storing, retrieving, analyzing, visualizing, and converting
- scientific data.
- The current and most popular version is HDF5, which stores multi-dimensional
- arrays together with ancillary data in a portable self-describing format.
- It uses a hierarchical structure that provides application programmers
- with a host of options for organizing how data is stored in HDF5 files.
 \end_layout
 
 \begin_layout Standard
-HDF5 files are organized in a hierarchical structure, similar to a UNIX
- file system.
- Two types of primary objects, groups and datasets, are stored in this structure.
- A group contains instances of zero or more groups or datasets, while a
- dataset stores a multi-dimensional array of data elements.
- Both kinds of objects are accompanied by supporting metadata.
+Alternatively, to perform a pointwise comparison at random sample points
+ inside each element in the first mesh,
+\end_layout
+
+\begin_layout LyX-Code
+
+\series bold
+cigma compare --samples-per-element=1    
+\backslash
+
+\end_layout
+
+\begin_layout LyX-Code
+
+\series bold
+              [...]
+\end_layout
+
+\begin_layout Subsection
+Against Known Values
 \end_layout
 
 \begin_layout Standard
-A dataset is physically stored in two parts: a header and a data array.
- The header contains miscellaneous metadata describing the dataset as well
- as information that is needed to interpret the array portion of the dataset.
- Essentially, it includes the name, datatype, dataspace, and storage layout
- of the dataset.
- The name is a text string identifying the dataset.
- The datatype describes the type of the data array elements.
- The dataspace defines the dimensionality of the dataset, i.e., the size and
- shape of the multi-dimensional array.
+A finite element description might not always be available for one of the
+ fields.
+ However, you can break the comparison into several steps if you have a
+ means to compute that field on any of the required points.
 \end_layout
 
 \begin_layout Standard
-Using HDF5 datasets in Cigma allows us to avoid having to convert between
- too many distinct formats.
- Moreover, due to the amount of disk I/O, large finite element meshes can
- be handled more efficiently in binary format.
- A typical Cigma HDF5 file has the following structure:
+First, extract the global coordinates of the integration points.
+ This will result in an explicit list of points over which to evaluate your
+ field.
 \end_layout
 
 \begin_layout LyX-Code
-model.h5
+cigma extract --mesh=field1.h5:/model/mesh/  
+\backslash
+
 \end_layout
 
 \begin_layout LyX-Code
+              --output=points.h5:/points
+\end_layout
+
+\begin_layout Standard
+At this point, one possibility would be to dump explicit the list of points
+ to a text file, generate the corresponding list of values on your own and
+ import that lsit of values back into an HDF5 file that Cigma can understand.
+\end_layout
 
+\begin_layout LyX-Code
+cigma copy --source=points.h5:/points  
 \backslash
-__ model
+
 \end_layout
 
 \begin_layout LyX-Code
-    |__ mesh
+           --destination=points.txt
 \end_layout
 
 \begin_layout LyX-Code
-    |   |__ coordinates    [nno x nsd]
+
 \end_layout
 
 \begin_layout LyX-Code
-    |   
-\backslash
-__ connectivity   [nel x ndof]
+# create values.txt
 \end_layout
 
 \begin_layout LyX-Code
 
-\backslash
-__ variables
 \end_layout
 
 \begin_layout LyX-Code
-        
+cigma copy --source=values.txt  
 \backslash
-__ velocity
+
+\end_layout
+
+\begin_layout LyX-Code
+           --destination=values.h5:/stepN_values
 \end_layout
 
 \begin_layout LyX-Code
 
-\backslash
-__ step00010  [nno x ndim]
 \end_layout
 
 \begin_layout Standard
-You have a certain amount of flexibility in grouping your own data.
- Cigma will only require you to provide a small amount of metadata on your
- field and mesh datasets, described below:
+Lastly, you can provide the path to the explicit set of values with
 \end_layout
 
-\begin_layout Description
-MeshID a universally unique identifier (uuid) assigned to the mesh for easily
- distinguishing identical meshes.
+\begin_layout LyX-Code
+cigma compare --output=squared-residuals.vtk
 \end_layout
 
-\begin_layout Description
-MeshLocation points to the HDF5 group which contains the appropriate coordinates
- and connectivity datasets.
+\begin_layout LyX-Code
+              --first=field1.h5:/field1/stepN
 \end_layout
 
-\begin_layout Description
-FunctionSpace string identifier to determine which shape functions to use
- for interpolating values inside the element.
+\begin_layout LyX-Code
+              --second=values.h5:/stepN_values
 \end_layout
 
-\begin_layout Subsection
-Importing Data
+\begin_layout LyX-Code
+
 \end_layout
 
-\begin_layout Standard
-In its source distribution, Cigma provides two examples for importing data
- from two different codes into its standard HDF5 format.
+\begin_layout Subsection
+Against a Known Function
 \end_layout
 
 \begin_layout Standard
-Mesh coordinates can be specified in the following format
+If one of your fields is easily described by an analytic expression, then
+ you also have the option to compile your analytic function into cigma,
+ which will enable the (TODO:tt)compare command to reference your function
+ by name:
 \end_layout
 
 \begin_layout LyX-Code
-nno nsd
-\end_layout
 
-\begin_layout LyX-Code
-1 x1 y1 z1
-\end_layout
+\series bold
+cigma compare --output=squared-residuals.vtk 
+\backslash
 
-\begin_layout LyX-Code
-2 x2 y2 z2
 \end_layout
 
 \begin_layout LyX-Code
-3 x3 y3 z3
+
+\series bold
+              --first=field1.h5:/vars/displacement/step0 
+\backslash
+
 \end_layout
 
 \begin_layout LyX-Code
-...
+
+\series bold
+              --second=
+\bar under
+disloc3d
+\bar default
+  
 \end_layout
 
 \begin_layout Standard
-Mesh connectivity with 
+You may also interact with your analytic function by using the (TODO:tt)`cigma
+ eval' command, and obtain a set of values which may then be passed back
+ to the compare command.
+ 
 \end_layout
 
 \begin_layout LyX-Code
-nel ndof
+cigma eval --function=disloc3d 
+\backslash
+
 \end_layout
 
 \begin_layout LyX-Code
-1 node_1 node_2 node_3 node_4 ...
+           --points=points.h5:/points 
+\backslash
+
 \end_layout
 
 \begin_layout LyX-Code
-2 node_1 node_2 node_3 node_4 ...
+           --values=values.h5:/disloc3d_values
 \end_layout
 
 \begin_layout LyX-Code
-3 node_1 node_2 node_3 node_4 ...
+
 \end_layout
 
 \begin_layout LyX-Code
-...
+cigma compare --output=squared-residuals.vtk 
+\backslash
+
 \end_layout
 
-\begin_layout Standard
-A generic field with 
-\family typewriter
-ndim
-\family default
- components is specified by
+\begin_layout LyX-Code
+              --first=field1.h5:/vars/displacement/step0 
+\backslash
+
 \end_layout
 
 \begin_layout LyX-Code
-nno ndim
+              --second=values.h5:/disloc3d_values
 \end_layout
 
 \begin_layout LyX-Code
-1 f1 f2 f3 ..
+
 \end_layout
 
 \begin_layout LyX-Code
-2 f1 f2 f3 ..
+
 \end_layout
 
 \begin_layout LyX-Code
-...
+
 \end_layout
 
 \begin_layout LyX-Code
@@ -1168,7 +1711,7 @@ ed both spatially and temporally.
 placement H
 wide false
 sideways false
-status open
+status collapsed
 
 \begin_layout Standard
 \align center
@@ -1238,7 +1781,7 @@ Here we compare the output from two codes, PyLith-0.8 and GeoFEST-4.5, on
 placement H
 wide false
 sideways false
-status open
+status collapsed
 
 \begin_layout Standard
 \noindent
@@ -1281,7 +1824,7 @@ The first benchmark problem (left) consists of a vertical right-lateral
 placement H
 wide false
 sideways false
-status open
+status collapsed
 
 \begin_layout Standard
 \noindent
@@ -1352,7 +1895,7 @@ In this section, we show ten equally spaced isosurfaces of the displacement
 placement H
 wide false
 sideways false
-status open
+status collapsed
 
 \begin_layout Standard
 \noindent
@@ -1405,7 +1948,7 @@ Slightly different behavior can be observed in the velocity field residuals.
 placement H
 wide false
 sideways false
-status open
+status collapsed
 
 \begin_layout Standard
 \noindent
@@ -1449,7 +1992,7 @@ n mesh (left: t=0 years, right: t=1 year).
 placement H
 wide false
 sideways false
-status open
+status collapsed
 
 \begin_layout Standard
 \noindent
@@ -1503,7 +2046,7 @@ Finally, here is a higher resolution comparison of the displacement residuals
 placement H
 wide false
 sideways false
-status open
+status collapsed
 
 \begin_layout Standard
 \noindent
@@ -1553,7 +2096,7 @@ You can also visualize the distribution of errors by plotting the residual
 placement H
 wide false
 sideways false
-status open
+status collapsed
 
 \begin_layout Standard
 \noindent
@@ -1597,7 +2140,7 @@ Reverse-slip: PyLith-GeoFEST comparison of velocity residuals on a 500m
 placement H
 wide false
 sideways false
-status open
+status collapsed
 
 \begin_layout Standard
 \noindent
@@ -1648,7 +2191,7 @@ tic layer.
 placement H
 wide false
 sideways false
-status open
+status collapsed
 
 \begin_layout Standard
 \noindent
@@ -1692,7 +2235,7 @@ Reverse-slip: PyLith-GeoFEST comparison of displacement residuals on a 500m
 placement H
 wide false
 sideways false
-status open
+status collapsed
 
 \begin_layout Standard
 \noindent



More information about the CIG-COMMITS mailing list