# This file was automatically generated by SWIG (http://www.swig.org).
# Version 4.0.2
#
# 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 _pncmesh
else:
    import _pncmesh

try:
    import builtins as __builtin__
except ImportError:
    import __builtin__

_swig_new_instance_method = _pncmesh.SWIG_PyInstanceMethod_New
_swig_new_static_method = _pncmesh.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

MFEM_VERSION = _pncmesh.MFEM_VERSION

MFEM_VERSION_STRING = _pncmesh.MFEM_VERSION_STRING

MFEM_VERSION_TYPE = _pncmesh.MFEM_VERSION_TYPE

MFEM_VERSION_TYPE_RELEASE = _pncmesh.MFEM_VERSION_TYPE_RELEASE

MFEM_VERSION_TYPE_DEVELOPMENT = _pncmesh.MFEM_VERSION_TYPE_DEVELOPMENT

MFEM_VERSION_MAJOR = _pncmesh.MFEM_VERSION_MAJOR

MFEM_VERSION_MINOR = _pncmesh.MFEM_VERSION_MINOR

MFEM_VERSION_PATCH = _pncmesh.MFEM_VERSION_PATCH

MFEM_HYPRE_VERSION = _pncmesh.MFEM_HYPRE_VERSION

import mfem._par.mesh
import mfem._par.matrix
import mfem._par.vector
import mfem._par.array
import mfem._par.mem_manager
import mfem._par.operators
import mfem._par.sort_pairs
import mfem._par.ncmesh
import mfem._par.globals
import mfem._par.vtk
import mfem._par.element
import mfem._par.densemat
import mfem._par.geom
import mfem._par.intrules
import mfem._par.table
import mfem._par.hash
import mfem._par.vertex
import mfem._par.gridfunc
import mfem._par.coefficient
import mfem._par.symmat
import mfem._par.sparsemat
import mfem._par.eltrans
import mfem._par.fe
import mfem._par.fe_base
import mfem._par.fe_fixed_order
import mfem._par.fe_h1
import mfem._par.fe_nd
import mfem._par.fe_rt
import mfem._par.fe_l2
import mfem._par.fe_nurbs
import mfem._par.fe_pos
import mfem._par.fe_ser
import mfem._par.fespace
import mfem._par.fe_coll
import mfem._par.lininteg
import mfem._par.doftrans
import mfem._par.handle
import mfem._par.hypre
import mfem._par.restriction
import mfem._par.bilininteg
import mfem._par.linearform
import mfem._par.nonlininteg
import mfem._par.communication
import mfem._par.sets
class ParNCMesh(mfem._par.ncmesh.NCMesh):
    r"""Proxy of C++ mfem::ParNCMesh class."""

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

    def __init__(self, *args):
        r"""
        __init__(ParNCMesh self, MPI_Comm comm, NCMesh ncmesh, int * part=None) -> ParNCMesh
        __init__(ParNCMesh self, MPI_Comm comm, std::istream & input, int version, int & curved, int & is_nc) -> ParNCMesh
        __init__(ParNCMesh self, ParNCMesh other) -> ParNCMesh
        """
        _pncmesh.ParNCMesh_swiginit(self, _pncmesh.new_ParNCMesh(*args))
    __swig_destroy__ = _pncmesh.delete_ParNCMesh

    def Refine(self, refinements):
        r"""Refine(ParNCMesh self, RefinementArray refinements)"""
        return _pncmesh.ParNCMesh_Refine(self, refinements)
    Refine = _swig_new_instance_method(_pncmesh.ParNCMesh_Refine)

    def LimitNCLevel(self, max_nc_level):
        r"""LimitNCLevel(ParNCMesh self, int max_nc_level)"""
        return _pncmesh.ParNCMesh_LimitNCLevel(self, max_nc_level)
    LimitNCLevel = _swig_new_instance_method(_pncmesh.ParNCMesh_LimitNCLevel)

    def CheckDerefinementNCLevel(self, deref_table, level_ok, max_nc_level):
        r"""CheckDerefinementNCLevel(ParNCMesh self, Table deref_table, intArray level_ok, int max_nc_level)"""
        return _pncmesh.ParNCMesh_CheckDerefinementNCLevel(self, deref_table, level_ok, max_nc_level)
    CheckDerefinementNCLevel = _swig_new_instance_method(_pncmesh.ParNCMesh_CheckDerefinementNCLevel)

    def Derefine(self, derefs):
        r"""Derefine(ParNCMesh self, intArray derefs)"""
        return _pncmesh.ParNCMesh_Derefine(self, derefs)
    Derefine = _swig_new_instance_method(_pncmesh.ParNCMesh_Derefine)

    def GetFineToCoarsePartitioning(self, derefs, new_ranks):
        r"""GetFineToCoarsePartitioning(ParNCMesh self, intArray derefs, intArray new_ranks)"""
        return _pncmesh.ParNCMesh_GetFineToCoarsePartitioning(self, derefs, new_ranks)
    GetFineToCoarsePartitioning = _swig_new_instance_method(_pncmesh.ParNCMesh_GetFineToCoarsePartitioning)

    def Rebalance(self, custom_partition=None):
        r"""Rebalance(ParNCMesh self, intArray custom_partition=None)"""
        return _pncmesh.ParNCMesh_Rebalance(self, custom_partition)
    Rebalance = _swig_new_instance_method(_pncmesh.ParNCMesh_Rebalance)

    def GetNElements(self):
        r"""GetNElements(ParNCMesh self) -> int"""
        return _pncmesh.ParNCMesh_GetNElements(self)
    GetNElements = _swig_new_instance_method(_pncmesh.ParNCMesh_GetNElements)

    def GetNGhostVertices(self):
        r"""GetNGhostVertices(ParNCMesh self) -> int"""
        return _pncmesh.ParNCMesh_GetNGhostVertices(self)
    GetNGhostVertices = _swig_new_instance_method(_pncmesh.ParNCMesh_GetNGhostVertices)

    def GetNGhostEdges(self):
        r"""GetNGhostEdges(ParNCMesh self) -> int"""
        return _pncmesh.ParNCMesh_GetNGhostEdges(self)
    GetNGhostEdges = _swig_new_instance_method(_pncmesh.ParNCMesh_GetNGhostEdges)

    def GetNGhostFaces(self):
        r"""GetNGhostFaces(ParNCMesh self) -> int"""
        return _pncmesh.ParNCMesh_GetNGhostFaces(self)
    GetNGhostFaces = _swig_new_instance_method(_pncmesh.ParNCMesh_GetNGhostFaces)

    def GetNGhostElements(self):
        r"""GetNGhostElements(ParNCMesh self) -> int"""
        return _pncmesh.ParNCMesh_GetNGhostElements(self)
    GetNGhostElements = _swig_new_instance_method(_pncmesh.ParNCMesh_GetNGhostElements)

    def GetSharedVertices(self):
        r"""GetSharedVertices(ParNCMesh self) -> mfem::NCMesh::NCList const &"""
        return _pncmesh.ParNCMesh_GetSharedVertices(self)
    GetSharedVertices = _swig_new_instance_method(_pncmesh.ParNCMesh_GetSharedVertices)

    def GetSharedEdges(self):
        r"""GetSharedEdges(ParNCMesh self) -> mfem::NCMesh::NCList const &"""
        return _pncmesh.ParNCMesh_GetSharedEdges(self)
    GetSharedEdges = _swig_new_instance_method(_pncmesh.ParNCMesh_GetSharedEdges)

    def GetSharedFaces(self):
        r"""GetSharedFaces(ParNCMesh self) -> mfem::NCMesh::NCList const &"""
        return _pncmesh.ParNCMesh_GetSharedFaces(self)
    GetSharedFaces = _swig_new_instance_method(_pncmesh.ParNCMesh_GetSharedFaces)

    def GetSharedList(self, entity):
        r"""GetSharedList(ParNCMesh self, int entity) -> mfem::NCMesh::NCList const &"""
        return _pncmesh.ParNCMesh_GetSharedList(self, entity)
    GetSharedList = _swig_new_instance_method(_pncmesh.ParNCMesh_GetSharedList)

    def GetFaceOrientation(self, index):
        r"""GetFaceOrientation(ParNCMesh self, int index) -> int"""
        return _pncmesh.ParNCMesh_GetFaceOrientation(self, index)
    GetFaceOrientation = _swig_new_instance_method(_pncmesh.ParNCMesh_GetFaceOrientation)

    def GetEntityOwnerId(self, entity, index):
        r"""GetEntityOwnerId(ParNCMesh self, int entity, int index) -> mfem::ParNCMesh::GroupId"""
        return _pncmesh.ParNCMesh_GetEntityOwnerId(self, entity, index)
    GetEntityOwnerId = _swig_new_instance_method(_pncmesh.ParNCMesh_GetEntityOwnerId)

    def GetEntityGroupId(self, entity, index):
        r"""GetEntityGroupId(ParNCMesh self, int entity, int index) -> mfem::ParNCMesh::GroupId"""
        return _pncmesh.ParNCMesh_GetEntityGroupId(self, entity, index)
    GetEntityGroupId = _swig_new_instance_method(_pncmesh.ParNCMesh_GetEntityGroupId)

    def GetGroup(self, id):
        r"""GetGroup(ParNCMesh self, mfem::ParNCMesh::GroupId id) -> vector_int"""
        return _pncmesh.ParNCMesh_GetGroup(self, id)
    GetGroup = _swig_new_instance_method(_pncmesh.ParNCMesh_GetGroup)

    def GroupContains(self, id, rank):
        r"""GroupContains(ParNCMesh self, mfem::ParNCMesh::GroupId id, int rank) -> bool"""
        return _pncmesh.ParNCMesh_GroupContains(self, id, rank)
    GroupContains = _swig_new_instance_method(_pncmesh.ParNCMesh_GroupContains)

    def IsGhost(self, entity, index):
        r"""IsGhost(ParNCMesh self, int entity, int index) -> bool"""
        return _pncmesh.ParNCMesh_IsGhost(self, entity, index)
    IsGhost = _swig_new_instance_method(_pncmesh.ParNCMesh_IsGhost)

    def ElementRank(self, index):
        r"""ElementRank(ParNCMesh self, int index) -> int"""
        return _pncmesh.ParNCMesh_ElementRank(self, index)
    ElementRank = _swig_new_instance_method(_pncmesh.ParNCMesh_ElementRank)

    def GetMyRank(self):
        r"""GetMyRank(ParNCMesh self) -> int"""
        return _pncmesh.ParNCMesh_GetMyRank(self)
    GetMyRank = _swig_new_instance_method(_pncmesh.ParNCMesh_GetMyRank)

    def SendRebalanceDofs(self, old_ndofs, old_element_dofs, old_global_offset, space):
        r"""SendRebalanceDofs(ParNCMesh self, int old_ndofs, Table old_element_dofs, long old_global_offset, FiniteElementSpace space)"""
        return _pncmesh.ParNCMesh_SendRebalanceDofs(self, old_ndofs, old_element_dofs, old_global_offset, space)
    SendRebalanceDofs = _swig_new_instance_method(_pncmesh.ParNCMesh_SendRebalanceDofs)

    def RecvRebalanceDofs(self, elements, dofs):
        r"""RecvRebalanceDofs(ParNCMesh self, intArray elements, mfem::Array< long > & dofs)"""
        return _pncmesh.ParNCMesh_RecvRebalanceDofs(self, elements, dofs)
    RecvRebalanceDofs = _swig_new_instance_method(_pncmesh.ParNCMesh_RecvRebalanceDofs)

    def GetRebalanceOldIndex(self):
        r"""GetRebalanceOldIndex(ParNCMesh self) -> intArray"""
        return _pncmesh.ParNCMesh_GetRebalanceOldIndex(self)
    GetRebalanceOldIndex = _swig_new_instance_method(_pncmesh.ParNCMesh_GetRebalanceOldIndex)

    def GetDerefineOldRanks(self):
        r"""GetDerefineOldRanks(ParNCMesh self) -> intArray"""
        return _pncmesh.ParNCMesh_GetDerefineOldRanks(self)
    GetDerefineOldRanks = _swig_new_instance_method(_pncmesh.ParNCMesh_GetDerefineOldRanks)

    def GetBoundaryClosure(self, bdr_attr_is_ess, bdr_vertices, bdr_edges):
        r"""GetBoundaryClosure(ParNCMesh self, intArray bdr_attr_is_ess, intArray bdr_vertices, intArray bdr_edges)"""
        return _pncmesh.ParNCMesh_GetBoundaryClosure(self, bdr_attr_is_ess, bdr_vertices, bdr_edges)
    GetBoundaryClosure = _swig_new_instance_method(_pncmesh.ParNCMesh_GetBoundaryClosure)

    def Trim(self):
        r"""Trim(ParNCMesh self)"""
        return _pncmesh.ParNCMesh_Trim(self)
    Trim = _swig_new_instance_method(_pncmesh.ParNCMesh_Trim)

    def MemoryUsage(self, with_base=True):
        r"""MemoryUsage(ParNCMesh self, bool with_base=True) -> long"""
        return _pncmesh.ParNCMesh_MemoryUsage(self, with_base)
    MemoryUsage = _swig_new_instance_method(_pncmesh.ParNCMesh_MemoryUsage)

    def PrintMemoryDetail(self, with_base=True):
        r"""PrintMemoryDetail(ParNCMesh self, bool with_base=True) -> int"""
        return _pncmesh.ParNCMesh_PrintMemoryDetail(self, with_base)
    PrintMemoryDetail = _swig_new_instance_method(_pncmesh.ParNCMesh_PrintMemoryDetail)

    def GetDebugMesh(self, debug_mesh):
        r"""GetDebugMesh(ParNCMesh self, Mesh debug_mesh)"""
        return _pncmesh.ParNCMesh_GetDebugMesh(self, debug_mesh)
    GetDebugMesh = _swig_new_instance_method(_pncmesh.ParNCMesh_GetDebugMesh)

# Register ParNCMesh in _pncmesh:
_pncmesh.ParNCMesh_swigregister(ParNCMesh)


def __lt__(a, b):
    r"""__lt__(mfem::NCMesh::MeshId const & a, mfem::NCMesh::MeshId const & b) -> bool"""
    return _pncmesh.__lt__(a, b)
__lt__ = _pncmesh.__lt__

def __eq__(a, b):
    r"""__eq__(mfem::NCMesh::MeshId const & a, mfem::NCMesh::MeshId const & b) -> bool"""
    return _pncmesh.__eq__(a, b)
__eq__ = _pncmesh.__eq__


