ngsPETSc.utils.firedrake.hierarchies
====================================

.. py:module:: ngsPETSc.utils.firedrake.hierarchies

.. autoapi-nested-parse::

   This module contains all the functions related



Attributes
----------

.. autoapisummary::

   ngsPETSc.utils.firedrake.hierarchies.fd
   ngsPETSc.utils.firedrake.hierarchies.refinementTypes


Functions
---------

.. autoapisummary::

   ngsPETSc.utils.firedrake.hierarchies.snapToNetgenDMPlex
   ngsPETSc.utils.firedrake.hierarchies.snapToCoarse
   ngsPETSc.utils.firedrake.hierarchies.uniformRefinementRoutine
   ngsPETSc.utils.firedrake.hierarchies.uniformMapRoutine
   ngsPETSc.utils.firedrake.hierarchies.alfeldRefinementRoutine
   ngsPETSc.utils.firedrake.hierarchies.alfeldMapRoutine
   ngsPETSc.utils.firedrake.hierarchies.NetgenHierarchy


Module Contents
---------------

.. py:data:: fd
   :value: None


.. py:function:: snapToNetgenDMPlex(ngmesh, petscPlex)

   This function snaps the coordinates of a DMPlex mesh to the coordinates of a Netgen mesh.


.. py:function:: snapToCoarse(coarse, linear, degree, snap_smoothing, cg)

   This function snaps the coordinates of a DMPlex mesh to the coordinates of a Netgen mesh.


.. py:function:: uniformRefinementRoutine(ngmesh, cdm)

   Routing called inside of NetgenHierarchy to compute refined ngmesh and plex.


.. py:function:: uniformMapRoutine(meshes, lgmaps)

   This function computes the coarse to fine and fine to coarse maps
   for a uniform mesh hierarchy.


.. py:function:: alfeldRefinementRoutine(ngmesh, cdm)

   Routing called inside of NetgenHierarchy to compute refined ngmesh and plex.


.. py:function:: alfeldMapRoutine(meshes)

   This function computes the coarse to fine and fine to coarse maps
   for a alfeld mesh hierarchy.


.. py:data:: refinementTypes

.. py:function:: NetgenHierarchy(mesh, levs, flags)

   This function creates a Firedrake mesh hierarchy from Netgen/NGSolve meshes.

   :arg mesh: the Netgen/NGSolve mesh
   :arg levs: the number of levels in the hierarchy
   :arg netgen_flags: either a bool or a dictionray containing options for Netgen.
   If not False the hierachy is constructed using ngsPETSc, if None hierarchy
   constructed in a standard manner. Netgen flags includes:
       -degree, either an integer denoting the degree of curvature of all levels of
       the mesh or a list of levs+1 integers denoting the degree of curvature of
       each level of the mesh.
       -tol, geometric tolerance adopted in snapToNetgenDMPlex.
       -refinement_type, the refinment type to be used: uniform (default), Alfeld


