initial upload

This commit is contained in:
2025-12-17 11:00:57 +08:00
parent 2bc7b24a71
commit a09a73537f
4614 changed files with 3478433 additions and 2 deletions

14
PyLaGriT/README Executable file
View File

@@ -0,0 +1,14 @@
PyLaGriT Class
##############
- The PyLaGriT class provides a python interface to the Los Alamos Grid Toolbox.
- The PyLaGrit class is derived class of the perplex packages spawn class, and its objects contains all of spawn's functionality.
- Commands can be sent using LaGriT syntax as string arguments to the sendline method.
- Direct access to the LaGriT shell is provided by the interact method.
- Subclasses of the PyLaGrit class include mesh object (MO), surface, and region and can be created using various methods to PyLaGriT objects.
- The mesh object subclass contains subclasses pset and eltset.
- Subclasses are contained in dictionaries in the parent class.
- The mesh object class contains gmv and paraview methods that dump the appropriate files and open them in viewer.
- PyLaGriT can be accessed in Julia using the Julia PyCall package (refer to PyLaGriT/examples/julia folder in the source code)
See Documentation at https://lanl.github.io/LaGriT/pylagrit/original/index.html

233
PyLaGriT/documentation/Makefile Executable file
View File

@@ -0,0 +1,233 @@
# Makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = build
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
.PHONY: help
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " html to make standalone HTML files"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " singlehtml to make a single large HTML file"
@echo " pickle to make pickle files"
@echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " qthelp to make HTML files and a qthelp project"
@echo " applehelp to make an Apple Help Book"
@echo " devhelp to make HTML files and a Devhelp project"
@echo " epub to make an epub"
@echo " epub3 to make an epub3"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " latexpdf to make LaTeX files and run them through pdflatex"
@echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
@echo " text to make text files"
@echo " man to make manual pages"
@echo " texinfo to make Texinfo files"
@echo " info to make Texinfo files and run them through makeinfo"
@echo " gettext to make PO message catalogs"
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " xml to make Docutils-native XML files"
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
@echo " coverage to run coverage check of the documentation (if enabled)"
@echo " dummy to check syntax errors of document sources"
.PHONY: clean
clean:
rm -rf $(BUILDDIR)/*
.PHONY: html
html:
rm -rf $(BUILDDIR)/html
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
find $(BUILDDIR)/html -name "*.html" | xargs sed -i'.original' -e 's/_static/static/g'
find $(BUILDDIR)/html -name "*.html" | xargs sed -i'.original' -e 's/_image/image/g'
find $(BUILDDIR)/html -name "*.html" | xargs sed -i'.original' -e 's/_sources/sources/g'
mv $(BUILDDIR)/html/_static $(BUILDDIR)/html/static
mv $(BUILDDIR)/html/_images $(BUILDDIR)/html/images
mv $(BUILDDIR)/html/_sources $(BUILDDIR)/html/sources
rm -f $(BUILDDIR)/html/*.original
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
.PHONY: dirhtml
dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
.PHONY: singlehtml
singlehtml:
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
@echo
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
.PHONY: pickle
pickle:
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
@echo
@echo "Build finished; now you can process the pickle files."
.PHONY: json
json:
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
@echo
@echo "Build finished; now you can process the JSON files."
.PHONY: htmlhelp
htmlhelp:
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in $(BUILDDIR)/htmlhelp."
.PHONY: qthelp
qthelp:
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/PyLaGriT.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/PyLaGriT.qhc"
.PHONY: applehelp
applehelp:
$(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
@echo
@echo "Build finished. The help book is in $(BUILDDIR)/applehelp."
@echo "N.B. You won't be able to view it unless you put it in" \
"~/Library/Documentation/Help or install it in your application" \
"bundle."
.PHONY: devhelp
devhelp:
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/PyLaGriT"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/PyLaGriT"
@echo "# devhelp"
.PHONY: epub
epub:
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
.PHONY: epub3
epub3:
$(SPHINXBUILD) -b epub3 $(ALLSPHINXOPTS) $(BUILDDIR)/epub3
@echo
@echo "Build finished. The epub3 file is in $(BUILDDIR)/epub3."
.PHONY: latex
latex:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
@echo "Run \`make' in that directory to run these through (pdf)latex" \
"(use \`make latexpdf' here to do that automatically)."
.PHONY: latexpdf
latexpdf:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through pdflatex..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
.PHONY: latexpdfja
latexpdfja:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through platex and dvipdfmx..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
.PHONY: text
text:
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
@echo
@echo "Build finished. The text files are in $(BUILDDIR)/text."
.PHONY: man
man:
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
@echo
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
.PHONY: texinfo
texinfo:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
@echo "Run \`make' in that directory to run these through makeinfo" \
"(use \`make info' here to do that automatically)."
.PHONY: info
info:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo "Running Texinfo files through makeinfo..."
make -C $(BUILDDIR)/texinfo info
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
.PHONY: gettext
gettext:
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
@echo
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
.PHONY: changes
changes:
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
@echo
@echo "The overview file is in $(BUILDDIR)/changes."
.PHONY: linkcheck
linkcheck:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."
.PHONY: doctest
doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."
.PHONY: coverage
coverage:
$(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage
@echo "Testing of coverage in the sources finished, look at the " \
"results in $(BUILDDIR)/coverage/python.txt."
.PHONY: xml
xml:
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
@echo
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
.PHONY: pseudoxml
pseudoxml:
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
@echo
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
.PHONY: dummy
dummy:
$(SPHINXBUILD) -b dummy $(ALLSPHINXOPTS) $(BUILDDIR)/dummy
@echo
@echo "Build finished. Dummy builder generates no files."

View File

@@ -0,0 +1,21 @@
.. _class_docs:
Class Documentation
-------------------
.. toctree::
PyLaGriT Class <autodoc_pylagrit.rst>
Mesh Class <autodoc_mo.rst>
Point Set Class <autodoc_pset.rst>
Element Set Class <autodoc_eltset.rst>
Face Set Class <autodoc_faceset.rst>
Region Class <autodoc_region.rst>

View File

@@ -0,0 +1,8 @@
Element Set Object
------------------
.. automodule:: pylagrit
.. autoclass:: EltSet
:members:
:undoc-members:

View File

@@ -0,0 +1,8 @@
Face Set Object
---------------
.. automodule:: pylagrit
.. autoclass:: FaceSet
:members:
:undoc-members:

View File

@@ -0,0 +1,8 @@
Mesh Object
-----------
.. automodule:: pylagrit
.. autoclass:: MO
:members:
:undoc-members:

View File

@@ -0,0 +1,8 @@
Point Set Object
----------------
.. automodule:: pylagrit
.. autoclass:: PSet
:members:
:undoc-members:

View File

@@ -0,0 +1,8 @@
PyLaGriT
--------
.. automodule:: pylagrit
.. autoclass:: PyLaGriT
:members:
:undoc-members:

View File

@@ -0,0 +1,8 @@
Region Object
-------------
.. automodule:: pylagrit
.. autoclass:: Region
:members:
:undoc-members:

View File

@@ -0,0 +1,343 @@
# -*- coding: utf-8 -*-
#
# PyLaGriT documentation build configuration file, created by
# sphinx-quickstart on Tue Oct 4 10:10:46 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))
# -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.doctest',
'sphinx.ext.mathjax',
#'sphinx.ext.githubpages',
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'
# The encoding of source files.
#
# source_encoding = 'utf-8-sig'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = u'PyLaGriT'
copyright = u'2016, Dylan R. Harp'
author = u'Dylan R. Harp'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = u'0'
# The full version, including alpha/beta/rc tags.
release = u'0.0.0'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#
# today = ''
#
# Else, today_fmt is used as the format for a strftime call.
#
# today_fmt = '%B %d, %Y'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns = []
# The reST default role (used for this markup: `text`) to use for all
# documents.
#
# default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
#
# add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#
# add_module_names = True
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#
# show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# A list of ignored prefixes for module index sorting.
# modindex_common_prefix = []
# If true, keep warnings as "system message" paragraphs in the built documents.
# keep_warnings = False
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = False
# -- Options for HTML output ----------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'alabaster'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#
# html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
# html_theme_path = []
# The name for this set of Sphinx documents.
# "<project> v<release> documentation" by default.
#
# html_title = u'PyLaGriT v0.0.0'
# A shorter title for the navigation bar. Default is the same as html_title.
#
# html_short_title = None
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#
# html_logo = None
# The name of an image file (relative to this directory) to use as a favicon of
# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#
# html_favicon = None
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['static']
# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
# directly to the root of the documentation.
#
# html_extra_path = []
# If not None, a 'Last updated on:' timestamp is inserted at every page
# bottom, using the given strftime format.
# The empty string is equivalent to '%b %d, %Y'.
#
# html_last_updated_fmt = None
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#
# html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
#
# html_sidebars = {}
# Additional templates that should be rendered to pages, maps page names to
# template names.
#
# html_additional_pages = {}
# If false, no module index is generated.
#
# html_domain_indices = True
# If false, no index is generated.
#
# html_use_index = True
# If true, the index is split into individual pages for each letter.
#
# html_split_index = False
# If true, links to the reST sources are added to the pages.
#
# html_show_sourcelink = True
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
#
# html_show_sphinx = True
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
#
# html_show_copyright = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
#
# html_use_opensearch = ''
# This is the file name suffix for HTML files (e.g. ".xhtml").
# html_file_suffix = None
# Language to be used for generating the HTML full-text search index.
# Sphinx supports the following languages:
# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr', 'zh'
#
# html_search_language = 'en'
# A dictionary with options for the search language support, empty by default.
# 'ja' uses this config value.
# 'zh' user can custom change `jieba` dictionary path.
#
# html_search_options = {'type': 'default'}
# The name of a javascript file (relative to the configuration directory) that
# implements a search results scorer. If empty, the default will be used.
#
# html_search_scorer = 'scorer.js'
# Output file base name for HTML help builder.
htmlhelp_basename = 'PyLaGriTdoc'
# -- Options for LaTeX output ---------------------------------------------
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',
# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'PyLaGriT.tex', u'PyLaGriT Documentation',
u'Dylan R. Harp', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
# the title page.
#
# latex_logo = None
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#
# latex_use_parts = False
# If true, show page references after internal links.
#
# latex_show_pagerefs = False
# If true, show URL addresses after external links.
#
# latex_show_urls = False
# Documents to append as an appendix to all manuals.
#
# latex_appendices = []
# It false, will not define \strong, \code, itleref, \crossref ... but only
# \sphinxstrong, ..., \sphinxtitleref, ... To help avoid clash with user added
# packages.
#
# latex_keep_old_macro_names = True
# If false, no module index is generated.
#
# latex_domain_indices = True
# -- Options for manual page output ---------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'pylagrit', u'PyLaGriT Documentation',
[author], 1)
]
# If true, show URL addresses after external links.
#
# man_show_urls = False
# -- Options for Texinfo output -------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'PyLaGriT', u'PyLaGriT Documentation',
author, 'PyLaGriT', 'One line description of project.',
'Miscellaneous'),
]
# Documents to append as an appendix to all manuals.
#
# texinfo_appendices = []
# If false, no module index is generated.
#
# texinfo_domain_indices = True
# How to display URL addresses: 'footnote', 'no', or 'inline'.
#
# texinfo_show_urls = 'footnote'
# If true, do not generate a @detailmenu in the "Top" node's menu.
#
# texinfo_no_detailmenu = False

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 KiB

View File

@@ -0,0 +1,73 @@
Getting Started
===============
Installation
------------
The Python module PyLaGriT allows LaGriT to be accessed interactively and in batch mode from Python.
To install PyLaGriT on your system, change to the PyLaGriT directory and run ``python setup.py install``.
Alternatively, the PyLaGriT folder can be added to your **PYTHONPATH** environment variable.
Due to the use of the pexpect Python module, PyLaGriT does not work on Windows.
It has been tested on Mac and Linux operating systems.
Since PyLaGriT is simply a frontend for LaGriT, you will need a lagrit executable to use PyLaGriT.
To use the paraview and gmv methods, you will need ParaView (http://www.paraview.org) and GMV (http://www.generalmeshviewer.com) installed, respectively.
To avoid specifying the LaGriT, ParaView, and GMV executable locations, copy the **pylagritrc_example** file:
.. literalinclude:: ../../pylagritrc_example
in the PyLaGriT folder to your home directory or working directory changing its name to either **pylagritrc** or **.pylagritrc** and uncomment and change the path locations.
Simple example
--------------
The following is a PyLaGriT script for creating a simple cube shaped mesh using the :func:`gridder <pylagrit.PyLaGriT.gridder>` and `connect <pylagrit.PyLaGriT.connect>` methods:
.. code-block:: python
# Import PyLaGriT class from pylagrit module
from pylagrit import PyLaGriT
# Create PyLaGriT object
# This assumes that pylagritrc is being used so that lagrit_exe option does not need to be specified
l = PyLaGriT()
# Create x,y,z arrays for location of points
x = range(1,5)
y = range(1,5)
z = range(1,5)
# Create mesh object using x,y,z arrays
m = l.gridder(x,y,z)
# Connect points
m.connect()
# Visualize connected mesh using ParaView
# This assumes that pylagritrc is being used so that exe option does not need to be specified
m.paraview()
The script can be pasted line by line into a Python or IPython terminal, or saved in a file (e.g., ``script.py``) and run on the command line as ``python script.py``.
This will open up ParaView with the mesh loaded:
.. image:: cube.png
Next steps
----------
Additional example PyLaGriT scripts are provided in the PyLaGriT/examples folder and in the :ref:`class_docs`.
Combining LaGriT and Python functionality
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
An example of using PyLaGriT to facilitate looping over LaGriT functionality is described in the :func:`merge method <pylagrit.PyLaGriT.merge>` documentation, where a mesh is successively copied, translated and merged into a larger mesh.
Other examples of usage are provided for other methods and more will be added in the future.
User defined error checking
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Since PyLaGriT stores the LaGriT terminal output from each command in the PyLaGriT object attribute ``before``, user-defined error checking can be easily implemented.
The example provided with the :func:`refine method <pylagrit.EltSet.refine>` demonstrates this by checking for the string `The mesh is complete but could not include all points.` in the LaGriT output using ``lg.before``.
In this example, an error message is printed to the screen and the script is aborted.

View File

@@ -0,0 +1,42 @@
.. PyLaGriT documentation master file, created by
sphinx-quickstart on Tue Oct 4 10:10:46 2016.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
PyLaGriT, Python interface for LaGriT
=====================================
.. include:: ../../README
.. toctree::
:maxdepth: 2
Getting Started <gettingstarted.rst>
Stratigraphic Hex Mesh Tutorial <stratigraphic.rst>
Class Documentation <autodoc.rst>
PyLaGriT source code is packaged with LaGriT source code `here <https://github.com/lanl/LaGriT>`_.
Example scripts can be found `here <https://github.com/lanl/LaGriT/tree/master/PyLaGriT/examples>`_.
Development team
################
* Dylan Harp <dharp@lanl.gov>
* Daniel Livingston <livingston@lanl.gov>
* James (Joe) Beisman <jjbeisman@gmail.com>
* Terry Miller <tamiller@lanl.gov>
* Carl Gable <gable@lanl.gov>
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

View File

@@ -0,0 +1,11 @@
Stratigraphic Hex Mesh Tutorial
===============================
Written by Guoyan Jiang (gyjiang@whu.edu.cn) with technical support from Dylan Harp (dharp@lanl.gov) and Terry Miller (tamiller@lanl.gov).
The associated LaGriT tutorial is `here <https://lanl.github.io/LaGriT/pages/tutorial/stratigraphy/index.html>`_.
This example script can be downloaded `here <https://github.com/lanl/LaGriT/blob/master/PyLaGriT/examples/stratigraphic_hex_mesh_tutorial.py>`_.
.. literalinclude:: ../../examples/stratigraphic_hex_mesh_tutorial.py
The final result:
.. image:: stratigraphy.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 399 KiB

View File

@@ -0,0 +1,101 @@
100 0 0 0 0
0001 0.0000000000000000e+00 0.0000000000000000e+00 5.0716771888730001e+00
0002 2.5191110372539999e-01 0.0000000000000000e+00 5.0716771888730001e+00
0003 5.0382220745090001e-01 0.0000000000000000e+00 5.0716771888730001e+00
0004 7.5573331117630005e-01 0.0000000000000000e+00 5.0718517112730002e+00
0005 1.0076444149020001e+00 0.0000000000000000e+00 5.0847439575200006e+00
0006 1.2595554590230000e+00 0.0000000000000000e+00 5.1445377972627231e+00
0007 1.5114666223530000e+00 0.0000000000000000e+00 5.2030201387405510e+00
0008 1.7633776664730001e+00 0.0000000000000000e+00 5.2377137947080001e+00
0009 2.0152888298030001e+00 0.0000000000000000e+00 5.2666477966310001e+00
0010 2.2671997547150000e+00 0.0000000000000000e+00 5.2951645660400004e+00
0011 2.5191109180450000e+00 0.0000000000000000e+00 5.3237533378600004e+00
0012 2.7710220813749999e+00 0.0000000000000000e+00 5.3532504844670008e+00
0013 3.0229332447049999e+00 0.0000000000000000e+00 5.3852810668950006e+00
0014 3.2748441696169999e+00 0.0000000000000000e+00 5.4106001663210002e+00
0015 3.5267553329469998e+00 0.0000000000000000e+00 5.4309906768800005e+00
0016 3.7786664962769998e+00 0.0000000000000000e+00 5.4567041206360001e+00
0017 4.0305776596070002e+00 0.0000000000000000e+00 5.4910721588130000e+00
0018 4.2824888229370002e+00 0.0000000000000000e+00 5.5325851249690006e+00
0019 4.5343995094300000e+00 0.0000000000000000e+00 5.5765929031370005e+00
0020 4.7863106727600000e+00 0.0000000000000000e+00 5.5945138740540008e+00
0021 5.0382218360900000e+00 0.0000000000000000e+00 5.6068677711490000e+00
0022 5.2901329994199999e+00 0.0000000000000000e+00 5.6192302513120005e+00
0023 5.5420441627499999e+00 0.0000000000000000e+00 5.6317906188960007e+00
0024 5.7939553260799999e+00 0.0000000000000000e+00 5.6339607048030000e+00
0025 6.0458664894099998e+00 0.0000000000000000e+00 5.6332988548280003e+00
0026 6.2977771759029997e+00 0.0000000000000000e+00 5.6272187042240001e+00
0027 6.5496883392329996e+00 0.0000000000000000e+00 5.6173095512390008e+00
0028 6.8015995025629996e+00 0.0000000000000000e+00 5.6057328987120005e+00
0029 7.0535106658939997e+00 0.0000000000000000e+00 5.5889453697200002e+00
0030 7.3054218292239996e+00 0.0000000000000000e+00 5.5792808341980002e+00
0031 7.5573329925539996e+00 0.0000000000000000e+00 5.5792507934570006e+00
0032 7.8092441558839996e+00 0.0000000000000000e+00 5.5837511825560000e+00
0033 8.0611553192140004e+00 0.0000000000000000e+00 5.5882530021670007e+00
0034 8.3130664825440004e+00 0.0000000000000000e+00 5.5927567291260001e+00
0035 8.5649776458740003e+00 0.0000000000000000e+00 5.5954818534850004e+00
0036 8.8168878555300001e+00 0.0000000000000000e+00 5.5987152862550005e+00
0037 9.0687990188600001e+00 0.0000000000000000e+00 5.6090965080260000e+00
0038 9.3207101821900000e+00 0.0000000000000000e+00 5.6176047134400005e+00
0039 9.5726213455200000e+00 0.0000000000000000e+00 5.6170592117310001e+00
0040 9.8245325088500000e+00 0.0000000000000000e+00 5.5915455627440007e+00
0041 1.0076443672180000e+01 0.0000000000000000e+00 5.5661158370970005e+00
0042 1.0328354835510000e+01 0.0000000000000000e+00 5.5407099533080002e+00
0043 1.0580265998840000e+01 0.0000000000000000e+00 5.5318555641170004e+00
0044 1.0832177162170000e+01 0.0000000000000000e+00 5.5223097610470004e+00
0045 1.1084088325500000e+01 0.0000000000000000e+00 5.4992298889160001e+00
0046 1.1335999488830000e+01 0.0000000000000000e+00 5.4565004662170500e+00
0047 1.1587910652160000e+01 0.0000000000000000e+00 5.3937348570795836e+00
0048 1.1839821815490000e+01 0.0000000000000000e+00 5.3156963648324993e+00
0049 1.2091732978820000e+01 0.0000000000000000e+00 5.2597856330870005e+00
0050 1.2343643188480000e+01 0.0000000000000000e+00 5.2352900314330002e+00
0051 0.0000000000000000e+00 2.5000000000000000e-01 5.0716771888730001e+00
0052 2.5191110372539999e-01 2.5000000000000000e-01 5.0716771888730001e+00
0053 5.0382220745090001e-01 2.5000000000000000e-01 5.0716771888730001e+00
0054 7.5573331117630005e-01 2.5000000000000000e-01 5.0718517112730002e+00
0055 1.0076444149020001e+00 2.5000000000000000e-01 5.0847439575200006e+00
0056 1.2595554590230000e+00 2.5000000000000000e-01 5.1445377972627231e+00
0057 1.5114666223530000e+00 2.5000000000000000e-01 5.2030201387405510e+00
0058 1.7633776664730001e+00 2.5000000000000000e-01 5.2377137947080001e+00
0059 2.0152888298030001e+00 2.5000000000000000e-01 5.2666477966310001e+00
0060 2.2671997547150000e+00 2.5000000000000000e-01 5.2951645660400004e+00
0061 2.5191109180450000e+00 2.5000000000000000e-01 5.3237533378600004e+00
0062 2.7710220813749999e+00 2.5000000000000000e-01 5.3532504844670008e+00
0063 3.0229332447049999e+00 2.5000000000000000e-01 5.3852810668950006e+00
0064 3.2748441696169999e+00 2.5000000000000000e-01 5.4106001663210002e+00
0065 3.5267553329469998e+00 2.5000000000000000e-01 5.4309906768800005e+00
0066 3.7786664962769998e+00 2.5000000000000000e-01 5.4567041206360001e+00
0067 4.0305776596070002e+00 2.5000000000000000e-01 5.4910721588130000e+00
0068 4.2824888229370002e+00 2.5000000000000000e-01 5.5325851249690006e+00
0069 4.5343995094300000e+00 2.5000000000000000e-01 5.5765929031370005e+00
0070 4.7863106727600000e+00 2.5000000000000000e-01 5.5945138740540008e+00
0071 5.0382218360900000e+00 2.5000000000000000e-01 5.6068677711490000e+00
0072 5.2901329994199999e+00 2.5000000000000000e-01 5.6192302513120005e+00
0073 5.5420441627499999e+00 2.5000000000000000e-01 5.6317906188960007e+00
0074 5.7939553260799999e+00 2.5000000000000000e-01 5.6339607048030000e+00
0075 6.0458664894099998e+00 2.5000000000000000e-01 5.6332988548280003e+00
0076 6.2977771759029997e+00 2.5000000000000000e-01 5.6272187042240001e+00
0077 6.5496883392329996e+00 2.5000000000000000e-01 5.6173095512390008e+00
0078 6.8015995025629996e+00 2.5000000000000000e-01 5.6057328987120005e+00
0079 7.0535106658939997e+00 2.5000000000000000e-01 5.5889453697200002e+00
0080 7.3054218292239996e+00 2.5000000000000000e-01 5.5792808341980002e+00
0081 7.5573329925539996e+00 2.5000000000000000e-01 5.5792507934570006e+00
0082 7.8092441558839996e+00 2.5000000000000000e-01 5.5837511825560000e+00
0083 8.0611553192140004e+00 2.5000000000000000e-01 5.5882530021670007e+00
0084 8.3130664825440004e+00 2.5000000000000000e-01 5.5927567291260001e+00
0085 8.5649776458740003e+00 2.5000000000000000e-01 5.5954818534850004e+00
0086 8.8168878555300001e+00 2.5000000000000000e-01 5.5987152862550005e+00
0087 9.0687990188600001e+00 2.5000000000000000e-01 5.6090965080260000e+00
0088 9.3207101821900000e+00 2.5000000000000000e-01 5.6176047134400005e+00
0089 9.5726213455200000e+00 2.5000000000000000e-01 5.6170592117310001e+00
0090 9.8245325088500000e+00 2.5000000000000000e-01 5.5915455627440007e+00
0091 1.0076443672180000e+01 2.5000000000000000e-01 5.5661158370970005e+00
0092 1.0328354835510000e+01 2.5000000000000000e-01 5.5407099533080002e+00
0093 1.0580265998840000e+01 2.5000000000000000e-01 5.5318555641170004e+00
0094 1.0832177162170000e+01 2.5000000000000000e-01 5.5223097610470004e+00
0095 1.1084088325500000e+01 2.5000000000000000e-01 5.4992298889160001e+00
0096 1.1335999488830000e+01 2.5000000000000000e-01 5.4565004662170500e+00
0097 1.1587910652160000e+01 2.5000000000000000e-01 5.3937348570795836e+00
0098 1.1839821815490000e+01 2.5000000000000000e-01 5.3156963648324993e+00
0099 1.2091732978820000e+01 2.5000000000000000e-01 5.2597856330870005e+00
0100 1.2343643188480000e+01 2.5000000000000000e-01 5.2352900314330002e+00

View File

@@ -0,0 +1,109 @@
from pylagrit import PyLaGriT
import numpy
# Variables
nx = 50 # Number of points in x direction
dy = 0.25 # width of cells in y direction
distance = 12.34364319 # distance in x direction
l = PyLaGriT()
# Create base layer
layer = l.create_qua()
layer.createpts_xyz((nx,2,1),[0.,0.,0.],[distance,dy,0.],rz_switch=[1,1,1],connect=True)
layer.setatt('itetclr',1)
layer.minmax_xyz()
# Create top of mesh
# Collapse y values
layer.addatt('y_save',vtype='vdouble',rank='scalar')
layer.copyatt('yic','y_save')
layer.setatt('yic',0.)
# Read in lidar top elevations
peat_surf_pts = l.read('surface_coords2.avs')
peat_surf_pts.addatt('z_save',vtype='vdouble',rank='scalar')
peat_surf_pts.copyatt('zic','z_save')
peat_surf_pts.setatt('zic',0.)
# Interpolate surface elevations to layer mo
layer.addatt('z_val',vtype='vdouble',rank='scalar')
layer.interpolate_voronoi('z_val',peat_surf_pts,'z_save')
layer.copyatt('y_save','yic')
layer.copyatt('z_val','zic')
# Save peat top
layer.setatt('imt',1)
layer.setatt('itetclr',1)
layer.dump('tmp_lay_peat_top.inp')
peat_surf_pts.delete()
# Read in peat bottom elevations
peat_bot_pts = l.read('bottom_peat2.avs')
peat_bot_pts.addatt('z_save',vtype='vdouble',rank='scalar')
peat_bot_pts.copyatt('zic','z_save')
peat_bot_pts.setatt('zic',0.)
# Interpolate peat bottom elevations to layer mo
layer.setatt('yic',0.)
layer.addatt('z_val',vtype='vdouble',rank='scalar')
layer.interpolate_voronoi('z_val',peat_bot_pts,'z_save')
layer.copyatt('y_save','yic')
layer.delatt('y_save')
layer.copyatt('z_val','zic')
layer.delatt('z_val')
# Save peat bot
layer.dump('tmp_lay_peat_bot.inp')
# Copy layer to peat_bot for use in generating additional layers
peat_bot = layer.copy()
stack_files = ['tmp_lay_peat_top.inp 1,5']
stack_files.append('tmp_lay_peat_bot.inp 1,33')
# Layer depths?
# 1 2 3 4 5 6 7 8 9 10
layers = [ 1.0, 0.16, 0.32, 0.64, 1.28, 3.2, 6.4, 8.0]
addnum = [ 3, 3, 3, 3, 4, 4, 3, 5]
matnum = [2]*len(layers)
layer_interfaces = numpy.cumsum(layers)
i = 1
for li,m,a in zip(layer_interfaces,matnum,addnum):
layer.math('sub','zic',li,cmosrc=peat_bot)
stack_files.append('tmp_lay'+str(i)+'.inp '+str(int(m))+', '+str(a))
layer.dump('tmp_lay'+str(i)+'.inp')
i += 1
layer.setatt('zic',-45.)
layer.dump('tmp_lay_bot.inp')
stack_files.append('tmp_lay_bot.inp 2')
stack_files.reverse()
# Create stacked layer mesh and fill
stack = l.create()
stack.stack_layers(stack_files,file_type='avs',flip_opt=True)
stack_hex = stack.stack_fill()
# Create boundary facesets, dictionary of PyLaGriT faceset objects is returned
fs = stack_hex.create_boundary_facesets(base_name='faceset_bounds',stacked_layers=True,reorder=True)
# Should add this to PyLaGriT, but I'm feeling lazy ;-)
stack_hex.sendline('quality volume itetclr')
# Write exo file with boundary facesets
stack_hex.dump_exo('arctic_siteb_2d.exo',facesets=fs.values())
# Write region and faceset identifier file for ats_xml
matnames = {10000:'computational domain peat',
20000:'computational domain upper mineral'}
facenames = {1:'bottom face',
2:'surface',
3:'front',
4:'right',
5:'back',
6:'left'}
stack_hex.dump_ats_xml('arctic_siteb_2d_mesh.xml','/scratch/tundra/dharp/arctic/geophysics/mesh/from_lucia/arctic_siteb_2d.exo',matnames=matnames,facenames=facenames)
stack_hex.dump_ats_xml('arctic_siteb_2d_par4_mesh.xml','/scratch/tundra/dharp/arctic/geophysics/mesh/from_lucia/arctic_siteb_2d.par',matnames=matnames,facenames=facenames)

View File

@@ -0,0 +1,101 @@
100 0 0 0 0
0001 0.0000000000000000e+00 0.0000000000000000e+00 5.2166771888729997e+00
0002 2.5191110372539999e-01 0.0000000000000000e+00 5.2166771888729997e+00
0003 5.0382220745090001e-01 0.0000000000000000e+00 5.2166771888729997e+00
0004 7.5573331117630005e-01 0.0000000000000000e+00 5.2168517112729997e+00
0005 1.0076444149020001e+00 0.0000000000000000e+00 5.2297439575200002e+00
0006 1.2595554590230000e+00 0.0000000000000000e+00 5.2605857849120001e+00
0007 1.5114666223530000e+00 0.0000000000000000e+00 5.2903299331670004e+00
0008 1.7633776664730001e+00 0.0000000000000000e+00 5.3202137947079997e+00
0009 2.0152888298030001e+00 0.0000000000000000e+00 5.3491477966309997e+00
0010 2.2671997547150000e+00 0.0000000000000000e+00 5.3776645660400000e+00
0011 2.5191109180450000e+00 0.0000000000000000e+00 5.4062533378600000e+00
0012 2.7710220813749999e+00 0.0000000000000000e+00 5.4357504844670004e+00
0013 3.0229332447049999e+00 0.0000000000000000e+00 5.4677810668950002e+00
0014 3.2748441696169999e+00 0.0000000000000000e+00 5.4931001663209997e+00
0015 3.5267553329469998e+00 0.0000000000000000e+00 5.5134906768800001e+00
0016 3.7786664962769998e+00 0.0000000000000000e+00 5.5392041206359997e+00
0017 4.0305776596070002e+00 0.0000000000000000e+00 5.5735721588129996e+00
0018 4.2824888229370002e+00 0.0000000000000000e+00 5.6150851249690001e+00
0019 4.5343995094300000e+00 0.0000000000000000e+00 5.6590929031370001e+00
0020 4.7863106727600000e+00 0.0000000000000000e+00 5.6770138740540004e+00
0021 5.0382218360900000e+00 0.0000000000000000e+00 5.6893677711489996e+00
0022 5.2901329994199999e+00 0.0000000000000000e+00 5.7017302513120001e+00
0023 5.5420441627499999e+00 0.0000000000000000e+00 5.7142906188960003e+00
0024 5.7939553260799999e+00 0.0000000000000000e+00 5.7164607048029996e+00
0025 6.0458664894099998e+00 0.0000000000000000e+00 5.7157988548279999e+00
0026 6.2977771759029997e+00 0.0000000000000000e+00 5.7097187042239996e+00
0027 6.5496883392329996e+00 0.0000000000000000e+00 5.6998095512390003e+00
0028 6.8015995025629996e+00 0.0000000000000000e+00 5.6882328987120001e+00
0029 7.0535106658939997e+00 0.0000000000000000e+00 5.6714453697199998e+00
0030 7.3054218292239996e+00 0.0000000000000000e+00 5.6617808341979998e+00
0031 7.5573329925539996e+00 0.0000000000000000e+00 5.6617507934570002e+00
0032 7.8092441558839996e+00 0.0000000000000000e+00 5.6662511825559996e+00
0033 8.0611553192140004e+00 0.0000000000000000e+00 5.6707530021670003e+00
0034 8.3130664825440004e+00 0.0000000000000000e+00 5.6752567291259997e+00
0035 8.5649776458740003e+00 0.0000000000000000e+00 5.6779818534850000e+00
0036 8.8168878555300001e+00 0.0000000000000000e+00 5.6812152862550001e+00
0037 9.0687990188600001e+00 0.0000000000000000e+00 5.6915965080259996e+00
0038 9.3207101821900000e+00 0.0000000000000000e+00 5.7001047134400000e+00
0039 9.5726213455200000e+00 0.0000000000000000e+00 5.6995592117309997e+00
0040 9.8245325088500000e+00 0.0000000000000000e+00 5.6740455627440003e+00
0041 1.0076443672180000e+01 0.0000000000000000e+00 5.6486158370970001e+00
0042 1.0328354835510000e+01 0.0000000000000000e+00 5.6232099533079998e+00
0043 1.0580265998840000e+01 0.0000000000000000e+00 5.6143555641170000e+00
0044 1.0832177162170000e+01 0.0000000000000000e+00 5.6048097610470000e+00
0045 1.1084088325500000e+01 0.0000000000000000e+00 5.5817298889159996e+00
0046 1.1335999488830000e+01 0.0000000000000000e+00 5.5391097068789996e+00
0047 1.1587910652160000e+01 0.0000000000000000e+00 5.4855241775510004e+00
0048 1.1839821815490000e+01 0.0000000000000000e+00 5.4387569427490003e+00
0049 1.2091732978820000e+01 0.0000000000000000e+00 5.4047856330870001e+00
0050 1.2343643188480000e+01 0.0000000000000000e+00 5.3802900314329998e+00
0051 0.0000000000000000e+00 2.5000000000000000e-01 5.2166771888729997e+00
0052 2.5191110372539999e-01 2.5000000000000000e-01 5.2166771888729997e+00
0053 5.0382220745090001e-01 2.5000000000000000e-01 5.2166771888729997e+00
0054 7.5573331117630005e-01 2.5000000000000000e-01 5.2168517112729997e+00
0055 1.0076444149020001e+00 2.5000000000000000e-01 5.2297439575200002e+00
0056 1.2595554590230000e+00 2.5000000000000000e-01 5.2605857849120001e+00
0057 1.5114666223530000e+00 2.5000000000000000e-01 5.2903299331670004e+00
0058 1.7633776664730001e+00 2.5000000000000000e-01 5.3202137947079997e+00
0059 2.0152888298030001e+00 2.5000000000000000e-01 5.3491477966309997e+00
0060 2.2671997547150000e+00 2.5000000000000000e-01 5.3776645660400000e+00
0061 2.5191109180450000e+00 2.5000000000000000e-01 5.4062533378600000e+00
0062 2.7710220813749999e+00 2.5000000000000000e-01 5.4357504844670004e+00
0063 3.0229332447049999e+00 2.5000000000000000e-01 5.4677810668950002e+00
0064 3.2748441696169999e+00 2.5000000000000000e-01 5.4931001663209997e+00
0065 3.5267553329469998e+00 2.5000000000000000e-01 5.5134906768800001e+00
0066 3.7786664962769998e+00 2.5000000000000000e-01 5.5392041206359997e+00
0067 4.0305776596070002e+00 2.5000000000000000e-01 5.5735721588129996e+00
0068 4.2824888229370002e+00 2.5000000000000000e-01 5.6150851249690001e+00
0069 4.5343995094300000e+00 2.5000000000000000e-01 5.6590929031370001e+00
0070 4.7863106727600000e+00 2.5000000000000000e-01 5.6770138740540004e+00
0071 5.0382218360900000e+00 2.5000000000000000e-01 5.6893677711489996e+00
0072 5.2901329994199999e+00 2.5000000000000000e-01 5.7017302513120001e+00
0073 5.5420441627499999e+00 2.5000000000000000e-01 5.7142906188960003e+00
0074 5.7939553260799999e+00 2.5000000000000000e-01 5.7164607048029996e+00
0075 6.0458664894099998e+00 2.5000000000000000e-01 5.7157988548279999e+00
0076 6.2977771759029997e+00 2.5000000000000000e-01 5.7097187042239996e+00
0077 6.5496883392329996e+00 2.5000000000000000e-01 5.6998095512390003e+00
0078 6.8015995025629996e+00 2.5000000000000000e-01 5.6882328987120001e+00
0079 7.0535106658939997e+00 2.5000000000000000e-01 5.6714453697199998e+00
0080 7.3054218292239996e+00 2.5000000000000000e-01 5.6617808341979998e+00
0081 7.5573329925539996e+00 2.5000000000000000e-01 5.6617507934570002e+00
0082 7.8092441558839996e+00 2.5000000000000000e-01 5.6662511825559996e+00
0083 8.0611553192140004e+00 2.5000000000000000e-01 5.6707530021670003e+00
0084 8.3130664825440004e+00 2.5000000000000000e-01 5.6752567291259997e+00
0085 8.5649776458740003e+00 2.5000000000000000e-01 5.6779818534850000e+00
0086 8.8168878555300001e+00 2.5000000000000000e-01 5.6812152862550001e+00
0087 9.0687990188600001e+00 2.5000000000000000e-01 5.6915965080259996e+00
0088 9.3207101821900000e+00 2.5000000000000000e-01 5.7001047134400000e+00
0089 9.5726213455200000e+00 2.5000000000000000e-01 5.6995592117309997e+00
0090 9.8245325088500000e+00 2.5000000000000000e-01 5.6740455627440003e+00
0091 1.0076443672180000e+01 2.5000000000000000e-01 5.6486158370970001e+00
0092 1.0328354835510000e+01 2.5000000000000000e-01 5.6232099533079998e+00
0093 1.0580265998840000e+01 2.5000000000000000e-01 5.6143555641170000e+00
0094 1.0832177162170000e+01 2.5000000000000000e-01 5.6048097610470000e+00
0095 1.1084088325500000e+01 2.5000000000000000e-01 5.5817298889159996e+00
0096 1.1335999488830000e+01 2.5000000000000000e-01 5.5391097068789996e+00
0097 1.1587910652160000e+01 2.5000000000000000e-01 5.4855241775510004e+00
0098 1.1839821815490000e+01 2.5000000000000000e-01 5.4387569427490003e+00
0099 1.2091732978820000e+01 2.5000000000000000e-01 5.4047856330870001e+00
0100 1.2343643188480000e+01 2.5000000000000000e-01 5.3802900314329998e+00

View File

@@ -0,0 +1,142 @@
Distance_m,X,Y,Z
0,585621.2001,7910271.778,5.380000114
0.250210394,585621.192,7910272.028,5.389999866
0.500420788,585621.1839,7910272.278,5.429999828
0.750631183,585621.1758,7910272.528,5.440000057
1.000841577,585621.1677,7910272.778,5.440000057
1.251051971,585621.1596,7910273.028,5.449999809
1.501262365,585621.1515,7910273.278,5.449999809
1.75147276,585621.1435,7910273.528,5.460000038
2.001683154,585621.1354,7910273.779,5.440000057
2.251893548,585621.1273,7910274.029,5.440000057
2.502103942,585621.1192,7910274.279,5.449999809
2.752314336,585621.1111,7910274.529,5.449999809
3.002524731,585621.103,7910274.779,5.449999809
3.252735125,585621.0949,7910275.029,5.440000057
3.502945519,585621.0869,7910275.279,5.460000038
3.753155913,585621.0788,7910275.529,5.46999979
4.003366307,585621.0707,7910275.779,5.46999979
4.253576702,585621.0626,7910276.029,5.480000019
4.503787096,585621.0545,7910276.279,5.5
4.75399749,585621.0464,7910276.529,5.510000229
5.004207884,585621.0383,7910276.78,5.510000229
5.254418279,585621.0302,7910277.03,5.510000229
5.504628673,585621.0222,7910277.28,5.519999981
5.754839067,585621.0141,7910277.53,5.559999943
6.005049461,585621.006,7910277.78,5.550000191
6.255259855,585620.9979,7910278.03,5.550000191
6.50547025,585620.9898,7910278.28,5.570000172
6.755680644,585620.9817,7910278.53,5.579999924
7.005891038,585620.9736,7910278.78,5.570000172
7.256101432,585620.9655,7910279.03,5.559999943
7.506311826,585620.9575,7910279.28,5.550000191
7.756522221,585620.9494,7910279.53,5.550000191
8.006732615,585620.9413,7910279.78,5.510000229
8.256943009,585620.9332,7910280.031,5.489999771
8.507153403,585620.9251,7910280.281,5.480000019
8.757363798,585620.917,7910280.531,5.449999809
9.007574192,585620.9089,7910280.781,5.400000095
9.257784586,585620.9009,7910281.031,5.360000134
9.50799498,585620.8928,7910281.281,5.329999924
9.758205374,585620.8847,7910281.531,5.309999943
10.00841577,585620.8766,7910281.781,5.300000191
10.25862616,585620.8685,7910282.031,5.289999962
10.50883656,585620.8604,7910282.281,5.289999962
10.75904695,585620.8523,7910282.531,5.28000021
11.00925735,585620.8442,7910282.781,5.289999962
11.25946774,585620.8362,7910283.032,5.300000191
11.50967813,585620.8281,7910283.282,5.320000172
11.75988853,585620.82,7910283.532,5.329999924
12.01009892,585620.8119,7910283.782,5.360000134
12.26030932,585620.8038,7910284.032,5.400000095
12.51051971,585620.7957,7910284.282,5.400000095
12.76073011,585620.7876,7910284.532,5.400000095
13.0109405,585620.7795,7910284.782,5.380000114
13.26115089,585620.7715,7910285.032,5.380000114
13.51136129,585620.7634,7910285.282,5.369999886
13.76157168,585620.7553,7910285.532,5.340000153
14.01178208,585620.7472,7910285.782,5.329999924
14.26199247,585620.7391,7910286.032,5.329999924
14.51220286,585620.731,7910286.283,5.320000172
14.76241326,585620.7229,7910286.533,5.320000172
15.01262365,585620.7148,7910286.783,5.309999943
15.26283405,585620.7068,7910287.033,5.289999962
15.51304444,585620.6987,7910287.283,5.309999943
15.76325484,585620.6906,7910287.533,5.300000191
16.01346523,585620.6825,7910287.783,5.289999962
16.26367562,585620.6744,7910288.033,5.300000191
16.51388602,585620.6663,7910288.283,5.300000191
16.76409641,585620.6582,7910288.533,5.289999962
17.01430681,585620.6502,7910288.783,5.300000191
17.2645172,585620.6421,7910289.033,5.309999943
17.5147276,585620.634,7910289.284,5.300000191
17.76493799,585620.6259,7910289.534,5.309999943
18.01514838,585620.6178,7910289.784,5.329999924
18.26535878,585620.6097,7910290.034,5.349999905
18.51556917,585620.6016,7910290.284,5.340000153
18.76577957,585620.5935,7910290.534,5.340000153
19.01598996,585620.5855,7910290.784,5.340000153
19.26620035,585620.5774,7910291.034,5.329999924
19.51641075,585620.5693,7910291.284,5.329999924
19.76662114,585620.5612,7910291.534,5.329999924
20.01683154,585620.5531,7910291.784,5.320000172
20.26704193,585620.545,7910292.034,5.309999943
20.51725233,585620.5369,7910292.284,5.28000021
20.76746272,585620.5288,7910292.535,5.269999981
21.01767311,585620.5208,7910292.785,5.230000019
21.26788351,585620.5127,7910293.035,5.230000019
21.5180939,585620.5046,7910293.285,5.210000038
21.7683043,585620.4965,7910293.535,5.199999809
22.01851469,585620.4884,7910293.785,5.199999809
22.26872509,585620.4803,7910294.035,5.190000057
22.51893548,585620.4722,7910294.285,5.199999809
22.76914587,585620.4642,7910294.535,5.199999809
23.01935627,585620.4561,7910294.785,5.210000038
23.26956666,585620.448,7910295.035,5.230000019
23.51977706,585620.4399,7910295.285,5.239999771
23.76998745,585620.4318,7910295.536,5.25
24.02019784,585620.4237,7910295.786,5.260000229
24.27040824,585620.4156,7910296.036,5.269999981
24.52061863,585620.4075,7910296.286,5.269999981
24.77082903,585620.3995,7910296.536,5.25
25.02103942,585620.3914,7910296.786,5.239999771
25.27124982,585620.3833,7910297.036,5.230000019
25.52146021,585620.3752,7910297.286,5.21999979
25.7716706,585620.3671,7910297.536,5.25
26.021881,585620.359,7910297.786,5.230000019
26.27209139,585620.3509,7910298.036,5.239999771
26.52230179,585620.3428,7910298.286,5.25
26.77251218,585620.3348,7910298.536,5.239999771
27.02272258,585620.3267,7910298.787,5.239999771
27.27293297,585620.3186,7910299.037,5.239999771
27.52314336,585620.3105,7910299.287,5.230000019
27.77335376,585620.3024,7910299.537,5.239999771
28.02356415,585620.2943,7910299.787,5.239999771
28.27377455,585620.2862,7910300.037,5.260000229
28.52398494,585620.2781,7910300.287,5.25
28.77419533,585620.2701,7910300.537,5.269999981
29.02440573,585620.262,7910300.787,5.260000229
29.27461612,585620.2539,7910301.037,5.269999981
29.52482652,585620.2458,7910301.287,5.260000229
29.77503691,585620.2377,7910301.537,5.260000229
30.02524731,585620.2296,7910301.788,5.260000229
30.2754577,585620.2215,7910302.038,5.260000229
30.52566809,585620.2135,7910302.288,5.28000021
30.77587849,585620.2054,7910302.538,5.289999962
31.02608888,585620.1973,7910302.788,5.300000191
31.27629928,585620.1892,7910303.038,5.269999981
31.52650967,585620.1811,7910303.288,5.289999962
31.77672007,585620.173,7910303.538,5.269999981
32.02693046,585620.1649,7910303.788,5.269999981
32.27714085,585620.1568,7910304.038,5.260000229
32.52735125,585620.1488,7910304.288,5.269999981
32.77756164,585620.1407,7910304.538,5.269999981
33.02777204,585620.1326,7910304.788,5.239999771
33.27798243,585620.1245,7910305.039,5.25
33.52819283,585620.1164,7910305.289,5.239999771
33.77840322,585620.1083,7910305.539,5.230000019
34.02861361,585620.1002,7910305.789,5.239999771
34.27882401,585620.0921,7910306.039,5.25
34.5290344,585620.0841,7910306.289,5.239999771
34.7792448,585620.076,7910306.539,5.239999771
35.02945519,585620.0679,7910306.789,5.210000038
1 Distance_m X Y Z
2 0 585621.2001 7910271.778 5.380000114
3 0.250210394 585621.192 7910272.028 5.389999866
4 0.500420788 585621.1839 7910272.278 5.429999828
5 0.750631183 585621.1758 7910272.528 5.440000057
6 1.000841577 585621.1677 7910272.778 5.440000057
7 1.251051971 585621.1596 7910273.028 5.449999809
8 1.501262365 585621.1515 7910273.278 5.449999809
9 1.75147276 585621.1435 7910273.528 5.460000038
10 2.001683154 585621.1354 7910273.779 5.440000057
11 2.251893548 585621.1273 7910274.029 5.440000057
12 2.502103942 585621.1192 7910274.279 5.449999809
13 2.752314336 585621.1111 7910274.529 5.449999809
14 3.002524731 585621.103 7910274.779 5.449999809
15 3.252735125 585621.0949 7910275.029 5.440000057
16 3.502945519 585621.0869 7910275.279 5.460000038
17 3.753155913 585621.0788 7910275.529 5.46999979
18 4.003366307 585621.0707 7910275.779 5.46999979
19 4.253576702 585621.0626 7910276.029 5.480000019
20 4.503787096 585621.0545 7910276.279 5.5
21 4.75399749 585621.0464 7910276.529 5.510000229
22 5.004207884 585621.0383 7910276.78 5.510000229
23 5.254418279 585621.0302 7910277.03 5.510000229
24 5.504628673 585621.0222 7910277.28 5.519999981
25 5.754839067 585621.0141 7910277.53 5.559999943
26 6.005049461 585621.006 7910277.78 5.550000191
27 6.255259855 585620.9979 7910278.03 5.550000191
28 6.50547025 585620.9898 7910278.28 5.570000172
29 6.755680644 585620.9817 7910278.53 5.579999924
30 7.005891038 585620.9736 7910278.78 5.570000172
31 7.256101432 585620.9655 7910279.03 5.559999943
32 7.506311826 585620.9575 7910279.28 5.550000191
33 7.756522221 585620.9494 7910279.53 5.550000191
34 8.006732615 585620.9413 7910279.78 5.510000229
35 8.256943009 585620.9332 7910280.031 5.489999771
36 8.507153403 585620.9251 7910280.281 5.480000019
37 8.757363798 585620.917 7910280.531 5.449999809
38 9.007574192 585620.9089 7910280.781 5.400000095
39 9.257784586 585620.9009 7910281.031 5.360000134
40 9.50799498 585620.8928 7910281.281 5.329999924
41 9.758205374 585620.8847 7910281.531 5.309999943
42 10.00841577 585620.8766 7910281.781 5.300000191
43 10.25862616 585620.8685 7910282.031 5.289999962
44 10.50883656 585620.8604 7910282.281 5.289999962
45 10.75904695 585620.8523 7910282.531 5.28000021
46 11.00925735 585620.8442 7910282.781 5.289999962
47 11.25946774 585620.8362 7910283.032 5.300000191
48 11.50967813 585620.8281 7910283.282 5.320000172
49 11.75988853 585620.82 7910283.532 5.329999924
50 12.01009892 585620.8119 7910283.782 5.360000134
51 12.26030932 585620.8038 7910284.032 5.400000095
52 12.51051971 585620.7957 7910284.282 5.400000095
53 12.76073011 585620.7876 7910284.532 5.400000095
54 13.0109405 585620.7795 7910284.782 5.380000114
55 13.26115089 585620.7715 7910285.032 5.380000114
56 13.51136129 585620.7634 7910285.282 5.369999886
57 13.76157168 585620.7553 7910285.532 5.340000153
58 14.01178208 585620.7472 7910285.782 5.329999924
59 14.26199247 585620.7391 7910286.032 5.329999924
60 14.51220286 585620.731 7910286.283 5.320000172
61 14.76241326 585620.7229 7910286.533 5.320000172
62 15.01262365 585620.7148 7910286.783 5.309999943
63 15.26283405 585620.7068 7910287.033 5.289999962
64 15.51304444 585620.6987 7910287.283 5.309999943
65 15.76325484 585620.6906 7910287.533 5.300000191
66 16.01346523 585620.6825 7910287.783 5.289999962
67 16.26367562 585620.6744 7910288.033 5.300000191
68 16.51388602 585620.6663 7910288.283 5.300000191
69 16.76409641 585620.6582 7910288.533 5.289999962
70 17.01430681 585620.6502 7910288.783 5.300000191
71 17.2645172 585620.6421 7910289.033 5.309999943
72 17.5147276 585620.634 7910289.284 5.300000191
73 17.76493799 585620.6259 7910289.534 5.309999943
74 18.01514838 585620.6178 7910289.784 5.329999924
75 18.26535878 585620.6097 7910290.034 5.349999905
76 18.51556917 585620.6016 7910290.284 5.340000153
77 18.76577957 585620.5935 7910290.534 5.340000153
78 19.01598996 585620.5855 7910290.784 5.340000153
79 19.26620035 585620.5774 7910291.034 5.329999924
80 19.51641075 585620.5693 7910291.284 5.329999924
81 19.76662114 585620.5612 7910291.534 5.329999924
82 20.01683154 585620.5531 7910291.784 5.320000172
83 20.26704193 585620.545 7910292.034 5.309999943
84 20.51725233 585620.5369 7910292.284 5.28000021
85 20.76746272 585620.5288 7910292.535 5.269999981
86 21.01767311 585620.5208 7910292.785 5.230000019
87 21.26788351 585620.5127 7910293.035 5.230000019
88 21.5180939 585620.5046 7910293.285 5.210000038
89 21.7683043 585620.4965 7910293.535 5.199999809
90 22.01851469 585620.4884 7910293.785 5.199999809
91 22.26872509 585620.4803 7910294.035 5.190000057
92 22.51893548 585620.4722 7910294.285 5.199999809
93 22.76914587 585620.4642 7910294.535 5.199999809
94 23.01935627 585620.4561 7910294.785 5.210000038
95 23.26956666 585620.448 7910295.035 5.230000019
96 23.51977706 585620.4399 7910295.285 5.239999771
97 23.76998745 585620.4318 7910295.536 5.25
98 24.02019784 585620.4237 7910295.786 5.260000229
99 24.27040824 585620.4156 7910296.036 5.269999981
100 24.52061863 585620.4075 7910296.286 5.269999981
101 24.77082903 585620.3995 7910296.536 5.25
102 25.02103942 585620.3914 7910296.786 5.239999771
103 25.27124982 585620.3833 7910297.036 5.230000019
104 25.52146021 585620.3752 7910297.286 5.21999979
105 25.7716706 585620.3671 7910297.536 5.25
106 26.021881 585620.359 7910297.786 5.230000019
107 26.27209139 585620.3509 7910298.036 5.239999771
108 26.52230179 585620.3428 7910298.286 5.25
109 26.77251218 585620.3348 7910298.536 5.239999771
110 27.02272258 585620.3267 7910298.787 5.239999771
111 27.27293297 585620.3186 7910299.037 5.239999771
112 27.52314336 585620.3105 7910299.287 5.230000019
113 27.77335376 585620.3024 7910299.537 5.239999771
114 28.02356415 585620.2943 7910299.787 5.239999771
115 28.27377455 585620.2862 7910300.037 5.260000229
116 28.52398494 585620.2781 7910300.287 5.25
117 28.77419533 585620.2701 7910300.537 5.269999981
118 29.02440573 585620.262 7910300.787 5.260000229
119 29.27461612 585620.2539 7910301.037 5.269999981
120 29.52482652 585620.2458 7910301.287 5.260000229
121 29.77503691 585620.2377 7910301.537 5.260000229
122 30.02524731 585620.2296 7910301.788 5.260000229
123 30.2754577 585620.2215 7910302.038 5.260000229
124 30.52566809 585620.2135 7910302.288 5.28000021
125 30.77587849 585620.2054 7910302.538 5.289999962
126 31.02608888 585620.1973 7910302.788 5.300000191
127 31.27629928 585620.1892 7910303.038 5.269999981
128 31.52650967 585620.1811 7910303.288 5.289999962
129 31.77672007 585620.173 7910303.538 5.269999981
130 32.02693046 585620.1649 7910303.788 5.269999981
131 32.27714085 585620.1568 7910304.038 5.260000229
132 32.52735125 585620.1488 7910304.288 5.269999981
133 32.77756164 585620.1407 7910304.538 5.269999981
134 33.02777204 585620.1326 7910304.788 5.239999771
135 33.27798243 585620.1245 7910305.039 5.25
136 33.52819283 585620.1164 7910305.289 5.239999771
137 33.77840322 585620.1083 7910305.539 5.230000019
138 34.02861361 585620.1002 7910305.789 5.239999771
139 34.27882401 585620.0921 7910306.039 5.25
140 34.5290344 585620.0841 7910306.289 5.239999771
141 34.7792448 585620.076 7910306.539 5.239999771
142 35.02945519 585620.0679 7910306.789 5.210000038

View File

@@ -0,0 +1,118 @@
from pylagrit import PyLaGriT
import numpy as np
lg = PyLaGriT()
# Create base layer from x=10 to x=21 to match bert02 mesh
x = np.linspace(10.,21,(21.-10.)/0.25+1)
y = [0.,0.25]
top = lg.gridder(x,y,elem_type='quad',connect=True)
# Create top of mesh
# Collapse y values
top.addatt('y_save',vtype='vdouble',rank='scalar')
top.copyatt('yic','y_save')
top.setatt('yic',0.)
# Read in top elevations
d = np.genfromtxt("./Topo_Profile_NS_ERT.csv", delimiter=",", names=True)
surf_pts = lg.points(x=d['Distance_m'],z=d['Z'],elem_type='quad')
surf_pts.addatt('z_save',vtype='vdouble',rank='scalar')
surf_pts.copyatt('zic','z_save')
surf_pts.setatt('zic',0.)
# Interpolate surface elevations to top
top.addatt('z_val',vtype='vdouble',rank='scalar')
top.interpolate_voronoi('z_val',surf_pts,'z_save')
top.copyatt('y_save','yic')
top.copyatt('z_val','zic')
# Save top
top.setatt('imt',1)
top.setatt('itetclr',1)
top.dump('tmp_lay_peat_top.inp')
surf_pts.delete()
# Copy top to create intermediate layers
layer = top.copy()
# Begin to construct stacked layer arrays
# Names of layer files
stack_files = ['tmp_lay_peat_top.inp']
# Material id, should be same length as length of stack_files
matids = [1]
# Add (15) 2 cm thick layers
layer.math('sub',0.02*15,'zic')
layer.dump('tmp_lay1.inp')
stack_files.append('tmp_lay1.inp')
# Number of layers in between surfaces, should be length of stack_files - 1
nlayers = [14]
matids.append(1)
# Add (15) 5 cm thick layers
layer.math('sub',0.05*15,'zic')
layer.dump('tmp_lay2.inp')
stack_files.append('tmp_lay2.inp')
# Number of layers in between surfaces, should be length of stack_files - 1
nlayers.append(14)
matids.append(2)
# Add (15) 10 cm thick layers
layer.math('sub',0.1*15,'zic')
layer.dump('tmp_lay3.inp')
stack_files.append('tmp_lay3.inp')
# Number of layers in between surfaces, should be length of stack_files - 1
nlayers.append(14)
matids.append(2)
# Add (15) 1 c thick layers
layer.math('sub',1*15,'zic')
layer.dump('tmp_lay3.inp')
stack_files.append('tmp_lay3.inp')
# Number of layers in between surfaces, should be length of stack_files - 1
nlayers.append(14)
matids.append(2)
layer.math('sub',2.*15.,'zic')
layer.dump('tmp_lay4.inp')
stack_files.append('tmp_lay4.inp')
nlayers.append(14)
matids.append(2)
layer.setatt('zic',-45.)
layer.dump('tmp_lay_bot.inp')
stack_files.append('tmp_lay_bot.inp 2')
nlayers.append(1)
matids.append(2)
# Create stacked layer mesh and fill
# Reverse arrays so that order is from bottom to top!!!
stack_files.reverse()
nlayers.reverse()
matids.reverse()
stack = lg.create()
stack.stack_layers(stack_files,nlayers=nlayers,matids=matids,flip_opt=True)
stack_hex = stack.stack_fill()
# Create boundary facesets, dictionary of PyLaGriT faceset objects is returned
fs = stack_hex.create_boundary_facesets(base_name='faceset_bounds',stacked_layers=True,reorder=True)
# Should add this to PyLaGriT, but I'm feeling lazy ;-)
stack_hex.sendline('quality volume itetclr')
# Write exo file with boundary facesets
stack_hex.dump_exo('arctic_siteb_2d.exo',facesets=fs.values())
# Write region and faceset identifier file for ats_xml
matnames = {10000:'computational domain peat',
20000:'computational domain upper mineral'}
facenames = {1:'bottom face',
2:'surface',
3:'front',
4:'right',
5:'back',
6:'left'}
stack_hex.dump_ats_xml('arctic_siteb_2d_mesh.xml','/scratch/tundra/dharp/arctic/geophysics/mesh/from_lucia/arctic_siteb_2d.exo',matnames=matnames,facenames=facenames)
stack_hex.dump_ats_xml('arctic_siteb_2d_par4_mesh.xml','/scratch/tundra/dharp/arctic/geophysics/mesh/from_lucia/arctic_siteb_2d.par',matnames=matnames,facenames=facenames)

Binary file not shown.

View File

@@ -0,0 +1,160 @@
from pylagrit import PyLaGriT
import numpy as np
lg = PyLaGriT()
# Create base layer, with x matching s from the csv file
x = np.linspace(0.,29.75,(29.75-0.)/0.25+1)
y = [0.,0.25]
top = lg.gridder(x,y,elem_type='quad',connect=True)
# Create top of mesh
# Collapse y values
top.addatt('y_save',vtype='vdouble',rank='scalar')
top.copyatt('yic','y_save')
top.setatt('yic',0.)
# Read in top elevations
d = np.genfromtxt("transectNWSE.csv", delimiter=",", names=True)
coords = np.column_stack([d['s'],np.zeros_like(d['s']),d['z']])
surf_pts = lg.points(coords,elem_type='quad')
surf_pts.addatt('z_save',vtype='vdouble',rank='scalar')
surf_pts.copyatt('zic','z_save')
surf_pts.setatt('zic',0.)
# Interpolate surface elevations to top
top.addatt('z_val',vtype='vdouble',rank='scalar')
top.interpolate_voronoi('z_val',surf_pts,'z_save')
top.copyatt('y_save','yic')
top.copyatt('z_val','zic')
# Save top
top.setatt('imt',1)
top.setatt('itetclr',1)
top.dump('tmp_lay_peat_top.inp')
surf_pts.delete()
# Copy top to create intermediate layers
layer = top.copy()
# Begin to construct stacked layer arrays
# Names of layer files
stack_files = ['tmp_lay_peat_top.inp']
# Material id, should be same length as length of stack_files
matids = [1]
# Add (2) 1 cm thick layers
layer.math('sub',0.01*2,'zic')
layer.dump('tmp_lay1.inp')
stack_files.append('tmp_lay1.inp')
nlayers = [1]
matids.append(1)
# Add (6) 2 cm thick layers
layer.math('sub',0.02*6,'zic')
layer.dump('tmp_lay2.inp')
stack_files.append('tmp_lay2.inp')
nlayers.append(5)
matids.append(2)
# Add (8) 2 cm thick layers
layer.math('sub',0.02*8,'zic')
layer.dump('tmp_lay3.inp')
stack_files.append('tmp_lay3.inp')
nlayers.append(7)
matids.append(3)
# Add (15) 5 cm thick layers
layer.math('sub',0.05*15,'zic')
layer.dump('tmp_lay4.inp')
stack_files.append('tmp_lay4.inp')
nlayers.append(14)
matids.append(3)
# Add (15) 10 cm thick layers
layer.math('sub',0.1*15,'zic')
layer.dump('tmp_lay5.inp')
stack_files.append('tmp_lay5.inp')
nlayers.append(14)
matids.append(3)
# Add (15) 1 m thick layers
layer.math('sub',1*15,'zic')
layer.dump('tmp_lay6.inp')
stack_files.append('tmp_lay6.inp')
nlayers.append(14)
matids.append(3)
# Add (15) 2 m thick layers
layer.math('sub',2.*15.,'zic')
layer.dump('tmp_lay7.inp')
stack_files.append('tmp_lay7.inp')
nlayers.append(14)
matids.append(3)
# Add the bottom layer, and make the bottom boundary flat
layer.setatt('zic',29.)
layer.dump('tmp_lay_bot.inp')
stack_files.append('tmp_lay_bot.inp')
nlayers.append(0)
matids.append(3)
# Create stacked layer mesh and fill
# Reverse arrays so that order is from bottom to top!!!
stack_files.reverse()
nlayers.reverse()
matids.reverse()
stack = lg.create()
stack.stack_layers(stack_files,nlayers=nlayers,matids=matids,flip_opt=True)
stack_hex = stack.stack_fill()
# Define ice wedges
def iceWedgePoints( vtxL, vtxB, vtxR, dx, dz ):
xnodes = np.arange( vtxL[0], vtxR[0], dx )
znodes = np.arange( vtxB[1], vtxR[1], dz )
xg, zg = np.meshgrid(xnodes, znodes)
xg = xg.flatten(); zg = zg.flatten()
m1 = (vtxB[1] - vtxL[1])/(vtxB[0] - vtxL[0])
b1 = vtxL[1] - m1*vtxL[0]
m2 = (vtxR[1] - vtxB[1])/(vtxR[0] - vtxB[0])
b2 = vtxR[1] - m2*vtxR[0]
idx = [ (zg[i] > m1*xg[i]+b1) & (zg[i] > m2*xg[i]+b2) for i in range(len(zg)) ]
iwx = xg[np.array(idx)]; iwz = zg[np.array(idx)]
iwy = np.concatenate( (np.ones(iwx.size)*0.05, np.ones(iwx.size)*0.2) )
iwx = np.tile(iwx, 2); iwz = np.tile(iwz, 2)
return iwx, iwy, iwz
iw1x, iw1y, iw1z = iceWedgePoints( [3.25, 78.3], [3.875, 75.0], [4.5, 78.3], 0.125, 0.01 )
iw1pts = lg.points(np.column_stack([iw1x, iw1y, iw1z]), connect=True)
iw1 = stack_hex.eltset_object(iw1pts)
iw1.setatt('itetclr', 4)
iw2x, iw2y, iw2z = iceWedgePoints( [18.5, 78.4], [19.125, 75.1], [19.75,78.4], 0.125, 0.01 )
iw2pts = lg.points(np.column_stack([iw2x, iw2y, iw2z]), connect=True)
iw2 = stack_hex.eltset_object(iw2pts)
iw2.setatt('itetclr', 4)
# Create boundary facesets, dictionary of PyLaGriT faceset objects is returned
fs = stack_hex.create_boundary_facesets(base_name='faceset_bounds',stacked_layers=True,reorder=True)
# Should add this to PyLaGriT, but I'm feeling lazy ;-)
stack_hex.sendline('quality volume itetclr')
# Write exo file with boundary facesets
stack_hex.dump_exo('transectNWSE.exo',facesets=fs.values())
# Write region and faceset identifier file for ats_xml
matnames = {10000:'computational domain moss',
20000:'computational domain peat',
30000:'computational domain mineral',
40000:'computational domain ice wedge'}
facenames = {1:'bottom face',
2:'surface',
3:'front',
4:'right',
5:'back',
6:'left'}
stack_hex.dump_ats_xml('transectNWSE_mesh.xml','../../mesh/transectNWSE.exo',matnames=matnames,facenames=facenames)
stack_hex.dump_ats_xml('transectNWSE_parmesh.xml','../../mesh/4/transectNWSE.par',matnames=matnames,facenames=facenames)

View File

@@ -0,0 +1,121 @@
s,x,y,z
0,431503.263849712,7748935.90919019,79.01
0.25,431503.436233142,7748935.72812679,79.01
0.5,431503.608616571,7748935.5470634,79.01
0.75,431503.781,7748935.366,79.01
1,431503.953383429,7748935.1849366,79.01
1.25,431504.125766858,7748935.00387321,79.03
1.5,431504.298150288,7748934.82280981,79.0733333333333
1.75,431504.470533717,7748934.64174642,79.1166666666667
2,431504.642917146,7748934.46068302,79.16
2.25,431504.815300575,7748934.27961962,79.165
2.5,431504.987684004,7748934.09855623,79.17
2.75,431505.160067433,7748933.91749283,79.17
3,431505.332450863,7748933.73642944,79.13
3.25,431505.504834292,7748933.55536604,79.09
3.5,431505.677217721,7748933.37430265,79.035
3.75,431505.84960115,7748933.19323925,78.98
4,431506.021984579,7748933.01217585,78.97
4.25,431506.194368009,7748932.83111246,79.03
4.5,431506.366751438,7748932.65004906,79.09
4.75,431506.539134867,7748932.46898567,79.12
5,431506.711518296,7748932.28792227,79.118
5.25,431506.883901725,7748932.10685887,79.116
5.5,431507.056285155,7748931.92579548,79.114
5.75,431507.228668584,7748931.74473208,79.112
6,431507.401052013,7748931.56366869,79.11
6.25,431507.573435442,7748931.38260529,79.08
6.5,431507.745818871,7748931.20154189,79.07
6.75,431507.918202301,7748931.0204785,79.0661538461538
7,431508.09058573,7748930.8394151,79.0623076923077
7.25,431508.262969159,7748930.65835171,79.0584615384615
7.5,431508.435352588,7748930.47728831,79.0546153846154
7.75,431508.607736017,7748930.29622491,79.0507692307692
8,431508.780119446,7748930.11516152,79.0469230769231
8.25,431508.952502876,7748929.93409812,79.0430769230769
8.5,431509.124886305,7748929.75303473,79.0392307692308
8.75,431509.297269734,7748929.57197133,79.0353846153846
9,431509.469653163,7748929.39090793,79.0315384615385
9.25,431509.642036592,7748929.20984454,79.0276923076923
9.5,431509.814420022,7748929.02878114,79.0238461538462
9.75,431509.986803451,7748928.84771775,79.02
10,431510.15918688,7748928.66665435,79.0242857142857
10.25,431510.331570309,7748928.48559096,79.0285714285714
10.5,431510.503953738,7748928.30452756,79.0328571428571
10.75,431510.676337168,7748928.12346416,79.0371428571429
11,431510.848720597,7748927.94240077,79.0414285714286
11.25,431511.021104026,7748927.76133737,79.0457142857143
11.5,431511.193487455,7748927.58027398,79.05
11.75,431511.365870884,7748927.39921058,79.055
12,431511.538254313,7748927.21814718,79.06
12.25,431511.710637743,7748927.03708379,79.066
12.5,431511.883021172,7748926.85602039,79.072
12.75,431512.055404601,7748926.674957,79.078
13,431512.22778803,7748926.4938936,79.084
13.25,431512.400171459,7748926.3128302,79.09
13.5,431512.572554889,7748926.13176681,79.0925
13.75,431512.744938318,7748925.95070341,79.095
14,431512.917321747,7748925.76964002,79.0975
14.25,431513.089705176,7748925.58857662,79.1
14.5,431513.262088605,7748925.40751322,79.106
14.75,431513.434472035,7748925.22644983,79.112
15,431513.606855464,7748925.04538643,79.118
15.25,431513.779238893,7748924.86432304,79.124
15.5,431513.951622322,7748924.68325964,79.13
15.75,431514.124005751,7748924.50219624,79.135
16,431514.29638918,7748924.32113285,79.14
16.25,431514.46877261,7748924.14006945,79.1633333333333
16.5,431514.641156039,7748923.95900606,79.1866666666667
16.75,431514.813539468,7748923.77794266,79.21
17,431514.985922897,7748923.59687927,79.205
17.25,431515.158306326,7748923.41581587,79.2
17.5,431515.330689756,7748923.23475247,79.195
17.75,431515.503073185,7748923.05368908,79.19
18,431515.675456614,7748922.87262568,79.155
18.25,431515.847840043,7748922.69156229,79.12
18.5,431516.020223472,7748922.51049889,79.08
18.75,431516.192606901,7748922.32943549,79.084
19,431516.364990331,7748922.1483721,79.088
19.25,431516.53737376,7748921.9673087,79.092
19.5,431516.709757189,7748921.78624531,79.096
19.75,431516.882140618,7748921.60518191,79.1
20,431517.054524047,7748921.42411851,79.17
20.25,431517.226907477,7748921.24305512,79.18
20.5,431517.399290906,7748921.06199172,79.19
20.75,431517.571674335,7748920.88092833,79.19
21,431517.744057764,7748920.69986493,79.17
21.25,431517.916441193,7748920.51880154,79.11
21.5,431518.088824623,7748920.33773814,79.092
21.75,431518.261208052,7748920.15667474,79.074
22,431518.433591481,7748919.97561135,79.056
22.25,431518.60597491,7748919.79454795,79.038
22.5,431518.778358339,7748919.61348456,79.02
22.75,431518.950741768,7748919.43242116,79.01
23,431519.123125198,7748919.25135776,79.01
23.25,431519.295508627,7748919.07029437,79.01
23.5,431519.467892056,7748918.88923097,79.01
23.75,431519.640275485,7748918.70816758,79.0128571428571
24,431519.812658914,7748918.52710418,79.0157142857143
24.25,431519.985042344,7748918.34604078,79.0185714285714
24.5,431520.157425773,7748918.16497739,79.0214285714286
24.75,431520.329809202,7748917.98391399,79.0242857142857
25,431520.502192631,7748917.8028506,79.0271428571428
25.25,431520.67457606,7748917.6217872,79.03
25.5,431520.84695949,7748917.4407238,79.0283333333333
25.75,431521.019342919,7748917.25966041,79.0266666666667
26,431521.191726348,7748917.07859701,79.025
26.25,431521.364109777,7748916.89753362,79.0233333333333
26.5,431521.536493206,7748916.71647022,79.0216666666667
26.75,431521.708876635,7748916.53540683,79.02
27,431521.881260065,7748916.35434343,79.0208333333333
27.25,431522.053643494,7748916.17328003,79.0216666666667
27.5,431522.226026923,7748915.99221664,79.0225
27.75,431522.398410352,7748915.81115324,79.0233333333333
28,431522.570793781,7748915.63008985,79.0241666666667
28.25,431522.743177211,7748915.44902645,79.025
28.5,431522.91556064,7748915.26796305,79.0258333333333
28.75,431523.087944069,7748915.08689966,79.0266666666667
29,431523.260327498,7748914.90583626,79.0275
29.25,431523.432710927,7748914.72477287,79.0283333333333
29.5,431523.605094357,7748914.54370947,79.0291666666667
29.75,431523.777477786,7748914.36264607,79.03
1 s x y z
2 0 431503.263849712 7748935.90919019 79.01
3 0.25 431503.436233142 7748935.72812679 79.01
4 0.5 431503.608616571 7748935.5470634 79.01
5 0.75 431503.781 7748935.366 79.01
6 1 431503.953383429 7748935.1849366 79.01
7 1.25 431504.125766858 7748935.00387321 79.03
8 1.5 431504.298150288 7748934.82280981 79.0733333333333
9 1.75 431504.470533717 7748934.64174642 79.1166666666667
10 2 431504.642917146 7748934.46068302 79.16
11 2.25 431504.815300575 7748934.27961962 79.165
12 2.5 431504.987684004 7748934.09855623 79.17
13 2.75 431505.160067433 7748933.91749283 79.17
14 3 431505.332450863 7748933.73642944 79.13
15 3.25 431505.504834292 7748933.55536604 79.09
16 3.5 431505.677217721 7748933.37430265 79.035
17 3.75 431505.84960115 7748933.19323925 78.98
18 4 431506.021984579 7748933.01217585 78.97
19 4.25 431506.194368009 7748932.83111246 79.03
20 4.5 431506.366751438 7748932.65004906 79.09
21 4.75 431506.539134867 7748932.46898567 79.12
22 5 431506.711518296 7748932.28792227 79.118
23 5.25 431506.883901725 7748932.10685887 79.116
24 5.5 431507.056285155 7748931.92579548 79.114
25 5.75 431507.228668584 7748931.74473208 79.112
26 6 431507.401052013 7748931.56366869 79.11
27 6.25 431507.573435442 7748931.38260529 79.08
28 6.5 431507.745818871 7748931.20154189 79.07
29 6.75 431507.918202301 7748931.0204785 79.0661538461538
30 7 431508.09058573 7748930.8394151 79.0623076923077
31 7.25 431508.262969159 7748930.65835171 79.0584615384615
32 7.5 431508.435352588 7748930.47728831 79.0546153846154
33 7.75 431508.607736017 7748930.29622491 79.0507692307692
34 8 431508.780119446 7748930.11516152 79.0469230769231
35 8.25 431508.952502876 7748929.93409812 79.0430769230769
36 8.5 431509.124886305 7748929.75303473 79.0392307692308
37 8.75 431509.297269734 7748929.57197133 79.0353846153846
38 9 431509.469653163 7748929.39090793 79.0315384615385
39 9.25 431509.642036592 7748929.20984454 79.0276923076923
40 9.5 431509.814420022 7748929.02878114 79.0238461538462
41 9.75 431509.986803451 7748928.84771775 79.02
42 10 431510.15918688 7748928.66665435 79.0242857142857
43 10.25 431510.331570309 7748928.48559096 79.0285714285714
44 10.5 431510.503953738 7748928.30452756 79.0328571428571
45 10.75 431510.676337168 7748928.12346416 79.0371428571429
46 11 431510.848720597 7748927.94240077 79.0414285714286
47 11.25 431511.021104026 7748927.76133737 79.0457142857143
48 11.5 431511.193487455 7748927.58027398 79.05
49 11.75 431511.365870884 7748927.39921058 79.055
50 12 431511.538254313 7748927.21814718 79.06
51 12.25 431511.710637743 7748927.03708379 79.066
52 12.5 431511.883021172 7748926.85602039 79.072
53 12.75 431512.055404601 7748926.674957 79.078
54 13 431512.22778803 7748926.4938936 79.084
55 13.25 431512.400171459 7748926.3128302 79.09
56 13.5 431512.572554889 7748926.13176681 79.0925
57 13.75 431512.744938318 7748925.95070341 79.095
58 14 431512.917321747 7748925.76964002 79.0975
59 14.25 431513.089705176 7748925.58857662 79.1
60 14.5 431513.262088605 7748925.40751322 79.106
61 14.75 431513.434472035 7748925.22644983 79.112
62 15 431513.606855464 7748925.04538643 79.118
63 15.25 431513.779238893 7748924.86432304 79.124
64 15.5 431513.951622322 7748924.68325964 79.13
65 15.75 431514.124005751 7748924.50219624 79.135
66 16 431514.29638918 7748924.32113285 79.14
67 16.25 431514.46877261 7748924.14006945 79.1633333333333
68 16.5 431514.641156039 7748923.95900606 79.1866666666667
69 16.75 431514.813539468 7748923.77794266 79.21
70 17 431514.985922897 7748923.59687927 79.205
71 17.25 431515.158306326 7748923.41581587 79.2
72 17.5 431515.330689756 7748923.23475247 79.195
73 17.75 431515.503073185 7748923.05368908 79.19
74 18 431515.675456614 7748922.87262568 79.155
75 18.25 431515.847840043 7748922.69156229 79.12
76 18.5 431516.020223472 7748922.51049889 79.08
77 18.75 431516.192606901 7748922.32943549 79.084
78 19 431516.364990331 7748922.1483721 79.088
79 19.25 431516.53737376 7748921.9673087 79.092
80 19.5 431516.709757189 7748921.78624531 79.096
81 19.75 431516.882140618 7748921.60518191 79.1
82 20 431517.054524047 7748921.42411851 79.17
83 20.25 431517.226907477 7748921.24305512 79.18
84 20.5 431517.399290906 7748921.06199172 79.19
85 20.75 431517.571674335 7748920.88092833 79.19
86 21 431517.744057764 7748920.69986493 79.17
87 21.25 431517.916441193 7748920.51880154 79.11
88 21.5 431518.088824623 7748920.33773814 79.092
89 21.75 431518.261208052 7748920.15667474 79.074
90 22 431518.433591481 7748919.97561135 79.056
91 22.25 431518.60597491 7748919.79454795 79.038
92 22.5 431518.778358339 7748919.61348456 79.02
93 22.75 431518.950741768 7748919.43242116 79.01
94 23 431519.123125198 7748919.25135776 79.01
95 23.25 431519.295508627 7748919.07029437 79.01
96 23.5 431519.467892056 7748918.88923097 79.01
97 23.75 431519.640275485 7748918.70816758 79.0128571428571
98 24 431519.812658914 7748918.52710418 79.0157142857143
99 24.25 431519.985042344 7748918.34604078 79.0185714285714
100 24.5 431520.157425773 7748918.16497739 79.0214285714286
101 24.75 431520.329809202 7748917.98391399 79.0242857142857
102 25 431520.502192631 7748917.8028506 79.0271428571428
103 25.25 431520.67457606 7748917.6217872 79.03
104 25.5 431520.84695949 7748917.4407238 79.0283333333333
105 25.75 431521.019342919 7748917.25966041 79.0266666666667
106 26 431521.191726348 7748917.07859701 79.025
107 26.25 431521.364109777 7748916.89753362 79.0233333333333
108 26.5 431521.536493206 7748916.71647022 79.0216666666667
109 26.75 431521.708876635 7748916.53540683 79.02
110 27 431521.881260065 7748916.35434343 79.0208333333333
111 27.25 431522.053643494 7748916.17328003 79.0216666666667
112 27.5 431522.226026923 7748915.99221664 79.0225
113 27.75 431522.398410352 7748915.81115324 79.0233333333333
114 28 431522.570793781 7748915.63008985 79.0241666666667
115 28.25 431522.743177211 7748915.44902645 79.025
116 28.5 431522.91556064 7748915.26796305 79.0258333333333
117 28.75 431523.087944069 7748915.08689966 79.0266666666667
118 29 431523.260327498 7748914.90583626 79.0275
119 29.25 431523.432710927 7748914.72477287 79.0283333333333
120 29.5 431523.605094357 7748914.54370947 79.0291666666667
121 29.75 431523.777477786 7748914.36264607 79.03

View File

@@ -0,0 +1,315 @@
103 103 4 0 0
0001 1.629163645680E+03 1.500000000000E+02 0.000000000000E+00
0002 1.505357451840E+03 1.732576268400E+02 0.000000000000E+00
0003 1.378405584840E+03 2.315049068400E+02 0.000000000000E+00
0004 1.299097005840E+03 2.975517750000E+02 0.000000000000E+00
0005 1.216650648000E+03 3.636067508400E+02 0.000000000000E+00
0006 1.127979618840E+03 5.034667911600E+02 0.000000000000E+00
0007 1.080487069680E+03 5.578803120000E+02 0.000000000000E+00
0008 1.023543846000E+03 6.394944591600E+02 0.000000000000E+00
0009 9.380799376800E+02 7.056427800000E+02 0.000000000000E+00
0010 8.969987498400E+02 7.678358331600E+02 0.000000000000E+00
0011 8.559549000000E+02 8.416917840000E+02 0.000000000000E+00
0012 7.928191156800E+02 9.350047800000E+02 0.000000000000E+00
0013 7.360066816800E+02 1.020568860840E+03 0.000000000000E+00
0014 7.012528980000E+02 1.040056523160E+03 0.000000000000E+00
0015 6.822772996800E+02 1.051760706000E+03 0.000000000000E+00
0016 5.906630760000E+02 1.114128501000E+03 0.000000000000E+00
0017 4.832497576800E+02 1.168811388840E+03 0.000000000000E+00
0018 4.200337500000E+02 1.192318326840E+03 0.000000000000E+00
0019 3.346950840000E+02 1.215917223000E+03 0.000000000000E+00
0020 2.874212288400E+02 1.262679120840E+03 0.000000000000E+00
0021 2.528796316800E+02 1.328831388840E+03 0.000000000000E+00
0022 1.523323448400E+02 1.480687595160E+03 0.000000000000E+00
0023 1.500000000000E+02 1.674850529160E+03 0.000000000000E+00
0024 2.076285360000E+02 1.864883667000E+03 0.000000000000E+00
0025 3.850000380000E+02 2.031183065160E+03 0.000000000000E+00
0026 4.797506536800E+02 2.054165991000E+03 0.000000000000E+00
0027 5.808805200000E+02 2.115985770840E+03 0.000000000000E+00
0028 6.032540896800E+02 2.224651299000E+03 0.000000000000E+00
0029 6.854176388400E+02 2.294335955160E+03 0.000000000000E+00
0030 6.888153968400E+02 2.391398753160E+03 0.000000000000E+00
0031 7.362799958400E+02 2.472830370840E+03 0.000000000000E+00
0032 7.711536878400E+02 2.565955290000E+03 0.000000000000E+00
0033 8.217333428400E+02 2.655154385160E+03 0.000000000000E+00
0034 8.659774860000E+02 2.736612672840E+03 0.000000000000E+00
0035 9.385625580000E+02 2.837447889000E+03 0.000000000000E+00
0036 1.036205481840E+03 2.903305506840E+03 0.000000000000E+00
0037 1.102329799680E+03 2.938179198840E+03 0.000000000000E+00
0038 1.168365999840E+03 2.922569141160E+03 0.000000000000E+00
0039 1.215583848000E+03 2.957470890000E+03 0.000000000000E+00
0040 1.221924693840E+03 3.023491194840E+03 0.000000000000E+00
0041 1.244014068000E+03 3.108904536840E+03 0.000000000000E+00
0042 1.344649365840E+03 3.186516797160E+03 0.000000000000E+00
0043 1.363546447680E+03 3.252519713160E+03 0.000000000000E+00
0044 1.420114797840E+03 3.310769766840E+03 0.000000000000E+00
0045 1.476663198840E+03 3.361237301160E+03 0.000000000000E+00
0046 1.501793059680E+03 3.458329542840E+03 0.000000000000E+00
0047 1.561435074000E+03 3.516591438000E+03 0.000000000000E+00
0048 1.621049244840E+03 3.633114054840E+03 0.000000000000E+00
0049 1.677489685680E+03 3.703056023160E+03 0.000000000000E+00
0050 1.746456918840E+03 3.761361977160E+03 0.000000000000E+00
0051 1.846805460840E+03 3.811960301160E+03 0.000000000000E+00
0052 1.962807906000E+03 3.839313053160E+03 0.000000000000E+00
0053 2.041204477680E+03 3.851111861160E+03 0.000000000000E+00
0054 2.147812362000E+03 3.870740981160E+03 0.000000000000E+00
0055 2.238781171680E+03 3.863198705160E+03 0.000000000000E+00
0056 2.310986142840E+03 3.832328286840E+03 0.000000000000E+00
0057 2.401921561680E+03 3.848122260840E+03 0.000000000000E+00
0058 2.499357739680E+03 3.786309095160E+03 0.000000000000E+00
0059 2.499755016000E+03 3.669810588000E+03 0.000000000000E+00
0060 2.452909267680E+03 3.599745831000E+03 0.000000000000E+00
0061 2.459500704840E+03 3.502691034000E+03 0.000000000000E+00
0062 2.528920047840E+03 3.401954496840E+03 0.000000000000E+00
0063 2.595428413680E+03 3.258513849000E+03 0.000000000000E+00
0064 2.570741274840E+03 3.130267206840E+03 0.000000000000E+00
0065 2.539757455680E+03 3.005882274000E+03 0.000000000000E+00
0066 2.596492440000E+03 2.971141932000E+03 0.000000000000E+00
0067 2.693999346840E+03 2.971519259160E+03 0.000000000000E+00
0068 2.782309050840E+03 2.917521897000E+03 0.000000000000E+00
0069 2.904957660000E+03 2.929720755000E+03 0.000000000000E+00
0070 3.040173279840E+03 2.942047629000E+03 0.000000000000E+00
0071 3.228648889680E+03 2.989674915000E+03 0.000000000000E+00
0072 3.367355505840E+03 2.943919863000E+03 0.000000000000E+00
0073 3.503067187680E+03 2.878771667160E+03 0.000000000000E+00
0074 3.658071840840E+03 2.763346680840E+03 0.000000000000E+00
0075 3.744131983680E+03 2.620290081000E+03 0.000000000000E+00
0076 3.717148557840E+03 2.433678810840E+03 0.000000000000E+00
0077 3.657978495840E+03 2.336154515160E+03 0.000000000000E+00
0078 3.570675637680E+03 2.195739738840E+03 0.000000000000E+00
0079 3.480214944840E+03 2.043674013000E+03 0.000000000000E+00
0080 3.389615568000E+03 1.899414702840E+03 0.000000000000E+00
0081 3.365213904840E+03 1.759467825000E+03 0.000000000000E+00
0082 3.334310095680E+03 1.650547545000E+03 0.000000000000E+00
0083 3.239648877840E+03 1.626685896000E+03 0.000000000000E+00
0084 3.170541573840E+03 1.556391777000E+03 0.000000000000E+00
0085 3.079023468840E+03 1.532598083160E+03 0.000000000000E+00
0086 3.047910246840E+03 1.435367370840E+03 0.000000000000E+00
0087 3.054885732000E+03 1.307255358840E+03 0.000000000000E+00
0088 3.036903537840E+03 1.113009641160E+03 0.000000000000E+00
0089 3.027883743840E+03 1.019762040000E+03 0.000000000000E+00
0090 2.958660372000E+03 9.301161690000E+02 0.000000000000E+00
0091 2.877158238840E+03 7.472305911600E+02 0.000000000000E+00
0092 2.890286599680E+03 6.463447020000E+02 0.000000000000E+00
0093 2.839905582840E+03 5.723381190000E+02 0.000000000000E+00
0094 2.726140644000E+03 4.864353291600E+02 0.000000000000E+00
0095 2.599552875840E+03 4.160506388400E+02 0.000000000000E+00
0096 2.510901795840E+03 3.691420560000E+02 0.000000000000E+00
0097 2.406356676000E+03 3.183449871600E+02 0.000000000000E+00
0098 2.320820652000E+03 2.715005190000E+02 0.000000000000E+00
0099 2.209866837840E+03 2.323796828400E+02 0.000000000000E+00
0100 2.117909958000E+03 1.972339568400E+02 0.000000000000E+00
0101 2.010027247680E+03 1.737282990000E+02 0.000000000000E+00
0102 1.873568805840E+03 1.541032328400E+02 0.000000000000E+00
0103 1.740252090000E+03 1.500773430000E+02 0.000000000000E+00
0001 1 line 1 2
0002 1 line 2 3
0003 1 line 3 4
0004 1 line 4 5
0005 1 line 5 6
0006 1 line 6 7
0007 1 line 7 8
0008 1 line 8 9
0009 1 line 9 10
0010 1 line 10 11
0011 1 line 11 12
0012 1 line 12 13
0013 1 line 13 14
0014 1 line 14 15
0015 1 line 15 16
0016 1 line 16 17
0017 1 line 17 18
0018 1 line 18 19
0019 1 line 19 20
0020 1 line 20 21
0021 1 line 21 22
0022 1 line 22 23
0023 1 line 23 24
0024 1 line 24 25
0025 1 line 25 26
0026 1 line 26 27
0027 1 line 27 28
0028 1 line 28 29
0029 1 line 29 30
0030 1 line 30 31
0031 1 line 31 32
0032 1 line 32 33
0033 1 line 33 34
0034 1 line 34 35
0035 1 line 35 36
0036 1 line 36 37
0037 1 line 37 38
0038 1 line 38 39
0039 1 line 39 40
0040 1 line 40 41
0041 1 line 41 42
0042 1 line 42 43
0043 1 line 43 44
0044 1 line 44 45
0045 1 line 45 46
0046 1 line 46 47
0047 1 line 47 48
0048 1 line 48 49
0049 1 line 49 50
0050 1 line 50 51
0051 1 line 51 52
0052 1 line 52 53
0053 1 line 53 54
0054 1 line 54 55
0055 1 line 55 56
0056 1 line 56 57
0057 1 line 57 58
0058 1 line 58 59
0059 1 line 59 60
0060 1 line 60 61
0061 1 line 61 62
0062 1 line 62 63
0063 1 line 63 64
0064 1 line 64 65
0065 1 line 65 66
0066 1 line 66 67
0067 1 line 67 68
0068 1 line 68 69
0069 1 line 69 70
0070 1 line 70 71
0071 1 line 71 72
0072 1 line 72 73
0073 1 line 73 74
0074 1 line 74 75
0075 1 line 75 76
0076 1 line 76 77
0077 1 line 77 78
0078 1 line 78 79
0079 1 line 79 80
0080 1 line 80 81
0081 1 line 81 82
0082 1 line 82 83
0083 1 line 83 84
0084 1 line 84 85
0085 1 line 85 86
0086 1 line 86 87
0087 1 line 87 88
0088 1 line 88 89
0089 1 line 89 90
0090 1 line 90 91
0091 1 line 91 92
0092 1 line 92 93
0093 1 line 93 94
0094 1 line 94 95
0095 1 line 95 96
0096 1 line 96 97
0097 1 line 97 98
0098 1 line 98 99
0099 1 line 99 100
0100 1 line 100 101
0101 1 line 101 102
0102 1 line 102 103
0103 1 line 103 1
00004 1 1 1 1
imt1, integer
itp1, integer
icr1, integer
isn1, integer
0000000001 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000002 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000003 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000004 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000005 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000006 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000007 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000008 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000009 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000010 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000011 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000012 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000013 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000014 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000015 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000016 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000017 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000018 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000019 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000020 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000021 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000022 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000023 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000024 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000025 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000026 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000027 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000028 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000029 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000030 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000031 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000032 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000033 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000034 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000035 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000036 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000037 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000038 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000039 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000040 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000041 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000042 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000043 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000044 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000045 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000046 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000047 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000048 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000049 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000050 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000051 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000052 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000053 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000054 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000055 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000056 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000057 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000058 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000059 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000060 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000061 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000062 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000063 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000064 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000065 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000066 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000067 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000068 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000069 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000070 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000071 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000072 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000073 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000074 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000075 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000076 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000077 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000078 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000079 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000080 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000081 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000082 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000083 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000084 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000085 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000086 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000087 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000088 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000089 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000090 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000091 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000092 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000093 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000094 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000095 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000096 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000097 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000098 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000099 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000100 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000101 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000102 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00
0000000103 1.000000000000E+00 0.000000000000E+00 0.000000000000E+00 0.000000000000E+00

View File

@@ -0,0 +1,8 @@
from pylagrit import PyLaGriT
l = PyLaGriT()
m = l.create()
m.createpts_xyz((3,3,3),(0.,0.,0.),(1.,1.,1.),rz_switch=[1,1,1],connect=True)
m.status ()
m.status (brief=True)
fs = m.create_boundary_facesets(base_name='faceset_bounds')
m.dump_exo('cube.exo',facesets=fs.values())

View File

@@ -0,0 +1,28 @@
from pylagrit import PyLaGriT
l = PyLaGriT()
# Create 2x2x2 cell mesh
m = l.create()
m.createpts_dxyz((0.5,0.5,0.5),(0.,0.,0.),(1.,1.,1.),rz_switch=[1,1,1],connect=True)
m.paraview()
#m.gmv()
# Create 2x2x2 mesh where maxs will be truncated to nearest value under given maxs
m_under = l.create()
m_under.createpts_dxyz((0.4,0.4,0.4),(0.,0.,0.),(1.,1.,1.),rz_switch=[1,1,1],connect=True)
m_under.paraview()
#m_under.gmv()
# Create 3x3x3 mesh where maxs will be truncated to nearest value over given maxs
m_over = l.create()
m_over.createpts_dxyz((0.4,0.4,0.4),(0.,0.,0.),(1.,1.,1.),clip='over',rz_switch=[1,1,1],connect=True)
m_over.paraview()
#m_over.gmv()
# Create 3x3x3 mesh where x and y maxs will be truncated to nearest value over given maxs
# and z min will be truncated to nearest value
m_mixed = l.create()
m_mixed.createpts_dxyz((0.4,0.4,0.4),(0.,0.,-1.),(1.,1.,0.),hard_bound=('min','min','max'),clip=('under','under','over'),rz_switch=[1,1,1],connect=True)
m_mixed.paraview()
#m_over.gmv()

View File

@@ -0,0 +1,17 @@
#To use pylagrit, import the module.
import pylagrit
#Create your pylagrit session.
lg = pylagrit.PyLaGriT()
#Create a mesh object and dump it to a gmv file 'test.gmv'.
mo = lg.create(name='test')
mo.createpts_brick_xyz((5,5,5), (0,0,0), (5,5,5,))
mo.dump('gmv', 'test.gmv')
#Convert test.gmv to exoduce and contour files.
lg.convert('test.gmv', 'exo')
lg.convert('test.gmv', 'avs')

13
PyLaGriT/examples/ex_gridder.py Executable file
View File

@@ -0,0 +1,13 @@
from pylagrit import PyLaGriT
import numpy
lg = PyLaGriT()
x0 = -numpy.logspace(1,2,15,endpoint=True)
x1 = numpy.arange(-10,10,1)
x2 = -x0
x = numpy.concatenate([x0,x1,x2])
y = x
mqua = lg.gridder(x,y,elem_type='quad',connect=True)
mqua.paraview()

View File

@@ -0,0 +1,30 @@
################################################################################
# This example shows how to merge multiple mesh objects together. #
################################################################################
#To use pylagrit, import the module.
import pylagrit
import numpy
#Instantiate the lagrit object.
lg = pylagrit.PyLaGriT()
# Create list with mesh object as first element
dxyz = numpy.array([0.25]*3)
mins = numpy.array([0.]*3)
maxs = numpy.array([1.]*3)
ms = [lg.createpts_dxyz(dxyz,mins,maxs,'tet',connect=True)]
# Create three new mesh objects, each one directly above the other
for i in range(3):
ms.append(ms[-1].copy())
ms[-1].trans(ms[-1].mins,ms[-1].mins+numpy.array([0.,0.,1.]))
# Merge list of mesh objects and clean up
mo_merge = lg.merge(ms)
for mo in ms: mo.delete()
mo_merge.rmpoint_compress(filter_bool=True,resetpts_itp=True)
mo_merge.paraview(filename='mo_merge.inp')

View File

@@ -0,0 +1,28 @@
#To use pylagrit, import the module.
import pylagrit
import numpy
#Instantiate the lagrit object.
lg = pylagrit.PyLaGriT()
# Create list with mesh object as first element
dxyz = numpy.array([0.25]*3)
mins = numpy.array([0.]*3)
maxs = numpy.array([1.]*3)
ms = [lg.createpts_dxyz(dxyz,mins,maxs,'tet',connect=True,name='testmo')]
# Create three new mesh objects, each one directly above the other
for i in range(3):
ms.append(ms[-1].copy())
ms[-1].trans(ms[-1].mins,ms[-1].mins+numpy.array([0.,0.,1.]))
lg.dump('lagrit_binary.lg')
lg.close()
lg = pylagrit.PyLaGriT()
ms_read = lg.read('lagrit_binary.lg')
print('Name of mesh object read in should be testmo, is: ', ms_read.name)

View File

@@ -0,0 +1,18 @@
#To use pylagrit, import the module.
import pylagrit
#Create your pylagrit session.
lg = pylagrit.PyLaGriT()
#Create a mesh object and dump it to a gmv file 'test.gmv'.
mo = lg.create(name='test')
mo.createpts_brick_xyz((5,5,5), (0,0,0), (5,5,5,))
mo.dump('test.gmv')
mo.dump('test.avs')
mo.dump('test.lg')
mo1 = lg.read('test.gmv')
mo2 = lg.read('test.avs')
mo3 = lg.read('test.lg',name='test')

View File

@@ -0,0 +1,42 @@
from pylagrit import PyLaGriT
import numpy
import sys
df = 0.0005 # Fault half aperture
lr = 7 # Levels of refinement
nx = 4 # Number of base mesh blocks in x direction
nz = 20 # Number of base mesh blocks in z direction
d_base = df*2**(lr+1) # Calculated dimension of base block
w = d_base*nx # Calculated width of model
d = d_base*nz # Calculated depth of model
lg = PyLaGriT()
# Create discrete fracture mesh
dxyz = numpy.array([d_base,d_base,0.])
mins = numpy.array([0.,-d,0.])
maxs = numpy.array([w,0,0])
mqua = lg.createpts_dxyz(dxyz,mins,maxs,'quad',hard_bound=('min','max','min'),connect=True)
for i in range(lr):
prefine = mqua.pset_geom_xyz(mins-0.1,(0.0001,0.1,0))
erefine = prefine.eltset()
erefine.refine()
prefine.delete()
erefine.delete()
mtri = mqua.copypts('triplane')
mtri.connect()
# Make sure that not nodes are lost during connect
if 'The mesh is complete but could not include all points.' in str(lg.before):
print("Error: Lost some points during connect, not completing mesh and exiting workflow!\n")
sys.exit()
mtri.tri_mesh_output_prep()
mtri.reorder_nodes(cycle='xic yic zic')
pfault = mtri.pset_geom_xyz(mins-0.1,(0.0001,0.1,0))
psource = mtri.pset_geom_xyz(mins-0.1,mins+0.0001)
mtri.setatt('imt',1)
pfault.setatt('imt',10)
psource.setatt('imt',20)
mtri.paraview(filename='discrete_fracture.inp')

16
PyLaGriT/examples/ex_rotate.py Executable file
View File

@@ -0,0 +1,16 @@
from pylagrit import PyLaGriT
import numpy
x = numpy.arange(0,10.1,1)
y = x
z = [0,1]
lg = PyLaGriT()
mqua = lg.gridder(x,y,z,elem_type='hex',connect=True)
mqua.rotateln([mqua.xmin-0.1,0,0],[mqua.xmax+0.1,0,0],25)
mqua.dump_exo('rotated.exo')
mqua.dump_ats_xml('rotated.xml','rotated.exo')
mqua.paraview()

View File

@@ -0,0 +1,47 @@
from pylagrit import PyLaGriT
import numpy
x = numpy.arange(0,10.1,1)
y = [0,1]
#z = [0,1]
lg = PyLaGriT()
layer = lg.gridder(x=x,y=y,elem_type='quad',connect=True)
layer.rotateln([0,layer.ymin-0.10,0],[0,layer.ymax+0.1,0],25)
layer.dump('tmp_lay_top.inp')
# Layer depths?
# 1 2 3 4 5 6 7 8 9 10
layers = [ .1, 1.]
addnum = [ 4, 2]
#matnum = [2]*len(layers)
matnum = [2, 1]
layer_interfaces = numpy.cumsum(layers)
mtop = layer.copy()
stack_files = ['tmp_lay_top.inp 1,9']
#stack_files.append('tmp_lay_peat_bot.inp 1,33')
i = 1
for li,m,a in zip(layer_interfaces,matnum,addnum):
layer.math('sub','zic',value=li,cmosrc=mtop)
stack_files.append('tmp_lay'+str(i)+'.inp '+str(int(m))+', '+str(a))
layer.dump('tmp_lay'+str(i)+'.inp')
i += 1
layer.math('sub','zic',2,cmosrc=mtop)
#layer.setatt('zic',-2.)
layer.dump('tmp_lay_bot.inp')
stack_files.append('tmp_lay_bot.inp 2')
stack_files.reverse()
# Create stacked layer mesh and fill
stack = lg.create()
stack.stack_layers(stack_files,file_type='avs',flip_opt=True)
stack_hex = stack.stack_fill()
stack_hex.dump_exo('rotated.exo')
stack_hex.dump_ats_xml('rotated.xml','rotated.exo')
stack_hex.paraview()

View File

@@ -0,0 +1,15 @@
#To use pylagrit, import the module.
import pylagrit
#Start the lagrit session.
lg = pylagrit.PyLaGriT()
#Create a mesh object.
mo = lg.create()
mo.createpts_brick_xyz((5,5,5), (0,0,0), (5,5,5))
#Take the subset from (3,3,3)
mo.subset((3,3,3),(5,5,5))

View File

@@ -0,0 +1,41 @@
from pylagrit import PyLaGriT
# Create pylagrit object
lg = PyLaGriT()
# Define polygon points in clockwise direction
# and create tri mesh object
coords = [[0.0, 0.0, 0.0],
[0.0, 1000.0, 0.0],
[2200.0, 200.0, 0.0],
[2200.0, 0.0, 0.0]]
motri = lg.tri_mo_from_polyline(coords)
# Triangulate polygon
motri.triangulate()
motri.setatt('imt',1)
motri.setatt('itetclr',1)
# refine mesh with successively smaller edge length constraints
edge_length = [1000,500,250,125,75,40,20,15]
for i,l in enumerate(edge_length):
motri.resetpts_itp()
motri.refine(refine_option='rivara',refine_type='edge',values=[l],inclusive_flag='inclusive')
motri.smooth()
motri.recon(0)
# provide additional smoothing after the last refine
for i in range(5):
motri.smooth()
motri.recon(0)
# create delaunay mesh and clean up
motri.tri_mesh_output_prep()
# dump fehm files
motri.dump_fehm('nk_mesh00')
# view results
motri.paraview()

View File

@@ -0,0 +1,38 @@
ncols 160
nrows 32
xllcorner 0.0
yllcorner 0.0
cellsize 0.5
NODATA_value -9999
-9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 3.67578006 3.68144989 3.68711996 3.69248009 3.70193005 3.71139002 3.72045994 3.72463012 3.72571993 3.72680998 3.72736001 3.72216010 3.71445990 3.70704007 3.69990993 3.69770002 3.69538999 3.69307995 3.69259000 3.69402003 3.69736004 3.70071006 3.70419002 3.70565009 3.71426010 3.72584009 3.73499990 3.73781991 3.73324990 3.72867990 3.72610998 3.71973991 3.70866990 3.69759011 3.68889999 3.67723989 3.67195010 3.66666007 3.66304994 3.66676998 3.67002010 3.67326999 3.67732000 3.68808007 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000
-9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 3.80152011 3.81911993 3.83673000 3.83797002 3.81517005 3.79237008 3.76943994 3.74967003 3.73159003 3.71310997 3.69426990 3.69110990 3.70169997 3.70654011 3.71008992 3.71265006 3.71826005 3.72740006 3.73315001 3.73889995 3.74063993 3.74092007 3.74107003 3.73696995 3.72748995 3.71965003 3.71497989 3.71276999 3.71054006 3.71019006 3.71073008 3.71127009 3.71427011 3.71776009 3.72124004 3.72307992 3.72341990 3.73109007 3.73631001 3.73947001 3.74030995 3.73793006 3.73568010 3.73297000 3.72312999 3.71462989 3.70613003 3.69215012 3.67993999 3.67463994 3.67669010 3.68144989 3.68470001 3.69039011 3.69951010 3.70972991 3.72053003 3.72772002 3.73278999 3.73739004 3.73105001 3.72470999 3.71394992 3.70319009 3.69095993 3.67872000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000
-9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 3.75475001 3.74907994 3.74724007 3.75851989 3.76999998 3.78148007 3.80120993 3.81920004 3.83546996 3.83880997 3.83655000 3.83053994 3.80749989 3.78425002 3.76565003 3.74860001 3.73019004 3.71093988 3.70831990 3.71953011 3.72837996 3.73249006 3.73286009 3.73133993 3.73551989 3.74054003 3.74421000 3.73726010 3.73628998 3.73530006 3.73233008 3.72877002 3.72726011 3.72456002 3.71945000 3.71072006 3.70832992 3.70797992 3.70799994 3.70991993 3.71309996 3.71493006 3.71777010 3.72303009 3.72380996 3.72325993 3.72297001 3.71752000 3.71604991 3.71501994 3.72231007 3.71914005 3.71275997 3.70576000 3.69827008 3.69089007 3.68551993 3.68823004 3.68945003 3.69720006 3.71041989 3.72168994 3.73023009 3.73304009 3.73585010 3.74305010 3.75445008 3.74754000 3.73182988 3.72687006 3.72262001 3.71024990 3.69779992 3.68760991 3.68583989 3.68603992 3.68623996 3.68857002 3.70222998 3.71672010 3.73120999 3.74965000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000
-9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 3.84483004 3.82737994 3.80970001 3.79201007 3.77605009 3.76996994 3.76430988 3.75865006 3.76278996 3.76799989 3.77947998 3.79763007 3.81759000 3.83240008 3.83574009 3.83877993 3.83465004 3.82170010 3.80574012 3.78974009 3.76957011 3.74766994 3.73929000 3.72761011 3.72497010 3.73044991 3.73018003 3.72920990 3.72807002 3.73006010 3.73337007 3.73451996 3.72147989 3.71216989 3.71082997 3.70819998 3.70526004 3.70721006 3.72006989 3.72303009 3.71444011 3.70405006 3.69823003 3.69833994 3.69854999 3.69981003 3.70095992 3.70166993 3.70431995 3.70296001 3.70022988 3.69894004 3.69344997 3.68783998 3.68524003 3.69456005 3.70389009 3.70372009 3.69616008 3.68835998 3.68086004 3.66948009 3.65727997 3.65849996 3.66400003 3.67234993 3.68558002 3.70854998 3.72836995 3.73825002 3.74397993 3.75030994 3.75149012 3.75268006 3.74242997 3.74024010 3.73833990 3.72913003 3.71856999 3.70839000 3.70251012 3.70272994 3.70296001 3.70512009 3.71431994 3.72881007 3.74329996 3.75938010 3.78412008 3.81211996 3.83978009 3.84027004 3.81645012 3.79262996 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000
-9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 3.83932996 3.84543991 3.85101008 3.85288000 3.85454988 3.85622001 3.84951997 3.83727002 3.81914997 3.79843998 3.78639007 3.77981997 3.77386999 3.77338004 3.77833009 3.78106999 3.78139997 3.79317999 3.80497003 3.81606007 3.82676005 3.82799006 3.81890011 3.80594993 3.79092002 3.77712011 3.76289010 3.74897003 3.73572993 3.71506000 3.70686007 3.71353006 3.72019005 3.72465992 3.72459006 3.72450995 3.72078991 3.70703006 3.69325995 3.67790008 3.67572999 3.67355990 3.67404008 3.68452001 3.69498992 3.69983006 3.68459010 3.66935992 3.66138005 3.66049004 3.65925002 3.65031004 3.65305996 3.65660000 3.66278005 3.66018009 3.65646005 3.64398003 3.63676000 3.63051009 3.63262010 3.64412999 3.65461993 3.65681005 3.65550995 3.65432000 3.64860010 3.63779998 3.62700009 3.63130999 3.63856006 3.64884996 3.67771006 3.70602012 3.72287989 3.72136998 3.72033000 3.72430992 3.72708988 3.73081994 3.73868990 3.73874998 3.73880005 3.73895001 3.72669005 3.71443009 3.71075010 3.71641994 3.71967006 3.72166991 3.73036003 3.74090004 3.75572991 3.77231002 3.79060006 3.81859994 3.82610011 3.83335996 3.81135011 3.78752995 3.76637006 3.74129009 3.71227002 3.68324995 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000
-9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 3.86736989 3.86121011 3.85506010 3.84818006 3.84769011 3.85254002 3.85864997 3.86238003 3.86444998 3.86631989 3.86247993 3.85421991 3.84087992 3.82542992 3.80471992 3.79673004 3.79015994 3.77809000 3.77683997 3.77344990 3.77006006 3.77248001 3.77536011 3.78709006 3.79576993 3.78979993 3.78384995 3.77846003 3.77220988 3.76046991 3.74562001 3.72862005 3.70879006 3.68811989 3.67012000 3.65400004 3.66066003 3.67014003 3.68241000 3.68261003 3.67899990 3.67079997 3.65762997 3.63877010 3.61507010 3.61142993 3.60759997 3.60298991 3.61347008 3.62543011 3.63770008 3.62348008 3.61452007 3.60556006 3.60156012 3.58922005 3.57914996 3.58474994 3.59417009 3.60341001 3.59706998 3.58220005 3.56778002 3.56225991 3.55965996 3.55856991 3.56744003 3.57216001 3.57540011 3.57582998 3.58027005 3.57809997 3.56626010 3.55039001 3.54918003 3.56043005 3.58261991 3.61700010 3.65219998 3.67553997 3.67195010 3.67770004 3.68289995 3.68735003 3.70151997 3.71329999 3.71360993 3.72293997 3.72909999 3.71759009 3.71143007 3.70922995 3.71491003 3.70912004 3.71685004 3.73411989 3.75139999 3.76706004 3.78134990 3.79563999 3.80314994 3.81237006 3.81968999 3.80735993 3.78697991 3.76659989 3.74144006 3.71240997 3.68495989 3.66026998 3.64368010 3.63051009 3.61734009 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000
-9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 3.89148998 3.89094996 3.89039993 3.88625002 3.88541007 3.88337994 3.87669992 3.86895990 3.86753011 3.86938000 3.87169003 3.87061000 3.86846995 3.86495996 3.85380006 3.84047008 3.82696009 3.81323004 3.79317999 3.77918005 3.76567006 3.75014997 3.75275993 3.75819993 3.76130009 3.76157999 3.76128006 3.75429010 3.75037003 3.74575996 3.73977995 3.73312998 3.72560000 3.71655989 3.69926000 3.68013000 3.66101003 3.64264989 3.62540007 3.60815001 3.61177993 3.62404990 3.63632989 3.63637996 3.62818003 3.61999011 3.60210991 3.57824993 3.55404997 3.54116988 3.53291011 3.52464008 3.53134990 3.54004002 3.54916000 3.54589009 3.53334999 3.52151990 3.50992990 3.49809003 3.48659992 3.49175000 3.50040007 3.50220990 3.49877000 3.48397994 3.47112012 3.46631002 3.46374011 3.45865011 3.46291995 3.47037005 3.47888994 3.48736000 3.49471998 3.49957991 3.48582006 3.47205997 3.47326994 3.49546003 3.51764989 3.54830003 3.58256006 3.61666989 3.62361002 3.62314010 3.62450004 3.64002991 3.65531993 3.67551994 3.68751001 3.69630003 3.71184993 3.70770001 3.70138001 3.68994999 3.67933011 3.68050003 3.69672990 3.71392012 3.73313999 3.75205994 3.76635003 3.77062011 3.77536988 3.78459001 3.79060006 3.78457999 3.77070999 3.75682998 3.74390006 3.71706009 3.69021010 3.67088008 3.65228009 3.63911009 3.62485003 3.61774993 3.62479997 3.63304996 3.64128995 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000
-9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 3.91897011 3.91734004 3.91564989 3.91070008 3.90890002 3.90537000 3.89898992 3.89848995 3.89496994 3.88835001 3.88371992 3.87594008 3.86880994 3.86197996 3.85662007 3.85448003 3.84709001 3.83798003 3.82667994 3.81138992 3.78996992 3.76855993 3.75324011 3.73773003 3.72219992 3.72299004 3.72504997 3.72478008 3.72447991 3.71615005 3.69835997 3.69279003 3.68886995 3.66961002 3.65637994 3.65202999 3.64646006 3.63090992 3.60939002 3.58377004 3.55318999 3.53278995 3.51514006 3.50966001 3.52357006 3.52746010 3.52312994 3.51331997 3.50907993 3.49840999 3.47226000 3.43950009 3.41451001 3.39230990 3.38918996 3.39920998 3.40882993 3.42295003 3.43048000 3.41922998 3.40806007 3.39678001 3.38532996 3.37387991 3.36535001 3.36518002 3.36500001 3.36306000 3.36101007 3.35650992 3.35034990 3.34367990 3.33625007 3.33308005 3.34089994 3.34985995 3.36021996 3.36999011 3.37290001 3.37551999 3.36998010 3.36963010 3.38595009 3.40991998 3.43614006 3.46811008 3.49664998 3.51781011 3.51733994 3.53084993 3.54676008 3.56861997 3.60562992 3.62623000 3.64337993 3.67391992 3.67894006 3.66645002 3.65103006 3.64423990 3.66047001 3.67670989 3.69560003 3.71636009 3.73705006 3.74346995 3.74463010 3.74759007 3.75313997 3.75570011 3.75154996 3.73904991 3.73655009 3.72534990 3.70809007 3.69390988 3.67389011 3.65700006 3.64512992 3.63065004 3.63471007 3.64082003 3.64907002 3.65759993 3.66779995 3.68292999 3.69984007 3.71674991 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000
-9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 3.96134996 3.95738006 3.94882989 3.94186997 3.94024992 3.93705010 3.93210006 3.92044997 3.91747999 3.91173005 3.90453005 3.89402008 3.88614011 3.87739992 3.86624002 3.85829997 3.85170007 3.84509993 3.83834004 3.82486010 3.80995989 3.79456997 3.77512002 3.75490999 3.73469996 3.71450996 3.70131993 3.68811989 3.68461990 3.68793988 3.68766999 3.68007994 3.66229010 3.64450002 3.63154006 3.60963011 3.58772993 3.57482004 3.56286001 3.55550003 3.54611993 3.52928996 3.49631000 3.46334004 3.43742990 3.42307997 3.40873003 3.40896010 3.40697002 3.40528011 3.40104008 3.39703989 3.39058995 3.36100006 3.32850003 3.29922009 3.27646995 3.26851010 3.27813005 3.28823996 3.29929996 3.30942011 3.31068993 3.29935002 3.28445005 3.26922011 3.25873995 3.25433993 3.25537992 3.25510001 3.25417995 3.25154996 3.24985003 3.24581003 3.23924994 3.22865009 3.21583009 3.21817994 3.23401999 3.24770999 3.26373005 3.27066994 3.27309990 3.27740002 3.27682996 3.27629995 3.29735994 3.32015991 3.34812999 3.37898993 3.40105009 3.41995001 3.43613005 3.45297003 3.49007010 3.52716994 3.55950999 3.58792996 3.61633992 3.62259007 3.59508991 3.57080007 3.58136010 3.59255004 3.61026001 3.63514996 3.66008997 3.68619990 3.69404006 3.69736004 3.70319009 3.70960999 3.71602011 3.72252011 3.72059989 3.71810007 3.70684004 3.69686007 3.68688011 3.66866994 3.65933990 3.65001988 3.64557004 3.65167999 3.65777993 3.66564012 3.67584991 3.68604994 3.69929004 3.71620011 3.72909999 3.73616004 3.72404003 3.71116996 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000
-9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 3.99785995 3.99517012 3.99880004 3.99745989 3.99348998 3.98220992 3.96989012 3.96315002 3.95271993 3.93304992 3.91698003 3.91401005 3.89949012 3.89029002 3.88442993 3.87418008 3.86164999 3.84911990 3.83210993 3.82001996 3.80735993 3.78664994 3.77115989 3.75601006 3.73972011 3.72182012 3.70161009 3.67217994 3.64650011 3.63331008 3.60981989 3.59527993 3.60000992 3.60128999 3.59573007 3.57903004 3.55596995 3.52982998 3.50903010 3.48448992 3.46485996 3.45281005 3.44432998 3.43421006 3.42225003 3.39684010 3.36373997 3.33644009 3.31160998 3.29777002 3.29331994 3.29272008 3.29103994 3.28575993 3.28058004 3.27243996 3.25517011 3.22375011 3.19127989 3.16512990 3.15984988 3.16694999 3.17704010 3.18847990 3.19673991 3.20000005 3.19608998 3.18860006 3.17617989 3.16468000 3.15305996 3.15208006 3.15162992 3.15229011 3.15069008 3.14933991 3.14877009 3.14389992 3.13471007 3.12597990 3.12351990 3.13241005 3.14795995 3.16527009 3.17469001 3.18206000 3.18730998 3.18748999 3.18618011 3.18580008 3.20373011 3.23313999 3.27275991 3.30156994 3.32276011 3.33349991 3.34478998 3.35583997 3.39118004 3.41057992 3.43848991 3.47224998 3.50132990 3.47569990 3.48598003 3.49627995 3.51297998 3.53781009 3.56268001 3.58877993 3.61592007 3.62754011 3.63334990 3.64113998 3.64767003 3.65667009 3.66757011 3.67248011 3.67948008 3.68329000 3.67596006 3.66901994 3.66149998 3.64877009 3.64135003 3.64865994 3.65389991 3.66250992 3.67837000 3.69162989 3.70429993 3.71565008 3.72690010 3.73395991 3.74102998 3.73290992 3.72004008 3.70572996 3.69426990 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000
-9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 4.02126980 4.01497984 4.00869989 4.01194000 4.01702976 4.01995993 4.00783014 3.99247003 3.97709990 3.96108007 3.94573998 3.92877007 3.91351008 3.89723992 3.87898993 3.86772990 3.85637999 3.84202003 3.82906008 3.81138992 3.79099011 3.77601004 3.75665998 3.73594999 3.71744990 3.70115995 3.68485999 3.66851997 3.64076996 3.60860991 3.57849002 3.55480003 3.52959991 3.50594997 3.50647998 3.50434995 3.50127006 3.47750998 3.44976997 3.42212009 3.39582992 3.36943007 3.34302998 3.32975006 3.32194996 3.31228995 3.30026007 3.28961992 3.27090001 3.24504995 3.21796989 3.19939995 3.19014001 3.18949008 3.18709993 3.18118000 3.17408991 3.16257000 3.14778996 3.13196993 3.11000991 3.08751988 3.07054996 3.07214999 3.08113003 3.09482002 3.09694004 3.09722996 3.09659004 3.09241009 3.08816004 3.07613993 3.06340003 3.05853009 3.05796003 3.06020999 3.05854011 3.05785990 3.05791998 3.05827999 3.05631995 3.05140996 3.04942989 3.05186009 3.06358004 3.08033991 3.09568000 3.10484004 3.10925007 3.11239004 3.11275005 3.11437988 3.12217999 3.14338994 3.17309999 3.20485997 3.22778010 3.24245000 3.25226998 3.25884008 3.26504993 3.27683997 3.29900002 3.33406997 3.36940002 3.38802004 3.39725995 3.40857005 3.43217993 3.45812011 3.47902989 3.51052999 3.54204011 3.56344008 3.57122993 3.57902002 3.58868003 3.60085011 3.61261010 3.62077999 3.63521004 3.64446998 3.63843012 3.64040995 3.63819003 3.62908006 3.63791990 3.64620996 3.65433002 3.67176008 3.68814993 3.70141006 3.71186996 3.71920991 3.72795010 3.73637009 3.74479008 3.74027991 3.72525001 3.71021008 3.70056009 3.69001007 3.67376995 3.65753007 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000
-9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 4.04579020 4.02204990 4.00775003 4.01561022 4.02255011 4.02572012 4.02888012 4.01294994 3.99249005 3.97644997 3.96051002 3.94403005 3.92857003 3.91323996 3.87781000 3.86325002 3.84868002 3.82856989 3.81585002 3.80312991 3.78681993 3.76416993 3.74152994 3.70860004 3.67817998 3.65175009 3.62736011 3.60980010 3.59376001 3.57640004 3.54732990 3.51347995 3.48085999 3.45396996 3.42985010 3.40496993 3.39667010 3.39244008 3.38548994 3.37134004 3.34618998 3.32005000 3.28937006 3.26050997 3.23924994 3.23022008 3.22257996 3.21401000 3.20374990 3.19366002 3.18361998 3.16313004 3.14085007 3.11802006 3.10229993 3.09730005 3.09122992 3.08756995 3.07735991 3.06288004 3.04836988 3.03925991 3.02779007 3.01164007 3.00260997 2.99712992 2.99559999 2.99491000 2.99276996 2.99277997 2.99259996 2.99199009 2.99147010 2.99147010 2.98885989 2.98779011 2.98790002 2.98841000 2.98792005 2.98792005 2.98762012 2.98794007 2.98962998 2.98819995 2.98708010 2.98708010 2.99172997 2.99928999 3.01339006 3.02356005 3.02996993 3.03664994 3.04461002 3.05324006 3.06138992 3.07295990 3.09424996 3.12333012 3.15106010 3.16215992 3.16650009 3.16926003 3.17185998 3.18265009 3.19946003 3.22281003 3.25553012 3.29281998 3.30455995 3.31890988 3.34063005 3.35722995 3.36916995 3.40068007 3.43426991 3.46044993 3.47217989 3.49198008 3.51154995 3.52765989 3.54632998 3.56420994 3.58155990 3.60052991 3.60368991 3.60634995 3.61126995 3.61979008 3.62718010 3.63761997 3.65614009 3.67383003 3.69265008 3.69935989 3.70555997 3.71451998 3.72391009 3.73233008 3.73821998 3.73861003 3.72972989 3.71468997 3.70621991 3.69786000 3.68576002 3.67406988 3.66636992 3.65866995 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000
-9999.00000 -9999.00000 -9999.00000 -9999.00000 4.07886982 4.05815983 4.03743982 4.00679016 3.98446012 3.99035001 3.98275995 3.98201990 3.98301005 3.98169994 3.97722006 3.95998001 3.94350004 3.92702007 3.90829992 3.86929011 3.83028007 3.81388998 3.78660989 3.75566006 3.74278998 3.72954988 3.71603990 3.69461012 3.66542006 3.63177991 3.58588004 3.54787993 3.52430010 3.50426006 3.48726010 3.46738005 3.44072008 3.40917993 3.37782001 3.34767008 3.32129002 3.30121994 3.28903008 3.28361011 3.27494001 3.26360989 3.24776006 3.22521996 3.20039010 3.17277002 3.15037990 3.13690996 3.13041997 3.12237000 3.11307001 3.10225010 3.09211993 3.08018994 3.06398010 3.04338002 3.02920008 3.02065992 3.01374006 3.00970006 2.99965000 2.98966002 2.98006010 2.98164010 2.98311996 2.98464990 2.98729992 2.98511004 2.98569012 2.98933005 2.98810005 2.99037004 2.99568009 3.00424004 3.00284004 3.00167990 2.99931002 2.99601007 2.99747992 2.99672008 2.99388003 2.99515009 3.00008988 3.00322008 3.00476003 3.00470996 2.99796009 2.99517012 2.99452996 2.99380994 2.99426007 2.99153996 2.98920012 2.98596001 2.98161006 2.98632002 2.99897003 3.00665998 3.02470994 3.04999995 3.07747006 3.09318995 3.09950995 3.09699011 3.09896994 3.10331988 3.11945009 3.14261007 3.17325997 3.20656991 3.22482991 3.23561001 3.24251008 3.24973011 3.26102996 3.29321003 3.32803988 3.35698009 3.37754989 3.40342999 3.42437005 3.44357991 3.46532989 3.48434997 3.50413990 3.52823997 3.53800011 3.54457998 3.56794000 3.58158994 3.59087992 3.61442995 3.63510990 3.65331006 3.67430997 3.69303989 3.70035005 3.70983005 3.71931005 3.72816992 3.72854996 3.72893000 3.72931004 3.72023010 3.71186996 3.70354009 3.69526005 3.68731999 3.67941999 3.67151999 3.66363001 3.66195989 -9999.00000 -9999.00000 -9999.00000 -9999.00000
-9999.00000 -9999.00000 -9999.00000 4.12364006 4.08560991 4.04980993 4.02222013 3.99153996 3.96069002 3.95330000 3.94569993 3.93830991 3.93056989 3.92160010 3.91084003 3.89561009 3.88360000 3.87377000 3.85435009 3.81871009 3.78307009 3.74787998 3.71713996 3.68638992 3.66404009 3.65025997 3.63648009 3.61449003 3.57797003 3.54097009 3.49474001 3.44723010 3.41433001 3.39334989 3.37842989 3.35850000 3.34071994 3.31356001 3.28465009 3.25700998 3.23014998 3.20895004 3.19179010 3.18635988 3.18109989 3.17420006 3.15896010 3.14094996 3.12322998 3.09959006 3.07553005 3.05751991 3.04746008 3.04097009 3.02849007 3.01639009 3.00711989 2.99675012 2.98619008 2.98125005 2.98378992 2.98645997 2.98526001 2.98343992 2.98393989 2.98549008 2.99094009 2.99528003 2.99618006 2.99729991 2.99951005 2.99879003 3.00064993 3.00424004 3.00714993 3.01218009 3.02189994 3.03303003 3.03469992 3.02993011 3.02542996 3.02180004 3.01959991 3.01665998 3.01481009 3.01883006 3.02590990 3.03233004 3.03434992 3.02837992 3.02313995 3.01899004 3.01851010 3.01982999 3.02139997 3.02081990 3.02257991 3.02187991 3.01612997 3.00454998 2.99685001 2.99219990 2.98714995 2.98305011 2.99381995 3.01680994 3.03452992 3.03198004 3.03548002 3.04541993 3.06366992 3.08405995 3.10879993 3.13280010 3.15730000 3.16459990 3.16814995 3.17286992 3.17887998 3.20740008 3.23826003 3.26918006 3.29442000 3.31902003 3.34198999 3.36348009 3.38497996 3.40775990 3.43185997 3.45596004 3.47789001 3.50125003 3.52460003 3.54414010 3.56768990 3.59124994 3.61407995 3.63420010 3.65086007 3.66753006 3.67956996 3.68594003 3.69232011 3.71411991 3.71620989 3.71673012 3.71725988 3.71714997 3.71777010 3.70949006 3.70121002 3.69319010 3.68529010 3.67812991 3.67444992 3.67269993 3.67873001 3.68476009 -9999.00000 -9999.00000
-9999.00000 -9999.00000 4.16922998 4.13319016 4.09714985 4.04455996 3.99267006 3.96022010 3.91979003 3.89386010 3.88656998 3.86697006 3.84957004 3.84060001 3.82306004 3.80593991 3.79601002 3.79536009 3.78629994 3.74897003 3.69519997 3.64705992 3.61195993 3.55778003 3.52869010 3.51167989 3.50324011 3.48321009 3.45706010 3.41739988 3.37430000 3.33316994 3.29971004 3.27375007 3.26390004 3.25215006 3.23469996 3.21928000 3.19394994 3.16842008 3.14418006 3.12264991 3.10380006 3.09612989 3.09288001 3.08087993 3.06311011 3.04460001 3.02682996 3.01036000 2.99365997 2.98151994 2.98182011 2.98298001 2.98473001 2.98678994 2.99012995 2.99334002 2.99555993 3.00095010 3.00626993 3.00677991 3.00299001 2.99637008 2.99480009 3.00129008 3.00876999 3.01490998 3.02060008 3.02215004 3.02359009 3.02426004 3.02421999 3.02908993 3.03525996 3.04854012 3.05945992 3.07028008 3.07605004 3.07645988 3.07046008 3.06194997 3.05453992 3.05034995 3.05498004 3.06135988 3.07069993 3.07838988 3.07825994 3.07522988 3.06697011 3.05572009 3.05358005 3.05314994 3.05727005 3.06037998 3.06575990 3.06721997 3.06068993 3.04703999 3.03401995 3.02279997 3.01606989 3.00962996 3.00412989 2.99695992 2.99043012 2.98067999 2.99025011 3.00096011 3.01321006 3.03002000 3.04836011 3.06890011 3.09270000 3.10029006 3.10320997 3.10695004 3.10867000 3.13163996 3.16229010 3.19301009 3.22052002 3.24518991 3.26655006 3.28803992 3.31127000 3.33565998 3.35975003 3.38721991 3.41816998 3.44224000 3.46634007 3.49060011 3.51352000 3.53638005 3.56453991 3.58662009 3.60329008 3.62000990 3.63676000 3.64371991 3.66226006 3.68789005 3.70217991 3.70270991 3.70132995 3.70004010 3.70458007 3.70912004 3.70717001 3.69906998 3.69324994 3.68956995 3.68588996 3.68343997 3.68947005 -9999.00000 -9999.00000 -9999.00000
-9999.00000 -9999.00000 4.19274998 4.14963007 4.10494995 4.03210020 3.95975995 3.92198992 3.87909007 3.83618999 3.81720996 3.79467010 3.77213001 3.75002003 3.72723007 3.70345998 3.70379996 3.70357990 3.70556998 3.65492010 3.60052991 3.53740001 3.46579003 3.41653991 3.38534999 3.38230991 3.38022995 3.36650991 3.34559989 3.30714011 3.26202989 3.21981001 3.18284988 3.15863991 3.14793992 3.13758993 3.12318993 3.10943007 3.09623003 3.06822991 3.05200005 3.03438997 3.01537991 2.99937010 2.98198009 2.98110008 2.98245001 2.98511004 2.98907995 2.99250007 2.99404001 2.99723005 2.99813008 2.99767995 2.99672008 3.00131011 3.00724006 3.01310992 3.01751995 3.02373004 3.02920008 3.03042006 3.02730989 3.02342010 3.02567005 3.03186011 3.04120994 3.05096006 3.05967999 3.06409001 3.06301999 3.06066990 3.05987000 3.06492996 3.07756996 3.09328008 3.10561991 3.11860991 3.12211990 3.12581992 3.12731004 3.11660004 3.10183001 3.09661007 3.10780001 3.11652994 3.12947011 3.13704991 3.13940001 3.13748002 3.12818003 3.11104989 3.09594989 3.09572005 3.10465002 3.11342001 3.11866999 3.12140989 3.11472988 3.09731007 3.07981992 3.06750989 3.05976009 3.05482006 3.04735994 3.03862000 3.02870011 3.01764011 3.00838995 2.99791002 2.98634005 2.98396993 2.99755001 3.01303005 3.02930999 3.04098010 3.05082989 3.05645990 3.06475997 3.08277988 3.10648990 3.13052011 3.15574002 3.17597008 3.19271994 3.21462989 3.23908997 3.26355004 3.29242992 3.32400990 3.35560012 3.38115001 3.40541005 3.42967010 3.45304990 3.48082995 3.50968003 3.53853011 3.55575991 3.57249999 3.58925009 3.60912991 3.63404012 3.65894008 3.68435001 3.68652010 3.68506002 3.68359995 3.68747997 3.69200993 3.69772005 3.70298004 3.70155001 3.70012999 3.69734001 3.69417000 -9999.00000 -9999.00000 -9999.00000 -9999.00000
-9999.00000 4.27704000 4.22553015 4.17047977 4.09845018 4.02725983 3.93875003 3.85727000 3.81215000 3.77383995 3.74696994 3.72460008 3.66375995 3.61429000 3.59033990 3.56236005 3.56838989 3.57473993 3.58440995 3.54951000 3.49913001 3.41512990 3.30975008 3.26513004 3.24484992 3.24464989 3.25016999 3.23809004 3.21515012 3.18216991 3.13384008 3.10208011 3.06734991 3.04157996 3.03388000 3.03266001 3.02110004 3.00685000 2.99096990 2.98188996 2.98621011 2.98902988 2.98787999 2.98671007 2.98860002 2.99263000 2.99668002 3.00254989 3.00989008 3.01510000 3.01889992 3.02340007 3.02101994 3.01780009 3.01640010 3.02290010 3.03014994 3.03719997 3.04397011 3.05022001 3.05556011 3.05901003 3.06052995 3.06151009 3.06640005 3.07226992 3.08100009 3.09138989 3.10110998 3.11233997 3.11421990 3.11483002 3.11184001 3.12154007 3.13211012 3.15059996 3.16486001 3.17934990 3.18702006 3.19228005 3.19707990 3.18897009 3.17251992 3.16324997 3.17857003 3.18891001 3.20274997 3.20976996 3.21301007 3.21169996 3.20202994 3.17913008 3.16117001 3.15600991 3.16493011 3.17333007 3.17818999 3.18022990 3.17646003 3.16160989 3.14277005 3.12506008 3.11295009 3.10558009 3.09870005 3.08938003 3.07643008 3.06409001 3.05190992 3.03702998 3.02066994 3.00846004 3.00056005 2.99158001 2.98212004 2.99036002 3.00253010 3.01074004 3.01992989 3.03413010 3.05472994 3.07930994 3.10386992 3.12026000 3.13586998 3.14988995 3.17294002 3.20188999 3.23042011 3.26176000 3.29322004 3.32006001 3.34435010 3.36847997 3.38780999 3.41419005 3.44056010 3.46539998 3.48481011 3.49936008 3.51642990 3.53903008 3.56393003 3.58927989 3.62037992 3.63737011 3.64609003 3.65616012 3.67444992 3.68154001 3.68863010 3.69571996 3.69556999 3.69414997 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000
-9999.00000 4.30981016 4.24881983 4.17521000 4.10202980 4.01735020 3.89807010 3.77944994 3.73855996 3.70800996 3.67744994 3.62294006 3.53813004 3.47721004 3.44437003 3.41017008 3.41486001 3.42911005 3.43037009 3.40107012 3.35360003 3.28942990 3.18563008 3.11654997 3.11664009 3.10897994 3.10202003 3.08284998 3.05886006 3.03863001 3.02280998 3.00205994 2.98878002 2.98095012 2.98470998 2.98827004 2.99343991 3.00002003 3.00342989 3.00695992 3.01144004 3.01142001 3.00815010 3.00846004 3.01098990 3.01361990 3.01884007 3.02628994 3.03193998 3.03647995 3.03925991 3.04233003 3.04348993 3.04259992 3.04597998 3.05121994 3.05932999 3.06798005 3.07609010 3.08505988 3.09413004 3.09868002 3.09714007 3.10261989 3.10788989 3.11671996 3.15472007 3.16850996 3.18347001 3.19591999 3.19905996 3.20393991 3.20514989 3.21304011 3.21959996 3.23075008 3.24579000 3.26182008 3.27589011 3.28048992 3.28446007 3.28776002 3.27717996 3.27238011 3.27576995 3.28371000 3.29218006 3.29684997 3.29958010 3.29556990 3.28203011 3.26840997 3.25635004 3.25165009 3.25811005 3.25530005 3.25225997 3.25417995 3.24164009 3.22911000 3.21269989 3.19326997 3.17365003 3.16406989 3.15647006 3.14701009 3.13309002 3.11804008 3.10273004 3.08241010 3.06104994 3.04748011 3.03801990 3.02744007 3.01677990 3.00499010 2.99495006 2.98617005 2.98220992 2.99725008 3.01440001 3.03513002 3.05436993 3.07101011 3.08453989 3.09622002 3.11260009 3.14421010 3.17299008 3.20269990 3.23116994 3.25886989 3.27821994 3.29513001 3.31521010 3.33676004 3.36246991 3.38502002 3.40756989 3.42474008 3.44733000 3.46991992 3.49421000 3.52532005 3.55642009 3.58114004 3.59466004 3.61357999 3.63237000 3.65095997 3.66954994 3.68663001 3.68958998 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000
-9999.00000 4.32958984 4.26198006 4.19436979 4.11348009 3.98003006 3.86104989 3.73839998 3.65543008 3.62239003 3.56806993 3.48030996 3.39459991 3.32097006 3.28175998 3.26283002 3.25218010 3.25730991 3.24253988 3.20755005 3.15928006 3.10452008 3.06538010 3.01863003 3.00686002 2.98976994 2.98183990 2.99003005 2.99867010 3.00909996 3.01307011 3.01490998 3.01060009 3.00864005 3.00989008 3.01270008 3.01715994 3.02467990 3.02968001 3.03264999 3.03591990 3.03594995 3.03307009 3.03260994 3.03486991 3.03850007 3.04288006 3.04849005 3.05428004 3.06050992 3.06389999 3.06737995 3.06914997 3.07282996 3.07708001 3.08224010 3.09319997 3.10473990 3.11676002 3.12747002 3.13797998 3.14739990 3.14535999 3.14767003 3.15282011 3.18296003 3.22315001 3.25158000 3.26743007 3.28555989 3.29291010 3.29838991 3.31490993 3.32511997 3.33263993 3.33212996 3.34393001 3.36048007 3.37453008 3.38081002 3.38498998 3.39422011 3.39665008 3.39261007 3.38425994 3.39182997 3.39650011 3.39490008 3.39762998 3.39943004 3.38972998 3.37502003 3.36658001 3.35915995 3.35332990 3.35139990 3.34907007 3.33030009 3.31889009 3.30648994 3.28832006 3.26854992 3.24836993 3.23222995 3.22186995 3.20988989 3.19314003 3.17831993 3.15942001 3.13762999 3.11208010 3.09579992 3.08345008 3.07321000 3.06273007 3.04852009 3.03118992 3.01689005 3.00302005 2.99131989 2.98356009 2.99201989 3.01297998 3.02730989 3.04130006 3.04875994 3.06735992 3.09243011 3.11946011 3.14814997 3.17528009 3.19509006 3.20653009 3.22283006 3.24410009 3.26566005 3.28595996 3.30894995 3.33184004 3.35367990 3.37614012 3.39859009 3.42159009 3.45322990 3.48486996 3.51420999 3.55207992 3.57101011 3.58989000 3.60847998 3.62706995 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000
-9999.00000 4.40333986 4.32630014 4.25868988 4.10820007 3.94964004 3.82912993 3.67629004 3.55581999 3.50978994 3.42018008 3.33176994 3.25375009 3.20001006 3.16195011 3.12483001 3.10247993 3.08208990 3.05869007 3.04164004 3.01657009 2.98417997 2.99408007 3.00170994 3.00465012 3.00746012 3.02022004 3.03831005 3.04846001 3.05515003 3.05358005 3.04667997 3.04094005 3.03529000 3.03730989 3.03733993 3.03833008 3.04205990 3.04550004 3.05307007 3.06030989 3.06521010 3.06582999 3.06026006 3.06511998 3.06861997 3.07393003 3.08097005 3.08866000 3.09578991 3.10246992 3.10848999 3.11090994 3.11595011 3.11679006 3.12281990 3.14628005 3.16255999 3.17630005 3.19003010 3.20432997 3.22226000 3.22210002 3.22679996 3.23708010 3.27586007 3.31509995 3.34483004 3.36357999 3.38464999 3.39693999 3.41455007 3.44069004 3.45713997 3.45582008 3.44938993 3.45342994 3.46730995 3.47968006 3.48878002 3.49883008 3.51224995 3.52024007 3.51296997 3.50462008 3.50276995 3.50153995 3.49837995 3.49826002 3.49973989 3.50112009 3.49095011 3.48315001 3.47435999 3.46690989 3.46066999 3.43812990 3.41711998 3.40384007 3.38648009 3.36866999 3.34826994 3.32698011 3.30914998 3.29626989 3.28027010 3.26302004 3.24432993 3.22461009 3.20071006 3.17332006 3.15254998 3.13972998 3.12810993 3.11568999 3.09850001 3.07781005 3.05818009 3.03742003 3.01887012 3.00872993 2.99727988 2.98746991 2.98404002 3.00243998 3.01339006 3.02717996 3.04670000 3.07357001 3.09898996 3.12074995 3.13842010 3.15076995 3.15970993 3.17902994 3.19906998 3.21506000 3.23801994 3.25945997 3.28098011 3.30343008 3.32512999 3.34671998 3.37545991 3.40386009 3.43162990 3.47127008 3.51283002 3.54735994 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000
-9999.00000 4.48734999 4.40679979 4.29054022 4.12805986 3.96556997 3.80802989 3.63828993 3.46930003 3.38247991 3.30736995 3.26602006 3.20518994 3.14210010 3.08310008 3.05408001 3.02645993 2.98285007 3.01243997 3.04820991 3.07638001 3.08500004 3.07301998 3.05358005 3.04654002 3.04421997 3.05360007 3.06541991 3.07246995 3.07360005 3.07433009 3.07397008 3.07396007 3.07511997 3.07826996 3.07729006 3.07356000 3.07869005 3.08552003 3.09229994 3.09850001 3.10576010 3.11063004 3.11277008 3.11476994 3.11495996 3.12153006 3.13082004 3.14011002 3.14718008 3.15415001 3.15952992 3.16090989 3.16462994 3.16970992 3.17911005 3.20421004 3.22835994 3.24760008 3.26767993 3.29808998 3.30958009 3.31445003 3.31815004 3.34348989 3.38170004 3.41990995 3.44548988 3.46671009 3.48793006 3.50956011 3.53532004 3.56106997 3.57809997 3.57160997 3.56511998 3.55773997 3.57000995 3.58226991 3.58909988 3.60244989 3.61578989 3.62839007 3.61996007 3.61153007 3.59845996 3.59580994 3.59324002 3.58829999 3.59015012 3.59202003 3.59669995 3.58832002 3.57995009 3.56917000 3.54660010 3.52380991 3.50223994 3.48475003 3.46740007 3.44800997 3.42672992 3.40544009 3.38400006 3.36792994 3.35186005 3.33312011 3.31456995 3.29601002 3.27428007 3.24900007 3.22758007 3.21120000 3.19378996 3.17966008 3.15797997 3.13176990 3.10787010 3.07960010 3.06045008 3.04606009 3.03330994 3.02030993 3.00384998 2.99152994 2.98148990 2.99285007 3.01343012 3.03060007 3.05328012 3.07159996 3.08769011 3.09624004 3.10142994 3.11397004 3.13136005 3.14796996 3.16810012 3.18845010 3.20881009 3.23094010 3.25366998 3.27640009 3.30429006 3.33335996 3.36238003 3.40330005 3.44578004 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000
-9999.00000 4.56533003 4.45507002 4.34480000 4.19796991 4.05501986 3.91055989 3.74081993 3.58285999 3.39767003 3.23937011 3.22202992 3.20099998 3.16553998 3.10887003 3.06020999 3.05712008 3.09040999 3.11910009 3.13803005 3.14312005 3.13861990 3.12683010 3.10792994 3.09416008 3.08721995 3.08874011 3.09796000 3.11128998 3.11845994 3.12200999 3.12887001 3.13416004 3.13439012 3.13628006 3.13157010 3.12807989 3.13667011 3.14810991 3.16173005 3.17385006 3.18291998 3.18611002 3.18552995 3.18586993 3.18829989 3.19484997 3.20385003 3.21483994 3.22451997 3.23179007 3.23659992 3.24147010 3.24856997 3.25689006 3.26658010 3.29051995 3.31166005 3.33225012 3.36033010 3.39861012 3.42352009 3.42847991 3.45290995 3.48087001 3.51908994 3.54145002 3.55949998 3.58071995 3.60055995 3.61997008 3.64546990 3.66789007 3.68922997 3.68500996 3.67354012 3.66058993 3.66947007 3.67479992 3.67815995 3.68975997 3.70289993 3.71597004 3.71230006 3.69847012 3.68267989 3.67719007 3.67164993 3.66471004 3.66486001 3.67063999 3.67877007 3.67360997 3.66171002 3.64728999 3.62632990 3.60516000 3.58502007 3.56709003 3.54719996 3.52620006 3.50495005 3.48205996 3.45865989 3.44235992 3.42188001 3.40024996 3.38169003 3.36967993 3.35411000 3.32979012 3.31234002 3.29290009 3.27337003 3.25866008 3.23229003 3.20166993 3.16561007 3.13034010 3.10067010 3.08718991 3.07446003 3.06320000 3.04644990 3.02698994 3.00980997 2.99541998 2.98597002 2.98881006 3.00729990 3.02376008 3.03873992 3.04822993 3.05671000 3.06323004 3.07244992 3.08955002 3.10995007 3.13042998 3.15107989 3.16808009 3.18871999 3.21412992 3.24370003 3.27326989 3.30309010 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000
-9999.00000 -9999.00000 4.52005005 4.40653992 4.28446007 4.15096998 4.01274014 3.84933996 3.69606996 3.51568007 3.40894008 3.33551002 3.29553008 3.26029992 3.20905995 3.16671991 3.16235995 3.16108990 3.19243002 3.20022988 3.20240998 3.20165992 3.19386005 3.18228006 3.17051005 3.16300011 3.15907001 3.16154003 3.17117000 3.18554997 3.20124006 3.21289992 3.22017002 3.22505999 3.21817994 3.20799994 3.20871997 3.21472001 3.22535992 3.23969007 3.25215006 3.26457000 3.26799011 3.26688004 3.26660991 3.26911998 3.27399993 3.28552008 3.29718995 3.30882001 3.31384993 3.31867003 3.32367992 3.33310008 3.34293008 3.35461998 3.37633991 3.39805007 3.41983008 3.45449996 3.49265003 3.53080010 3.55976009 3.58828998 3.61681008 3.63689995 3.65475988 3.67261004 3.69050002 3.70969009 3.72888994 3.74836993 3.76933002 3.79028010 3.78519011 3.77167010 3.75814009 3.75718999 3.76021004 3.76324010 3.77144003 3.78462005 3.79780006 3.79022002 3.77491999 3.75962996 3.75057006 3.74428010 3.73797989 3.74080992 3.74883008 3.75686002 3.74963999 3.73513007 3.72061992 3.70314002 3.68270993 3.66227007 3.64232993 3.62153006 3.60071993 3.57786012 3.55439997 3.53094006 3.50867009 3.48717999 3.46579003 3.45519996 3.44448996 3.43428993 3.41732001 3.40014005 3.38057995 3.35974002 3.33890009 3.31090999 3.27339005 3.23586011 3.20022988 3.16629004 3.14402008 3.12719011 3.11266994 3.09264994 3.07165003 3.05400991 3.03865004 3.02508998 3.01166010 2.99882007 2.98114991 2.99549007 3.00388002 3.01399994 3.02294993 3.03402996 3.04744005 3.05663991 3.07277989 3.09267998 3.10960007 3.13118005 3.16160989 3.19325995 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000
-9999.00000 -9999.00000 4.60009003 4.48656988 4.36001015 4.23085022 4.11598015 3.98637009 3.82370996 3.70281005 3.61073995 3.53464007 3.47641993 3.42927003 3.38691998 3.33763003 3.31862998 3.31260991 3.31680012 3.31416011 3.30222011 3.29054999 3.28173995 3.27112007 3.25975990 3.25020003 3.24241996 3.25188994 3.26255012 3.27812004 3.29655004 3.31566000 3.32565999 3.33126998 3.32629991 3.31820989 3.32183003 3.33097005 3.34402990 3.35975003 3.37225008 3.38446999 3.38820004 3.38915992 3.38902998 3.39111996 3.39422989 3.40365005 3.41531992 3.42349005 3.42992997 3.43567991 3.43845010 3.44555998 3.45453000 3.46070004 3.47815990 3.50010991 3.52396011 3.55507994 3.59267998 3.62310004 3.65247011 3.68098998 3.70952010 3.73231006 3.75015998 3.76041007 3.77487993 3.79408002 3.80774999 3.82444000 3.84540009 3.84847999 3.84396005 3.83043003 3.82692003 3.82617998 3.82920003 3.83034992 3.83574009 3.84887004 3.84473991 3.83664989 3.82136011 3.81027007 3.80121994 3.79492998 3.79070997 3.79184008 3.79987001 3.79819989 3.79093003 3.77642989 3.76484990 3.74959993 3.72916007 3.71232009 3.69355011 3.67270994 3.65130997 3.62873006 3.60501003 3.57962990 3.55662990 3.53744006 3.52766991 3.51723003 3.50991988 3.51329994 3.49897003 3.48457003 3.46960998 3.44870996 3.42774010 3.39996004 3.36257005 3.32134008 3.27935004 3.24341989 3.20836997 3.18844008 3.16737008 3.14530993 3.12261009 3.10146999 3.08440995 3.07051992 3.06527996 3.05468988 3.03480005 3.01090002 2.98651004 2.98539996 2.99301004 3.00226998 3.01150990 3.02013993 3.02870989 3.04492998 3.06773996 3.09383011 3.12296009 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000
-9999.00000 -9999.00000 -9999.00000 4.56471014 4.46084023 4.36171007 4.26256990 4.17419004 4.05404997 3.93425989 3.83711004 3.75098991 3.69181991 3.64493990 3.60052991 3.55360007 3.52677011 3.51672006 3.51254010 3.47491002 3.45488000 3.42529011 3.40137005 3.39096999 3.37800002 3.36500001 3.36134005 3.37058997 3.38027000 3.39530993 3.41619992 3.43765998 3.45009995 3.44959998 3.44910002 3.44571996 3.45081997 3.45591998 3.46729994 3.47979999 3.49230003 3.50196004 3.50569010 3.50941992 3.51160002 3.51470995 3.51782990 3.52433991 3.53243995 3.54053998 3.54751992 3.55025005 3.55298996 3.55750990 3.56367993 3.56984997 3.58037996 3.60423994 3.62808990 3.65453005 3.68494010 3.71534991 3.74517012 3.77370000 3.80222988 3.82693005 3.83705997 3.84718990 3.85867000 3.87214994 3.88562989 3.89949989 3.90165997 3.90382004 3.90345001 3.90034008 3.89722991 3.89495993 3.89611006 3.89725995 3.89736009 3.89318991 3.88906002 3.88353992 3.87262011 3.86170006 3.85208011 3.84803009 3.84398007 3.84173989 3.83944011 3.83715010 3.83267999 3.82122993 3.80977988 3.79657006 3.77975988 3.76294994 3.74464989 3.72323990 3.70183992 3.67902994 3.65366006 3.62827992 3.60908008 3.59931993 3.58956003 3.58498001 3.58836007 3.59174991 3.58257008 3.57048988 3.55841994 3.53802991 3.51699996 3.49529004 3.45231009 3.40646005 3.36255002 3.32768011 3.29315996 3.26473999 3.23939991 3.21586990 3.18595004 3.16048002 3.13460994 3.11718988 3.10893011 3.10011005 3.09014010 3.06884003 3.03867006 3.01213002 2.99386001 2.98137999 2.98850012 2.99618006 3.00527000 3.01884007 3.04206991 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000
-9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 4.50828981 4.40915012 4.31957006 4.23512983 4.15441990 4.06632996 3.96993995 3.91950011 3.87191010 3.82178998 3.78160000 3.75126004 3.72004008 3.68189001 3.64374995 3.60525990 3.57466006 3.54397988 3.51967001 3.50704002 3.49441004 3.48991990 3.49872994 3.50753999 3.52128005 3.54303002 3.56478000 3.56976008 3.56936002 3.56894994 3.57030010 3.57507992 3.57988000 3.58679008 3.59926009 3.61092997 3.61623001 3.61988997 3.62356997 3.62729001 3.63054991 3.63369012 3.63704991 3.64514995 3.65233994 3.65230989 3.65458989 3.65686011 3.65919995 3.66507006 3.67142010 3.67934990 3.70325994 3.72496009 3.74047995 3.77103996 3.79952002 3.81981993 3.84825993 3.87514997 3.89394999 3.90366006 3.91347003 3.92365003 3.93716002 3.94882011 3.95198989 3.95414996 3.95617008 3.95742011 3.95392990 3.95034003 3.94624996 3.94690990 3.94686007 3.94448996 3.94039011 3.93505001 3.92625999 3.91553998 3.90404010 3.89045000 3.88632989 3.88196993 3.87690997 3.87454009 3.87169003 3.86746001 3.85612988 3.84471989 3.83242989 3.81576991 3.79864001 3.77990007 3.75829005 3.73368001 3.70538998 3.67972994 3.65454006 3.63404012 3.62538004 3.62077999 3.62210989 3.62704992 3.63803005 3.63769007 3.62595010 3.62126994 3.60652995 3.58554006 3.57115006 3.53210998 3.48649001 3.45419002 3.41962004 3.38471007 3.34274006 3.31678009 3.28622007 3.25493002 3.22435999 3.19397998 3.17747998 3.16755009 3.15527010 3.13799000 3.11834002 3.09055996 3.05843997 3.03190994 3.01230001 2.99803996 2.98338008 2.98559999 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000
-9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 4.55573988 4.46583986 4.38897991 4.31172991 4.22817993 4.15384007 4.12025023 4.07011986 4.01909018 3.96926999 3.91944003 3.88232994 3.84305000 3.80281997 3.76258993 3.73002005 3.69626999 3.66469002 3.65206003 3.64124990 3.63132000 3.64013004 3.64875007 3.65774012 3.67949009 3.68523002 3.69086003 3.69074011 3.69091010 3.69107008 3.69583011 3.70115995 3.70648003 3.71778989 3.72344995 3.72909999 3.73305988 3.73685002 3.74063993 3.74378991 3.74619007 3.74858999 3.75500989 3.75461006 3.75421000 3.75612998 3.75830007 3.76045990 3.76610994 3.77403998 3.78197002 3.79888010 3.81327009 3.82765007 3.85355997 3.87308002 3.89260006 3.91772008 3.93684006 3.95596004 3.96785998 3.97803998 3.98820996 3.99762988 4.00082016 4.00401020 4.00610018 4.00740004 4.00869989 4.00592995 4.00184011 3.99775004 3.99611998 3.99374008 3.99136996 3.98576999 3.97705007 3.96832991 3.95656991 3.94228005 3.92799997 3.92249990 3.91728997 3.91209006 3.90859008 3.90462995 3.90066004 3.89023995 3.87863994 3.86690998 3.84959006 3.83152008 3.81332994 3.78800011 3.75896001 3.73007011 3.70500994 3.68022990 3.65699005 3.65357995 3.65202999 3.65259004 3.66489005 3.67986989 3.68420005 3.68056989 3.67923999 3.66851997 3.65532994 3.64233994 3.61121988 3.58025002 3.54926991 3.51323009 3.46823001 3.42322993 3.39383006 3.36268997 3.33148003 3.30258989 3.27870011 3.25901008 3.24396992 3.22650003 3.20532990 3.17890000 3.14651990 3.10921001 3.07927990 3.05504990 3.03754997 3.02096009 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000
-9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 4.54310989 4.46624994 4.38547993 4.32633018 4.29273987 4.25915003 4.21396017 4.15674019 4.09951019 4.04351997 3.99869990 3.95865011 3.91494989 3.87674999 3.84436011 3.81120992 3.79418993 3.78392005 3.77363992 3.77661991 3.78420997 3.79162002 3.79316998 3.79836011 3.80295992 3.80352998 3.80457997 3.80637002 3.81272006 3.81757998 3.82134008 3.82108998 3.82532001 3.82934999 3.83267999 3.83622003 3.84117007 3.84613991 3.84964991 3.85226011 3.85176992 3.85114002 3.84979010 3.84847999 3.84945989 3.85227990 3.86033010 3.86807990 3.87490010 3.88626003 3.90073991 3.90836000 3.92083001 3.94032001 3.95759010 3.97340989 3.99196005 4.01042986 4.02446985 4.03454018 4.03970003 4.04219007 4.04602003 4.04612017 4.04527998 4.04632998 4.04929018 4.04917002 4.04431009 4.04035997 4.03788996 4.03547001 4.02615023 4.01668978 4.00907993 4.00177002 3.98910999 3.97480011 3.95975995 3.95072007 3.94492006 3.93622994 3.92934990 3.92524004 3.92244005 3.91330004 3.90267992 3.89688993 3.88035989 3.86226010 3.83481002 3.80443001 3.77467990 3.74424005 3.71834993 3.69355011 3.67207003 3.67198992 3.67191005 3.67247009 3.68759990 3.70272994 3.71918011 3.71630001 3.71341991 3.72231007 3.70930004 3.69684005 3.67732000 3.64905000 3.62222004 3.58277988 3.53685999 3.50049996 3.47016001 3.43903995 3.40997005 3.38664007 3.36330009 3.34386992 3.32465005 3.30644011 3.28517008 3.24928999 3.21396995 3.17369008 3.13346004 3.10634995 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000
-9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 4.54278994 4.49882984 4.45354986 4.40710020 4.36201000 4.31805992 4.26083994 4.20631981 4.15248013 4.10715008 4.05724001 4.01716995 3.98251009 3.94227004 3.91717005 3.90689993 3.89669991 3.89252996 3.90013003 3.89580989 3.89317012 3.89702010 3.89658999 3.89700007 3.90017009 3.91042995 3.91816998 3.92167997 3.91423011 3.90984011 3.91401005 3.91709995 3.92027998 3.92575002 3.93359995 3.93889999 3.94090009 3.94075990 3.94038010 3.93882990 3.93434000 3.93126988 3.93338990 3.94171000 3.94992995 3.95646000 3.96209002 3.97310996 3.97746992 3.97372007 3.98174000 3.99843001 4.01019001 4.02398014 4.04246998 4.06078005 4.07706022 4.08039999 4.08024979 4.08268976 4.08086014 4.07571983 4.07387018 4.07739019 4.08395004 4.08685017 4.08279991 4.08025980 4.07776022 4.06617022 4.05209017 4.04269981 4.03554010 4.02851009 4.01693010 4.00166988 3.98569989 3.97404003 3.96548009 3.95374990 3.94507003 3.94267011 3.94042993 3.93114996 3.92717004 3.92386007 3.90946007 3.88011003 3.84684992 3.81556010 3.78516006 3.75442004 3.72742009 3.70493007 3.68368006 3.68318009 3.68028998 3.67751002 3.69264007 3.71357012 3.73451996 3.73493004 3.74904990 3.76430988 3.75407004 3.74313998 3.72429991 3.69823003 3.67399001 3.63853002 3.60342002 3.57595992 3.54639006 3.51783991 3.48964000 3.46631002 3.45365000 3.44342995 3.42421007 3.40812993 3.37837005 3.32736993 3.29034996 3.24480009 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000
-9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 4.59426022 4.54780006 4.50269985 4.45879984 4.41260004 4.35628986 4.30109978 4.25052023 4.19994020 4.15382004 4.11358023 4.07332993 4.04016018 4.02996016 4.01976013 4.00956011 4.00457001 3.99354005 3.98353004 3.98473001 3.98942995 3.99397993 4.00423002 4.01449013 4.02201986 4.01457024 4.00712013 3.99934006 3.99624991 3.99409008 3.99631000 4.01000977 4.02237988 4.02847004 4.02851009 4.02855015 4.02684021 4.02162981 4.01641989 4.01171017 4.01478004 4.01809978 4.02099991 4.02812004 4.04078007 4.04436016 4.04082012 4.03727007 4.03660011 4.04791021 4.05921984 4.07013988 4.08363008 4.09740019 4.10427999 4.10633993 4.11236000 4.11154985 4.10663986 4.10171986 4.10050011 4.10642004 4.11232996 4.12047005 4.11570978 4.11031008 4.09641981 4.08154011 4.07169008 4.06411982 4.05743980 4.05076981 4.04039001 4.02412987 4.00786018 3.98972011 3.97509003 3.96044993 3.95421004 3.95387006 3.95427990 3.95180011 3.94875002 3.94569993 3.92615008 3.89295006 3.85975003 3.82140994 3.78850007 3.75558996 3.73069000 3.71013999 3.69075990 3.68809009 3.68542004 3.68331003 3.69950008 3.72018003 3.74087000 3.76116991 3.77291989 3.78303003 3.77995992 3.77561998 3.76390004 3.73970008 3.71549010 3.68908000 3.65435004 3.61963010 3.59981990 3.58234000 3.56687999 3.55841994 3.54995990 3.54145002 3.52934003 3.51688004 3.48026991 3.42571998 3.37116003 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000
-9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 4.64178991 4.59597015 4.55013990 4.49826002 4.44572020 4.38675022 4.30862999 4.23880005 4.20069981 4.16695023 4.13784981 4.12072992 4.11025000 4.09138012 4.07167006 4.06062984 4.05372000 4.04960012 4.04851007 4.05473995 4.06504011 4.07738018 4.09111023 4.09019995 4.08203983 4.06607008 4.05054998 4.04838991 4.05846024 4.07349014 4.08758020 4.09551001 4.09555006 4.08900976 4.08033991 4.07426023 4.07009983 4.07126999 4.07263994 4.07595015 4.07827997 4.08038998 4.08677006 4.09217978 4.08864021 4.07785988 4.06629992 4.07379007 4.08456993 4.09405994 4.10431004 4.11808014 4.11703014 4.11475992 4.11655998 4.11665010 4.11175013 4.10714006 4.10253000 4.10757017 4.11627007 4.12888002 4.13692999 4.13093996 4.10960007 4.08827019 4.07352018 4.06573009 4.05929995 4.05411005 4.04859018 4.03232002 4.01335001 3.99213004 3.97332001 3.96074009 3.95889997 3.95705009 3.95675993 3.95449996 3.95157003 3.94887996 3.94160008 3.90840006 3.86736012 3.82295990 3.78417993 3.75428009 3.73095012 3.70761991 3.68709993 3.68324995 3.68233991 3.68322992 3.69042993 3.71111989 3.73880005 3.76731992 3.78471994 3.78882003 3.78590012 3.78297997 3.77551007 3.75131011 3.72726989 3.70325994 3.67300010 3.64611006 3.63032007 3.62185001 3.61336994 3.60489988 3.59645009 3.60377002 3.61120009 3.60505009 3.56705999 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000
-9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 4.63767004 4.55955982 4.48145008 4.40333986 4.32523012 4.29421997 4.26513004 4.23603010 4.20696020 4.18704987 4.16715002 4.14724016 4.12802982 4.12390995 4.11978006 4.11566019 4.11306000 4.12680006 4.14053011 4.15427017 4.16422987 4.14826012 4.13229990 4.11633015 4.10558987 4.12061977 4.13565016 4.15067005 4.16071987 4.15205002 4.14337015 4.13468981 4.12848997 4.12966013 4.13082981 4.13199997 4.13345003 4.13556004 4.13767004 4.13978004 4.13732004 4.12576008 4.11420012 4.10263014 4.09898996 4.10848999 4.11798000 4.12748003 4.13206005 4.12978983 4.12751007 4.12523985 4.12190008 4.11729002 4.11267996 4.10806990 4.11207008 4.12468004 4.13729000 4.14989996 4.14412022 4.12278986 4.10145998 4.08013010 4.06821012 4.06302023 4.05781984 4.05262995 4.03741980 4.01620007 3.99497008 3.97375011 3.96543002 3.96358991 3.96174002 3.95989990 3.95745993 3.95477009 3.95209002 3.94940996 3.91546988 3.87106991 3.82666993 3.78226995 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000

View File

@@ -0,0 +1,22 @@
ncols 80
nrows 16
xllcorner 0.0
yllcorner 0.0
cellsize 1.0
NODATA_value -9999
-9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 3.67219996 3.68359995 3.69619012 3.71521997 3.72508001 3.72726989 3.71860003 3.70366001 3.69660997 3.69231009 3.69566989 3.70247006 3.70868993 3.73199010 3.73533010 3.72710991 3.71343994 3.69245005 3.67408991 3.66343999 3.66878009 3.67532992 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000
-9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 3.75395012 3.75072002 3.77381992 3.80789995 3.83649993 3.83517003 3.80082989 3.76087999 3.72447991 3.71415997 3.73225999 3.73175001 3.73741007 3.73725009 3.73420000 3.72895002 3.72724009 3.71581006 3.70748997 3.70763993 3.71369004 3.71959996 3.72178006 3.71810007 3.71340990 3.72086000 3.70785999 3.69271994 3.68577003 3.69053006 3.71712995 3.73258996 3.73983002 3.75313997 3.72856998 3.71529007 3.69196010 3.68709993 3.68752003 3.71386003 3.74335003 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000
-9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 3.84218001 3.85291004 3.85646009 3.84837008 3.81525993 3.78619003 3.77371001 3.78171992 3.78228998 3.80602002 3.82614994 3.81270003 3.78468990 3.75465989 3.72204995 3.70226002 3.71567988 3.71896005 3.70863008 3.68091989 3.66621995 3.66920996 3.69081998 3.66926003 3.65340996 3.64381003 3.64496994 3.65351009 3.63864994 3.62265992 3.62915993 3.64632010 3.64388990 3.63277006 3.61752009 3.63211012 3.69529009 3.71615005 3.71783996 3.72343993 3.73534012 3.74135995 3.71669006 3.71463990 3.72206998 3.73904991 3.77004004 3.81308007 3.82997990 3.79167008 3.74681997 3.68841004 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000
-9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 3.89721990 3.89446998 3.88790989 3.88687992 3.87184000 3.87367010 3.86740994 3.85953999 3.83484006 3.80479002 3.77077007 3.74273992 3.75369000 3.75407004 3.74163008 3.73374009 3.72142005 3.70238996 3.66389990 3.62322998 3.58352995 3.61139011 3.61373997 3.59570003 3.54733992 3.50950003 3.49995995 3.51776004 3.51693010 3.49341989 3.46985006 3.47119999 3.47304010 3.45194006 3.44093990 3.43341994 3.44907999 3.46670008 3.46933007 3.44515991 3.49103999 3.54961991 3.60261011 3.60168004 3.63162994 3.67248011 3.69498992 3.69745994 3.67420006 3.68841004 3.72452998 3.75991011 3.76771998 3.78307009 3.76691008 3.74364996 3.69601989 3.65737009 3.62821007 3.62685990 3.64345002 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000
-9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 3.97463989 3.96666002 3.94780993 3.94218993 3.91915011 3.91198993 3.89215994 3.87345004 3.85437989 3.83789992 3.80751991 3.77642989 3.73608994 3.69320011 3.66227007 3.66677999 3.65785003 3.62424994 3.58114004 3.54922009 3.52816010 3.49469995 3.42711997 3.39080000 3.37755990 3.37296009 3.36444998 3.31990004 3.25889993 3.24163008 3.26091003 3.27699995 3.26254010 3.23248005 3.22522998 3.22555995 3.22105002 3.21431994 3.18898010 3.19310999 3.22851992 3.24569988 3.25251007 3.25864005 3.30609012 3.36669993 3.40301991 3.44205999 3.51185012 3.56785989 3.57076001 3.55559993 3.58434010 3.63444996 3.67550993 3.68491006 3.69812012 3.71179008 3.70617008 3.68607998 3.66150999 3.64916992 3.66020989 3.67941999 3.70173001 3.72968006 3.72755003 3.70164990 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000
-9999.00000 -9999.00000 -9999.00000 -9999.00000 4.02367020 4.01190996 4.02333021 4.00113010 3.97018003 3.93827009 3.90633988 3.86961007 3.84359002 3.81522989 3.77417994 3.73583007 3.69358993 3.66131997 3.60915995 3.54360008 3.49505997 3.47079992 3.45974994 3.40716004 3.35136008 3.30119991 3.28457999 3.26395988 3.23436999 3.18297005 3.15848994 3.15164995 3.13547993 3.10908008 3.07193995 3.04245996 3.05696988 3.06269002 3.06114006 3.05426002 3.03233004 3.03197002 3.03110003 3.03109002 3.02905989 3.02705002 3.04509997 3.07450008 3.08585000 3.09185004 3.10967994 3.16898990 3.20758009 3.22706008 3.24148989 3.28264999 3.35360003 3.37469006 3.42071009 3.46594000 3.52659988 3.55022001 3.57961988 3.60310006 3.63214993 3.63052011 3.62648010 3.64428997 3.67242002 3.70278001 3.71656990 3.73416996 3.74310994 3.71284008 3.69461989 3.66292000 -9999.00000 -9999.00000 -9999.00000 -9999.00000
-9999.00000 -9999.00000 4.08056021 4.03021002 3.97554994 3.96744990 3.96454000 3.96043992 3.93502998 3.88625002 3.80773997 3.75567007 3.71145010 3.68425012 3.62757993 3.54643989 3.47901011 3.43943000 3.39190006 3.33290005 3.27805996 3.24868989 3.23566008 3.20618010 3.16253996 3.11444998 3.09419990 3.07409000 3.05212998 3.02804995 3.00203991 2.98604012 2.98108006 2.98636007 2.98809004 2.98990989 2.99160004 2.99549007 3.01216006 3.01435995 3.00728011 3.00518990 3.00177002 3.01401997 3.01781988 3.00535011 3.00322008 3.00254011 3.00037003 2.99166989 2.98130989 3.01029992 3.06195998 3.07175994 3.07405996 3.11138010 3.16626000 3.20573997 3.21698999 3.24619007 3.31199002 3.36210990 3.40650010 3.44888997 3.49475002 3.52310991 3.56508994 3.60157990 3.64304996 3.68530989 3.70687008 3.72404003 3.72502995 3.72311997 3.70644999 3.69006991 3.67417002 3.66610003 -9999.00000 -9999.00000
-9999.00000 4.17643976 4.10390997 3.97607994 3.89861989 3.85435009 3.81108999 3.78051996 3.75936007 3.75047994 3.64608002 3.54189992 3.46359992 3.44306993 3.39913011 3.31353998 3.23955011 3.20812011 3.18319011 3.14372993 3.09769011 3.05991006 3.03835011 3.00462008 2.98114991 2.98615003 2.98948002 2.99089003 2.99953008 3.00716996 3.01724005 3.00921011 3.01032996 3.02570009 3.03816009 3.03851008 3.04104996 3.06101990 3.08590007 3.09742999 3.09222007 3.07147002 3.08153009 3.10124993 3.10500002 3.08592010 3.07090998 3.07936001 3.09131002 3.07593989 3.04626989 3.03160000 3.01507998 3.00090003 2.98080993 3.00290990 3.03574991 3.06944990 3.08284998 3.10534000 3.15187001 3.20514011 3.24820995 3.29709005 3.35172009 3.40943003 3.45816994 3.50570989 3.56209993 3.59572005 3.62329006 3.67304993 3.69532990 3.69238997 3.70085001 3.70246005 3.69505000 3.68829012 -9999.00000 -9999.00000
-9999.00000 4.24236012 4.09855986 3.91252995 3.76834989 3.70830011 3.59031010 3.51260996 3.49142003 3.51143003 3.42268991 3.23323011 3.17428994 3.17407990 3.12173009 3.05750990 3.01828003 2.99637008 2.98281002 2.99205995 2.99881005 2.99673009 3.00162005 3.01030993 3.02418995 3.03158998 3.03176999 3.03296995 3.04728007 3.06346011 3.07817006 3.07838011 3.09077001 3.12357998 3.15052009 3.16090012 3.16596007 3.18351007 3.21501994 3.23701000 3.24569988 3.22339010 3.23500991 3.25476003 3.25937009 3.23691010 3.20707989 3.21790004 3.21984005 3.20320010 3.16915011 3.13944006 3.12245989 3.09775996 3.06613994 3.03109002 3.01264000 2.99286008 2.98671007 3.01121998 3.04731989 3.09072995 3.11647010 3.16470003 3.22282004 3.28312993 3.32658005 3.36889005 3.41938996 3.45702004 3.49959993 3.55202007 3.60661006 3.63202000 3.66960001 3.69051003 -9999.00000 -9999.00000 -9999.00000 -9999.00000
-9999.00000 4.29971981 4.10629988 3.83737993 3.59399009 3.47365999 3.30367994 3.20103002 3.15771008 3.10987997 3.06352997 2.99652004 2.98945999 3.00626993 3.03315997 3.03697991 3.02785993 3.02589989 3.03076005 3.03990006 3.04690003 3.04946995 3.05135989 3.05876994 3.07023001 3.08350992 3.09370995 3.10203004 3.13198996 3.15823007 3.18322992 3.19155002 3.21530008 3.29510999 3.33300996 3.35775995 3.40023994 3.40590000 3.41758990 3.44348001 3.45841002 3.46871996 3.45460010 3.45779991 3.45900989 3.45091009 3.43195009 3.42033005 3.38880992 3.36106992 3.32400990 3.28205991 3.25758004 3.22212005 3.18089008 3.13333011 3.10859990 3.08309007 3.04491997 3.01049995 2.99011993 2.99732995 3.02582002 3.05786991 3.11262012 3.15846992 3.18129992 3.22334003 3.26321006 3.30721998 3.35206008 3.40335989 3.46203995 3.54347992 3.58182001 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000
-9999.00000 4.43861008 4.17054987 3.86994004 3.53736997 3.25597000 3.20038009 3.08452010 3.03712010 3.10261011 3.12493992 3.10684991 3.07525992 3.07524991 3.09787011 3.10535002 3.11404991 3.11512995 3.10285997 3.12579989 3.15029001 3.16046000 3.16025996 3.17108989 3.19092989 3.20595002 3.21574998 3.22956991 3.27025008 3.31076002 3.37841010 3.39192009 3.45056009 3.51063991 3.55185008 3.59440994 3.64246011 3.64417005 3.62995005 3.64646006 3.66740990 3.68558002 3.66199994 3.64866996 3.63913012 3.64798999 3.64030004 3.60897994 3.56533003 3.52887988 3.48669004 3.44168997 3.40675998 3.36542010 3.33564997 3.28865004 3.25092006 3.21391010 3.15182996 3.08898997 3.06352997 3.03574991 2.99936008 2.98095012 3.01904011 3.05187011 3.07034993 3.08738995 3.12649989 3.16768003 3.20777988 3.26090002 3.31991005 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000
-9999.00000 4.57731009 4.33658981 4.07664013 3.77132010 3.55111003 3.41736007 3.32752991 3.26822996 3.28042006 3.27336001 3.25344992 3.22819996 3.21158004 3.23557997 3.26879001 3.29426003 3.29137993 3.29047990 3.31513000 3.34335995 3.35736990 3.35695004 3.36314011 3.38662004 3.40035009 3.40897012 3.42754006 3.45870996 3.50495005 3.57962990 3.63894010 3.69623995 3.73137999 3.76063991 3.79294991 3.83254004 3.82194996 3.80666995 3.81192994 3.82526994 3.83078003 3.80167007 3.78429008 3.77467990 3.78880000 3.77147007 3.74549007 3.70541000 3.66699004 3.62378001 3.57565999 3.52970004 3.50422001 3.49130988 3.46569991 3.43094993 3.38494992 3.30970001 3.23032999 3.17314005 3.13644004 3.09240007 3.06037998 3.04159999 3.00019002 2.99084997 3.00775003 3.02535009 3.05351996 3.10082006 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000
-9999.00000 -9999.00000 4.57560015 4.37607002 4.20177984 4.01429987 3.87034988 3.77456999 3.71565008 3.64509010 3.57018995 3.50861001 3.47612000 3.46308994 3.48081994 3.51987004 3.54540992 3.54459000 3.55202007 3.56594992 3.58985996 3.59822989 3.60551000 3.61189008 3.62537003 3.63271999 3.63729000 3.64698005 3.66808009 3.71257997 3.76557994 3.81666994 3.87055993 3.89491010 3.91667008 3.93983006 3.94470000 3.94535995 3.93807006 3.93723011 3.93302011 3.92212009 3.90139008 3.88089991 3.87199998 3.86624002 3.85402012 3.83102989 3.79874992 3.75980997 3.71024990 3.65822005 3.62374997 3.61437988 3.62491989 3.62020993 3.60022998 3.56051993 3.48305011 3.40926003 3.33383012 3.27803993 3.21555996 3.16777992 3.14651990 3.11034989 3.05351996 3.00648999 2.98060989 3.00207996 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000
-9999.00000 -9999.00000 -9999.00000 -9999.00000 4.51867008 4.35922003 4.26718998 4.18594980 4.07220984 3.97362995 3.88965988 3.82112002 3.77624011 3.75555992 3.77010012 3.78081989 3.79038000 3.79234004 3.79977012 3.80716991 3.81455994 3.82194996 3.83102989 3.83831000 3.83976007 3.83709002 3.83874011 3.85103011 3.86532998 3.89446998 3.92010999 3.95538998 3.99272990 4.02166986 4.03460979 4.04231977 4.04194021 4.04672003 4.03694010 4.03138018 4.01698017 4.00165987 3.97779989 3.95024991 3.93858004 3.92491007 3.91535997 3.89463997 3.86547995 3.81423998 3.75416994 3.70116997 3.67047000 3.66912007 3.69726992 3.71468997 3.71936989 3.69407010 3.65030003 3.58697009 3.49704003 3.43596005 3.38104010 3.33449006 3.29909992 3.24625993 3.17236996 3.10206008 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000
-9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 4.58134985 4.48944998 4.39742994 4.28569984 4.18388987 4.09923983 4.03039980 4.00988007 3.99761009 3.97807002 3.98390007 3.99950004 4.01413012 3.99914002 3.99207997 3.99616003 4.02147007 4.02345991 4.02088022 4.01127005 4.01202011 4.01789999 4.04221010 4.03633022 4.03916979 4.06193018 4.08783007 4.10255003 4.11400986 4.10411978 4.10311985 4.11502981 4.11170006 4.08641005 4.06730986 4.05387020 4.03119993 3.99847007 3.96706009 3.95353007 3.95288992 3.94675994 3.90494990 3.83586001 3.76796007 3.71741009 3.68933010 3.68394995 3.71424007 3.75681996 3.78045988 3.77634001 3.74535990 3.69663000 3.62673998 3.58439994 3.55714011 3.53695989 3.51200008 3.42859006 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000
-9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 4.55066013 4.39344978 4.29017019 4.23160982 4.18378019 4.14372015 4.12312984 4.11482000 4.12974977 4.15740013 4.14442015 4.11228991 4.12460995 4.15486002 4.14951992 4.13205004 4.13003016 4.13239002 4.13628006 4.14053011 4.12151003 4.09823990 4.11220980 4.13132000 4.12883997 4.12425995 4.11524010 4.10596991 4.13058996 4.15518999 4.11225986 4.07076979 4.06031990 4.04735994 4.00464010 3.96624994 3.96253991 3.95858002 3.95318007 3.93288994 3.84352994 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000 -9999.00000

View File

@@ -0,0 +1,194 @@
import optparse
import shutil, distutils.dir_util, os, sys, glob
import numpy
import math
import matplotlib.pyplot as plt
from pylagrit import PyLaGriT
#
# Create parser and options
#
p = optparse.OptionParser()
p.add_option('--dem-file', help='DEM data file name including path', type='string', dest='dem_filename' )
p.add_option('--exo-file', help='Exodus II mesh output including path', type='string', dest='exo_filename')
p.add_option('--dry-run', help='Show commands and diagnostics but no execution', default=False, dest='dry_run', action='store_true')
p.add_option('--plot', help='Show commands and diagnostics but no execution', default=False, dest='plot', action='store_true')
#
(opts,args) = p.parse_args()
print(opts.dem_filename)
print(opts.dry_run)
# Input: DEM data
dem_file_fullname=opts.dem_filename
dem_file_noext, dem_file_ext=os.path.splitext(opts.dem_filename)
dem_file_base=os.path.basename(opts.dem_filename).rstrip(dem_file_ext)
dem_file_path=os.path.dirname(opts.dem_filename)
# Output: Exodus II mesh
exo_file_fullname=opts.exo_filename
exo_file_noext, exo_file_ext=os.path.splitext(opts.exo_filename)
exo_file_base=os.path.basename(opts.exo_filename).rstrip(exo_file_ext)
exo_file_path=os.path.dirname(opts.exo_filename)
# Output: XML region specifications for the new mesh
xml_file_fullname=exo_file_path+exo_file_base+'.xml'
# DEM parsing
#
with open(dem_file_fullname) as dem_header:
for line in dem_header:
if ("ncols" in line):
nx=int(line.split()[1])
elif ("nrows" in line):
ny=int(line.split()[1])
elif ("xllcorner" in line):
xll_corner=float(line.split()[1])
elif ("yllcorner" in line):
yll_corner=float(line.split()[1])
elif ("cellsize" in line):
dx=float(line.split()[1])
dy=dx
elif ("NODATA_value" in line):
no_data_value=int(line.split()[1])
break
print(nx, ny, xll_corner, yll_corner, dx, dy, no_data_value)
dem_header.close()
d = numpy.flipud(numpy.genfromtxt(dem_file_fullname,skip_header=6))
#plt.matshow(d)
# Create mesh based on ncols and nrows in file, could automatically read
x = numpy.linspace(xll_corner,dx*(nx-1),nx)
y = numpy.linspace(yll_corner,dy*(ny-1),ny)
x=numpy.arange(xll_corner,dx*nx,dx)
y=numpy.arange(yll_corner,dy*ny,dy)
xx, yy = numpy.meshgrid(x,y)
# Write avs file
fh = open(dem_file_base+'.avs','w')
# Find number of data values and write avs header
N = numpy.where(numpy.isnan(d)==False)[0].shape[0]
fh.write(str(N)+' 0 0 0 0\n')
# Collect data into avs format
# JDM: Not sure if this should be nx*ny?
davs = numpy.zeros([nx*ny,4])
ind = 0
for i,row in enumerate(d):
for j,v in enumerate(row):
davs[ind,:] = [ind + 1, xx[i,j], yy[i,j], v]
ind += 1
# Write data to avs file
numpy.savetxt(fh,davs,fmt=['%4d','%.1lf','%.1lf','%.8lf'])
fh.close()
# Crank up pylagrit
lg = PyLaGriT()
# Read in elevations in avs fromat
m = lg.read(dem_file_base+'.avs')
# Take a look, change paraview exe
# Will need to use glyph filter to view points
#m.paraview(exe='paraview')
# Copy z values over to attribute
m.addatt('z_save',vtype='vdouble',rank='scalar')
m.copyatt('zic','z_save')
# Not sure why this has to be done, but not data elements don't get removed otherwise
m.setatt('zic',0.)
# Create connected quad mesh surface
m2 = lg.create()
#m2.createpts_xyz((nx,ny,1),[xx.min(),yy.min(),0.],[xx.max(),yy.max(),0],rz_switch=[1,1,1],connect=True)
m2.createpts_xyz((nx,ny,1),[xx.min(),yy.min(),0.],[xx.max(),yy.max(),0],rz_switch=[1,1,1])
# Create temporary z value attribute
m2.addatt('z_save',vtype='vdouble',rank='scalar')
# Interpolate elevations to z_save
m2.interpolate_voronoi('z_save',m,'z_save')
# Find nodes associated with nodata
pdel = m2.pset_attribute('z_save',-9999)
# Create element set from these nodes and remove elements
edel = pdel.eltset()
m2.rmpoint_eltset(edel)
# Copy temp z values over to actual a values
#m2.copyatt('z_save','zic')
# Take a look to make sure everything is ok
#m2.paraview(exe='paraview')
m3 = m2.copypts(elem_type='triplane')
m3.connect()
# To lazy to add to pylagrit now, and don't know how to make it intuitive
# Creates edge_max element attribute containing max edge length
m3.sendline('quality/edge_max/y')
# Query created attribute
#m3.printatt('edgemax')
m3.minmax('edgemax')
# Figure out max desired edge length
max_edge = numpy.sqrt(dx**2+dy**2)
# Identify elements with longer edges
edel = m3.eltset_attribute('edgemax',max_edge*2.05,'gt')
m3.rmpoint_eltset(edel)
#m3 = m2.grid2grid_quadtotri2()
#m3=m2
# Create temporary z value attribute
m3.addatt('z_save',vtype='vdouble',rank='scalar')
# Interpolate elevations to z_save
m3.interpolate_voronoi('z_save',m,'z_save')
# Find nodes associated with nodata
pdel = m3.pset_attribute('z_save',-9999)
# Create element set from these nodes and remove elements
edel = pdel.eltset()
m3.rmpoint_eltset(edel)
# Copy temp z values over to actual a values
m3.copyatt('z_save','zic')
# Take a look to make sure everything is ok
#m2.paraview(exe='paraview')
# Create top surface avs
m3.dump('top.inp')
## Subtract 1 from z values of top and dump into bottom surface avs
m3.math('sub',1,'zic',cmosrc=m3)
m3.dump('mid.inp')
m3.setatt('zic',0.0)
m3.dump('bot.inp')
# Stack the layers in a new mesh object
stack = lg.create()
stack.stack_layers('avs',['bot.inp 1','mid.inp 1,3','top.inp 1,0'],flip_opt=True)
stack_hex = stack.stack_fill()
# Automatically create face sets based on normal vectors and layer id
#fs = stack_hex.create_boundary_facesets(base_name='faceset_bounds',stacked_layers=True)
#fs = stack_hex.create_boundary_facesets(base_name='faceset_bounds',stacked_layers=False)
# Diagnostic
#stack_hex.sendline('quality volume itetclr')
# Write exo file with boundary facesets
#stack_hex.dump_exo(exo_file_fullname,facesets=fs.values())
stack_hex.dump_exo(exo_file_fullname)
# Write region and faceset identifier file for ats_xml
matnames = {10000:'computational domain peat'}
facenames = {1:'bottom face',
2:'surface',
3:'front',
4:'right',
5:'back',
6:'left'}
# Dump ats style xml for mesh, can provide options for other schemas easily also
#stack_hex.dump_ats_xml(xml_file_fullname,exo_file_fullname,matnames=matnames,facenames=facenames)
stack_hex.dump_ats_xml(xml_file_fullname,exo_file_fullname,matnames=matnames,facenames=facenames)
# Take a look
if opts.plot:
stack_hex.paraview(exe='/Applications/paraview.app/Contents/MacOS/paraview')

View File

@@ -0,0 +1,47 @@
using PyCall
@pyimport pylagrit
l = pylagrit.PyLaGriT(lagrit_exe="lagrit")
# Create mesh object 'm'
m = l[:create](elem_type="triplane")
m[:read]("data.inp")
# Set imt to 1 for all points
m[:setatt]("imt",1)
m[:minmax_xyz]()
# Connect mesh
m[:connect]()
# Lift the triangulation by assigning the Z coordinate to the data value (value)
m[:copyatt]("value","zic")
m[:minmax_xyz]()
# Dump surface to vis file
m[:dump]("tmp_tri_surf.inp")
# Extrude mesh to 0
mprism = m[:extrude](0.1,offset_type="min",return_type="volume", direction=[0.,0.,-1.])
# Diagnostic
l[:sendline]("quality / volume")
# Add e_volume attribute of type "volume"
mprism[:addatt]("e_volume", keyword="volume")
# Calculate volume
mprism[:math]("sum","volume_sum",attsrc="e_volume")
# Dump surface to vis file
mprism[:dump]("tmp_prism.inp")
# Just to check the math do this again and assign all the 'values' to 1.0 and see if we get the expected result.
mprism[:delete]()
m[:setatt]("value", 1.0)
m[:copyatt]("value","zic")
mprism = m[:extrude](0.1,offset_type="min",return_type="volume", direction=[0.,0.,-1.])
l[:sendline]("quality / volume")
mprism[:addatt]("e_volume", keyword="volume")
mprism[:math]("sum","volume_sum",attsrc="e_volume")

View File

@@ -0,0 +1,13 @@
5 0 1 0 0
1 0. 0. 0.
2 1. 0. 0.
3 1. 1. 0.
4 0. 1. 0.
5 .3 .7 0.
1 1
value, real
1 0.1
2 0.2
3 0.4
4 0.4
5 0.5

View File

@@ -0,0 +1,112 @@
36 34 4 0 0
001 6.013520000000E+01 7.815840000000E+01 0.000000000000E+00
002 6.225470000000E+01 7.304140000000E+01 0.000000000000E+00
003 6.636100000000E+01 7.733150000000E+01 0.000000000000E+00
004 6.743270000000E+01 7.545220000000E+01 0.000000000000E+00
005 6.859450000000E+01 7.817220000000E+01 0.000000000000E+00
006 6.951440000000E+01 7.399160000000E+01 0.000000000000E+00
007 7.084420000000E+01 7.675250000000E+01 0.000000000000E+00
008 7.160620000000E+01 7.163580000000E+01 0.000000000000E+00
009 7.446970000000E+01 7.667770000000E+01 0.000000000000E+00
010 7.634490000000E+01 6.771360000000E+01 0.000000000000E+00
011 7.675880000000E+01 6.338200000000E+01 0.000000000000E+00
012 7.897770000000E+01 6.857050000000E+01 0.000000000000E+00
013 7.901310000000E+01 6.423670000000E+01 0.000000000000E+00
014 8.278350000000E+01 6.370140000000E+01 0.000000000000E+00
015 8.581780000000E+01 6.354890000000E+01 0.000000000000E+00
016 8.837110000000E+01 6.236630000000E+01 0.000000000000E+00
017 9.139940000000E+01 5.620000000000E+01 0.000000000000E+00
018 9.220260000000E+01 5.174260000000E+01 0.000000000000E+00
019 9.029090000000E+01 5.127020000000E+01 0.000000000000E+00
020 8.814240000000E+01 4.745050000000E+01 0.000000000000E+00
021 8.651860000000E+01 4.605400000000E+01 0.000000000000E+00
022 8.447390000000E+01 4.624540000000E+01 0.000000000000E+00
023 8.032490000000E+01 4.764650000000E+01 0.000000000000E+00
024 7.972940000000E+01 5.571550000000E+01 0.000000000000E+00
025 7.884580000000E+01 5.498510000000E+01 0.000000000000E+00
026 7.671340000000E+01 5.763060000000E+01 0.000000000000E+00
027 7.543020000000E+01 5.673740000000E+01 0.000000000000E+00
028 7.536320000000E+01 5.840850000000E+01 0.000000000000E+00
029 7.325510000000E+01 6.345750000000E+01 0.000000000000E+00
030 7.111320000000E+01 6.315590000000E+01 0.000000000000E+00
031 7.113480000000E+01 6.613580000000E+01 0.000000000000E+00
032 7.012260000000E+01 6.643770000000E+01 0.000000000000E+00
033 6.865560000000E+01 6.764970000000E+01 0.000000000000E+00
034 6.784250000000E+01 6.752880000000E+01 0.000000000000E+00
035 6.589600000000E+01 6.792520000000E+01 0.000000000000E+00
036 6.262800000000E+01 6.655140000000E+01 0.000000000000E+00
001 0 tri 1 2 3
002 0 tri 3 4 5
003 0 tri 5 6 7
004 0 tri 9 10 11
005 0 tri 13 14 15
006 0 tri 15 16 17
007 0 tri 17 18 19
008 0 tri 19 20 21
009 0 tri 21 22 23
010 0 tri 23 24 25
011 0 tri 25 26 27
012 0 tri 28 29 30
013 0 tri 34 35 36
014 0 tri 1 3 5
015 0 tri 5 7 8
016 0 tri 8 9 11
017 0 tri 13 15 17
018 0 tri 17 19 21
019 0 tri 21 23 25
020 0 tri 25 27 28
021 0 tri 28 30 31
022 0 tri 1 5 8
023 0 tri 8 11 12
024 0 tri 13 17 21
025 0 tri 21 25 28
026 0 tri 28 31 32
027 0 tri 1 8 12
028 0 tri 12 13 21
029 0 tri 21 28 32
030 0 tri 12 21 32
031 0 tri 12 32 33
032 0 tri 1 12 33
033 0 tri 1 33 34
034 0 tri 1 34 36
00004 1 1 1 1
imt1, integer
itp1, integer
icr1, integer
isn1, integer
0000000001 0.000000000000E+00 1.000000000000E+01 0.000000000000E+00 0.000000000000E+00
0000000002 0.000000000000E+00 1.000000000000E+01 0.000000000000E+00 0.000000000000E+00
0000000003 0.000000000000E+00 1.000000000000E+01 0.000000000000E+00 0.000000000000E+00
0000000004 0.000000000000E+00 1.000000000000E+01 0.000000000000E+00 0.000000000000E+00
0000000005 0.000000000000E+00 1.000000000000E+01 0.000000000000E+00 0.000000000000E+00
0000000006 0.000000000000E+00 1.000000000000E+01 0.000000000000E+00 0.000000000000E+00
0000000007 0.000000000000E+00 1.000000000000E+01 0.000000000000E+00 0.000000000000E+00
0000000008 0.000000000000E+00 1.000000000000E+01 0.000000000000E+00 0.000000000000E+00
0000000009 0.000000000000E+00 1.000000000000E+01 0.000000000000E+00 0.000000000000E+00
0000000010 0.000000000000E+00 1.000000000000E+01 0.000000000000E+00 0.000000000000E+00
0000000011 0.000000000000E+00 1.000000000000E+01 0.000000000000E+00 0.000000000000E+00
0000000012 0.000000000000E+00 1.000000000000E+01 0.000000000000E+00 0.000000000000E+00
0000000013 0.000000000000E+00 1.000000000000E+01 0.000000000000E+00 0.000000000000E+00
0000000014 0.000000000000E+00 1.000000000000E+01 0.000000000000E+00 0.000000000000E+00
0000000015 0.000000000000E+00 1.000000000000E+01 0.000000000000E+00 0.000000000000E+00
0000000016 0.000000000000E+00 1.000000000000E+01 0.000000000000E+00 0.000000000000E+00
0000000017 0.000000000000E+00 1.000000000000E+01 0.000000000000E+00 0.000000000000E+00
0000000018 0.000000000000E+00 1.000000000000E+01 0.000000000000E+00 0.000000000000E+00
0000000019 0.000000000000E+00 1.000000000000E+01 0.000000000000E+00 0.000000000000E+00
0000000020 0.000000000000E+00 1.000000000000E+01 0.000000000000E+00 0.000000000000E+00
0000000021 0.000000000000E+00 1.000000000000E+01 0.000000000000E+00 0.000000000000E+00
0000000022 0.000000000000E+00 1.000000000000E+01 0.000000000000E+00 0.000000000000E+00
0000000023 0.000000000000E+00 1.000000000000E+01 0.000000000000E+00 0.000000000000E+00
0000000024 0.000000000000E+00 1.000000000000E+01 0.000000000000E+00 0.000000000000E+00
0000000025 0.000000000000E+00 1.000000000000E+01 0.000000000000E+00 0.000000000000E+00
0000000026 0.000000000000E+00 1.000000000000E+01 0.000000000000E+00 0.000000000000E+00
0000000027 0.000000000000E+00 1.000000000000E+01 0.000000000000E+00 0.000000000000E+00
0000000028 0.000000000000E+00 1.000000000000E+01 0.000000000000E+00 0.000000000000E+00
0000000029 0.000000000000E+00 1.000000000000E+01 0.000000000000E+00 0.000000000000E+00
0000000030 0.000000000000E+00 1.000000000000E+01 0.000000000000E+00 0.000000000000E+00
0000000031 0.000000000000E+00 1.000000000000E+01 0.000000000000E+00 0.000000000000E+00
0000000032 0.000000000000E+00 1.000000000000E+01 0.000000000000E+00 0.000000000000E+00
0000000033 0.000000000000E+00 1.000000000000E+01 0.000000000000E+00 0.000000000000E+00
0000000034 0.000000000000E+00 1.000000000000E+01 0.000000000000E+00 0.000000000000E+00
0000000035 0.000000000000E+00 1.000000000000E+01 0.000000000000E+00 0.000000000000E+00
0000000036 0.000000000000E+00 1.000000000000E+01 0.000000000000E+00 0.000000000000E+00

View File

@@ -0,0 +1 @@
This example demonstrates how PyLaGriT can be used within a Julia script. The julia script "polygon_map.jl" and the python script "polygon_map.py" perform the same LaGriT operations. The two scripts can be compared to see how the syntax is modified for the Julia languange.

View File

@@ -0,0 +1,43 @@
using PyCall
@pyimport pylagrit
@pyimport numpy as np
# User parameters #######################
# Discretization
nx = 61; ny = 61
# Polygon delineation filename
polygon_file = "2d_mesh.avs"
# User parameters #######################
l = pylagrit.PyLaGriT()
# Read in polygon delineation mesh
mopoly = l[:read](polygon_file)
# Create quad using polygon min and max coordinates
xs = linspace(mopoly[:xmin],mopoly[:xmax],nx)
ys = linspace(mopoly[:ymin],mopoly[:ymax],ny)
#xs = np.linspace(mopoly.xmin,mopoly.xmax,nx)
#ys = np.linspace(mopoly.ymin,mopoly.ymax,ny)
moquad = l[:gridder](xs,ys,elem_type="quad",connect=true)
mopoly[:setatt]("itetclr",1)
# Create extruded quad to tet and center at z=0
moprism = mopoly[:extrude](1.0)
moprism[:trans]((0.,0.,0.),(0.,0.,0.5))
motet = moprism[:grid2grid_prismtotet3]()
# Clean up a little
mopoly[:delete]()
moprism[:delete]()
# Add attribute to moquad to store if in polygon or not
moquad[:addatt]("if_in_poly",vtype="vint")
moquad[:setatt]("if_in_poly", 0) # Make sure attr starts as zero
# Interpolate motet's itetclr into moquad's if_in_poly
moquad[:interpolate_map]("if_in_poly",motet,"itetclr")
moquad[:intersect_elements](motet,attr_name="if_inter")
# Write out file, mapping is stored as cell attribute in if_inter
moquad[:dump]("polygon_map_julia.inp")

View File

@@ -0,0 +1,40 @@
from pylagrit import PyLaGriT
import numpy as np
# User parameters #######################
# Discretization
nx = 61; ny = 61
# Polygon delineation filename
polygon_file = '2d_mesh.avs'
# User parameters #######################
l = PyLaGriT()
# Read in polygon delineation mesh
mopoly = l.read(polygon_file)
# Create quad using polygon min and max coordinates
xs = np.linspace(mopoly.xmin,mopoly.xmax,nx)
ys = np.linspace(mopoly.ymin,mopoly.ymax,ny)
moquad = l.gridder(xs,ys,elem_type='quad',connect=True)
mopoly.setatt('itetclr',1)
# Create extruded quad to tet and center at z=0
mopoly.extrude(1.0)
moprism = mopoly.extrude(1.0)
moprism.trans((0.,0.,0.),(0.,0.,0.5))
motet = moprism.grid2grid_prismtotet3()
# Clean up a little
mopoly.delete()
moprism.delete()
# Add attribute to moquad to store if in polygon or not
moquad.addatt('if_in_poly',vtype='vint')
moquad.setatt('if_in_poly', 0) # Make sure attr starts as zero
# Interpolate motet's itetclr into moquad's if_in_poly
moquad.interpolate_map('if_in_poly',motet,'itetclr')
moquad.intersect_elements(motet,attr_name='if_inter')
moquad.dump('polygon_map_python.inp')

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,11 @@
from pylagrit import PyLaGriT
l = PyLaGriT()
mhex = l.read_fehm('fehm.grid')
#mhex.paraview()
mtet = l.create(elem_type='tet')
mtet = mhex.copypts()
mtet.connect()
mtet.paraview()

View File

@@ -0,0 +1,96 @@
# Set up a five spot co2 injection and brine production problem
import os,sys
#from fdata import*
#from fpost import*
import zipfile
import time
from glob import glob
import pylagrit
import numpy as np
batch = False
dip = 90. # Degrees, dip of fault, angle is measured from horizontal
pars = {'k_cap':-18,
'k_res':-12.,
'k_aq':-14,
'k_leak':-12,
'zcap1':100.,
'zcap2':100.,
'fx':3000.,
'fw':380,
'fl':1.e3,
'injection_rate':10.,
'specific_storage':1.e-4,
'failure_pressure':3.,
}
# dimensions
xmin, xmax = -2000., 6000.
zmin, zmax = -1000.,0.
print('zmin = '+str(zmin)+' zmax '+str(zmax))
zmid = -1.e3 # 1 km depth
fx = pars['fx'] # distance between fault and injector
fw = pars['fw']
fl = pars['fl']
############################################## generate grid
# ndivisions
nxbase = 11
nzbase = int((zmax-zmin)/25.)
xmm = np.linspace(xmin,xmax,nxbase)
ymm = [0.,25.]
zmm = np.linspace(zmin,zmax,nzbase+1)
#N = len(xmm)*len(ymm)*len(zmm)
#print('Grid will contain '+str(N) +' nodes')
#print(str(len(zmm))+' in the z direction')
#
## assemble parameters and root names
#dat = fdata()
#dat.work_dir='.'
#
#dat.grid.make(dat.work_dir+os.sep+'GRID.inp',x=xmm,y=ymm,z=zmm)
#dat.grid.write('AVS.inp', format='avs')
l = pylagrit.PyLaGriT(batch=batch)
mtemp = l.gridder(xmm,ymm,zmm,connect=True)
mtemp.dump("AVS.inp")
m = l.read('AVS.inp')
#z_inj = dat.grid.node_nearest_point((0,0,zmid)).position[2]
#m_l = l.create_line(2, (0.1,0.1,zmin), (0.1,0.1,zmax))
#m_l.connect_delaunay()
#m.refine_to_object(m_l,level=3)
#m_l.delete()
#for i in range(4):
# prefine = m.pset_geom( (-.1,-.1,zmin), (.1,.1,zmax))
# prefine.refine('constant','element',inclusive_flag='inclusive',prd_choice=12)
# prefine.delete()
m_l = l.create_line(2, [fx+fw/2.,-fl/2.,zmax+.1], [fx+fw/2.,fl/2.,zmax+.1])
m_h = m_l.extrude(fw, direction=[1,0,0])
m_l.delete()
m_c = m_h.extrude((zmax-zmin)*2, direction=[np.tan(np.radians(90.-dip)),0.,-1])
m_h.delete()
m_c.connect_delaunay()
for i in range(4): m.refine_to_object(m_c,prd_choice=1)
m2 = m.grid2grid_tree_to_fe()
#m2.gmv()
m2.connect_delaunay()
# Set imt at injector
#p_inj = m.pset_geom( (-.1,-.1,z_inj-0.1), (.1,.1,z_inj+0.1))
#p_inj.setatt('imt',10)
# set imt of fault
attr_name = m2.intersect_elements(m_c)
e_fault = m2.eltset_attribute(attr_name,0,boolstr='gt')
p_fault = e_fault.pset()
p_fault.setatt('imt',20)
if batch: l.run_batch()
else: m2.paraview()

View File

@@ -0,0 +1,21 @@
from pylagrit import PyLaGriT
lg = PyLaGriT()
mesh = lg.create()
mins = (0,0,0)
maxs = (5,5,5)
eighth = mesh.surface_box(mins,maxs)
boolstr1 = 'le '+eighth.name
boolstr2 = 'gt '+eighth.name
reg1 = mesh.region(boolstr1)
reg2 = mesh.region(boolstr2)
mreg1 = mesh.mregion(boolstr1)
mreg2 = mesh.mregion(boolstr2)
mesh.createpts_brick_xyz((10,10,10), (0,0,0), (10,10,10))
mesh.rmregion(reg1)
mesh.dump('reg_test.gmv')

View File

@@ -0,0 +1,479 @@
# -*- coding: utf-8
# This script is the PyLaGriT version of LaGriT tutorial example at
# https://lanl.github.io/LaGriT/pages/tutorial/stratigraphy/index.html.
# Written by Guoyan Jiang (gyjiang@whu.edu.cn) with technical support
# from Dylan Harp (dharp@lanl.gov) and Terry Miller (tamiller@lanl.gov).
# Import PyLaGriT class from pylagrit module
from pylagrit import PyLaGriT
import numpy
# Variables
maxX = 4000 # Max value in x direction
maxY = 4000 # Max value in y direction
maxZ = 3000 # Max value in z direction
numX = 51 # Number of points in x direction
numY = 51 # Number of points in y direction
numZ = 26 # Number of points in z direction
# Create PyLaGriT object
# This assumes that pylagritrc is being used so that lagrit_exe option does not need to be specified
lg = PyLaGriT()
#********************************************
# 01 Built HEX Mesh
#********************************************
# Create mesh object
mo = lg.create_hex()
mo.createpts_brick_xyz((numX, numY, numZ), (0,0,0), (maxX, maxY, maxZ))
# Save the mesh object
mo.dump('tmp_hex_01.inp')
# Set vertices (imt) and cells (itetlcr) to 1
mo.setatt('imt', 1)
mo.setatt('itetclr', 1)
# Set node type from connectivity of mesh
mo.resetpts_itp()
#********************************************
# 02 Use psets to identify (for setting boundary conditions,
# initial conditions, etc.) a set of vertices on the top
# surface of the mesh
#********************************************
# Create a pset named p_top, which contains all nodes (stride = 1 0 0)
# where the nodes Z value (zic) is greater than or equal to (ge) the top of the mesh (maxZ)
pset0 = mo.pset_attribute('zic', maxZ, 'ge', (1,0,0), 'p_top')
# Define three cylindrical objects
pset1 = mo.pset_geom((0,0,-1), (1100,360,10000), (1500,1500,0), 'rtz', (1,0,0), 'p_circle1')
pset2 = mo.pset_geom((0,0,-1), (1100,360,10000), (2500,2500,0), 'rtz', (1,0,0), 'p_circle2')
pset3 = mo.pset_geom((0,0,-1), (1100,360,10000), (2500,1500,0), 'rtz', (1,0,0), 'p_circle3')
# Intersect four psets, points belonging to the union of all given sets are preserved into the pset p_region
pset4 = mo.pset_inter([pset0, pset1, pset2, pset3], 'p_region')
# Map psets to an attribute
mo.addatt('id_top_region', vtype='vint', rank='scalar') # Creat a node-based attribute id_top_region within the mesh object
mo.setatt('id_top_region', 1) #Fill the entire attribute with 1
pset1.setatt('id_top_region', 2) #Color all nodes in the pset p_circle1 with the value 2
pset2.setatt('id_top_region', 3)
pset3.setatt('id_top_region', 4)
pset4.setatt('id_top_region', 5)
# Release the psets from memory
pset0.delete()
pset1.delete()
pset2.delete()
pset3.delete()
pset4.delete()
#********************************************
# 03 Build some surfaces to define stratigraphy.
# In a real model, the surfaces would come from some geologic framework model
# and would define geologic or hydro-geologic horizons and topography.
#********************************************
mosurf1 = lg.create_qua() # Create the top surface
p1 = (-20, -20, 1000)
p2 = (4020, -20, 1500)
p3 = (4020, 4020, 2500)
p4 = (-20, 4020, 500)
pts = [p1, p2, p3, p4]
nnodes = (numX, numY, 1)
mosurf1.quadxy(nnodes, pts)
#mosurf1.paraview()
mosurf1.minmax_xyz()
mosurf1.dump('tmp_surf1_quad.inp')
mosurf2 = lg.create_qua() # Create the bottom surface
p1 = (-20, -20, 1800)
p2 = (4020, -20, 2100)
p3 = (4020, 4020, 2800)
p4 = (-20, 4020, 800)
pts = [p1, p2, p3, p4]
nnodes = (numX, numY, 1)
mosurf2.quadxy(nnodes, pts)
#mosurf2.paraview()
mosurf2.minmax_xyz()
mosurf2.dump('tmp_surf2_quad.inp')
#********************************************
# 04 Use the surfaces to define regions and set
# vertex and cell ids
#********************************************
# Define Regions
sf1 = mosurf1.surface('sf1')
sf2 = mosurf2.surface('sf2')
r1 = mo.region('le ' + str(sf1))
r2 = mo.region('gt ' + str(sf1) + ' and ' + 'le ' + str(sf2))
r3 = mo.region('gt ' + str(sf2))
mosurf1.delete()
mosurf2.delete()
# Create Eltsets and PSets from Regions
pset1 = mo.pset_region(r1)
pset2 = mo.pset_region(r2)
pset3 = mo.pset_region(r3)
eltset1 = mo.eltset_region(r1)
eltset2 = mo.eltset_region(r2)
eltset3 = mo.eltset_region(r3)
#Set Attributes from Eltsets and PSets
pset1.setatt('imt', 1)
pset2.setatt('imt', 2)
pset3.setatt('imt', 3)
eltset1.setatt('itetclr', 1)
eltset2.setatt('itetclr', 2)
eltset3.setatt('itetclr', 3)
#********************************************
# 05 Build a fault surface and define stratigraphy
# on each side of the fault
#********************************************
# Create fault surface and surfaces to either side of fault
mosurf1_fminus = lg.create_qua()
p1 = (-20, -20, 1000)
p2 = (4020, -20, 1500)
p3 = (4020, 4020, 2500)
p4 = (-20, 4020, 500)
pts = [p1, p2, p3, p4]
nnodes = (numX, numY, 1)
mosurf1_fminus .quadxy(nnodes, pts)
#mosurf1_fminus .paraview()
mosurf1_fminus .minmax_xyz()
mosurf1_fminus .dump('tmp_s1_fm.inp')
mosurf2_fminus = lg.create_qua()
p1 = (-20, -20, 1800)
p2 = (4020, -20, 2100)
p3 = (4020, 4020, 2800)
p4 = (-20, 4020, 800)
pts = [p1, p2, p3, p4]
nnodes = (numX, numY, 1)
mosurf2_fminus.quadxy(nnodes, pts)
#mosurf2_fminus.paraview()
mosurf2_fminus.minmax_xyz()
mosurf2_fminus.dump('tmp_s2_fm.inp')
mosurf1_fplus = lg.create_qua()
p1 = (-20, -20, 1400)
p2 = (4020, -20, 1900)
p3 = (4020, 4020, 2900)
p4 = (-20, 4020, 900)
pts = [p1, p2, p3, p4]
nnodes = (numX, numY, 1)
mosurf1_fplus.quadxy(nnodes, pts)
#mosurf1_fplus.paraview()
mosurf1_fplus.minmax_xyz()
mosurf1_fplus.dump('mosurf1_fplus.inp')
mosurf2_fplus = lg.create_qua()
p1 = (-20, -20, 2200)
p2 = (4020, -20, 2500)
p3 = (4020, 4020, 3200)
p4 = (-20, 4020, 1200)
pts = [p1, p2, p3, p4]
nnodes = (numX, numY, 1)
mosurf2_fplus.quadxy(nnodes, pts)
#mosurf2_fplus.paraview()
mosurf2_fplus.minmax_xyz()
mosurf2_fplus.dump('mosurf2_fplus.inp')
mosurf_fault = lg.create_qua()
p1 = (-20, -20, -1.e4)
p2 = (4020, -20, -1.e4)
p3 = (4020, 4020, 1.e4)
p4 = (-20, 4020, 1.e4)
pts = [p1, p2, p3, p4]
nnodes = (numX, numY, 1)
mosurf_fault.quadxy(nnodes, pts)
#mosurf_fault.paraview()
mosurf_fault.minmax_xyz()
mosurf_fault.dump('mosurf_fault.inp')
# Define geometry of hydrostratigraphic model
sf1_fm = mosurf1_fminus.surface('sf1_fm')
sf2_fm = mosurf2_fminus.surface('sf2_fm')
sf1_fp = mosurf1_fplus.surface('sf1_fp')
sf2_fp = mosurf2_fplus.surface('sf2_fp')
sf_f = mosurf_fault.surface('sf_f')
r1_fm = mo.region('le ' + str(sf1_fm) + ' and ' + 'le ' + str(sf_f))
r2_fm = mo.region('gt ' + str(sf1_fm) + ' and ' + 'le ' + str(sf2_fm) + ' and ' + 'le ' + str(sf_f))
r3_fm = mo.region('gt ' + str(sf2_fm) + ' and ' + 'le ' + str(sf_f))
r1_fp = mo.region('le ' + str(sf1_fp) + ' and ' + 'gt ' + str(sf_f))
r2_fp = mo.region('gt ' + str(sf1_fp) + ' and ' + 'le ' + str(sf2_fp) + ' and ' + 'gt ' + str(sf_f))
r3_fp = mo.region('gt ' + str(sf2_fp) + ' and ' + 'gt ' + str(sf_f))
mosurf1_fminus.delete()
mosurf2_fminus.delete()
mosurf1_fplus.delete()
mosurf2_fplus.delete()
mosurf_fault.delete()
# Set fault node and element materials
pset1_fm = mo.pset_region(r1_fm)
pset2_fm = mo.pset_region(r2_fm)
pset3_fm = mo.pset_region(r3_fm)
pset1_fp = mo.pset_region(r1_fp)
pset2_fp = mo.pset_region(r2_fp)
pset3_fp = mo.pset_region(r3_fp)
eltset1_fm = mo.eltset_region(r1_fm)
eltset2_fm = mo.eltset_region(r2_fm)
eltset3_fm = mo.eltset_region(r3_fm)
eltset1_fp = mo.eltset_region(r1_fp)
eltset2_fp = mo.eltset_region(r2_fp)
eltset3_fp = mo.eltset_region(r3_fp)
#Set Attributes from Eltsets and PSets
mo.setatt('imt', 7)
mo.setatt('itetclr', 7)
pset1_fm.setatt('imt', 1)
pset2_fm.setatt('imt', 2)
pset3_fm.setatt('imt', 3)
pset1_fp.setatt('imt', 4)
pset2_fp.setatt('imt', 5)
pset3_fp.setatt('imt', 6)
eltset1_fm.setatt('itetclr', 1)
eltset2_fm.setatt('itetclr', 2)
eltset3_fm.setatt('itetclr', 3)
eltset1_fp.setatt('itetclr', 4)
eltset2_fp.setatt('itetclr', 5)
eltset3_fp.setatt('itetclr', 6)
#********************************************
# 06 Define a polyline and truncate the exterior boundary of the mesh with the polyline
#********************************************
# Read boundary polygon file
mobndry = lg.read('basin_bnd_ply_rescale.inp')
# Extrude the polyline into a vertical surface
mofence = mobndry.extrude(3200, 'const', 'volume', [0, 0, -1])
mobndry.minmax_xyz()
mofence.minmax_xyz()
# Translate the extrusion to make it cover the vertical extent of the hex mesh
mofence.trans((0, 0, -3100), (0, 0 ,0))
mofence.minmax_xyz()
#mofence.paraview()
#mofence.dump('3D_vertical_surface.inp')
#mo.dump('cube.inp')
# Truncate mesh
sf_bndry = mofence.surface('sf_bndry')
r_bndry = mo.region('ge ' + str(sf_bndry))
pset_bndry = mo.pset_region(r_bndry)
mobndry.delete()
mofence.delete()
# Method 1: Only remove a cell if ALL vertices are outside
e_delete1 = pset_bndry.eltset('exclusive')
# Method 2: Remove a cell if the centroid (average of all vertices) is outside
e_delete2 = mo.eltset_region(r_bndry)
# Method 3: Remove a cell if one or more vertices are outside
e_delete3 = pset_bndry.eltset('inclusive')
#mo.addatt('id_in_out_bndry', vtype='vint', rank='scalar', length='nelements')
mo.add_element_attribute('id_in_out_bndry', vtype='vint')
mo.setatt('id_in_out_bndry', 4) #Fill the entire attribute with 4
e_delete3.setatt('id_in_out_bndry', 3)
e_delete2.setatt('id_in_out_bndry', 2)
e_delete1.setatt('id_in_out_bndry', 1)
eltset4 = mo.eltset_attribute('id_in_out_bndry', 4, 'eq')
eltset3 = mo.eltset_attribute('id_in_out_bndry', 3, 'eq')
#eltset2 = mo.eltset_attribute('id_in_out_bndry', 2, 'eq')
#eltset1 = mo.eltset_attribute('id_in_out_bndry', 1, 'eq')
mo.rmpoint_eltset(eltset4, False, False)
mo.rmpoint_eltset(eltset3, True, True)
#********************************************
# 07 Refine the mesh around the fault
#********************************************
f_zone = mo.intersect_elements(sf_f, 'f_zone')
fz_i = mo.eltset_attribute('f_zone', 0, 'gt') #Non-zero indicates intersection
fz_i.refine()
mo.delatt('f_zone')
mo.status (brief=True)
#sf_f.delete()
#sf1_fm.delete()
#sf2_fm.delete()
#sf1_fp.delete()
#sf1_fp.delete()
#sf_bndry.delete()
#********************************************
# 08 Insert a couple of 'wells' by refining the mesh and identifying a line of nodes
# that will be the well source/sink for boundary conditions.
#********************************************
Well1X = 1234.56
Well1Y = 1987.65
Well2X = 2243.21
Well2Y = 1212.34
Radius = 25
NRadius = 2
#Well 1
mowell1 = lg.create_tet()
mowell1.createpts_rtz((NRadius, 9, numZ), (0, 0, 3100), (Radius, 360, 1500)) #Create a cylindrical point cloud
mowell1.filter() # Filter (delete) points that are too close ( default distance <=1.e-16) or duplicate points
mowell1.rmpoint_compress() # Remove all marked nodes and correct the itet array
mowell1.setatt('imt', 1)
mowell1.connect() # Connect the point cloud
mowell1.resetpts_itp()
mowell1.minmax_xyz()
mowell1.trans((0, 0, 0), (Well1X, Well1Y, 0))
mowell1.minmax_xyz()
#mowell1.paraview()
mowell1.dump('tmp_well1.inp')
#Well 2
mowell2 = lg.create_tet()
mowell2.createpts_rtz((NRadius, 9, numZ), (0, 0, 3100), (Radius, 360, 2200))
mowell2.filter()
mowell2.rmpoint_compress()
mowell2.setatt('imt', 1)
mowell2.connect()
mowell2.resetpts_itp()
mowell2.minmax_xyz()
mowell2.trans((0, 0, 0), (Well2X, Well2Y, 0))
mowell2.minmax_xyz()
#mowell2.paraview()
mowell2.dump('tmp_well2.inp')
# Join the two distinct wells into a single mesh object
mowells = lg.merge([mowell1, mowell2])
mowells.dump('tmp_wells.inp')
#mowells.paraview()
# Refine the mo around the wells
# First pass refinement
w_zone = mo.intersect_elements(mowells, 'w_zone')
wz_i = mo.eltset_attribute('w_zone', 0, 'gt') #Non-zero indicates intersection
wz_i.refine()
mo.setatt('w_zone', 0)
#wz_i.delete()
# Second pass refinement
w_zone = mo.intersect_elements(mowells, 'w_zone')
wz_i = mo.eltset_attribute('w_zone', 0, 'gt') #Non-zero indicates intersection
wz_i.refine()
mo.setatt('w_zone', 0)
#wz_i.delete()
mohex = mo.grid2grid_tree_to_fe() #Quadtree or octree grid to grid
#mo.status (brief=True)
# Identify the column of vertices closest to the well center.
#Well1
mo_pts1 = lg.create()
mo_pts1.createpts_rtz((2, 2, 1000), (0, 0, 3100), (Radius, 360, 2200))
mo_pts1.trans((0, 0, 0), (Well1X, Well1Y, 0))
#Well2
mo_pts2 = lg.create()
mo_pts2.createpts_rtz((2, 2, 1000), (0, 0, 3100), (Radius, 360, 2200))
mo_pts2.trans((0, 0, 0), (Well2X, Well2Y, 0))
mo_pts = lg.merge([mo_pts1, mo_pts2])
mo_pts.filter()
mo_pts.rmpoint_compress()
# Compute a distance field attribute
mo.compute_distance(mo_pts, option='distance_field', attname='dfield_well')
mo_pts1.delete()
mo_pts2.delete()
mo_pts.delete()
mowell1.delete()
mowell2.delete()
mowells.delete()
# Describe all nodes within 32, 16, 8, 4, 2 and 1 meters of the wells.
pwell = mo.pset_attribute('dfield_well', 1.0, 'le', (1,0,0), 'pwell1')
pwell.dump('zone_radius_01.0.zone')
pwell = mo.pset_attribute('dfield_well', 2.0, 'le', (1,0,0), 'pwell2')
pwell.dump('zone_radius_02.0.zone')
pwell = mo.pset_attribute('dfield_well', 4.0, 'le', (1,0,0), 'pwell4')
pwell.dump('zone_radius_04.0.zone')
pwell = mo.pset_attribute('dfield_well', 8.0, 'le', (1,0,0), 'pwell8')
pwell.dump('zone_radius_08.0.zone')
pwell = mo.pset_attribute('dfield_well', 16.0, 'le', (1,0,0), 'pwell16')
pwell.dump('zone_radius_16.0.zone')
pwell = mo.pset_attribute('dfield_well', 32.0, 'le', (1,0,0), 'pwell32')
pwell.dump('zone_radius_32.0.zone')
mo.dump('Hex_mesh.inp')
#********************************************
# 09 Convert hex mesh to tet mesh
#********************************************
motet = mohex.copypts()
motet.setatt('imt', 1)
motet.setatt('itp', 0)
motet.connect(option1='check_interface')
motet.resetpts_itp()
motet.interpolate_voronoi('imt', mohex, 'imt')
motet.interpolate_map('itetclr', mohex, 'itetclr')
#Remove all nodes and elements with imt and itetclr values of 7
motet.rmmat(7)
#pset7 = motet.pset_attribute('imt', 7, 'eq', (1,0,0), 'pset7')
#motet.rmpoint_pset(pset7)
#eltset7 = motet.eltset_attribute('itetclr', 7, 'eq')
#motet.rmpoint_eltset(eltset7, True, True)
motet.rmpoint_compress()
motet.resetpts_itp()
# Visualize connected mesh using ParaView
# This assumes that pylagritrc is being used so that exe option does not need to be specified
#motet.paraview()
motet.dump('Tet_mesh.inp')
#********************************************
# 10 Write tet mesh files for FEHM
# FEHM uses node based materials and properties
#********************************************
#motet.resetpts_parent()
motet.filter()
motet.rmpoint_compress()
motet.resetpts_itp()
motet.minmax('imt')
motet.setatt('itetclr', 1)
#motet. tri_mesh_output_prep()
motet.dump_fehm('Example3')

3
PyLaGriT/pylagrit/__init__.py Executable file
View File

@@ -0,0 +1,3 @@
from pylagrit.pylagrit import *
__xall__ = ["PyLaGriT"]

5730
PyLaGriT/pylagrit/pylagrit.py Executable file

File diff suppressed because it is too large Load Diff

231
PyLaGriT/pylagrit/utilities.py Executable file
View File

@@ -0,0 +1,231 @@
import os
import numpy as np
from datetime import datetime
def zone_to_zonn(zonefile):
zonnfile = os.path.splitext(zonefile)[0] + ".zonn"
with open(zonefile, "r") as fh:
fh.readline()
lns = fh.readlines()
with open(zonnfile, "w") as fout:
fout.write("zonn\n")
for l in lns:
fout.write(l)
def spherical_writeFEHM(node_locations, filename_base, title="default"):
"""
Create FEHM .stor and .fehmn input files for 1d spherical simulations.
Assumes logical 1D structure.
:arg node_locations: radial location of nodes
:type node_locations: array(float)
:arg filename_base: base name for the .stor and .fehmn files
:type filename_base: str
:arg title: optional title for simulation
:type title: str
Example:
from pylagrit import utilities as util
import numpy as np
nodes = np.linspace(0.0,200.0)
filename_base = "test"
title = "test sim"
# write .stor and .fehmn files
util.spherical_writeFEHM(nodes,filename_base,title)
"""
# stor file header
now = datetime.now()
print_datetime = now.strftime("%m/%d/%Y %H:%M:%S")
header = (
"FEHM .stor file generated by PyLaGriT "
+ print_datetime
+ "\n"
+ "title: "
+ title
+ "\n"
)
# calculate dx, face locations, face areas, volumes, and geometric coefficients
dx = spherical_dx(node_locations)
faces = spherical_faces(node_locations)
area = spherical_areas(faces)
volumes = spherical_volumes(node_locations)
coeffs = area / dx
# matrix metadata header info
neq = np.size(node_locations)
num_coeffs = neq - 1
FEHM_mem = (neq - 2) * 3 + 4 + neq + 1
num_area_coeff = 1
max_connect = 3
matrix_params = (num_coeffs, neq, FEHM_mem, num_area_coeff, max_connect)
params_header = " " + " ".join(str(s) for s in matrix_params) + "\n"
# row count
row_count = np.empty([neq + 1])
start = neq + 1
row_count[0] = start
row_count[1] = row_count[0] + 2
for i in range(2, neq):
row_count[i] = row_count[i - 1] + 3
row_count[neq] = row_count[neq - 1] + 2
# row entries
row_entries = []
row_entries.append(1)
row_entries.append(2)
for i in range(1, neq - 1):
row_entries.append(i)
row_entries.append(i + 1)
row_entries.append(i + 2)
row_entries.append(neq - 1)
row_entries.append(neq)
# index into geometric coefficient matrix
coeff_indices = []
coeff_indices.append(0)
coeff_indices.append(1)
for i in range(1, neq - 1):
coeff_indices.append(i)
coeff_indices.append(0)
coeff_indices.append(i + 1)
coeff_indices.append(neq - 1)
coeff_indices.append(0)
# neq + 1 extra 0s for padding
for i in range(0, neq + 1):
coeff_indices.append(0)
# index of diagonal entries
diagonal_indices = np.empty([neq])
diagonal_indices[0] = neq + 2
for i in range(1, neq):
diagonal_indices[i] = diagonal_indices[i - 1] + 3
# open stor file, write header and matrix parameters
storfile = filename_base + ".stor"
sfile = open(storfile, "w")
_ = sfile.write(header)
_ = sfile.write(params_header)
# write Voronoi volumes
count = 1
for vol in volumes:
print(" %1.12e" % vol, end="" if count % 5 else "\n", file=sfile)
count += 1
if (count - 1) % 5:
_ = sfile.write("\n")
# write row counts
count = 1
for row in row_count:
print(" %9d" % row, end="" if count % 5 else "\n", file=sfile)
count += 1
if (count - 1) % 5:
_ = sfile.write("\n")
# write row entries
count = 1
for row in row_entries:
print(" %9d" % row, end="" if count % 5 else "\n", file=sfile)
count += 1
if (count - 1) % 5:
_ = sfile.write("\n")
# write geometric coefficient indices
count = 1
for idx in coeff_indices:
print(" %9d" % idx, end="" if count % 5 else "\n", file=sfile)
count += 1
if (count - 1) % 5:
_ = sfile.write("\n")
# write diagonal indices
count = 1
for idx in diagonal_indices:
print(" %9d" % idx, end="" if count % 5 else "\n", file=sfile)
count += 1
if (count - 1) % 5:
_ = sfile.write("\n")
# write geometric coefficients
count = 1
for coef in coeffs:
print(" %1.12e" % coef, end="" if count % 5 else "\n", file=sfile)
count += 1
# close stor file
if (count - 1) % 5:
_ = sfile.write("\n")
_ = sfile.close()
# open fehmn file
fehmnfile = filename_base + ".fehmn"
ifile = open(fehmnfile, "w")
# write header and neq
_ = ifile.write("coor\n%d\n" % neq)
# write node number and radial location
for i in range(1, neq + 1):
print(
" %3d %12f 0 0" % (i, node_locations[i - 1]),
file=ifile,
)
# write connectivity
_ = ifile.write("\nelem\n")
_ = ifile.write("%d %d\n" % (2, neq - 1))
for i in range(1, neq):
print("%3d %3d %3d" % (i, i, i + 1), file=ifile)
# close fehmn file
_ = ifile.write("\nstop\n")
_ = ifile.close()
def spherical_faces(node_locations):
"""
Calculate radial interface locations given radial node locations.
Assumes 1st and last nodes lie on domain boundary.
:arg node_locations: radial location of nodes
:type node_locations: array_like(float)
Returns: array of radial interface locations of size node_locations - 1
"""
interface_locations = node_locations[:-1] + np.diff(node_locations) / 2.0
return interface_locations
def spherical_areas(interface_locations):
"""
Calculate spherical area of each interface given radial interface locations.
:arg interface_locations: radial location of interfaces
:type interface_locations: array_like(float)
Returns: array of spherical interface areas of size interface_locations
"""
areas = 4.0 * np.pi * interface_locations ** 2
return areas
def spherical_dx(node_locations):
"""
Calculate Delaunay edge lengths given radial node locations.
:arg node_locations: radial location of nodes
:type node_locations: array_like(float)
Returns: array of Delaunay edge lengths of size node_locations - 1
"""
delaunay = np.diff(node_locations)
return delaunay
def spherical_volumes(node_locations):
"""
Calculate Voronoi volume associated with each node given radial node locations.
:arg node_locations: radial location of nodes
:type node_locations: array_like(float)
Returns: array of Voronoi volumes of size node_locations
"""
coeff = np.pi * 4.0 / 3.0
edges = spherical_faces(node_locations)
edges = np.insert(edges, 0, node_locations[0])
edges = np.append(edges, node_locations[np.size(node_locations) - 1])
spheres = coeff * edges ** 3
volumes = np.diff(spheres)
assert np.all(volumes > 0), "ERROR: Negative volumes are not good."
return volumes

7
PyLaGriT/pylagritrc_example Executable file
View File

@@ -0,0 +1,7 @@
# This is an example pylagritrc file.
# To use, change its name to pylagritrc or .pylagritrc, uncomment and modify attributes and move to your working directory or your home directory.
# The rc file in the working directory will take precedence over the one in your home directory.
#lagrit_exe : '/lagrit/executable/location/lagrit'
#gmv_exe : '/gmv/executable/location/gmv'
#paraview_exe : '/paraview/executable/location/paraview'

27
PyLaGriT/setup.py Executable file
View File

@@ -0,0 +1,27 @@
"""
Build script for PyLaGriT
"""
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
import os
setup(
name="pylagrit",
version="1.0.1",
description="Python interface for LaGriT",
author="Dylan R. Harp",
author_email="dharp@lanl.gov",
url="lagrit.lanl.gov",
license="LGPL",
install_requires=[
"pexpect>=4.6.0",
"numpy",
],
packages=[
"pylagrit",
],
)

3
PyLaGriT/tests/.directory Executable file
View File

@@ -0,0 +1,3 @@
[Dolphin]
Timestamp=2014,7,24,15,5,28
ViewMode=1

23858
PyLaGriT/tests/contour_file.avs Executable file

File diff suppressed because it is too large Load Diff

0
PyLaGriT/tests/old_formatF Executable file
View File

23858
PyLaGriT/tests/test_convert/test.avs Executable file

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

23858
PyLaGriT/tests/test_merge/test.avs Executable file

File diff suppressed because it is too large Load Diff

204
PyLaGriT/tests/test_pylagrit.py Executable file
View File

@@ -0,0 +1,204 @@
import unittest
import pylagrit
import glob
import sys
import os
from contextlib import contextmanager
import itertools
class TestPyLaGriT(unittest.TestCase):
'''
A PyLagriT Test
Represents a test of PyLaGriT functionality.
'''
def setUp(self):
#Sets upt a lagrit object to be used during tests.
with suppress_stdout():
self.lg = pylagrit.PyLaGriT('../../build/lagrit')
def test_read_script(self):
'''
Test the Read Script Function
Tests that pylagrit can read a lagrit script.
'''
lg = self.lg
for f in glob.glob('/test_scripts/*.lg'):
with suppress_stdout():
lg.read_script(f)
def test_convert(self):
'''
Test the Conversion Function
Tests that pylagrit can convert files from one format to a new one.
'''
lg = self.lg
old_formats = ['avs', 'gmv']
new_formats = ['avs', 'gmv', 'exo']
for old_ft, new_ft in itertools.product(old_formats, new_formats):
#Convert all avs files to gmv with pylagrit
with suppress_stdout():
lg.convert('test_convert/*.%s'%old_ft, new_ft)
#If the file did not get generated, assume fail.
if not os.path.isfile('test.%s'%new_ft):
raise OSError('Failed Conversion.')
os.remove('test.%s'%new_ft)
def test_merge(self):
'''
Tests the Merge Function
Tests that pylagrit can merge 3 mesh objects and return a single mesh
object.
'''
lg = self.lg
with suppress_stdout():
mo1 = lg.read('avs', 'contour_file.avs')
mo2 = lg.read('avs', 'contour_file.avs')
mo3 = lg.read('avs', 'contour_file.avs')
new_mo = lg.merge([mo1, mo2, mo3])
#Test that the merge created a new mesh object.
if type(new_mo) is type(None):
raise ValueError('An expected mesh object was not created.')
def test_create(self):
'''
Tests the Create Function
Tests that the create function returns a mesh object.
'''
lg = self.lg
with suppress_stdout():
mo1 = lg.create()
mo2 = lg.create_hex()
mo3 = lg.create(elem_type='pri')
if any([type(x) is type(None) for x in [mo1, mo2, mo3]]):
raise ValueError('An expected mesh object was not created.')
def test_createpts_brick(self):
'''
Test the Create Points Function
Tests that a mesh object can run the createpts method with fail.
'''
lg = self.lg
with suppress_stdout():
mo = lg.create()
npts = (4, 4, 4)
mins = (0, 0, 0)
maxs = (4, 4, 4)
mo.createpts_brick('xyz', npts, mins, maxs)
def test_pset_geom(self):
'''
Test the MO Geometry Function
Tests that each geom method returns a PSet.
'''
lg = self.lg
mins = (1, 1, 1)
maxs = (2, 2, 2)
with suppress_stdout():
mo = lg.create()
ps = []
ps.append(mo.pset_geom(mins, maxs))
ps.append(mo.pset_geom_xyz(mins, maxs))
ps.append(mo.pset_geom_rtz(mins, maxs))
ps.append(mo.pset_geom_rtp(mins, maxs))
if any([not isinstance(x, pylagrit.PSet) for x in ps]):
raise ValueError('PSet not returned.')
def test_copy(self):
'''
Test the Copy Function
Tests that the copy function returns a mesh object.
'''
lg = self.lg
with suppress_stdout():
mo = lg.create()
mo_clone = lg.copy(mo)
if not isinstance(mo_clone, pylagrit.MO):
raise ValueError('MO not returned.')
def test_pset_not(self):
'''
Test the Mesh Object Not Function
Tests that a mesh object can return a PSet using the pset_not function.
'''
lg = self.lg
mins = (1, 1, 1)
maxs = (2, 2, 2)
with suppress_stdout():
mo = lg.create()
ps1 = mo.pset_geom(mins, maxs)
ps2 = mo.pset_not(ps1)
if not isinstance(ps2, pylagrit.PSet):
raise ValueError('PSet not returned.')
def test_subset(self):
'''
Test the MO Subset Function
Tests that a mesh object can return another mesh object with the subset
methods.
'''
lg = self.lg
mins = (1,1,1)
maxs = (2,2,2)
with suppress_stdout():
mo = lg.create()
mo_subs = []
mo_subs = mo_subs + [mo.subset(mins, maxs)]
mo_subs = mo_subs + [mo.subset(mins, maxs, geom='rtz')]
mo_subs = mo_subs + [mo.subset(mins, maxs, geom='rtp')]
mo_subs = mo_subs + [mo.subset_rtp(mins, maxs)]
mo_subs = mo_subs + [mo.subset_rtz(mins, maxs)]
if any([not isinstance(x, pylagrit.MO) for x in mo_subs]):
raise ValueError('MO not returned.')
@contextmanager
def suppress_stdout():
#Utility to supress standard output.
with open(os.devnull, 'w') as devnull:
old_stdout = sys.stdout
sys.stdout = devnull
try:
yield
finally:
sys.stdout = old_stdout
if __name__ == '__main__':
runner = unittest.TextTestRunner(verbosity=2)
suite = unittest.TestSuite()
suite.addTest(TestPyLaGriT('test_read_script'))
suite.addTest(TestPyLaGriT('test_convert'))
suite.addTest(TestPyLaGriT('test_merge'))
suite.addTest(TestPyLaGriT('test_create'))
suite.addTest(TestPyLaGriT('test_createpts_brick'))
suite.addTest(TestPyLaGriT('test_pset_geom'))
suite.addTest(TestPyLaGriT('test_copy'))
suite.addTest(TestPyLaGriT('test_pset_not'))
suite.addTest(TestPyLaGriT('test_subset'))
runner.run(suite)

View File

@@ -0,0 +1 @@
cmo / create / cmotri / / / tri

View File

@@ -0,0 +1,6 @@
*Example Comment
cmo / create / cmotri / / / tri
read / avs / input.inp / cmotri
*
finish

View File

@@ -0,0 +1,8 @@
* Example of Some Comments
* More Comments
*
define/nx/20
define/ny/20
define/nz/20
finish