.. py:currentmodule:: pysph.tools

Miscellaneous Tools for PySPH
==============================

.. contents::
    :local:
    :depth: 1

Input/Output of data files
---------------------------

The following functions are handy functions when processing output generated by
PySPH or to generate new files.

.. autofunction:: pysph.solver.utils.dump

.. autofunction:: pysph.solver.utils.get_files

.. autofunction:: pysph.solver.utils.load

.. autofunction:: pysph.solver.utils.load_and_concatenate


Interpolator
------------

This module provides a convenient class called
:py:class:`interpolator.Interpolator` which can be used to interpolate any
scalar values from the points onto either a mesh or a collection of other
points.  SPH interpolation is performed with a simple Shepard filtering.

.. automodule:: pysph.tools.interpolator
    :members:
    :undoc-members:


SPH Evaluator
-------------

This module provides a class that allows one to evaluate a set of equations on
a collection of particle arrays. This is very handy for non-trivial
post-processing that needs to be quick.

.. automodule:: pysph.tools.sph_evaluator
    :members:
    :undoc-members:


GMsh input/output
------------------


.. automodule:: pysph.tools.gmsh
    :members:
    :undoc-members:

Mayavi Viewer
-------------

.. automodule:: pysph.tools.mayavi_viewer
   :members:
   :undoc-members:

Mesh Converter
--------------

The following functions can be used to convert a mesh file supported by
`meshio <https://github.com/nschloe/meshio>`_ to a set of surface points.

.. autofunction:: pysph.tools.read_mesh.mesh2points

Particle Packer
---------------

The following functions can be used to create a domain with particle packed
around a solid surface in both 2D and 3D.

.. autofunction:: pysph.tools.geometry.get_packed_periodic_packed_particles
.. autofunction:: pysph.tools.geometry.get_packed_2d_particles_from_surface_coordinates
.. autofunction:: pysph.tools.geometry.get_packed_2d_particles_from_surface_file
.. autofunction:: pysph.tools.geometry.get_packed_3d_particles_from_surface_file
.. autofunction:: pysph.tools.geometry.create_fluid_around_packing