initial upload
This commit is contained in:
21
docs/_site/pylagrit/original/static/sources/autodoc.rst.txt
Executable file
21
docs/_site/pylagrit/original/static/sources/autodoc.rst.txt
Executable 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>
|
||||
|
||||
|
||||
|
||||
8
docs/_site/pylagrit/original/static/sources/autodoc_eltset.rst.txt
Executable file
8
docs/_site/pylagrit/original/static/sources/autodoc_eltset.rst.txt
Executable file
@@ -0,0 +1,8 @@
|
||||
Element Set Object
|
||||
------------------
|
||||
.. automodule:: pylagrit
|
||||
|
||||
.. autoclass:: EltSet
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
||||
8
docs/_site/pylagrit/original/static/sources/autodoc_faceset.rst.txt
Executable file
8
docs/_site/pylagrit/original/static/sources/autodoc_faceset.rst.txt
Executable file
@@ -0,0 +1,8 @@
|
||||
Face Set Object
|
||||
---------------
|
||||
.. automodule:: pylagrit
|
||||
|
||||
.. autoclass:: FaceSet
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
||||
8
docs/_site/pylagrit/original/static/sources/autodoc_mo.rst.txt
Executable file
8
docs/_site/pylagrit/original/static/sources/autodoc_mo.rst.txt
Executable file
@@ -0,0 +1,8 @@
|
||||
Mesh Object
|
||||
-----------
|
||||
.. automodule:: pylagrit
|
||||
|
||||
.. autoclass:: MO
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
||||
8
docs/_site/pylagrit/original/static/sources/autodoc_pset.rst.txt
Executable file
8
docs/_site/pylagrit/original/static/sources/autodoc_pset.rst.txt
Executable file
@@ -0,0 +1,8 @@
|
||||
Point Set Object
|
||||
----------------
|
||||
.. automodule:: pylagrit
|
||||
|
||||
.. autoclass:: PSet
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
||||
8
docs/_site/pylagrit/original/static/sources/autodoc_pylagrit.rst.txt
Executable file
8
docs/_site/pylagrit/original/static/sources/autodoc_pylagrit.rst.txt
Executable file
@@ -0,0 +1,8 @@
|
||||
PyLaGriT
|
||||
--------
|
||||
.. automodule:: pylagrit
|
||||
|
||||
.. autoclass:: PyLaGriT
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
||||
8
docs/_site/pylagrit/original/static/sources/autodoc_region.rst.txt
Executable file
8
docs/_site/pylagrit/original/static/sources/autodoc_region.rst.txt
Executable file
@@ -0,0 +1,8 @@
|
||||
Region Object
|
||||
-------------
|
||||
.. automodule:: pylagrit
|
||||
|
||||
.. autoclass:: Region
|
||||
:members:
|
||||
:undoc-members:
|
||||
|
||||
73
docs/_site/pylagrit/original/static/sources/gettingstarted.rst.txt
Executable file
73
docs/_site/pylagrit/original/static/sources/gettingstarted.rst.txt
Executable 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.
|
||||
24
docs/_site/pylagrit/original/static/sources/index.rst.txt
Executable file
24
docs/_site/pylagrit/original/static/sources/index.rst.txt
Executable file
@@ -0,0 +1,24 @@
|
||||
.. 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>
|
||||
|
||||
Class Documentation <autodoc.rst>
|
||||
|
||||
Indices and tables
|
||||
==================
|
||||
|
||||
* :ref:`genindex`
|
||||
* :ref:`modindex`
|
||||
* :ref:`search`
|
||||
|
||||
11
docs/_site/pylagrit/original/static/sources/stratigraphic.rst.txt
Executable file
11
docs/_site/pylagrit/original/static/sources/stratigraphic.rst.txt
Executable 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>`_.
|
||||
|
||||
|
||||
.. literalinclude:: ../../examples/stratigraphic_hex_mesh_tutorial.py
|
||||
|
||||
The final result:
|
||||
|
||||
.. image:: stratigraphy.png
|
||||
Reference in New Issue
Block a user