# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.12
#
# 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):
    def swig_import_helper():
        import importlib
        pkg = __name__.rpartition('.')[0]
        mname = '.'.join((pkg, '_strumpack')).lstrip('.')
        try:
            return importlib.import_module(mname)
        except ImportError:
            return importlib.import_module('_strumpack')
    _strumpack = swig_import_helper()
    del swig_import_helper
elif _swig_python_version_info >= (2, 6, 0):
    def swig_import_helper():
        from os.path import dirname
        import imp
        fp = None
        try:
            fp, pathname, description = imp.find_module('_strumpack', [dirname(__file__)])
        except ImportError:
            import _strumpack
            return _strumpack
        try:
            _mod = imp.load_module('_strumpack', fp, pathname, description)
        finally:
            if fp is not None:
                fp.close()
        return _mod
    _strumpack = swig_import_helper()
    del swig_import_helper
else:
    import _strumpack
del _swig_python_version_info

try:
    _swig_property = property
except NameError:
    pass  # Python < 2.2 doesn't have 'property'.

try:
    import builtins as __builtin__
except ImportError:
    import __builtin__

def _swig_setattr_nondynamic(self, class_type, name, value, static=1):
    if (name == "thisown"):
        return self.this.own(value)
    if (name == "this"):
        if type(value).__name__ == 'SwigPyObject':
            self.__dict__[name] = value
            return
    method = class_type.__swig_setmethods__.get(name, None)
    if method:
        return method(self, value)
    if (not static):
        if _newclass:
            object.__setattr__(self, name, value)
        else:
            self.__dict__[name] = value
    else:
        raise AttributeError("You cannot add attributes to %s" % self)


def _swig_setattr(self, class_type, name, value):
    return _swig_setattr_nondynamic(self, class_type, name, value, 0)


def _swig_getattr(self, class_type, name):
    if (name == "thisown"):
        return self.this.own()
    method = class_type.__swig_getmethods__.get(name, None)
    if method:
        return method(self)
    raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name))


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,)

try:
    _object = object
    _newclass = 1
except __builtin__.Exception:
    class _object:
        pass
    _newclass = 0

try:
    import weakref
    weakref_proxy = weakref.proxy
except __builtin__.Exception:
    weakref_proxy = lambda x: x


MFEM_VERSION = _strumpack.MFEM_VERSION
MFEM_VERSION_STRING = _strumpack.MFEM_VERSION_STRING
MFEM_VERSION_TYPE = _strumpack.MFEM_VERSION_TYPE
MFEM_VERSION_TYPE_RELEASE = _strumpack.MFEM_VERSION_TYPE_RELEASE
MFEM_VERSION_TYPE_DEVELOPMENT = _strumpack.MFEM_VERSION_TYPE_DEVELOPMENT
MFEM_VERSION_MAJOR = _strumpack.MFEM_VERSION_MAJOR
MFEM_VERSION_MINOR = _strumpack.MFEM_VERSION_MINOR
MFEM_VERSION_PATCH = _strumpack.MFEM_VERSION_PATCH
MFEM_TIMER_TYPE = _strumpack.MFEM_TIMER_TYPE
MFEM_HYPRE_VERSION = _strumpack.MFEM_HYPRE_VERSION
class intp(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, intp, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, intp, name)
    __repr__ = _swig_repr

    def __init__(self):
        this = _strumpack.new_intp()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _strumpack.delete_intp
    __del__ = lambda self: None

    def assign(self, value):
        return _strumpack.intp_assign(self, value)

    def value(self):
        return _strumpack.intp_value(self)

    def cast(self):
        return _strumpack.intp_cast(self)
    if _newclass:
        frompointer = staticmethod(_strumpack.intp_frompointer)
    else:
        frompointer = _strumpack.intp_frompointer
intp_swigregister = _strumpack.intp_swigregister
intp_swigregister(intp)

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

class doublep(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, doublep, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, doublep, name)
    __repr__ = _swig_repr

    def __init__(self):
        this = _strumpack.new_doublep()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _strumpack.delete_doublep
    __del__ = lambda self: None

    def assign(self, value):
        return _strumpack.doublep_assign(self, value)

    def value(self):
        return _strumpack.doublep_value(self)

    def cast(self):
        return _strumpack.doublep_cast(self)
    if _newclass:
        frompointer = staticmethod(_strumpack.doublep_frompointer)
    else:
        frompointer = _strumpack.doublep_frompointer
doublep_swigregister = _strumpack.doublep_swigregister
doublep_swigregister(doublep)

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

import ostream_typemap
import operators
import vector
import array
import hypre
import sparsemat
import matrix
import densemat
import fespace
import coefficient
import intrules
import eltrans
import fe
import mesh
import ncmesh
import element
import geom
import table
import vertex
import gridfunc
import bilininteg
import fe_coll
import lininteg
import linearform
import handle
import communication
import sets

def argv_obj(input):
    """argv_obj(PyObject * input) -> char **"""
    return _strumpack.argv_obj(input)
ReorderingStrategy_NATURAL = _strumpack.ReorderingStrategy_NATURAL
ReorderingStrategy_METIS = _strumpack.ReorderingStrategy_METIS
ReorderingStrategy_PARMETIS = _strumpack.ReorderingStrategy_PARMETIS
ReorderingStrategy_SCOTCH = _strumpack.ReorderingStrategy_SCOTCH
ReorderingStrategy_PTSCOTCH = _strumpack.ReorderingStrategy_PTSCOTCH
ReorderingStrategy_RCM = _strumpack.ReorderingStrategy_RCM
ReorderingStrategy_GEOMETRIC = _strumpack.ReorderingStrategy_GEOMETRIC
MC64Job_NONE = _strumpack.MC64Job_NONE
MC64Job_MAX_CARDINALITY = _strumpack.MC64Job_MAX_CARDINALITY
MC64Job_MAX_SMALLEST_DIAGONAL = _strumpack.MC64Job_MAX_SMALLEST_DIAGONAL
MC64Job_MAX_SMALLEST_DIAGONAL_2 = _strumpack.MC64Job_MAX_SMALLEST_DIAGONAL_2
MC64Job_MAX_DIAGONAL_SUM = _strumpack.MC64Job_MAX_DIAGONAL_SUM
MC64Job_MAX_DIAGONAL_PRODUCT_SCALING = _strumpack.MC64Job_MAX_DIAGONAL_PRODUCT_SCALING

def MC64_job_number(job):
    """MC64_job_number(strumpack::MC64Job job) -> int"""
    return _strumpack.MC64_job_number(job)

def get_name(method):
    """get_name(strumpack::ReorderingStrategy method) -> std::string"""
    return _strumpack.get_name(method)

def is_parallel(method):
    """is_parallel(strumpack::ReorderingStrategy method) -> bool"""
    return _strumpack.is_parallel(method)
GramSchmidtType_CLASSICAL = _strumpack.GramSchmidtType_CLASSICAL
GramSchmidtType_MODIFIED = _strumpack.GramSchmidtType_MODIFIED
KrylovSolver_AUTO = _strumpack.KrylovSolver_AUTO
KrylovSolver_DIRECT = _strumpack.KrylovSolver_DIRECT
KrylovSolver_REFINE = _strumpack.KrylovSolver_REFINE
KrylovSolver_PREC_GMRES = _strumpack.KrylovSolver_PREC_GMRES
KrylovSolver_GMRES = _strumpack.KrylovSolver_GMRES
KrylovSolver_PREC_BICGSTAB = _strumpack.KrylovSolver_PREC_BICGSTAB
KrylovSolver_BICGSTAB = _strumpack.KrylovSolver_BICGSTAB
class STRUMPACKRowLocMatrix(operators.Operator):
    """Proxy of C++ mfem::STRUMPACKRowLocMatrix class."""

    __swig_setmethods__ = {}
    for _s in [operators.Operator]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, STRUMPACKRowLocMatrix, name, value)
    __swig_getmethods__ = {}
    for _s in [operators.Operator]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, STRUMPACKRowLocMatrix, name)
    __repr__ = _swig_repr

    def __init__(self, *args):
        """
        __init__(mfem::STRUMPACKRowLocMatrix self, MPI_Comm comm, int num_loc_rows, int first_loc_row, int glob_nrows, int glob_ncols, int * I, int * J, double * data) -> STRUMPACKRowLocMatrix
        __init__(mfem::STRUMPACKRowLocMatrix self, HypreParMatrix hypParMat) -> STRUMPACKRowLocMatrix
        """
        this = _strumpack.new_STRUMPACKRowLocMatrix(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _strumpack.delete_STRUMPACKRowLocMatrix
    __del__ = lambda self: None

    def Mult(self, x, y):
        """Mult(STRUMPACKRowLocMatrix self, Vector x, Vector y)"""
        return _strumpack.STRUMPACKRowLocMatrix_Mult(self, x, y)


    def GetComm(self):
        """GetComm(STRUMPACKRowLocMatrix self) -> MPI_Comm"""
        return _strumpack.STRUMPACKRowLocMatrix_GetComm(self)


    def getA(self):
        """getA(STRUMPACKRowLocMatrix self) -> strumpack::CSRMatrixMPI< double,int > *"""
        return _strumpack.STRUMPACKRowLocMatrix_getA(self)

STRUMPACKRowLocMatrix_swigregister = _strumpack.STRUMPACKRowLocMatrix_swigregister
STRUMPACKRowLocMatrix_swigregister(STRUMPACKRowLocMatrix)

class STRUMPACKSolver(operators.Solver):
    """Proxy of C++ mfem::STRUMPACKSolver class."""

    __swig_setmethods__ = {}
    for _s in [operators.Solver]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, STRUMPACKSolver, name, value)
    __swig_getmethods__ = {}
    for _s in [operators.Solver]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, STRUMPACKSolver, name)
    __repr__ = _swig_repr

    def __init__(self, *args):
        """
        __init__(mfem::STRUMPACKSolver self, int argc, char *[] argv, MPI_Comm comm) -> STRUMPACKSolver
        __init__(mfem::STRUMPACKSolver self, STRUMPACKRowLocMatrix A) -> STRUMPACKSolver
        """

        attach_argv = False
        if isinstance(args[0], list):
            aa = [""]+args[0]  
            num = len(aa)
            ptr = argv_obj(aa)
            args = (num, ptr, args[1])
            attach_argv = True



        this = _strumpack.new_STRUMPACKSolver(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

        if attach_argv:
            self._argv = ptr



    __swig_destroy__ = _strumpack.delete_STRUMPACKSolver
    __del__ = lambda self: None

    def Mult(self, x, y):
        """Mult(STRUMPACKSolver self, Vector x, Vector y)"""
        return _strumpack.STRUMPACKSolver_Mult(self, x, y)


    def SetOperator(self, op):
        """SetOperator(STRUMPACKSolver self, Operator op)"""
        return _strumpack.STRUMPACKSolver_SetOperator(self, op)


    def SetFromCommandLine(self):
        """SetFromCommandLine(STRUMPACKSolver self)"""
        return _strumpack.STRUMPACKSolver_SetFromCommandLine(self)


    def SetPrintFactorStatistics(self, print_stat):
        """SetPrintFactorStatistics(STRUMPACKSolver self, bool print_stat)"""
        return _strumpack.STRUMPACKSolver_SetPrintFactorStatistics(self, print_stat)


    def SetPrintSolveStatistics(self, print_stat):
        """SetPrintSolveStatistics(STRUMPACKSolver self, bool print_stat)"""
        return _strumpack.STRUMPACKSolver_SetPrintSolveStatistics(self, print_stat)


    def SetRelTol(self, rtol):
        """SetRelTol(STRUMPACKSolver self, double rtol)"""
        return _strumpack.STRUMPACKSolver_SetRelTol(self, rtol)


    def SetAbsTol(self, atol):
        """SetAbsTol(STRUMPACKSolver self, double atol)"""
        return _strumpack.STRUMPACKSolver_SetAbsTol(self, atol)


    def SetKrylovSolver(self, method):
        """SetKrylovSolver(STRUMPACKSolver self, strumpack::KrylovSolver method)"""
        return _strumpack.STRUMPACKSolver_SetKrylovSolver(self, method)


    def SetReorderingStrategy(self, method):
        """SetReorderingStrategy(STRUMPACKSolver self, strumpack::ReorderingStrategy method)"""
        return _strumpack.STRUMPACKSolver_SetReorderingStrategy(self, method)


    def SetMC64Job(self, job):
        """SetMC64Job(STRUMPACKSolver self, strumpack::MC64Job job)"""
        return _strumpack.STRUMPACKSolver_SetMC64Job(self, job)

STRUMPACKSolver_swigregister = _strumpack.STRUMPACKSolver_swigregister
STRUMPACKSolver_swigregister(STRUMPACKSolver)

# This file is compatible with both classic and new-style classes.


