:orphan:

.. _ref_pymath_examples:

Examples
========
These examples show how you use the PyAnsys Math library.


.. raw:: html

    <div class="sphx-glr-thumbnails">

.. thumbnail-parent-div-open

.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example shows how to perform these tasks:">

.. only:: html

  .. image:: /examples/images/thumb/sphx_glr_ansys-math_vs_scipy_thumb.png
    :alt:

  :ref:`sphx_glr_examples_ansys-math_vs_scipy.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Compute Eigenvalues using PyAnsys Math and SciPy</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This tutorial shows how you can use PyAnsys Math for basic operations on AnsMath vectors and matrices in the APDL memory workspace.">

.. only:: html

  .. image:: /examples/images/thumb/sphx_glr_basic_operations_thumb.png
    :alt:

  :ref:`sphx_glr_examples_basic_operations.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">PyAnsys Math basic operations</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example uses a verification manual input file, but you can use your own sparse or dense matrices.">

.. only:: html

  .. image:: /examples/images/thumb/sphx_glr_eigen_solve_thumb.png
    :alt:

  :ref:`sphx_glr_examples_eigen_solve.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Use PyAnsys Math to solve eigenproblems</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="This example shows how to get AnsMath sparse matrices into SciPy sparse matrices.">

.. only:: html

  .. image:: /examples/images/thumb/sphx_glr_scipy_sparse_matrix_thumb.png
    :alt:

  :ref:`sphx_glr_examples_scipy_sparse_matrix.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">AnsMath sparse matrices and SciPy sparse matrices</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Use PyAnsys Math to solve a dense matrix linear system">

.. only:: html

  .. image:: /examples/images/thumb/sphx_glr_solve_dense_matrix_thumb.png
    :alt:

  :ref:`sphx_glr_examples_solve_dense_matrix.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Use PyAnsys Math to solve a dense matrix linear system</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Using PyAnsys Math, you can solve linear systems of equations based on sparse or dense matrices.">

.. only:: html

  .. image:: /examples/images/thumb/sphx_glr_solve_sparse_matrix_thumb.png
    :alt:

  :ref:`sphx_glr_examples_solve_sparse_matrix.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Perform sparse factorization and solve operations</div>
    </div>


.. raw:: html

    <div class="sphx-glr-thumbcontainer" tooltip="Manipulate AnsMath vectors or dense matrices as NumPy arrays">

.. only:: html

  .. image:: /examples/images/thumb/sphx_glr_use_numpy_arrays_thumb.png
    :alt:

  :ref:`sphx_glr_examples_use_numpy_arrays.py`

.. raw:: html

      <div class="sphx-glr-thumbnail-title">Manipulate AnsMath vectors or dense matrices as NumPy arrays</div>
    </div>


.. thumbnail-parent-div-close

.. raw:: html

    </div>


.. toctree::
   :hidden:

   /examples/ansys-math_vs_scipy
   /examples/basic_operations
   /examples/eigen_solve
   /examples/scipy_sparse_matrix
   /examples/solve_dense_matrix
   /examples/solve_sparse_matrix
   /examples/use_numpy_arrays



.. only:: html

 .. rst-class:: sphx-glr-signature

    `Gallery generated by Sphinx-Gallery <https://sphinx-gallery.github.io>`_