# This file was automatically generated by SWIG (http://www.swig.org).
# Version 4.0.1
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.

from sys import version_info as _swig_python_version_info
if _swig_python_version_info < (2, 7, 0):
    raise RuntimeError("Python 2.7 or later required")

# Import the low-level C/C++ module
if __package__ or "." in __name__:
    from . import _mesh
else:
    import _mesh

try:
    import builtins as __builtin__
except ImportError:
    import __builtin__

_swig_new_instance_method = _mesh.SWIG_PyInstanceMethod_New
_swig_new_static_method = _mesh.SWIG_PyStaticMethod_New

def _swig_repr(self):
    try:
        strthis = "proxy of " + self.this.__repr__()
    except __builtin__.Exception:
        strthis = ""
    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)


def _swig_setattr_nondynamic_instance_variable(set):
    def set_instance_attr(self, name, value):
        if name == "thisown":
            self.this.own(value)
        elif name == "this":
            set(self, name, value)
        elif hasattr(self, name) and isinstance(getattr(type(self), name), property):
            set(self, name, value)
        else:
            raise AttributeError("You cannot add instance attributes to %s" % self)
    return set_instance_attr


def _swig_setattr_nondynamic_class_variable(set):
    def set_class_attr(cls, name, value):
        if hasattr(cls, name) and not isinstance(getattr(cls, name), property):
            set(cls, name, value)
        else:
            raise AttributeError("You cannot add class attributes to %s" % cls)
    return set_class_attr


def _swig_add_metaclass(metaclass):
    """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""
    def wrapper(cls):
        return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy())
    return wrapper


class _SwigNonDynamicMeta(type):
    """Meta class to enforce nondynamic attributes (no new attributes) for a class"""
    __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)


import weakref

class intp(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self):
        _mesh.intp_swiginit(self, _mesh.new_intp())
    __swig_destroy__ = _mesh.delete_intp

    def assign(self, value):
        return _mesh.intp_assign(self, value)
    assign = _swig_new_instance_method(_mesh.intp_assign)

    def value(self):
        return _mesh.intp_value(self)
    value = _swig_new_instance_method(_mesh.intp_value)

    def cast(self):
        return _mesh.intp_cast(self)
    cast = _swig_new_instance_method(_mesh.intp_cast)

    @staticmethod
    def frompointer(t):
        return _mesh.intp_frompointer(t)
    frompointer = _swig_new_static_method(_mesh.intp_frompointer)

# Register intp in _mesh:
_mesh.intp_swigregister(intp)

def intp_frompointer(t):
    return _mesh.intp_frompointer(t)
intp_frompointer = _mesh.intp_frompointer

class doublep(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self):
        _mesh.doublep_swiginit(self, _mesh.new_doublep())
    __swig_destroy__ = _mesh.delete_doublep

    def assign(self, value):
        return _mesh.doublep_assign(self, value)
    assign = _swig_new_instance_method(_mesh.doublep_assign)

    def value(self):
        return _mesh.doublep_value(self)
    value = _swig_new_instance_method(_mesh.doublep_value)

    def cast(self):
        return _mesh.doublep_cast(self)
    cast = _swig_new_instance_method(_mesh.doublep_cast)

    @staticmethod
    def frompointer(t):
        return _mesh.doublep_frompointer(t)
    frompointer = _swig_new_static_method(_mesh.doublep_frompointer)

# Register doublep in _mesh:
_mesh.doublep_swigregister(doublep)

def doublep_frompointer(t):
    return _mesh.doublep_frompointer(t)
doublep_frompointer = _mesh.doublep_frompointer

import mfem._ser.matrix
import mfem._ser.vector
import mfem._ser.array
import mfem._ser.mem_manager
import mfem._ser.operators
import mfem._ser.sort_pairs
import mfem._ser.ncmesh
import mfem._ser.gridfunc
import mfem._ser.coefficient
import mfem._ser.globals
import mfem._ser.intrules
import mfem._ser.sparsemat
import mfem._ser.densemat
import mfem._ser.eltrans
import mfem._ser.fe
import mfem._ser.geom
import mfem._ser.fespace
import mfem._ser.fe_coll
import mfem._ser.lininteg
import mfem._ser.handle
import mfem._ser.restriction
import mfem._ser.element
import mfem._ser.table
import mfem._ser.hash
import mfem._ser.bilininteg
import mfem._ser.linearform
import mfem._ser.nonlininteg
import mfem._ser.vertex
import mfem._ser.vtk
FaceType_Interior = _mesh.FaceType_Interior

FaceType_Boundary = _mesh.FaceType_Boundary

class Mesh(object):
    r"""Proxy of C++ mfem::Mesh class."""

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    NONE = _mesh.Mesh_NONE
    
    REFINE = _mesh.Mesh_REFINE
    
    DEREFINE = _mesh.Mesh_DEREFINE
    
    REBALANCE = _mesh.Mesh_REBALANCE
    
    attributes = property(_mesh.Mesh_attributes_get, doc=r"""attributes : mfem::Array<(int)>""")
    bdr_attributes = property(_mesh.Mesh_bdr_attributes_get, doc=r"""bdr_attributes : mfem::Array<(int)>""")
    NURBSext = property(_mesh.Mesh_NURBSext_get, _mesh.Mesh_NURBSext_set, doc=r"""NURBSext : p.mfem::NURBSExtension""")
    ncmesh = property(_mesh.Mesh_ncmesh_get, _mesh.Mesh_ncmesh_set, doc=r"""ncmesh : p.mfem::NCMesh""")
    geom_factors = property(_mesh.Mesh_geom_factors_get, _mesh.Mesh_geom_factors_set, doc=r"""geom_factors : mfem::Array<(p.mfem::GeometricFactors)>""")
    face_geom_factors = property(_mesh.Mesh_face_geom_factors_get, _mesh.Mesh_face_geom_factors_set, doc=r"""face_geom_factors : mfem::Array<(p.mfem::FaceGeometricFactors)>""")
    tmp_vertex_parents = property(_mesh.Mesh_tmp_vertex_parents_get, _mesh.Mesh_tmp_vertex_parents_set, doc=r"""tmp_vertex_parents : mfem::Array<(mfem::Triple<(int,int,int)>)>""")
    remove_unused_vertices = property(_mesh.Mesh_remove_unused_vertices_get, _mesh.Mesh_remove_unused_vertices_set, doc=r"""remove_unused_vertices : bool""")

    def NewElement(self, geom):
        r"""NewElement(Mesh self, int geom) -> Element"""
        return _mesh.Mesh_NewElement(self, geom)
    NewElement = _swig_new_instance_method(_mesh.Mesh_NewElement)

    def AddVertex(self, *args):
        r"""
        AddVertex(Mesh self, double x, double y=0.0, double z=0.0) -> int
        AddVertex(Mesh self, double const * coords) -> int
        """
        return _mesh.Mesh_AddVertex(self, *args)
    AddVertex = _swig_new_instance_method(_mesh.Mesh_AddVertex)

    def AddVertexParents(self, i, p1, p2):
        r"""AddVertexParents(Mesh self, int i, int p1, int p2)"""
        return _mesh.Mesh_AddVertexParents(self, i, p1, p2)
    AddVertexParents = _swig_new_instance_method(_mesh.Mesh_AddVertexParents)

    def AddSegment(self, *args):
        r"""
        AddSegment(Mesh self, int v1, int v2, int attr=1) -> int
        AddSegment(Mesh self, int const * vi, int attr=1) -> int
        """
        return _mesh.Mesh_AddSegment(self, *args)
    AddSegment = _swig_new_instance_method(_mesh.Mesh_AddSegment)

    def AddTriangle(self, *args):
        r"""
        AddTriangle(Mesh self, int v1, int v2, int v3, int attr=1) -> int
        AddTriangle(Mesh self, int const * vi, int attr=1) -> int
        """
        return _mesh.Mesh_AddTriangle(self, *args)
    AddTriangle = _swig_new_instance_method(_mesh.Mesh_AddTriangle)

    def AddTri(self, vi, attr=1):
        r"""AddTri(Mesh self, int const * vi, int attr=1) -> int"""
        return _mesh.Mesh_AddTri(self, vi, attr)
    AddTri = _swig_new_instance_method(_mesh.Mesh_AddTri)

    def AddQuad(self, *args):
        r"""
        AddQuad(Mesh self, int v1, int v2, int v3, int v4, int attr=1) -> int
        AddQuad(Mesh self, int const * vi, int attr=1) -> int
        """
        return _mesh.Mesh_AddQuad(self, *args)
    AddQuad = _swig_new_instance_method(_mesh.Mesh_AddQuad)

    def AddTet(self, *args):
        r"""
        AddTet(Mesh self, int v1, int v2, int v3, int v4, int attr=1) -> int
        AddTet(Mesh self, int const * vi, int attr=1) -> int
        """
        return _mesh.Mesh_AddTet(self, *args)
    AddTet = _swig_new_instance_method(_mesh.Mesh_AddTet)

    def AddWedge(self, *args):
        r"""
        AddWedge(Mesh self, int v1, int v2, int v3, int v4, int v5, int v6, int attr=1) -> int
        AddWedge(Mesh self, int const * vi, int attr=1) -> int
        """
        return _mesh.Mesh_AddWedge(self, *args)
    AddWedge = _swig_new_instance_method(_mesh.Mesh_AddWedge)

    def AddHex(self, *args):
        r"""
        AddHex(Mesh self, int v1, int v2, int v3, int v4, int v5, int v6, int v7, int v8, int attr=1) -> int
        AddHex(Mesh self, int const * vi, int attr=1) -> int
        """
        return _mesh.Mesh_AddHex(self, *args)
    AddHex = _swig_new_instance_method(_mesh.Mesh_AddHex)

    def AddHexAsTets(self, vi, attr=1):
        r"""AddHexAsTets(Mesh self, int const * vi, int attr=1)"""
        return _mesh.Mesh_AddHexAsTets(self, vi, attr)
    AddHexAsTets = _swig_new_instance_method(_mesh.Mesh_AddHexAsTets)

    def AddHexAsWedges(self, vi, attr=1):
        r"""AddHexAsWedges(Mesh self, int const * vi, int attr=1)"""
        return _mesh.Mesh_AddHexAsWedges(self, vi, attr)
    AddHexAsWedges = _swig_new_instance_method(_mesh.Mesh_AddHexAsWedges)

    def AddElement(self, elem):
        r"""AddElement(Mesh self, Element elem) -> int"""
        return _mesh.Mesh_AddElement(self, elem)
    AddElement = _swig_new_instance_method(_mesh.Mesh_AddElement)

    def AddBdrElement(self, elem):
        r"""AddBdrElement(Mesh self, Element elem) -> int"""
        return _mesh.Mesh_AddBdrElement(self, elem)
    AddBdrElement = _swig_new_instance_method(_mesh.Mesh_AddBdrElement)

    def AddBdrSegment(self, *args):
        r"""
        AddBdrSegment(Mesh self, int v1, int v2, int attr=1) -> int
        AddBdrSegment(Mesh self, int const * vi, int attr=1) -> int
        """
        return _mesh.Mesh_AddBdrSegment(self, *args)
    AddBdrSegment = _swig_new_instance_method(_mesh.Mesh_AddBdrSegment)

    def AddBdrTriangle(self, *args):
        r"""
        AddBdrTriangle(Mesh self, int v1, int v2, int v3, int attr=1) -> int
        AddBdrTriangle(Mesh self, int const * vi, int attr=1) -> int
        """
        return _mesh.Mesh_AddBdrTriangle(self, *args)
    AddBdrTriangle = _swig_new_instance_method(_mesh.Mesh_AddBdrTriangle)

    def AddBdrQuad(self, *args):
        r"""
        AddBdrQuad(Mesh self, int v1, int v2, int v3, int v4, int attr=1) -> int
        AddBdrQuad(Mesh self, int const * vi, int attr=1) -> int
        """
        return _mesh.Mesh_AddBdrQuad(self, *args)
    AddBdrQuad = _swig_new_instance_method(_mesh.Mesh_AddBdrQuad)

    def AddBdrQuadAsTriangles(self, vi, attr=1):
        r"""AddBdrQuadAsTriangles(Mesh self, int const * vi, int attr=1)"""
        return _mesh.Mesh_AddBdrQuadAsTriangles(self, vi, attr)
    AddBdrQuadAsTriangles = _swig_new_instance_method(_mesh.Mesh_AddBdrQuadAsTriangles)

    def GenerateBoundaryElements(self):
        r"""GenerateBoundaryElements(Mesh self)"""
        return _mesh.Mesh_GenerateBoundaryElements(self)
    GenerateBoundaryElements = _swig_new_instance_method(_mesh.Mesh_GenerateBoundaryElements)

    def FinalizeTriMesh(self, generate_edges=0, refine=0, fix_orientation=True):
        r"""FinalizeTriMesh(Mesh self, int generate_edges=0, int refine=0, bool fix_orientation=True)"""
        return _mesh.Mesh_FinalizeTriMesh(self, generate_edges, refine, fix_orientation)
    FinalizeTriMesh = _swig_new_instance_method(_mesh.Mesh_FinalizeTriMesh)

    def FinalizeQuadMesh(self, generate_edges=0, refine=0, fix_orientation=True):
        r"""FinalizeQuadMesh(Mesh self, int generate_edges=0, int refine=0, bool fix_orientation=True)"""
        return _mesh.Mesh_FinalizeQuadMesh(self, generate_edges, refine, fix_orientation)
    FinalizeQuadMesh = _swig_new_instance_method(_mesh.Mesh_FinalizeQuadMesh)

    def FinalizeTetMesh(self, generate_edges=0, refine=0, fix_orientation=True):
        r"""FinalizeTetMesh(Mesh self, int generate_edges=0, int refine=0, bool fix_orientation=True)"""
        return _mesh.Mesh_FinalizeTetMesh(self, generate_edges, refine, fix_orientation)
    FinalizeTetMesh = _swig_new_instance_method(_mesh.Mesh_FinalizeTetMesh)

    def FinalizeWedgeMesh(self, generate_edges=0, refine=0, fix_orientation=True):
        r"""FinalizeWedgeMesh(Mesh self, int generate_edges=0, int refine=0, bool fix_orientation=True)"""
        return _mesh.Mesh_FinalizeWedgeMesh(self, generate_edges, refine, fix_orientation)
    FinalizeWedgeMesh = _swig_new_instance_method(_mesh.Mesh_FinalizeWedgeMesh)

    def FinalizeHexMesh(self, generate_edges=0, refine=0, fix_orientation=True):
        r"""FinalizeHexMesh(Mesh self, int generate_edges=0, int refine=0, bool fix_orientation=True)"""
        return _mesh.Mesh_FinalizeHexMesh(self, generate_edges, refine, fix_orientation)
    FinalizeHexMesh = _swig_new_instance_method(_mesh.Mesh_FinalizeHexMesh)

    def FinalizeMesh(self, refine=0, fix_orientation=True):
        r"""FinalizeMesh(Mesh self, int refine=0, bool fix_orientation=True)"""
        return _mesh.Mesh_FinalizeMesh(self, refine, fix_orientation)
    FinalizeMesh = _swig_new_instance_method(_mesh.Mesh_FinalizeMesh)

    def FinalizeTopology(self, generate_bdr=True):
        r"""FinalizeTopology(Mesh self, bool generate_bdr=True)"""
        return _mesh.Mesh_FinalizeTopology(self, generate_bdr)
    FinalizeTopology = _swig_new_instance_method(_mesh.Mesh_FinalizeTopology)

    def Finalize(self, refine=False, fix_orientation=False):
        r"""Finalize(Mesh self, bool refine=False, bool fix_orientation=False)"""
        return _mesh.Mesh_Finalize(self, refine, fix_orientation)
    Finalize = _swig_new_instance_method(_mesh.Mesh_Finalize)

    def SetAttributes(self):
        r"""SetAttributes(Mesh self)"""
        return _mesh.Mesh_SetAttributes(self)
    SetAttributes = _swig_new_instance_method(_mesh.Mesh_SetAttributes)

    def GetGeckoElementOrdering(self, ordering, iterations=4, window=4, period=2, seed=0, verbose=False, time_limit=0):
        r"""GetGeckoElementOrdering(Mesh self, intArray ordering, int iterations=4, int window=4, int period=2, int seed=0, bool verbose=False, double time_limit=0) -> double"""
        return _mesh.Mesh_GetGeckoElementOrdering(self, ordering, iterations, window, period, seed, verbose, time_limit)
    GetGeckoElementOrdering = _swig_new_instance_method(_mesh.Mesh_GetGeckoElementOrdering)

    def GetHilbertElementOrdering(self, ordering):
        r"""GetHilbertElementOrdering(Mesh self, intArray ordering)"""
        return _mesh.Mesh_GetHilbertElementOrdering(self, ordering)
    GetHilbertElementOrdering = _swig_new_instance_method(_mesh.Mesh_GetHilbertElementOrdering)

    def ReorderElements(self, ordering, reorder_vertices=True):
        r"""ReorderElements(Mesh self, intArray ordering, bool reorder_vertices=True)"""
        return _mesh.Mesh_ReorderElements(self, ordering, reorder_vertices)
    ReorderElements = _swig_new_instance_method(_mesh.Mesh_ReorderElements)

    def Load(self, input, generate_edges=0, refine=1, fix_orientation=True):
        r"""Load(Mesh self, std::istream & input, int generate_edges=0, int refine=1, bool fix_orientation=True)"""
        return _mesh.Mesh_Load(self, input, generate_edges, refine, fix_orientation)
    Load = _swig_new_instance_method(_mesh.Mesh_Load)

    def Clear(self):
        r"""Clear(Mesh self)"""
        return _mesh.Mesh_Clear(self)
    Clear = _swig_new_instance_method(_mesh.Mesh_Clear)

    def MeshGenerator(self):
        r"""MeshGenerator(Mesh self) -> int"""
        return _mesh.Mesh_MeshGenerator(self)
    MeshGenerator = _swig_new_instance_method(_mesh.Mesh_MeshGenerator)

    def GetNV(self):
        r"""GetNV(Mesh self) -> int"""
        return _mesh.Mesh_GetNV(self)
    GetNV = _swig_new_instance_method(_mesh.Mesh_GetNV)

    def GetNE(self):
        r"""GetNE(Mesh self) -> int"""
        return _mesh.Mesh_GetNE(self)
    GetNE = _swig_new_instance_method(_mesh.Mesh_GetNE)

    def GetNBE(self):
        r"""GetNBE(Mesh self) -> int"""
        return _mesh.Mesh_GetNBE(self)
    GetNBE = _swig_new_instance_method(_mesh.Mesh_GetNBE)

    def GetNEdges(self):
        r"""GetNEdges(Mesh self) -> int"""
        return _mesh.Mesh_GetNEdges(self)
    GetNEdges = _swig_new_instance_method(_mesh.Mesh_GetNEdges)

    def GetNFaces(self):
        r"""GetNFaces(Mesh self) -> int"""
        return _mesh.Mesh_GetNFaces(self)
    GetNFaces = _swig_new_instance_method(_mesh.Mesh_GetNFaces)

    def GetNumFaces(self):
        r"""GetNumFaces(Mesh self) -> int"""
        return _mesh.Mesh_GetNumFaces(self)
    GetNumFaces = _swig_new_instance_method(_mesh.Mesh_GetNumFaces)

    def GetNFbyType(self, type):
        r"""GetNFbyType(Mesh self, mfem::FaceType type) -> int"""
        return _mesh.Mesh_GetNFbyType(self, type)
    GetNFbyType = _swig_new_instance_method(_mesh.Mesh_GetNFbyType)

    def ReduceInt(self, value):
        r"""ReduceInt(Mesh self, int value) -> long"""
        return _mesh.Mesh_ReduceInt(self, value)
    ReduceInt = _swig_new_instance_method(_mesh.Mesh_ReduceInt)

    def GetGlobalNE(self):
        r"""GetGlobalNE(Mesh self) -> long"""
        return _mesh.Mesh_GetGlobalNE(self)
    GetGlobalNE = _swig_new_instance_method(_mesh.Mesh_GetGlobalNE)

    def GetGeometricFactors(self, ir, flags):
        r"""GetGeometricFactors(Mesh self, IntegrationRule ir, int const flags) -> GeometricFactors"""
        return _mesh.Mesh_GetGeometricFactors(self, ir, flags)
    GetGeometricFactors = _swig_new_instance_method(_mesh.Mesh_GetGeometricFactors)

    def GetFaceGeometricFactors(self, ir, flags, type):
        r"""GetFaceGeometricFactors(Mesh self, IntegrationRule ir, int const flags, mfem::FaceType type) -> FaceGeometricFactors"""
        return _mesh.Mesh_GetFaceGeometricFactors(self, ir, flags, type)
    GetFaceGeometricFactors = _swig_new_instance_method(_mesh.Mesh_GetFaceGeometricFactors)

    def DeleteGeometricFactors(self):
        r"""DeleteGeometricFactors(Mesh self)"""
        return _mesh.Mesh_DeleteGeometricFactors(self)
    DeleteGeometricFactors = _swig_new_instance_method(_mesh.Mesh_DeleteGeometricFactors)

    def EulerNumber(self):
        r"""EulerNumber(Mesh self) -> int"""
        return _mesh.Mesh_EulerNumber(self)
    EulerNumber = _swig_new_instance_method(_mesh.Mesh_EulerNumber)

    def EulerNumber2D(self):
        r"""EulerNumber2D(Mesh self) -> int"""
        return _mesh.Mesh_EulerNumber2D(self)
    EulerNumber2D = _swig_new_instance_method(_mesh.Mesh_EulerNumber2D)

    def Dimension(self):
        r"""Dimension(Mesh self) -> int"""
        return _mesh.Mesh_Dimension(self)
    Dimension = _swig_new_instance_method(_mesh.Mesh_Dimension)

    def SpaceDimension(self):
        r"""SpaceDimension(Mesh self) -> int"""
        return _mesh.Mesh_SpaceDimension(self)
    SpaceDimension = _swig_new_instance_method(_mesh.Mesh_SpaceDimension)

    def GetVertex(self, *args):
        r"""
        GetVertex(Mesh self, int i) -> double const
        GetVertex(Mesh self, int i) -> double *
        """
        return _mesh.Mesh_GetVertex(self, *args)
    GetVertex = _swig_new_instance_method(_mesh.Mesh_GetVertex)

    def GetElementData(self, geom, elem_vtx, attr):
        r"""GetElementData(Mesh self, int geom, intArray elem_vtx, intArray attr)"""
        return _mesh.Mesh_GetElementData(self, geom, elem_vtx, attr)
    GetElementData = _swig_new_instance_method(_mesh.Mesh_GetElementData)

    def GetBdrElementData(self, geom, bdr_elem_vtx, bdr_attr):
        r"""GetBdrElementData(Mesh self, int geom, intArray bdr_elem_vtx, intArray bdr_attr)"""
        return _mesh.Mesh_GetBdrElementData(self, geom, bdr_elem_vtx, bdr_attr)
    GetBdrElementData = _swig_new_instance_method(_mesh.Mesh_GetBdrElementData)

    def ChangeVertexDataOwnership(self, vertices, len_vertices, zerocopy=False):
        r"""ChangeVertexDataOwnership(Mesh self, double * vertices, int len_vertices, bool zerocopy=False)"""
        return _mesh.Mesh_ChangeVertexDataOwnership(self, vertices, len_vertices, zerocopy)
    ChangeVertexDataOwnership = _swig_new_instance_method(_mesh.Mesh_ChangeVertexDataOwnership)

    def GetElementsArray(self):
        r"""GetElementsArray(Mesh self) -> mfem::Element const *const *"""
        return _mesh.Mesh_GetElementsArray(self)
    GetElementsArray = _swig_new_instance_method(_mesh.Mesh_GetElementsArray)

    def GetElement(self, *args):
        r"""
        GetElement(Mesh self, int i) -> Element
        GetElement(Mesh self, int i) -> Element
        """
        return _mesh.Mesh_GetElement(self, *args)
    GetElement = _swig_new_instance_method(_mesh.Mesh_GetElement)

    def GetBdrElement(self, *args):
        r"""
        GetBdrElement(Mesh self, int i) -> Element
        GetBdrElement(Mesh self, int i) -> Element
        """
        return _mesh.Mesh_GetBdrElement(self, *args)
    GetBdrElement = _swig_new_instance_method(_mesh.Mesh_GetBdrElement)

    def GetFace(self, i):
        r"""GetFace(Mesh self, int i) -> Element"""
        return _mesh.Mesh_GetFace(self, i)
    GetFace = _swig_new_instance_method(_mesh.Mesh_GetFace)

    def GetFaceBaseGeometry(self, i):
        r"""GetFaceBaseGeometry(Mesh self, int i) -> mfem::Geometry::Type"""
        return _mesh.Mesh_GetFaceBaseGeometry(self, i)
    GetFaceBaseGeometry = _swig_new_instance_method(_mesh.Mesh_GetFaceBaseGeometry)

    def GetElementBaseGeometry(self, i):
        r"""GetElementBaseGeometry(Mesh self, int i) -> mfem::Geometry::Type"""
        return _mesh.Mesh_GetElementBaseGeometry(self, i)
    GetElementBaseGeometry = _swig_new_instance_method(_mesh.Mesh_GetElementBaseGeometry)

    def GetBdrElementBaseGeometry(self, i):
        r"""GetBdrElementBaseGeometry(Mesh self, int i) -> mfem::Geometry::Type"""
        return _mesh.Mesh_GetBdrElementBaseGeometry(self, i)
    GetBdrElementBaseGeometry = _swig_new_instance_method(_mesh.Mesh_GetBdrElementBaseGeometry)

    def HasGeometry(self, geom):
        r"""HasGeometry(Mesh self, mfem::Geometry::Type geom) -> bool"""
        return _mesh.Mesh_HasGeometry(self, geom)
    HasGeometry = _swig_new_instance_method(_mesh.Mesh_HasGeometry)

    def GetNumGeometries(self, dim):
        r"""GetNumGeometries(Mesh self, int dim) -> int"""
        return _mesh.Mesh_GetNumGeometries(self, dim)
    GetNumGeometries = _swig_new_instance_method(_mesh.Mesh_GetNumGeometries)

    def GetGeometries(self, dim, el_geoms):
        r"""GetGeometries(Mesh self, int dim, GeometryTypeArray el_geoms)"""
        return _mesh.Mesh_GetGeometries(self, dim, el_geoms)
    GetGeometries = _swig_new_instance_method(_mesh.Mesh_GetGeometries)

    def GetElementVertices(self, i):
        from  .array import intArray
        ivert = intArray()
        _mesh.Mesh_GetElementVertices(self, i, ivert)
        return ivert.ToList()



    def GetBdrElementVertices(self, i):
        from  .array import intArray
        ivert = intArray()
        _mesh.Mesh_GetBdrElementVertices(self, i, ivert)
        return ivert.ToList()



    def GetElementEdges(self, i):
        from  .array import intArray
        ia = intArray()
        ib = intArray()      
        _mesh.Mesh_GetElementEdges(self, i, ia, ib)
        return ia.ToList(), ib.ToList()      



    def GetBdrElementEdges(self, i):
        from  .array import intArray
        ia = intArray()
        ib = intArray()      
        _mesh.Mesh_GetBdrElementEdges(self, i, ia, ib)
        return ia.ToList(), ib.ToList()



    def GetFaceEdges(self, i):
        from  .array import intArray
        ia = intArray()
        ib = intArray()      
        _mesh.Mesh_GetFaceEdges(self, i, ia, ib)
        return ia.ToList(), ib.ToList()



    def GetFaceVertices(self, i):
        from  .array import intArray
        ia = intArray()
        _mesh.Mesh_GetFaceVertices(self, i, ia)
        return ia.ToList()



    def GetEdgeVertices(self, i):
        from  .array import intArray
        ia = intArray()
        _mesh.Mesh_GetEdgeVertices(self, i, ia)
        return ia.ToList()



    def GetFaceEdgeTable(self):
        r"""GetFaceEdgeTable(Mesh self) -> Table"""
        return _mesh.Mesh_GetFaceEdgeTable(self)
    GetFaceEdgeTable = _swig_new_instance_method(_mesh.Mesh_GetFaceEdgeTable)

    def GetEdgeVertexTable(self):
        r"""GetEdgeVertexTable(Mesh self) -> Table"""
        return _mesh.Mesh_GetEdgeVertexTable(self)
    GetEdgeVertexTable = _swig_new_instance_method(_mesh.Mesh_GetEdgeVertexTable)

    def GetElementFaces(self, i):
        from  .array import intArray
        ia = intArray()
        ib = intArray()      
        _mesh.Mesh_GetElementFaces(self, i, ia, ib)
        return ia.ToList(), ib.ToList()



    def GetBdrElementEdgeIndex(self, i):
        r"""GetBdrElementEdgeIndex(Mesh self, int i) -> int"""
        return _mesh.Mesh_GetBdrElementEdgeIndex(self, i)
    GetBdrElementEdgeIndex = _swig_new_instance_method(_mesh.Mesh_GetBdrElementEdgeIndex)

    def GetBdrElementAdjacentElement(self, bdr_el):
        from mfem.ser import intp
        el = intp()
        info = intp()  
        _mesh.Mesh_GetBdrElementAdjacentElement(self, bdr_el, el, info)
        return el.value(), info.value()



    def GetElementType(self, i):
        r"""GetElementType(Mesh self, int i) -> mfem::Element::Type"""
        return _mesh.Mesh_GetElementType(self, i)
    GetElementType = _swig_new_instance_method(_mesh.Mesh_GetElementType)

    def GetBdrElementType(self, i):
        r"""GetBdrElementType(Mesh self, int i) -> mfem::Element::Type"""
        return _mesh.Mesh_GetBdrElementType(self, i)
    GetBdrElementType = _swig_new_instance_method(_mesh.Mesh_GetBdrElementType)

    def GetPointMatrix(self, i, pointmat):
        r"""GetPointMatrix(Mesh self, int i, DenseMatrix pointmat)"""
        return _mesh.Mesh_GetPointMatrix(self, i, pointmat)
    GetPointMatrix = _swig_new_instance_method(_mesh.Mesh_GetPointMatrix)

    def GetBdrPointMatrix(self, i, pointmat):
        r"""GetBdrPointMatrix(Mesh self, int i, DenseMatrix pointmat)"""
        return _mesh.Mesh_GetBdrPointMatrix(self, i, pointmat)
    GetBdrPointMatrix = _swig_new_instance_method(_mesh.Mesh_GetBdrPointMatrix)

    @staticmethod
    def GetTransformationFEforElementType(arg1):
        r"""GetTransformationFEforElementType(mfem::Element::Type arg1) -> FiniteElement"""
        return _mesh.Mesh_GetTransformationFEforElementType(arg1)
    GetTransformationFEforElementType = _swig_new_static_method(_mesh.Mesh_GetTransformationFEforElementType)

    def GetElementTransformation(self, i):
        from mfem.ser import IsoparametricTransformation
        Tr = IsoparametricTransformation()
        _mesh.Mesh_GetElementTransformation(self, i, Tr)
        return Tr



    def GetBdrElementTransformation(self, i):
        from mfem.ser import IsoparametricTransformation
        Tr = IsoparametricTransformation()
        _mesh.Mesh_GetBdrElementTransformation(self, i, Tr)
        return Tr



    def GetLocalFaceTransformation(self, face_type, elem_type, Transf, info):
        r"""GetLocalFaceTransformation(Mesh self, int face_type, int elem_type, IsoparametricTransformation Transf, int info)"""
        return _mesh.Mesh_GetLocalFaceTransformation(self, face_type, elem_type, Transf, info)
    GetLocalFaceTransformation = _swig_new_instance_method(_mesh.Mesh_GetLocalFaceTransformation)

    def GetFaceTransformation(self, i):
        from mfem.ser import IsoparametricTransformation
        Tr = IsoparametricTransformation()
        _mesh.Mesh_GetFaceTransformation(self, i, Tr)
        return Tr



    def GetEdgeTransformation(self, i):
        from mfem.ser import IsoparametricTransformation
        Tr = IsoparametricTransformation()
        _mesh.Mesh_GetEdgeTransformation(self, i, Tr)
        return Tr



    def GetFaceElementTransformations(self, FaceNo, mask=31):
        r"""GetFaceElementTransformations(Mesh self, int FaceNo, int mask=31) -> FaceElementTransformations"""
        return _mesh.Mesh_GetFaceElementTransformations(self, FaceNo, mask)
    GetFaceElementTransformations = _swig_new_instance_method(_mesh.Mesh_GetFaceElementTransformations)

    def GetInteriorFaceTransformations(self, FaceNo):
        r"""GetInteriorFaceTransformations(Mesh self, int FaceNo) -> FaceElementTransformations"""
        return _mesh.Mesh_GetInteriorFaceTransformations(self, FaceNo)
    GetInteriorFaceTransformations = _swig_new_instance_method(_mesh.Mesh_GetInteriorFaceTransformations)

    def GetBdrFaceTransformations(self, BdrElemNo):
        r"""GetBdrFaceTransformations(Mesh self, int BdrElemNo) -> FaceElementTransformations"""
        return _mesh.Mesh_GetBdrFaceTransformations(self, BdrElemNo)
    GetBdrFaceTransformations = _swig_new_instance_method(_mesh.Mesh_GetBdrFaceTransformations)

    def FaceIsInterior(self, FaceNo):
        r"""FaceIsInterior(Mesh self, int FaceNo) -> bool"""
        return _mesh.Mesh_FaceIsInterior(self, FaceNo)
    FaceIsInterior = _swig_new_instance_method(_mesh.Mesh_FaceIsInterior)

    def GetFaceElements(self, Face):
        from mfem.ser import intp
        Elem1 = intp()
        Elem2 = intp()  
        val = _mesh.Mesh_GetFaceElements(self, Face, Elem1, Elem2)
        return Elem1.value(), Elem2.value()



    def GetFaceInfos(self, i):
        from mfem.ser import intp
        Elem1 = intp()
        Elem2 = intp()  

        _mesh.Mesh_GetFaceInfos(self, i, Elem1, Elem2)
        return Elem1.value(), Elem2.value()



    def GetFaceGeometryType(self, Face):
        r"""GetFaceGeometryType(Mesh self, int Face) -> mfem::Geometry::Type"""
        return _mesh.Mesh_GetFaceGeometryType(self, Face)
    GetFaceGeometryType = _swig_new_instance_method(_mesh.Mesh_GetFaceGeometryType)

    def GetFaceElementType(self, Face):
        r"""GetFaceElementType(Mesh self, int Face) -> mfem::Element::Type"""
        return _mesh.Mesh_GetFaceElementType(self, Face)
    GetFaceElementType = _swig_new_instance_method(_mesh.Mesh_GetFaceElementType)

    def CheckElementOrientation(self, fix_it=True):
        r"""CheckElementOrientation(Mesh self, bool fix_it=True) -> int"""
        return _mesh.Mesh_CheckElementOrientation(self, fix_it)
    CheckElementOrientation = _swig_new_instance_method(_mesh.Mesh_CheckElementOrientation)

    def CheckBdrElementOrientation(self, fix_it=True):
        r"""CheckBdrElementOrientation(Mesh self, bool fix_it=True) -> int"""
        return _mesh.Mesh_CheckBdrElementOrientation(self, fix_it)
    CheckBdrElementOrientation = _swig_new_instance_method(_mesh.Mesh_CheckBdrElementOrientation)

    def GetAttribute(self, i):
        r"""GetAttribute(Mesh self, int i) -> int"""
        return _mesh.Mesh_GetAttribute(self, i)
    GetAttribute = _swig_new_instance_method(_mesh.Mesh_GetAttribute)

    def SetAttribute(self, i, attr):
        r"""SetAttribute(Mesh self, int i, int attr)"""
        return _mesh.Mesh_SetAttribute(self, i, attr)
    SetAttribute = _swig_new_instance_method(_mesh.Mesh_SetAttribute)

    def GetBdrAttribute(self, i):
        r"""GetBdrAttribute(Mesh self, int i) -> int"""
        return _mesh.Mesh_GetBdrAttribute(self, i)
    GetBdrAttribute = _swig_new_instance_method(_mesh.Mesh_GetBdrAttribute)

    def ElementToElementTable(self):
        r"""ElementToElementTable(Mesh self) -> Table"""
        return _mesh.Mesh_ElementToElementTable(self)
    ElementToElementTable = _swig_new_instance_method(_mesh.Mesh_ElementToElementTable)

    def ElementToFaceTable(self):
        r"""ElementToFaceTable(Mesh self) -> Table"""
        return _mesh.Mesh_ElementToFaceTable(self)
    ElementToFaceTable = _swig_new_instance_method(_mesh.Mesh_ElementToFaceTable)

    def ElementToEdgeTable(self):
        r"""ElementToEdgeTable(Mesh self) -> Table"""
        return _mesh.Mesh_ElementToEdgeTable(self)
    ElementToEdgeTable = _swig_new_instance_method(_mesh.Mesh_ElementToEdgeTable)

    def GetVertexToElementTable(self):
        r"""GetVertexToElementTable(Mesh self) -> Table"""
        return _mesh.Mesh_GetVertexToElementTable(self)
    GetVertexToElementTable = _swig_new_instance_method(_mesh.Mesh_GetVertexToElementTable)

    def GetFaceToElementTable(self):
        r"""GetFaceToElementTable(Mesh self) -> Table"""
        return _mesh.Mesh_GetFaceToElementTable(self)
    GetFaceToElementTable = _swig_new_instance_method(_mesh.Mesh_GetFaceToElementTable)

    def ReorientTetMesh(self):
        r"""ReorientTetMesh(Mesh self)"""
        return _mesh.Mesh_ReorientTetMesh(self)
    ReorientTetMesh = _swig_new_instance_method(_mesh.Mesh_ReorientTetMesh)

    def CartesianPartitioning(self, nxyz, return_list=False):
        import mfem.ser as mfem
        import warnings      
        try:
            nxyz = list(nxyz)
            d = mfem.intArray(nxyz)
            dd = d.GetData()
        except BaseException:
            dd = nxyz
            warnings.warn("CartesianPartitioning argument should be iterable",
    		      DeprecationWarning,)
        r = _mesh.Mesh_CartesianPartitioning(self, dd)

        if not return_list:
            return r
        else:	 
            result = mfem.intArray()
            result.MakeRef(r, self.GetNE())
            result.MakeDataOwner()
            return result.ToList()



    def GeneratePartitioning(self, nparts, part_method=1):
        r"""GeneratePartitioning(Mesh self, int nparts, int part_method=1) -> int *"""
        return _mesh.Mesh_GeneratePartitioning(self, nparts, part_method)
    GeneratePartitioning = _swig_new_instance_method(_mesh.Mesh_GeneratePartitioning)

    def CheckPartitioning(self, partitioning):
        r"""CheckPartitioning(Mesh self, int * partitioning)"""
        return _mesh.Mesh_CheckPartitioning(self, partitioning)
    CheckPartitioning = _swig_new_instance_method(_mesh.Mesh_CheckPartitioning)

    def CheckDisplacements(self, displacements, tmax):
        r"""CheckDisplacements(Mesh self, Vector displacements, double & tmax)"""
        return _mesh.Mesh_CheckDisplacements(self, displacements, tmax)
    CheckDisplacements = _swig_new_instance_method(_mesh.Mesh_CheckDisplacements)

    def MoveVertices(self, displacements):
        r"""MoveVertices(Mesh self, Vector displacements)"""
        return _mesh.Mesh_MoveVertices(self, displacements)
    MoveVertices = _swig_new_instance_method(_mesh.Mesh_MoveVertices)

    def GetVertices(self, vert_coord):
        r"""GetVertices(Mesh self, Vector vert_coord)"""
        return _mesh.Mesh_GetVertices(self, vert_coord)
    GetVertices = _swig_new_instance_method(_mesh.Mesh_GetVertices)

    def SetVertices(self, vert_coord):
        r"""SetVertices(Mesh self, Vector vert_coord)"""
        return _mesh.Mesh_SetVertices(self, vert_coord)
    SetVertices = _swig_new_instance_method(_mesh.Mesh_SetVertices)

    def GetNode(self, i, coord):
        r"""GetNode(Mesh self, int i, double * coord)"""
        return _mesh.Mesh_GetNode(self, i, coord)
    GetNode = _swig_new_instance_method(_mesh.Mesh_GetNode)

    def SetNode(self, i, coord):
        r"""SetNode(Mesh self, int i, double const * coord)"""
        return _mesh.Mesh_SetNode(self, i, coord)
    SetNode = _swig_new_instance_method(_mesh.Mesh_SetNode)

    def MoveNodes(self, displacements):
        r"""MoveNodes(Mesh self, Vector displacements)"""
        return _mesh.Mesh_MoveNodes(self, displacements)
    MoveNodes = _swig_new_instance_method(_mesh.Mesh_MoveNodes)

    def SetNodes(self, node_coord):
        r"""SetNodes(Mesh self, Vector node_coord)"""
        return _mesh.Mesh_SetNodes(self, node_coord)
    SetNodes = _swig_new_instance_method(_mesh.Mesh_SetNodes)

    def OwnsNodes(self):
        r"""OwnsNodes(Mesh self) -> bool"""
        return _mesh.Mesh_OwnsNodes(self)
    OwnsNodes = _swig_new_instance_method(_mesh.Mesh_OwnsNodes)

    def SetNodesOwner(self, nodes_owner):
        r"""SetNodesOwner(Mesh self, bool nodes_owner)"""
        return _mesh.Mesh_SetNodesOwner(self, nodes_owner)
    SetNodesOwner = _swig_new_instance_method(_mesh.Mesh_SetNodesOwner)

    def NewNodes(self, nodes, make_owner=False):
        r"""NewNodes(Mesh self, GridFunction nodes, bool make_owner=False)"""
        return _mesh.Mesh_NewNodes(self, nodes, make_owner)
    NewNodes = _swig_new_instance_method(_mesh.Mesh_NewNodes)

    def SwapNodes(self, nodes, own_nodes_):
        r"""SwapNodes(Mesh self, mfem::GridFunction *& nodes, int & own_nodes_)"""
        return _mesh.Mesh_SwapNodes(self, nodes, own_nodes_)
    SwapNodes = _swig_new_instance_method(_mesh.Mesh_SwapNodes)

    def GetNodes(self, *args):
        r"""
        GetNodes(Mesh self, Vector node_coord)
        GetNodes(Mesh self) -> GridFunction
        GetNodes(Mesh self) -> GridFunction
        GetNodes(Mesh self, GridFunction nodes)
        """
        return _mesh.Mesh_GetNodes(self, *args)
    GetNodes = _swig_new_instance_method(_mesh.Mesh_GetNodes)

    def SetNodalFESpace(self, nfes):
        r"""SetNodalFESpace(Mesh self, FiniteElementSpace nfes)"""
        return _mesh.Mesh_SetNodalFESpace(self, nfes)
    SetNodalFESpace = _swig_new_instance_method(_mesh.Mesh_SetNodalFESpace)

    def SetNodalGridFunction(self, nodes, make_owner=False):
        r"""SetNodalGridFunction(Mesh self, GridFunction nodes, bool make_owner=False)"""
        return _mesh.Mesh_SetNodalGridFunction(self, nodes, make_owner)
    SetNodalGridFunction = _swig_new_instance_method(_mesh.Mesh_SetNodalGridFunction)

    def GetNodalFESpace(self):
        r"""GetNodalFESpace(Mesh self) -> FiniteElementSpace"""
        return _mesh.Mesh_GetNodalFESpace(self)
    GetNodalFESpace = _swig_new_instance_method(_mesh.Mesh_GetNodalFESpace)

    def EnsureNodes(self):
        r"""EnsureNodes(Mesh self)"""
        return _mesh.Mesh_EnsureNodes(self)
    EnsureNodes = _swig_new_instance_method(_mesh.Mesh_EnsureNodes)

    def SetCurvature(self, order, discont=False, space_dim=-1, ordering=1):
        r"""SetCurvature(Mesh self, int order, bool discont=False, int space_dim=-1, int ordering=1)"""
        return _mesh.Mesh_SetCurvature(self, order, discont, space_dim, ordering)
    SetCurvature = _swig_new_instance_method(_mesh.Mesh_SetCurvature)

    def UniformRefinement(self, ref_algo=0):
        r"""UniformRefinement(Mesh self, int ref_algo=0)"""
        return _mesh.Mesh_UniformRefinement(self, ref_algo)
    UniformRefinement = _swig_new_instance_method(_mesh.Mesh_UniformRefinement)

    def GeneralRefinement(self, *args):
        r"""
        GeneralRefinement(Mesh self, RefinementArray refinements, int nonconforming=-1, int nc_limit=0)
        GeneralRefinement(Mesh self, intArray el_to_refine, int nonconforming=-1, int nc_limit=0)
        """
        return _mesh.Mesh_GeneralRefinement(self, *args)
    GeneralRefinement = _swig_new_instance_method(_mesh.Mesh_GeneralRefinement)

    def RandomRefinement(self, prob, aniso=False, nonconforming=-1, nc_limit=0):
        r"""RandomRefinement(Mesh self, double prob, bool aniso=False, int nonconforming=-1, int nc_limit=0)"""
        return _mesh.Mesh_RandomRefinement(self, prob, aniso, nonconforming, nc_limit)
    RandomRefinement = _swig_new_instance_method(_mesh.Mesh_RandomRefinement)

    def RefineAtVertex(self, vert, eps=0.0, nonconforming=-1):
        r"""RefineAtVertex(Mesh self, Vertex vert, double eps=0.0, int nonconforming=-1)"""
        return _mesh.Mesh_RefineAtVertex(self, vert, eps, nonconforming)
    RefineAtVertex = _swig_new_instance_method(_mesh.Mesh_RefineAtVertex)

    def RefineByError(self, *args):
        r"""
        RefineByError(Mesh self, doubleArray elem_error, double threshold, int nonconforming=-1, int nc_limit=0) -> bool
        RefineByError(Mesh self, Vector elem_error, double threshold, int nonconforming=-1, int nc_limit=0) -> bool
        """
        return _mesh.Mesh_RefineByError(self, *args)
    RefineByError = _swig_new_instance_method(_mesh.Mesh_RefineByError)

    def DerefineByError(self, *args):
        r"""
        DerefineByError(Mesh self, doubleArray elem_error, double threshold, int nc_limit=0, int op=1) -> bool
        DerefineByError(Mesh self, Vector elem_error, double threshold, int nc_limit=0, int op=1) -> bool
        """
        return _mesh.Mesh_DerefineByError(self, *args)
    DerefineByError = _swig_new_instance_method(_mesh.Mesh_DerefineByError)

    def KnotInsert(self, *args):
        r"""
        KnotInsert(Mesh self, mfem::Array< mfem::KnotVector * > & kv)
        KnotInsert(Mesh self, mfem::Array< mfem::Vector * > & kv)
        """
        return _mesh.Mesh_KnotInsert(self, *args)
    KnotInsert = _swig_new_instance_method(_mesh.Mesh_KnotInsert)

    def DegreeElevate(self, rel_degree, degree=16):
        r"""DegreeElevate(Mesh self, int rel_degree, int degree=16)"""
        return _mesh.Mesh_DegreeElevate(self, rel_degree, degree)
    DegreeElevate = _swig_new_instance_method(_mesh.Mesh_DegreeElevate)

    def EnsureNCMesh(self, simplices_nonconforming=False):
        r"""EnsureNCMesh(Mesh self, bool simplices_nonconforming=False)"""
        return _mesh.Mesh_EnsureNCMesh(self, simplices_nonconforming)
    EnsureNCMesh = _swig_new_instance_method(_mesh.Mesh_EnsureNCMesh)

    def Conforming(self):
        r"""Conforming(Mesh self) -> bool"""
        return _mesh.Mesh_Conforming(self)
    Conforming = _swig_new_instance_method(_mesh.Mesh_Conforming)

    def Nonconforming(self):
        r"""Nonconforming(Mesh self) -> bool"""
        return _mesh.Mesh_Nonconforming(self)
    Nonconforming = _swig_new_instance_method(_mesh.Mesh_Nonconforming)

    def GetRefinementTransforms(self):
        r"""GetRefinementTransforms(Mesh self) -> CoarseFineTransformations"""
        return _mesh.Mesh_GetRefinementTransforms(self)
    GetRefinementTransforms = _swig_new_instance_method(_mesh.Mesh_GetRefinementTransforms)

    def GetLastOperation(self):
        r"""GetLastOperation(Mesh self) -> mfem::Mesh::Operation"""
        return _mesh.Mesh_GetLastOperation(self)
    GetLastOperation = _swig_new_instance_method(_mesh.Mesh_GetLastOperation)

    def GetSequence(self):
        r"""GetSequence(Mesh self) -> long"""
        return _mesh.Mesh_GetSequence(self)
    GetSequence = _swig_new_instance_method(_mesh.Mesh_GetSequence)

    def PrintVTU(self, *args):
        r"""
        PrintVTU(Mesh self, std::ostream & out, int ref=1, mfem::VTKFormat format=ASCII, bool high_order_output=False, int compression_level=0, bool bdr_elements=False)
        PrintVTU(Mesh self, std::string fname, mfem::VTKFormat format=ASCII, bool high_order_output=False, int compression_level=0, bool bdr=False)
        """
        return _mesh.Mesh_PrintVTU(self, *args)
    PrintVTU = _swig_new_instance_method(_mesh.Mesh_PrintVTU)

    def PrintBdrVTU(self, *args, **kwargs):
        r"""PrintBdrVTU(Mesh self, std::string fname, mfem::VTKFormat format=ASCII, bool high_order_output=False, int compression_level=0)"""
        return _mesh.Mesh_PrintBdrVTU(self, *args, **kwargs)
    PrintBdrVTU = _swig_new_instance_method(_mesh.Mesh_PrintBdrVTU)

    def GetElementColoring(self, colors, el0=0):
        r"""GetElementColoring(Mesh self, intArray colors, int el0=0)"""
        return _mesh.Mesh_GetElementColoring(self, colors, el0)
    GetElementColoring = _swig_new_instance_method(_mesh.Mesh_GetElementColoring)

    def PrintWithPartitioning(self, partitioning, out, elem_attr=0):
        r"""PrintWithPartitioning(Mesh self, int * partitioning, std::ostream & out, int elem_attr=0)"""
        return _mesh.Mesh_PrintWithPartitioning(self, partitioning, out, elem_attr)
    PrintWithPartitioning = _swig_new_instance_method(_mesh.Mesh_PrintWithPartitioning)

    def PrintElementsWithPartitioning(self, partitioning, out, interior_faces=0):
        r"""PrintElementsWithPartitioning(Mesh self, int * partitioning, std::ostream & out, int interior_faces=0)"""
        return _mesh.Mesh_PrintElementsWithPartitioning(self, partitioning, out, interior_faces)
    PrintElementsWithPartitioning = _swig_new_instance_method(_mesh.Mesh_PrintElementsWithPartitioning)

    def PrintSurfaces(self, Aface_face, out):
        r"""PrintSurfaces(Mesh self, Table Aface_face, std::ostream & out)"""
        return _mesh.Mesh_PrintSurfaces(self, Aface_face, out)
    PrintSurfaces = _swig_new_instance_method(_mesh.Mesh_PrintSurfaces)

    def ScaleSubdomains(self, sf):
        r"""ScaleSubdomains(Mesh self, double sf)"""
        return _mesh.Mesh_ScaleSubdomains(self, sf)
    ScaleSubdomains = _swig_new_instance_method(_mesh.Mesh_ScaleSubdomains)

    def ScaleElements(self, sf):
        r"""ScaleElements(Mesh self, double sf)"""
        return _mesh.Mesh_ScaleElements(self, sf)
    ScaleElements = _swig_new_instance_method(_mesh.Mesh_ScaleElements)

    def Transform(self, *args):
        r"""
        Transform(Mesh self, void (*)(mfem::Vector const &,mfem::Vector &) f)
        Transform(Mesh self, VectorCoefficient deformation)
        """
        return _mesh.Mesh_Transform(self, *args)
    Transform = _swig_new_instance_method(_mesh.Mesh_Transform)

    def RemoveUnusedVertices(self):
        r"""RemoveUnusedVertices(Mesh self)"""
        return _mesh.Mesh_RemoveUnusedVertices(self)
    RemoveUnusedVertices = _swig_new_instance_method(_mesh.Mesh_RemoveUnusedVertices)

    def RemoveInternalBoundaries(self):
        r"""RemoveInternalBoundaries(Mesh self)"""
        return _mesh.Mesh_RemoveInternalBoundaries(self)
    RemoveInternalBoundaries = _swig_new_instance_method(_mesh.Mesh_RemoveInternalBoundaries)

    def GetElementSize(self, *args):
        r"""
        GetElementSize(Mesh self, int i, int type=0) -> double
        GetElementSize(Mesh self, int i, Vector dir) -> double
        """
        return _mesh.Mesh_GetElementSize(self, *args)
    GetElementSize = _swig_new_instance_method(_mesh.Mesh_GetElementSize)

    def GetElementVolume(self, i):
        r"""GetElementVolume(Mesh self, int i) -> double"""
        return _mesh.Mesh_GetElementVolume(self, i)
    GetElementVolume = _swig_new_instance_method(_mesh.Mesh_GetElementVolume)

    def GetElementCenter(self, i, center):
        r"""GetElementCenter(Mesh self, int i, Vector center)"""
        return _mesh.Mesh_GetElementCenter(self, i, center)
    GetElementCenter = _swig_new_instance_method(_mesh.Mesh_GetElementCenter)

    def GetBoundingBox(self, ref = 2):
        from  .vector import Vector
        min = Vector()
        max = Vector()      
        _mesh.Mesh_GetBoundingBox(self, min, max, ref)      
        return min.GetDataArray().copy(), max.GetDataArray().copy()



    def GetCharacteristics(self, h_min, h_max, kappa_min, kappa_max, Vh=None, Vk=None):
        r"""GetCharacteristics(Mesh self, double & h_min, double & h_max, double & kappa_min, double & kappa_max, Vector Vh=None, Vector Vk=None)"""
        return _mesh.Mesh_GetCharacteristics(self, h_min, h_max, kappa_min, kappa_max, Vh, Vk)
    GetCharacteristics = _swig_new_instance_method(_mesh.Mesh_GetCharacteristics)

    @staticmethod
    def PrintElementsByGeometry(dim, num_elems_by_geom, out):
        r"""PrintElementsByGeometry(int dim, intArray num_elems_by_geom, std::ostream & out)"""
        return _mesh.Mesh_PrintElementsByGeometry(dim, num_elems_by_geom, out)
    PrintElementsByGeometry = _swig_new_static_method(_mesh.Mesh_PrintElementsByGeometry)

    def PrintCharacteristics(self, *args, **kwargs):
        r"""PrintCharacteristics(Mesh self, Vector Vh=None, Vector Vk=None, std::ostream & out=out)"""
        return _mesh.Mesh_PrintCharacteristics(self, *args, **kwargs)
    PrintCharacteristics = _swig_new_instance_method(_mesh.Mesh_PrintCharacteristics)

    def FindPoints(self, pp, warn=True, inv_trans=None):          
        r"""count, element_id, integration_points = FindPoints(points, warn=True, inv_trans=None)"""
        import numpy as np
        import mfem.ser as mfem      

        pp = np.array(pp, copy=False, dtype=float).transpose()      
        M = mfem.DenseMatrix(pp.shape[0], pp.shape[1])
        M.Assign(pp)
        elem_ids = mfem.intArray()
        int_points = mfem.IntegrationPointArray()
        count = _mesh.Mesh_FindPoints(self, M, elem_ids, int_points, warn, inv_trans)
        elem_ids = elem_ids.ToList()
        return count, elem_ids, int_points


    __swig_destroy__ = _mesh.delete_Mesh

    def __init__(self, *args):
        r"""
        __init__(Mesh self) -> Mesh
        __init__(Mesh self, Mesh mesh, bool copy_nodes=True) -> Mesh
        __init__(Mesh self, double * vertices, int num_vertices, int * element_indices, mfem::Geometry::Type element_type, int * element_attributes, int num_elements, int * boundary_indices, mfem::Geometry::Type boundary_type, int * boundary_attributes, int num_boundary_elements, int dimension, int space_dimension=-1) -> Mesh
        __init__(Mesh self, int _Dim, int NVert, int NElem, int NBdrElem=0, int _spaceDim=-1) -> Mesh
        __init__(Mesh self, int nx, int ny, int nz, mfem::Element::Type type, bool generate_edges=False, double sx=1.0, double sy=1.0, double sz=1.0, bool sfc_ordering=True) -> Mesh
        __init__(Mesh self, int nx, int ny, mfem::Element::Type type, bool generate_edges=False, double sx=1.0, double sy=1.0, bool sfc_ordering=True) -> Mesh
        __init__(Mesh self, int n, double sx=1.0) -> Mesh
        __init__(Mesh self, char const * filename, int generate_edges=0, int refine=1, bool fix_orientation=True) -> Mesh
        __init__(Mesh self, std::istream & input, int generate_edges=0, int refine=1, bool fix_orientation=True) -> Mesh
        __init__(Mesh self, mfem::Mesh *[] mesh_array, int num_pieces) -> Mesh
        __init__(Mesh self, Mesh orig_mesh, int ref_factor, int ref_type) -> Mesh
        __init__(Mesh self, int nx, int ny, int nz, char const * type, bool generate_edges=False, double sx=1.0, double sy=1.0, double sz=1.0, bool sfc_ordering=True) -> Mesh
        __init__(Mesh self, int nx, int ny, char const * type, bool generate_edges=False, double sx=1.0, double sy=1.0, bool sfc_ordering=True) -> Mesh
        """
        _mesh.Mesh_swiginit(self, _mesh.new_Mesh(*args))

    def PrintToFile(self, mesh_file, precision):
        r"""PrintToFile(Mesh self, char const * mesh_file, int const precision)"""
        return _mesh.Mesh_PrintToFile(self, mesh_file, precision)
    PrintToFile = _swig_new_instance_method(_mesh.Mesh_PrintToFile)

    def WriteToStream(self, StringIO):
        r"""WriteToStream(Mesh self, PyObject * StringIO) -> PyObject *"""
        return _mesh.Mesh_WriteToStream(self, StringIO)
    WriteToStream = _swig_new_instance_method(_mesh.Mesh_WriteToStream)

    def GetAttributeArray(self):
        r"""GetAttributeArray(Mesh self) -> PyObject *"""
        return _mesh.Mesh_GetAttributeArray(self)
    GetAttributeArray = _swig_new_instance_method(_mesh.Mesh_GetAttributeArray)

    def GetVertexArray(self, *args):
        r"""
        GetVertexArray(Mesh self, int i) -> PyObject
        GetVertexArray(Mesh self) -> PyObject *
        """
        return _mesh.Mesh_GetVertexArray(self, *args)
    GetVertexArray = _swig_new_instance_method(_mesh.Mesh_GetVertexArray)

    def GetBdrElementFace(self, *args):
        r"""
        GetBdrElementFace(Mesh self, int i, int * arg3, int * arg4)
        GetBdrElementFace(Mesh self, int i) -> PyObject *
        """
        return _mesh.Mesh_GetBdrElementFace(self, *args)
    GetBdrElementFace = _swig_new_instance_method(_mesh.Mesh_GetBdrElementFace)

    def GetBdrAttributeArray(self):
        r"""GetBdrAttributeArray(Mesh self) -> PyObject *"""
        return _mesh.Mesh_GetBdrAttributeArray(self)
    GetBdrAttributeArray = _swig_new_instance_method(_mesh.Mesh_GetBdrAttributeArray)

    def GetBdrArray(self, idx):
        r"""GetBdrArray(Mesh self, int idx) -> PyObject *"""
        return _mesh.Mesh_GetBdrArray(self, idx)
    GetBdrArray = _swig_new_instance_method(_mesh.Mesh_GetBdrArray)

    def GetDomainArray(self, idx):
        r"""GetDomainArray(Mesh self, int idx) -> PyObject *"""
        return _mesh.Mesh_GetDomainArray(self, idx)
    GetDomainArray = _swig_new_instance_method(_mesh.Mesh_GetDomainArray)

    def GetElementCenterArray(self, idx):
        r"""GetElementCenterArray(Mesh self, int idx) -> PyObject *"""
        return _mesh.Mesh_GetElementCenterArray(self, idx)
    GetElementCenterArray = _swig_new_instance_method(_mesh.Mesh_GetElementCenterArray)

    def GetScaledJacobian(self, i, sd=2):
        r"""GetScaledJacobian(Mesh self, int i, int sd=2) -> double"""
        return _mesh.Mesh_GetScaledJacobian(self, i, sd)
    GetScaledJacobian = _swig_new_instance_method(_mesh.Mesh_GetScaledJacobian)

    def PrintInfo(self, *args):
        r"""
        PrintInfo(Mesh self, std::ostream & out=out)
        PrintInfo(Mesh self, char const * file, int precision=8)
        """
        return _mesh.Mesh_PrintInfo(self, *args)
    PrintInfo = _swig_new_instance_method(_mesh.Mesh_PrintInfo)

    def Print(self, *args):
        r"""
        Print(Mesh self, std::ostream & out=out)
        Print(Mesh self, char const * file, int precision=8)
        """
        return _mesh.Mesh_Print(self, *args)
    Print = _swig_new_instance_method(_mesh.Mesh_Print)

    def PrintXG(self, *args):
        r"""
        PrintXG(Mesh self, std::ostream & out=out)
        PrintXG(Mesh self, char const * file, int precision=8)
        """
        return _mesh.Mesh_PrintXG(self, *args)
    PrintXG = _swig_new_instance_method(_mesh.Mesh_PrintXG)

    def PrintVTK(self, *args):
        r"""
        PrintVTK(Mesh self, std::ostream & out)
        PrintVTK(Mesh self, std::ostream & out, int ref, int field_data=0)
        PrintVTK(Mesh self, char const * file, int precision=8)
        """
        return _mesh.Mesh_PrintVTK(self, *args)
    PrintVTK = _swig_new_instance_method(_mesh.Mesh_PrintVTK)

# Register Mesh in _mesh:
_mesh.Mesh_swigregister(Mesh)
cvar = _mesh.cvar

def Mesh_GetTransformationFEforElementType(arg1):
    r"""Mesh_GetTransformationFEforElementType(mfem::Element::Type arg1) -> FiniteElement"""
    return _mesh.Mesh_GetTransformationFEforElementType(arg1)
Mesh_GetTransformationFEforElementType = _mesh.Mesh_GetTransformationFEforElementType

def Mesh_PrintElementsByGeometry(dim, num_elems_by_geom, out):
    r"""Mesh_PrintElementsByGeometry(int dim, intArray num_elems_by_geom, std::ostream & out)"""
    return _mesh.Mesh_PrintElementsByGeometry(dim, num_elems_by_geom, out)
Mesh_PrintElementsByGeometry = _mesh.Mesh_PrintElementsByGeometry


def __lshift__(*args):
    r"""
    __lshift__(std::ostream & os, SparseMatrix mat) -> std::ostream
    __lshift__(std::ostream & out, GridFunction sol) -> std::ostream
    __lshift__(std::ostream & out, QuadratureFunction qf) -> std::ostream
    __lshift__(std::ostream & out, Mesh mesh) -> std::ostream &
    """
    return _mesh.__lshift__(*args)
__lshift__ = _mesh.__lshift__
class GeometricFactors(object):
    r"""Proxy of C++ mfem::GeometricFactors class."""

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    mesh = property(_mesh.GeometricFactors_mesh_get, _mesh.GeometricFactors_mesh_set, doc=r"""mesh : p.q(const).mfem::Mesh""")
    IntRule = property(_mesh.GeometricFactors_IntRule_get, _mesh.GeometricFactors_IntRule_set, doc=r"""IntRule : p.q(const).mfem::IntegrationRule""")
    computed_factors = property(_mesh.GeometricFactors_computed_factors_get, _mesh.GeometricFactors_computed_factors_set, doc=r"""computed_factors : int""")
    COORDINATES = _mesh.GeometricFactors_COORDINATES
    
    JACOBIANS = _mesh.GeometricFactors_JACOBIANS
    
    DETERMINANTS = _mesh.GeometricFactors_DETERMINANTS
    

    def __init__(self, mesh, ir, flags):
        r"""__init__(GeometricFactors self, Mesh mesh, IntegrationRule ir, int flags) -> GeometricFactors"""
        _mesh.GeometricFactors_swiginit(self, _mesh.new_GeometricFactors(mesh, ir, flags))
    X = property(_mesh.GeometricFactors_X_get, _mesh.GeometricFactors_X_set, doc=r"""X : mfem::Vector""")
    J = property(_mesh.GeometricFactors_J_get, _mesh.GeometricFactors_J_set, doc=r"""J : mfem::Vector""")
    detJ = property(_mesh.GeometricFactors_detJ_get, _mesh.GeometricFactors_detJ_set, doc=r"""detJ : mfem::Vector""")
    __swig_destroy__ = _mesh.delete_GeometricFactors

# Register GeometricFactors in _mesh:
_mesh.GeometricFactors_swigregister(GeometricFactors)

class FaceGeometricFactors(object):
    r"""Proxy of C++ mfem::FaceGeometricFactors class."""

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    mesh = property(_mesh.FaceGeometricFactors_mesh_get, _mesh.FaceGeometricFactors_mesh_set, doc=r"""mesh : p.q(const).mfem::Mesh""")
    IntRule = property(_mesh.FaceGeometricFactors_IntRule_get, _mesh.FaceGeometricFactors_IntRule_set, doc=r"""IntRule : p.q(const).mfem::IntegrationRule""")
    computed_factors = property(_mesh.FaceGeometricFactors_computed_factors_get, _mesh.FaceGeometricFactors_computed_factors_set, doc=r"""computed_factors : int""")
    type = property(_mesh.FaceGeometricFactors_type_get, _mesh.FaceGeometricFactors_type_set, doc=r"""type : mfem::FaceType""")
    COORDINATES = _mesh.FaceGeometricFactors_COORDINATES
    
    JACOBIANS = _mesh.FaceGeometricFactors_JACOBIANS
    
    DETERMINANTS = _mesh.FaceGeometricFactors_DETERMINANTS
    
    NORMALS = _mesh.FaceGeometricFactors_NORMALS
    

    def __init__(self, mesh, ir, flags, type):
        r"""__init__(FaceGeometricFactors self, Mesh mesh, IntegrationRule ir, int flags, mfem::FaceType type) -> FaceGeometricFactors"""
        _mesh.FaceGeometricFactors_swiginit(self, _mesh.new_FaceGeometricFactors(mesh, ir, flags, type))
    X = property(_mesh.FaceGeometricFactors_X_get, _mesh.FaceGeometricFactors_X_set, doc=r"""X : mfem::Vector""")
    J = property(_mesh.FaceGeometricFactors_J_get, _mesh.FaceGeometricFactors_J_set, doc=r"""J : mfem::Vector""")
    detJ = property(_mesh.FaceGeometricFactors_detJ_get, _mesh.FaceGeometricFactors_detJ_set, doc=r"""detJ : mfem::Vector""")
    normal = property(_mesh.FaceGeometricFactors_normal_get, _mesh.FaceGeometricFactors_normal_set, doc=r"""normal : mfem::Vector""")
    __swig_destroy__ = _mesh.delete_FaceGeometricFactors

# Register FaceGeometricFactors in _mesh:
_mesh.FaceGeometricFactors_swigregister(FaceGeometricFactors)

class NodeExtrudeCoefficient(mfem._ser.coefficient.VectorCoefficient):
    r"""Proxy of C++ mfem::NodeExtrudeCoefficient class."""

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr

    def SetLayer(self, l):
        r"""SetLayer(NodeExtrudeCoefficient self, int const l)"""
        return _mesh.NodeExtrudeCoefficient_SetLayer(self, l)
    SetLayer = _swig_new_instance_method(_mesh.NodeExtrudeCoefficient_SetLayer)

    def Eval(self, *args):
        r"""
        Eval(NodeExtrudeCoefficient self, Vector V, ElementTransformation T, IntegrationPoint ip)
        Eval(NodeExtrudeCoefficient self, DenseMatrix M, ElementTransformation T, IntegrationRule ir)
        Eval(NodeExtrudeCoefficient self, Vector V, ElementTransformation T, IntegrationPoint ip)
        """
        return _mesh.NodeExtrudeCoefficient_Eval(self, *args)
    Eval = _swig_new_instance_method(_mesh.NodeExtrudeCoefficient_Eval)
    __swig_destroy__ = _mesh.delete_NodeExtrudeCoefficient

# Register NodeExtrudeCoefficient in _mesh:
_mesh.NodeExtrudeCoefficient_swigregister(NodeExtrudeCoefficient)


def Extrude1D(mesh, ny, sy, closed=False):
    r"""Extrude1D(Mesh mesh, int const ny, double const sy, bool const closed=False) -> Mesh"""
    return _mesh.Extrude1D(mesh, ny, sy, closed)
Extrude1D = _mesh.Extrude1D

def Extrude2D(mesh, nz, sz):
    r"""Extrude2D(Mesh mesh, int const nz, double const sz) -> Mesh"""
    return _mesh.Extrude2D(mesh, nz, sz)
Extrude2D = _mesh.Extrude2D

def ShiftRight(a, b, c):
    r"""ShiftRight(int & a, int & b, int & c)"""
    return _mesh.ShiftRight(a, b, c)
ShiftRight = _mesh.ShiftRight


