Skip to content

Commit

Permalink
add api docs (#25)
Browse files Browse the repository at this point in the history
* add api docs

* hamburger to white
  • Loading branch information
akaszynski authored Apr 30, 2021
1 parent 8995286 commit 4d5edad
Show file tree
Hide file tree
Showing 12 changed files with 80 additions and 5 deletions.
5 changes: 1 addition & 4 deletions ansys/mapdl/reader/archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def plot(self, *args, **kwargs):


def save_as_archive(filename, grid, mtype_start=1, etype_start=1,
real_constant_start=1, mode='w', nblock=True,
real_constant_start=1, mode='w',
enum_start=1, nnum_start=1,
include_etype_header=True, reset_etype=False,
allow_missing=True, include_surface_elements=True,
Expand Down Expand Up @@ -284,9 +284,6 @@ def save_as_archive(filename, grid, mtype_start=1, etype_start=1,
mode : str, optional
File mode. See ``help(open)``
nblock : bool, optional
Write node block when writing archive file.
enum_start : int, optional
Starting element number to assign to unset cells. Can be
manually set by adding the cell array "ansys_elem_num" to the
Expand Down
5 changes: 5 additions & 0 deletions ansys/mapdl/reader/cell_quality.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ def quality(grid):
Negative values indicate invalid cells while positive values
indicate valid cells. Varies between -1 and 1.
Parameters
----------
grid : pyvista.UnstructuredGrid or pyvista.StructuredGrid
Structured or Unstructured Grid from ``pyvista``.
Examples
--------
>>> from ansys.mapdl import reader as pymapdl_reader
Expand Down
2 changes: 1 addition & 1 deletion ansys/mapdl/reader/emat.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ class EmatFile(object):
Parameters
----------
filename : str
File to open. Usually ends in .emat
File to open. Generally ends in ``*.emat``.
Examples
--------
Expand Down
3 changes: 3 additions & 0 deletions docs/source/_static/css/ansys.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ h1, h2, h3, h4, h5, h6 {
font-family: 'Source Sans Pro', sans-serif;
}

.navbar-toggler-icon {
background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(255,255,255, 0.9)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 8h24M4 16h24M4 24h24'/%3E%3C/svg%3E") !important;
}

.sig-prename {
color: var(--ansysBronze);
Expand Down
14 changes: 14 additions & 0 deletions docs/source/api/archive.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.. _ref_archive_api:

***************************
Archive Class and Functions
***************************
.. autoclass:: ansys.mapdl.reader.archive.Archive
:members:
:noindex:

.. autofunction:: ansys.mapdl.reader.archive.save_as_archive

.. autofunction:: ansys.mapdl.reader.archive.write_nblock

.. autofunction:: ansys.mapdl.reader.archive.write_cmblock
8 changes: 8 additions & 0 deletions docs/source/api/cyclic_result.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.. _ref_cyc_rst_api:

*******************
Cyclic Result Class
*******************
.. autoclass:: ansys.mapdl.reader.cyclic_reader.CyclicResult
:members:
:noindex:
8 changes: 8 additions & 0 deletions docs/source/api/emat.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.. _ref_emat_api:

********************
Element Matrix Class
********************
.. autoclass:: ansys.mapdl.reader.emat.EmatFile
:members:
:noindex:
8 changes: 8 additions & 0 deletions docs/source/api/full.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.. _ref_full_api:

***************
Full File Class
***************
.. autoclass:: ansys.mapdl.reader.full.FullFile
:members:
:noindex:
17 changes: 17 additions & 0 deletions docs/source/api/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.. _ref_index_api:

=============
API Reference
=============
This section gives an overview of the API of several public
PyMAPDL-Reader classes, functions, and attributes.

.. toctree::
:maxdepth: 1

archive
cyclic_result
emat
full
mesh_quality
rst
6 changes: 6 additions & 0 deletions docs/source/api/mesh_quality.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.. _ref_mesh_quality_api:

********************
Compute Cell Quality
********************
.. autofunction:: ansys.mapdl.reader.cell_quality.quality
8 changes: 8 additions & 0 deletions docs/source/api/rst.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.. _ref_rst_api:

************
Result Class
************
.. autoclass:: ansys.mapdl.reader.rst.Result
:members:
:noindex:
1 change: 1 addition & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ plots results directly from an ANSYS result file using
getting_started
user_guide/index
api/index
examples/index
contributing
Expand Down

0 comments on commit 4d5edad

Please sign in to comment.