Sync with upstream branch
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
This commit is contained in:
commit
f279da55b8
3
.gitignore
vendored
3
.gitignore
vendored
@ -66,3 +66,6 @@
|
||||
/petsc-with-docs-3.20.0.tar.gz
|
||||
/petsc-with-docs-3.20.1.tar.gz
|
||||
/petsc-with-docs-3.20.2.tar.gz
|
||||
/petsc-with-docs-3.20.4.tar.gz
|
||||
/petsc-with-docs-3.20.5.tar.gz
|
||||
/petsc-with-docs-3.20.6.tar.gz
|
||||
|
29
no-parse_makefile.patch
Normal file
29
no-parse_makefile.patch
Normal file
@ -0,0 +1,29 @@
|
||||
diff --git a/config/gmakegen.py b/config/gmakegen.py
|
||||
index c9c476822c5..f58caab4d71 100644
|
||||
--- a/config/gmakegen.py
|
||||
+++ b/config/gmakegen.py
|
||||
@@ -1,7 +1,6 @@
|
||||
#! /usr/bin/python3 -sP
|
||||
|
||||
import os
|
||||
-from sysconfig import _parse_makefile as parse_makefile
|
||||
import sys
|
||||
import logging
|
||||
sys.path.insert(0, os.path.abspath(os.path.dirname(__file__)))
|
||||
@@ -36,6 +35,16 @@ def getlangsplit(name):
|
||||
def stripsplit(line):
|
||||
return line[len('#requires'):].replace("'","").split()
|
||||
|
||||
+def parse_makefile(fn):
|
||||
+ out = {}
|
||||
+ with open(fn) as f:
|
||||
+ for l in f:
|
||||
+ print(l[:-1])
|
||||
+ if "=" in l:
|
||||
+ a,b = l.split("=", 1)
|
||||
+ out[a.strip()] = b.strip()
|
||||
+ return out
|
||||
+
|
||||
PetscPKGS = 'sys vec mat dm ksp snes ts tao'.split()
|
||||
# the key is actually the language suffix, it won't work for suffixes such as 'kokkos.cxx' so use an _ and replace the _ as needed with .
|
||||
LANGS = dict(kokkos_cxx='KOKKOS', hip_cpp='HIP', sycl_cxx='SYCL', raja_cxx='RAJA', c='C', cxx='CXX', cpp='CPP', cu='CU', F='F', F90='F90')
|
48
no-xdrlib.patch
Normal file
48
no-xdrlib.patch
Normal file
@ -0,0 +1,48 @@
|
||||
diff --git a/config/BuildSystem/RDict.py b/config/BuildSystem/RDict.py
|
||||
index cc90f3e26c5..d68ab095e06 100755
|
||||
--- a/config/BuildSystem/RDict.py
|
||||
+++ b/config/BuildSystem/RDict.py
|
||||
@@ -83,7 +83,7 @@ Arg class, which wraps the usual value.'''
|
||||
def __init__(self, parentAddr = None, parentDirectory = None, load = 1, autoShutdown = 1, readonly = False):
|
||||
import atexit
|
||||
import time
|
||||
- import xdrlib
|
||||
+ #import xdrlib
|
||||
|
||||
self.logFile = None
|
||||
self.setupLogFile()
|
||||
@@ -98,8 +98,8 @@ Arg class, which wraps the usual value.'''
|
||||
self.isServer = 0
|
||||
self.readonly = readonly
|
||||
self.parentDirectory = parentDirectory
|
||||
- self.packer = xdrlib.Packer()
|
||||
- self.unpacker = xdrlib.Unpacker('')
|
||||
+ #self.packer = xdrlib.Packer()
|
||||
+ #self.unpacker = xdrlib.Unpacker('')
|
||||
self.stopCmd = pickle.dumps(('stop',))
|
||||
self.writeLogLine('Greetings')
|
||||
self.connectParent(self.parentAddr, self.parentDirectory)
|
||||
@@ -116,8 +116,8 @@ Arg class, which wraps the usual value.'''
|
||||
if 'parent' in d: del d['parent']
|
||||
if 'saveTimer' in d: del d['saveTimer']
|
||||
if '_setCommandLine' in d: del d['_setCommandLine']
|
||||
- del d['packer']
|
||||
- del d['unpacker']
|
||||
+ #del d['packer']
|
||||
+ #del d['unpacker']
|
||||
del d['logFile']
|
||||
return d
|
||||
|
||||
@@ -126,9 +126,9 @@ Arg class, which wraps the usual value.'''
|
||||
self.logFile = open('RDict.log', 'a')
|
||||
self.writeLogLine('Unpickling RDict')
|
||||
self.__dict__.update(d)
|
||||
- import xdrlib
|
||||
- self.packer = xdrlib.Packer()
|
||||
- self.unpacker = xdrlib.Unpacker('')
|
||||
+ #import xdrlib
|
||||
+ #self.packer = xdrlib.Packer()
|
||||
+ #self.unpacker = xdrlib.Unpacker('')
|
||||
self.connectParent(self.parentAddr, self.parentDirectory)
|
||||
return
|
||||
|
@ -20,3 +20,13 @@
|
||||
if self.defaultIndexSize == 64:
|
||||
msg= '--with-64-bit-indices option requires a metis build with IDXTYPEWIDTH=64.\n'
|
||||
else:
|
||||
--- a/src/mat/order/metisnd/metisnd.orig.c 2023-11-30 20:14:32.000000000 +0100
|
||||
+++ b/src/mat/order/metisnd/metisnd.c 2024-02-06 21:21:38.011280520 +0100
|
||||
@@ -1,6 +1,6 @@
|
||||
#include <petscmat.h>
|
||||
#include <petsc/private/matorderimpl.h>
|
||||
-#include <metis.h>
|
||||
+#include <metis64.h>
|
||||
|
||||
/*
|
||||
MatGetOrdering_METISND - Find the nested dissection ordering of a given matrix.
|
||||
|
434
petsc-3.20-PETSc_api_cython3.0.6.h
Normal file
434
petsc-3.20-PETSc_api_cython3.0.6.h
Normal file
@ -0,0 +1,434 @@
|
||||
/* Generated by Cython 3.0.6 */
|
||||
|
||||
#ifndef __PYX_HAVE_API__petsc4py__PETSc
|
||||
#define __PYX_HAVE_API__petsc4py__PETSc
|
||||
#ifdef __MINGW64__
|
||||
#define MS_WIN64
|
||||
#endif
|
||||
#include "Python.h"
|
||||
#include "PETSc.h"
|
||||
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_Comm = 0;
|
||||
#define PyPetscComm_Type (*__pyx_ptype_8petsc4py_5PETSc_Comm)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_Object = 0;
|
||||
#define PyPetscObject_Type (*__pyx_ptype_8petsc4py_5PETSc_Object)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_Viewer = 0;
|
||||
#define PyPetscViewer_Type (*__pyx_ptype_8petsc4py_5PETSc_Viewer)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_Random = 0;
|
||||
#define PyPetscRandom_Type (*__pyx_ptype_8petsc4py_5PETSc_Random)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_Device = 0;
|
||||
#define PyPetscDevice_Type (*__pyx_ptype_8petsc4py_5PETSc_Device)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_DeviceContext = 0;
|
||||
#define PyPetscDeviceContext_Type (*__pyx_ptype_8petsc4py_5PETSc_DeviceContext)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_IS = 0;
|
||||
#define PyPetscIS_Type (*__pyx_ptype_8petsc4py_5PETSc_IS)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_LGMap = 0;
|
||||
#define PyPetscLGMap_Type (*__pyx_ptype_8petsc4py_5PETSc_LGMap)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_SF = 0;
|
||||
#define PyPetscSF_Type (*__pyx_ptype_8petsc4py_5PETSc_SF)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_Vec = 0;
|
||||
#define PyPetscVec_Type (*__pyx_ptype_8petsc4py_5PETSc_Vec)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_Space = 0;
|
||||
#define PyPetscSpace_Type (*__pyx_ptype_8petsc4py_5PETSc_Space)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_DualSpace = 0;
|
||||
#define PyPetscDualSpace_Type (*__pyx_ptype_8petsc4py_5PETSc_DualSpace)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_FE = 0;
|
||||
#define PyPetscFE_Type (*__pyx_ptype_8petsc4py_5PETSc_FE)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_Quad = 0;
|
||||
#define PyPetscQuad_Type (*__pyx_ptype_8petsc4py_5PETSc_Quad)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_Scatter = 0;
|
||||
#define PyPetscScatter_Type (*__pyx_ptype_8petsc4py_5PETSc_Scatter)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_Section = 0;
|
||||
#define PyPetscSection_Type (*__pyx_ptype_8petsc4py_5PETSc_Section)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_Mat = 0;
|
||||
#define PyPetscMat_Type (*__pyx_ptype_8petsc4py_5PETSc_Mat)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_MatPartitioning = 0;
|
||||
#define PyPetscMatPartitioning_Type (*__pyx_ptype_8petsc4py_5PETSc_MatPartitioning)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_NullSpace = 0;
|
||||
#define PyPetscNullSpace_Type (*__pyx_ptype_8petsc4py_5PETSc_NullSpace)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_PC = 0;
|
||||
#define PyPetscPC_Type (*__pyx_ptype_8petsc4py_5PETSc_PC)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_KSP = 0;
|
||||
#define PyPetscKSP_Type (*__pyx_ptype_8petsc4py_5PETSc_KSP)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_SNES = 0;
|
||||
#define PyPetscSNES_Type (*__pyx_ptype_8petsc4py_5PETSc_SNES)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_TS = 0;
|
||||
#define PyPetscTS_Type (*__pyx_ptype_8petsc4py_5PETSc_TS)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_TAO = 0;
|
||||
#define PyPetscTAO_Type (*__pyx_ptype_8petsc4py_5PETSc_TAO)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_TAOLineSearch = 0;
|
||||
#define PyPetscTAOLineSearch_Type (*__pyx_ptype_8petsc4py_5PETSc_TAOLineSearch)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_AO = 0;
|
||||
#define PyPetscAO_Type (*__pyx_ptype_8petsc4py_5PETSc_AO)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_DM = 0;
|
||||
#define PyPetscDM_Type (*__pyx_ptype_8petsc4py_5PETSc_DM)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_DMPlexTransform = 0;
|
||||
#define PyPetscDMPlexTransform_Type (*__pyx_ptype_8petsc4py_5PETSc_DMPlexTransform)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_DS = 0;
|
||||
#define PyPetscDS_Type (*__pyx_ptype_8petsc4py_5PETSc_DS)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_Partitioner = 0;
|
||||
#define PyPetscPartitioner_Type (*__pyx_ptype_8petsc4py_5PETSc_Partitioner)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_DMLabel = 0;
|
||||
#define PyPetscDMLabel_Type (*__pyx_ptype_8petsc4py_5PETSc_DMLabel)
|
||||
|
||||
static int (*__pyx_api_f_8petsc4py_5PETSc_PyPetscError_Set)(PetscErrorCode) = 0;
|
||||
#define PyPetscError_Set __pyx_api_f_8petsc4py_5PETSc_PyPetscError_Set
|
||||
static PyObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscComm_New)(MPI_Comm) = 0;
|
||||
#define PyPetscComm_New __pyx_api_f_8petsc4py_5PETSc_PyPetscComm_New
|
||||
static MPI_Comm (*__pyx_api_f_8petsc4py_5PETSc_PyPetscComm_Get)(PyObject *) = 0;
|
||||
#define PyPetscComm_Get __pyx_api_f_8petsc4py_5PETSc_PyPetscComm_Get
|
||||
static MPI_Comm *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscComm_GetPtr)(PyObject *) = 0;
|
||||
#define PyPetscComm_GetPtr __pyx_api_f_8petsc4py_5PETSc_PyPetscComm_GetPtr
|
||||
static PyObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscObject_New)(PetscObject) = 0;
|
||||
#define PyPetscObject_New __pyx_api_f_8petsc4py_5PETSc_PyPetscObject_New
|
||||
static PetscObject (*__pyx_api_f_8petsc4py_5PETSc_PyPetscObject_Get)(PyObject *) = 0;
|
||||
#define PyPetscObject_Get __pyx_api_f_8petsc4py_5PETSc_PyPetscObject_Get
|
||||
static PetscObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscObject_GetPtr)(PyObject *) = 0;
|
||||
#define PyPetscObject_GetPtr __pyx_api_f_8petsc4py_5PETSc_PyPetscObject_GetPtr
|
||||
static PyObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscViewer_New)(PetscViewer) = 0;
|
||||
#define PyPetscViewer_New __pyx_api_f_8petsc4py_5PETSc_PyPetscViewer_New
|
||||
static PetscViewer (*__pyx_api_f_8petsc4py_5PETSc_PyPetscViewer_Get)(PyObject *) = 0;
|
||||
#define PyPetscViewer_Get __pyx_api_f_8petsc4py_5PETSc_PyPetscViewer_Get
|
||||
static PyObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscRandom_New)(PetscRandom) = 0;
|
||||
#define PyPetscRandom_New __pyx_api_f_8petsc4py_5PETSc_PyPetscRandom_New
|
||||
static PetscRandom (*__pyx_api_f_8petsc4py_5PETSc_PyPetscRandom_Get)(PyObject *) = 0;
|
||||
#define PyPetscRandom_Get __pyx_api_f_8petsc4py_5PETSc_PyPetscRandom_Get
|
||||
static struct PyPetscDeviceObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscDevice_New)(PetscDevice) = 0;
|
||||
#define PyPetscDevice_New __pyx_api_f_8petsc4py_5PETSc_PyPetscDevice_New
|
||||
static PetscDevice (*__pyx_api_f_8petsc4py_5PETSc_PyPetscDevice_Get)(PyObject *) = 0;
|
||||
#define PyPetscDevice_Get __pyx_api_f_8petsc4py_5PETSc_PyPetscDevice_Get
|
||||
static struct PyPetscDeviceContextObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscDeviceContext_New)(PetscDeviceContext) = 0;
|
||||
#define PyPetscDeviceContext_New __pyx_api_f_8petsc4py_5PETSc_PyPetscDeviceContext_New
|
||||
static PetscDeviceContext (*__pyx_api_f_8petsc4py_5PETSc_PyPetscDeviceContext_Get)(PyObject *) = 0;
|
||||
#define PyPetscDeviceContext_Get __pyx_api_f_8petsc4py_5PETSc_PyPetscDeviceContext_Get
|
||||
static PyObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscIS_New)(IS) = 0;
|
||||
#define PyPetscIS_New __pyx_api_f_8petsc4py_5PETSc_PyPetscIS_New
|
||||
static IS (*__pyx_api_f_8petsc4py_5PETSc_PyPetscIS_Get)(PyObject *) = 0;
|
||||
#define PyPetscIS_Get __pyx_api_f_8petsc4py_5PETSc_PyPetscIS_Get
|
||||
static PyObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscLGMap_New)(ISLocalToGlobalMapping) = 0;
|
||||
#define PyPetscLGMap_New __pyx_api_f_8petsc4py_5PETSc_PyPetscLGMap_New
|
||||
static ISLocalToGlobalMapping (*__pyx_api_f_8petsc4py_5PETSc_PyPetscLGMap_Get)(PyObject *) = 0;
|
||||
#define PyPetscLGMap_Get __pyx_api_f_8petsc4py_5PETSc_PyPetscLGMap_Get
|
||||
static PyObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscSF_New)(PetscSF) = 0;
|
||||
#define PyPetscSF_New __pyx_api_f_8petsc4py_5PETSc_PyPetscSF_New
|
||||
static PetscSF (*__pyx_api_f_8petsc4py_5PETSc_PyPetscSF_Get)(PyObject *) = 0;
|
||||
#define PyPetscSF_Get __pyx_api_f_8petsc4py_5PETSc_PyPetscSF_Get
|
||||
static PyObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscVec_New)(Vec) = 0;
|
||||
#define PyPetscVec_New __pyx_api_f_8petsc4py_5PETSc_PyPetscVec_New
|
||||
static Vec (*__pyx_api_f_8petsc4py_5PETSc_PyPetscVec_Get)(PyObject *) = 0;
|
||||
#define PyPetscVec_Get __pyx_api_f_8petsc4py_5PETSc_PyPetscVec_Get
|
||||
static PyObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscScatter_New)(VecScatter) = 0;
|
||||
#define PyPetscScatter_New __pyx_api_f_8petsc4py_5PETSc_PyPetscScatter_New
|
||||
static VecScatter (*__pyx_api_f_8petsc4py_5PETSc_PyPetscScatter_Get)(PyObject *) = 0;
|
||||
#define PyPetscScatter_Get __pyx_api_f_8petsc4py_5PETSc_PyPetscScatter_Get
|
||||
static PyObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscSection_New)(PetscSection) = 0;
|
||||
#define PyPetscSection_New __pyx_api_f_8petsc4py_5PETSc_PyPetscSection_New
|
||||
static PetscSection (*__pyx_api_f_8petsc4py_5PETSc_PyPetscSection_Get)(PyObject *) = 0;
|
||||
#define PyPetscSection_Get __pyx_api_f_8petsc4py_5PETSc_PyPetscSection_Get
|
||||
static PyObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscMat_New)(Mat) = 0;
|
||||
#define PyPetscMat_New __pyx_api_f_8petsc4py_5PETSc_PyPetscMat_New
|
||||
static Mat (*__pyx_api_f_8petsc4py_5PETSc_PyPetscMat_Get)(PyObject *) = 0;
|
||||
#define PyPetscMat_Get __pyx_api_f_8petsc4py_5PETSc_PyPetscMat_Get
|
||||
static PyObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscMatPartitioning_New)(MatPartitioning) = 0;
|
||||
#define PyPetscMatPartitioning_New __pyx_api_f_8petsc4py_5PETSc_PyPetscMatPartitioning_New
|
||||
static MatPartitioning (*__pyx_api_f_8petsc4py_5PETSc_PyPetscMatPartitioning_Get)(PyObject *) = 0;
|
||||
#define PyPetscMatPartitioning_Get __pyx_api_f_8petsc4py_5PETSc_PyPetscMatPartitioning_Get
|
||||
static PyObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscPC_New)(PC) = 0;
|
||||
#define PyPetscPC_New __pyx_api_f_8petsc4py_5PETSc_PyPetscPC_New
|
||||
static PC (*__pyx_api_f_8petsc4py_5PETSc_PyPetscPC_Get)(PyObject *) = 0;
|
||||
#define PyPetscPC_Get __pyx_api_f_8petsc4py_5PETSc_PyPetscPC_Get
|
||||
static PyObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscKSP_New)(KSP) = 0;
|
||||
#define PyPetscKSP_New __pyx_api_f_8petsc4py_5PETSc_PyPetscKSP_New
|
||||
static KSP (*__pyx_api_f_8petsc4py_5PETSc_PyPetscKSP_Get)(PyObject *) = 0;
|
||||
#define PyPetscKSP_Get __pyx_api_f_8petsc4py_5PETSc_PyPetscKSP_Get
|
||||
static PyObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscSNES_New)(SNES) = 0;
|
||||
#define PyPetscSNES_New __pyx_api_f_8petsc4py_5PETSc_PyPetscSNES_New
|
||||
static SNES (*__pyx_api_f_8petsc4py_5PETSc_PyPetscSNES_Get)(PyObject *) = 0;
|
||||
#define PyPetscSNES_Get __pyx_api_f_8petsc4py_5PETSc_PyPetscSNES_Get
|
||||
static PyObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscTS_New)(TS) = 0;
|
||||
#define PyPetscTS_New __pyx_api_f_8petsc4py_5PETSc_PyPetscTS_New
|
||||
static TS (*__pyx_api_f_8petsc4py_5PETSc_PyPetscTS_Get)(PyObject *) = 0;
|
||||
#define PyPetscTS_Get __pyx_api_f_8petsc4py_5PETSc_PyPetscTS_Get
|
||||
static PyObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscTAO_New)(Tao) = 0;
|
||||
#define PyPetscTAO_New __pyx_api_f_8petsc4py_5PETSc_PyPetscTAO_New
|
||||
static Tao (*__pyx_api_f_8petsc4py_5PETSc_PyPetscTAO_Get)(PyObject *) = 0;
|
||||
#define PyPetscTAO_Get __pyx_api_f_8petsc4py_5PETSc_PyPetscTAO_Get
|
||||
static PyObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscTAOLineSearch_New)(TaoLineSearch) = 0;
|
||||
#define PyPetscTAOLineSearch_New __pyx_api_f_8petsc4py_5PETSc_PyPetscTAOLineSearch_New
|
||||
static TaoLineSearch (*__pyx_api_f_8petsc4py_5PETSc_PyPetscTAOLineSearch_Get)(PyObject *) = 0;
|
||||
#define PyPetscTAOLineSearch_Get __pyx_api_f_8petsc4py_5PETSc_PyPetscTAOLineSearch_Get
|
||||
static PyObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscAO_New)(AO) = 0;
|
||||
#define PyPetscAO_New __pyx_api_f_8petsc4py_5PETSc_PyPetscAO_New
|
||||
static AO (*__pyx_api_f_8petsc4py_5PETSc_PyPetscAO_Get)(PyObject *) = 0;
|
||||
#define PyPetscAO_Get __pyx_api_f_8petsc4py_5PETSc_PyPetscAO_Get
|
||||
static PyObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscDM_New)(DM) = 0;
|
||||
#define PyPetscDM_New __pyx_api_f_8petsc4py_5PETSc_PyPetscDM_New
|
||||
static DM (*__pyx_api_f_8petsc4py_5PETSc_PyPetscDM_Get)(PyObject *) = 0;
|
||||
#define PyPetscDM_Get __pyx_api_f_8petsc4py_5PETSc_PyPetscDM_Get
|
||||
static PyObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscDS_New)(PetscDS) = 0;
|
||||
#define PyPetscDS_New __pyx_api_f_8petsc4py_5PETSc_PyPetscDS_New
|
||||
static PetscDS (*__pyx_api_f_8petsc4py_5PETSc_PyPetscDS_Get)(PyObject *) = 0;
|
||||
#define PyPetscDS_Get __pyx_api_f_8petsc4py_5PETSc_PyPetscDS_Get
|
||||
static PyObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscPartitioner_New)(PetscPartitioner) = 0;
|
||||
#define PyPetscPartitioner_New __pyx_api_f_8petsc4py_5PETSc_PyPetscPartitioner_New
|
||||
static PetscPartitioner (*__pyx_api_f_8petsc4py_5PETSc_PyPetscPartitioner_Get)(PyObject *) = 0;
|
||||
#define PyPetscPartitioner_Get __pyx_api_f_8petsc4py_5PETSc_PyPetscPartitioner_Get
|
||||
static PyObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscFE_New)(PetscFE) = 0;
|
||||
#define PyPetscFE_New __pyx_api_f_8petsc4py_5PETSc_PyPetscFE_New
|
||||
static PetscFE (*__pyx_api_f_8petsc4py_5PETSc_PyPetscFE_Get)(PyObject *) = 0;
|
||||
#define PyPetscFE_Get __pyx_api_f_8petsc4py_5PETSc_PyPetscFE_Get
|
||||
static PyObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscQuad_New)(PetscQuadrature) = 0;
|
||||
#define PyPetscQuad_New __pyx_api_f_8petsc4py_5PETSc_PyPetscQuad_New
|
||||
static PetscQuadrature (*__pyx_api_f_8petsc4py_5PETSc_PyPetscQuad_Get)(PyObject *) = 0;
|
||||
#define PyPetscQuad_Get __pyx_api_f_8petsc4py_5PETSc_PyPetscQuad_Get
|
||||
static PyObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscDMLabel_New)(DMLabel) = 0;
|
||||
#define PyPetscDMLabel_New __pyx_api_f_8petsc4py_5PETSc_PyPetscDMLabel_New
|
||||
static DMLabel (*__pyx_api_f_8petsc4py_5PETSc_PyPetscDMLabel_Get)(PyObject *) = 0;
|
||||
#define PyPetscDMLabel_Get __pyx_api_f_8petsc4py_5PETSc_PyPetscDMLabel_Get
|
||||
static PyObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscSpace_New)(PetscSpace) = 0;
|
||||
#define PyPetscSpace_New __pyx_api_f_8petsc4py_5PETSc_PyPetscSpace_New
|
||||
static PetscSpace (*__pyx_api_f_8petsc4py_5PETSc_PyPetscSpace_Get)(PyObject *) = 0;
|
||||
#define PyPetscSpace_Get __pyx_api_f_8petsc4py_5PETSc_PyPetscSpace_Get
|
||||
static PyObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscDualSpace_New)(PetscDualSpace) = 0;
|
||||
#define PyPetscDualSpace_New __pyx_api_f_8petsc4py_5PETSc_PyPetscDualSpace_New
|
||||
static PetscDualSpace (*__pyx_api_f_8petsc4py_5PETSc_PyPetscDualSpace_Get)(PyObject *) = 0;
|
||||
#define PyPetscDualSpace_Get __pyx_api_f_8petsc4py_5PETSc_PyPetscDualSpace_Get
|
||||
#ifndef __PYX_HAVE_RT_ImportFunction_3_0_6
|
||||
#define __PYX_HAVE_RT_ImportFunction_3_0_6
|
||||
static int __Pyx_ImportFunction_3_0_6(PyObject *module, const char *funcname, void (**f)(void), const char *sig) {
|
||||
PyObject *d = 0;
|
||||
PyObject *cobj = 0;
|
||||
union {
|
||||
void (*fp)(void);
|
||||
void *p;
|
||||
} tmp;
|
||||
d = PyObject_GetAttrString(module, (char *)"__pyx_capi__");
|
||||
if (!d)
|
||||
goto bad;
|
||||
cobj = PyDict_GetItemString(d, funcname);
|
||||
if (!cobj) {
|
||||
PyErr_Format(PyExc_ImportError,
|
||||
"%.200s does not export expected C function %.200s",
|
||||
PyModule_GetName(module), funcname);
|
||||
goto bad;
|
||||
}
|
||||
if (!PyCapsule_IsValid(cobj, sig)) {
|
||||
PyErr_Format(PyExc_TypeError,
|
||||
"C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
|
||||
PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj));
|
||||
goto bad;
|
||||
}
|
||||
tmp.p = PyCapsule_GetPointer(cobj, sig);
|
||||
*f = tmp.fp;
|
||||
if (!(*f))
|
||||
goto bad;
|
||||
Py_DECREF(d);
|
||||
return 0;
|
||||
bad:
|
||||
Py_XDECREF(d);
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef __PYX_HAVE_RT_ImportType_proto_3_0_6
|
||||
#define __PYX_HAVE_RT_ImportType_proto_3_0_6
|
||||
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
|
||||
#include <stdalign.h>
|
||||
#endif
|
||||
#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L
|
||||
#define __PYX_GET_STRUCT_ALIGNMENT_3_0_6(s) alignof(s)
|
||||
#else
|
||||
#define __PYX_GET_STRUCT_ALIGNMENT_3_0_6(s) sizeof(void*)
|
||||
#endif
|
||||
enum __Pyx_ImportType_CheckSize_3_0_6 {
|
||||
__Pyx_ImportType_CheckSize_Error_3_0_6 = 0,
|
||||
__Pyx_ImportType_CheckSize_Warn_3_0_6 = 1,
|
||||
__Pyx_ImportType_CheckSize_Ignore_3_0_6 = 2
|
||||
};
|
||||
static PyTypeObject *__Pyx_ImportType_3_0_6(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_6 check_size);
|
||||
#endif
|
||||
|
||||
#ifndef __PYX_HAVE_RT_ImportType_3_0_6
|
||||
#define __PYX_HAVE_RT_ImportType_3_0_6
|
||||
static PyTypeObject *__Pyx_ImportType_3_0_6(PyObject *module, const char *module_name, const char *class_name,
|
||||
size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_6 check_size)
|
||||
{
|
||||
PyObject *result = 0;
|
||||
char warning[200];
|
||||
Py_ssize_t basicsize;
|
||||
Py_ssize_t itemsize;
|
||||
#if CYTHON_COMPILING_IN_LIMITED_API
|
||||
PyObject *py_basicsize;
|
||||
PyObject *py_itemsize;
|
||||
#endif
|
||||
result = PyObject_GetAttrString(module, class_name);
|
||||
if (!result)
|
||||
goto bad;
|
||||
if (!PyType_Check(result)) {
|
||||
PyErr_Format(PyExc_TypeError,
|
||||
"%.200s.%.200s is not a type object",
|
||||
module_name, class_name);
|
||||
goto bad;
|
||||
}
|
||||
#if !CYTHON_COMPILING_IN_LIMITED_API
|
||||
basicsize = ((PyTypeObject *)result)->tp_basicsize;
|
||||
itemsize = ((PyTypeObject *)result)->tp_itemsize;
|
||||
#else
|
||||
py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
|
||||
if (!py_basicsize)
|
||||
goto bad;
|
||||
basicsize = PyLong_AsSsize_t(py_basicsize);
|
||||
Py_DECREF(py_basicsize);
|
||||
py_basicsize = 0;
|
||||
if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
|
||||
goto bad;
|
||||
py_itemsize = PyObject_GetAttrString(result, "__itemsize__");
|
||||
if (!py_itemsize)
|
||||
goto bad;
|
||||
itemsize = PyLong_AsSsize_t(py_itemsize);
|
||||
Py_DECREF(py_itemsize);
|
||||
py_itemsize = 0;
|
||||
if (itemsize == (Py_ssize_t)-1 && PyErr_Occurred())
|
||||
goto bad;
|
||||
#endif
|
||||
if (itemsize) {
|
||||
if (size % alignment) {
|
||||
alignment = size % alignment;
|
||||
}
|
||||
if (itemsize < (Py_ssize_t)alignment)
|
||||
itemsize = (Py_ssize_t)alignment;
|
||||
}
|
||||
if ((size_t)(basicsize + itemsize) < size) {
|
||||
PyErr_Format(PyExc_ValueError,
|
||||
"%.200s.%.200s size changed, may indicate binary incompatibility. "
|
||||
"Expected %zd from C header, got %zd from PyObject",
|
||||
module_name, class_name, size, basicsize+itemsize);
|
||||
goto bad;
|
||||
}
|
||||
if (check_size == __Pyx_ImportType_CheckSize_Error_3_0_6 &&
|
||||
((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) {
|
||||
PyErr_Format(PyExc_ValueError,
|
||||
"%.200s.%.200s size changed, may indicate binary incompatibility. "
|
||||
"Expected %zd from C header, got %zd-%zd from PyObject",
|
||||
module_name, class_name, size, basicsize, basicsize+itemsize);
|
||||
goto bad;
|
||||
}
|
||||
else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_0_6 && (size_t)basicsize > size) {
|
||||
PyOS_snprintf(warning, sizeof(warning),
|
||||
"%s.%s size changed, may indicate binary incompatibility. "
|
||||
"Expected %zd from C header, got %zd from PyObject",
|
||||
module_name, class_name, size, basicsize);
|
||||
if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
|
||||
}
|
||||
return (PyTypeObject *)result;
|
||||
bad:
|
||||
Py_XDECREF(result);
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
static int import_petsc4py__PETSc(void) {
|
||||
PyObject *module = 0;
|
||||
module = PyImport_ImportModule("petsc4py.PETSc");
|
||||
if (!module) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscError_Set", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscError_Set, "int (PetscErrorCode)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscComm_New", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscComm_New, "PyObject *(MPI_Comm)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscComm_Get", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscComm_Get, "MPI_Comm (PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscComm_GetPtr", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscComm_GetPtr, "MPI_Comm *(PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscObject_New", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscObject_New, "PyObject *(PetscObject)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscObject_Get", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscObject_Get, "PetscObject (PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscObject_GetPtr", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscObject_GetPtr, "PetscObject *(PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscViewer_New", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscViewer_New, "PyObject *(PetscViewer)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscViewer_Get", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscViewer_Get, "PetscViewer (PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscRandom_New", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscRandom_New, "PyObject *(PetscRandom)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscRandom_Get", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscRandom_Get, "PetscRandom (PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscDevice_New", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscDevice_New, "struct PyPetscDeviceObject *(PetscDevice)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscDevice_Get", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscDevice_Get, "PetscDevice (PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscDeviceContext_New", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscDeviceContext_New, "struct PyPetscDeviceContextObject *(PetscDeviceContext)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscDeviceContext_Get", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscDeviceContext_Get, "PetscDeviceContext (PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscIS_New", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscIS_New, "PyObject *(IS)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscIS_Get", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscIS_Get, "IS (PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscLGMap_New", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscLGMap_New, "PyObject *(ISLocalToGlobalMapping)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscLGMap_Get", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscLGMap_Get, "ISLocalToGlobalMapping (PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscSF_New", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscSF_New, "PyObject *(PetscSF)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscSF_Get", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscSF_Get, "PetscSF (PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscVec_New", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscVec_New, "PyObject *(Vec)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscVec_Get", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscVec_Get, "Vec (PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscScatter_New", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscScatter_New, "PyObject *(VecScatter)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscScatter_Get", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscScatter_Get, "VecScatter (PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscSection_New", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscSection_New, "PyObject *(PetscSection)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscSection_Get", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscSection_Get, "PetscSection (PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscMat_New", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscMat_New, "PyObject *(Mat)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscMat_Get", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscMat_Get, "Mat (PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscMatPartitioning_New", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscMatPartitioning_New, "PyObject *(MatPartitioning)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscMatPartitioning_Get", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscMatPartitioning_Get, "MatPartitioning (PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscPC_New", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscPC_New, "PyObject *(PC)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscPC_Get", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscPC_Get, "PC (PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscKSP_New", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscKSP_New, "PyObject *(KSP)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscKSP_Get", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscKSP_Get, "KSP (PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscSNES_New", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscSNES_New, "PyObject *(SNES)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscSNES_Get", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscSNES_Get, "SNES (PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscTS_New", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscTS_New, "PyObject *(TS)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscTS_Get", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscTS_Get, "TS (PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscTAO_New", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscTAO_New, "PyObject *(Tao)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscTAO_Get", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscTAO_Get, "Tao (PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscTAOLineSearch_New", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscTAOLineSearch_New, "PyObject *(TaoLineSearch)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscTAOLineSearch_Get", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscTAOLineSearch_Get, "TaoLineSearch (PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscAO_New", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscAO_New, "PyObject *(AO)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscAO_Get", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscAO_Get, "AO (PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscDM_New", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscDM_New, "PyObject *(DM)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscDM_Get", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscDM_Get, "DM (PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscDS_New", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscDS_New, "PyObject *(PetscDS)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscDS_Get", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscDS_Get, "PetscDS (PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscPartitioner_New", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscPartitioner_New, "PyObject *(PetscPartitioner)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscPartitioner_Get", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscPartitioner_Get, "PetscPartitioner (PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscFE_New", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscFE_New, "PyObject *(PetscFE)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscFE_Get", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscFE_Get, "PetscFE (PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscQuad_New", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscQuad_New, "PyObject *(PetscQuadrature)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscQuad_Get", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscQuad_Get, "PetscQuadrature (PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscDMLabel_New", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscDMLabel_New, "PyObject *(DMLabel)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscDMLabel_Get", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscDMLabel_Get, "DMLabel (PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscSpace_New", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscSpace_New, "PyObject *(PetscSpace)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscSpace_Get", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscSpace_Get, "PetscSpace (PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscDualSpace_New", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscDualSpace_New, "PyObject *(PetscDualSpace)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_3_0_6(module, "PyPetscDualSpace_Get", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscDualSpace_Get, "PetscDualSpace (PyObject *)") < 0) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_Comm = __Pyx_ImportType_3_0_6(module, "petsc4py.PETSc", "Comm", sizeof(struct PyPetscCommObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(struct PyPetscCommObject),__Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_8petsc4py_5PETSc_Comm) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_Object = __Pyx_ImportType_3_0_6(module, "petsc4py.PETSc", "Object", sizeof(struct PyPetscObjectObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(struct PyPetscObjectObject),__Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_8petsc4py_5PETSc_Object) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_Viewer = __Pyx_ImportType_3_0_6(module, "petsc4py.PETSc", "Viewer", sizeof(struct PyPetscViewerObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(struct PyPetscViewerObject),__Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_8petsc4py_5PETSc_Viewer) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_Random = __Pyx_ImportType_3_0_6(module, "petsc4py.PETSc", "Random", sizeof(struct PyPetscRandomObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(struct PyPetscRandomObject),__Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_8petsc4py_5PETSc_Random) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_Device = __Pyx_ImportType_3_0_6(module, "petsc4py.PETSc", "Device", sizeof(struct PyPetscDeviceObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(struct PyPetscDeviceObject),__Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_8petsc4py_5PETSc_Device) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_DeviceContext = __Pyx_ImportType_3_0_6(module, "petsc4py.PETSc", "DeviceContext", sizeof(struct PyPetscDeviceContextObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(struct PyPetscDeviceContextObject),__Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_8petsc4py_5PETSc_DeviceContext) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_IS = __Pyx_ImportType_3_0_6(module, "petsc4py.PETSc", "IS", sizeof(struct PyPetscISObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(struct PyPetscISObject),__Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_8petsc4py_5PETSc_IS) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_LGMap = __Pyx_ImportType_3_0_6(module, "petsc4py.PETSc", "LGMap", sizeof(struct PyPetscLGMapObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(struct PyPetscLGMapObject),__Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_8petsc4py_5PETSc_LGMap) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_SF = __Pyx_ImportType_3_0_6(module, "petsc4py.PETSc", "SF", sizeof(struct PyPetscSFObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(struct PyPetscSFObject),__Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_8petsc4py_5PETSc_SF) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_Vec = __Pyx_ImportType_3_0_6(module, "petsc4py.PETSc", "Vec", sizeof(struct PyPetscVecObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(struct PyPetscVecObject),__Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_8petsc4py_5PETSc_Vec) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_Space = __Pyx_ImportType_3_0_6(module, "petsc4py.PETSc", "Space", sizeof(struct PyPetscSpaceObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(struct PyPetscSpaceObject),__Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_8petsc4py_5PETSc_Space) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_DualSpace = __Pyx_ImportType_3_0_6(module, "petsc4py.PETSc", "DualSpace", sizeof(struct PyPetscDualSpaceObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(struct PyPetscDualSpaceObject),__Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_8petsc4py_5PETSc_DualSpace) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_FE = __Pyx_ImportType_3_0_6(module, "petsc4py.PETSc", "FE", sizeof(struct PyPetscFEObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(struct PyPetscFEObject),__Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_8petsc4py_5PETSc_FE) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_Quad = __Pyx_ImportType_3_0_6(module, "petsc4py.PETSc", "Quad", sizeof(struct PyPetscQuadObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(struct PyPetscQuadObject),__Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_8petsc4py_5PETSc_Quad) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_Scatter = __Pyx_ImportType_3_0_6(module, "petsc4py.PETSc", "Scatter", sizeof(struct PyPetscScatterObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(struct PyPetscScatterObject),__Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_8petsc4py_5PETSc_Scatter) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_Section = __Pyx_ImportType_3_0_6(module, "petsc4py.PETSc", "Section", sizeof(struct PyPetscSectionObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(struct PyPetscSectionObject),__Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_8petsc4py_5PETSc_Section) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_Mat = __Pyx_ImportType_3_0_6(module, "petsc4py.PETSc", "Mat", sizeof(struct PyPetscMatObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(struct PyPetscMatObject),__Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_8petsc4py_5PETSc_Mat) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_MatPartitioning = __Pyx_ImportType_3_0_6(module, "petsc4py.PETSc", "MatPartitioning", sizeof(struct PyPetscMatPartitioningObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(struct PyPetscMatPartitioningObject),__Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_8petsc4py_5PETSc_MatPartitioning) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_NullSpace = __Pyx_ImportType_3_0_6(module, "petsc4py.PETSc", "NullSpace", sizeof(struct PyPetscNullSpaceObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(struct PyPetscNullSpaceObject),__Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_8petsc4py_5PETSc_NullSpace) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_PC = __Pyx_ImportType_3_0_6(module, "petsc4py.PETSc", "PC", sizeof(struct PyPetscPCObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(struct PyPetscPCObject),__Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_8petsc4py_5PETSc_PC) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_KSP = __Pyx_ImportType_3_0_6(module, "petsc4py.PETSc", "KSP", sizeof(struct PyPetscKSPObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(struct PyPetscKSPObject),__Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_8petsc4py_5PETSc_KSP) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_SNES = __Pyx_ImportType_3_0_6(module, "petsc4py.PETSc", "SNES", sizeof(struct PyPetscSNESObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(struct PyPetscSNESObject),__Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_8petsc4py_5PETSc_SNES) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_TS = __Pyx_ImportType_3_0_6(module, "petsc4py.PETSc", "TS", sizeof(struct PyPetscTSObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(struct PyPetscTSObject),__Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_8petsc4py_5PETSc_TS) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_TAO = __Pyx_ImportType_3_0_6(module, "petsc4py.PETSc", "TAO", sizeof(struct PyPetscTAOObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(struct PyPetscTAOObject),__Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_8petsc4py_5PETSc_TAO) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_TAOLineSearch = __Pyx_ImportType_3_0_6(module, "petsc4py.PETSc", "TAOLineSearch", sizeof(struct PyPetscTAOLineSearchObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(struct PyPetscTAOLineSearchObject),__Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_8petsc4py_5PETSc_TAOLineSearch) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_AO = __Pyx_ImportType_3_0_6(module, "petsc4py.PETSc", "AO", sizeof(struct PyPetscAOObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(struct PyPetscAOObject),__Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_8petsc4py_5PETSc_AO) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_DM = __Pyx_ImportType_3_0_6(module, "petsc4py.PETSc", "DM", sizeof(struct PyPetscDMObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(struct PyPetscDMObject),__Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_8petsc4py_5PETSc_DM) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_DMPlexTransform = __Pyx_ImportType_3_0_6(module, "petsc4py.PETSc", "DMPlexTransform", sizeof(struct PyPetscDMPlexTransformObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(struct PyPetscDMPlexTransformObject),__Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_8petsc4py_5PETSc_DMPlexTransform) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_DS = __Pyx_ImportType_3_0_6(module, "petsc4py.PETSc", "DS", sizeof(struct PyPetscDSObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(struct PyPetscDSObject),__Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_8petsc4py_5PETSc_DS) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_Partitioner = __Pyx_ImportType_3_0_6(module, "petsc4py.PETSc", "Partitioner", sizeof(struct PyPetscPartitionerObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(struct PyPetscPartitionerObject),__Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_8petsc4py_5PETSc_Partitioner) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_DMLabel = __Pyx_ImportType_3_0_6(module, "petsc4py.PETSc", "DMLabel", sizeof(struct PyPetscDMLabelObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_6(struct PyPetscDMLabelObject),__Pyx_ImportType_CheckSize_Warn_3_0_6); if (!__pyx_ptype_8petsc4py_5PETSc_DMLabel) goto bad;
|
||||
Py_DECREF(module); module = 0;
|
||||
return 0;
|
||||
bad:
|
||||
Py_XDECREF(module);
|
||||
return -1;
|
||||
}
|
||||
|
||||
#endif /* !__PYX_HAVE_API__petsc4py__PETSc */
|
File diff suppressed because one or more lines are too long
@ -1,4 +1,4 @@
|
||||
/* Generated by Cython 0.29.36 */
|
||||
/* Generated by Cython 3.0.6 */
|
||||
|
||||
#ifndef __PYX_HAVE__petsc4py__PETSc
|
||||
#define __PYX_HAVE__petsc4py__PETSc
|
||||
@ -28,6 +28,7 @@ struct PyPetscKSPObject;
|
||||
struct PyPetscSNESObject;
|
||||
struct PyPetscTSObject;
|
||||
struct PyPetscTAOObject;
|
||||
struct PyPetscTAOLineSearchObject;
|
||||
struct PyPetscAOObject;
|
||||
struct PyPetscDMObject;
|
||||
struct PyPetscDMPlexTransformObject;
|
||||
@ -357,6 +358,19 @@ typedef struct PyPetscTAOObject PyPetscTAOObject;
|
||||
/* "petsc4py/PETSc.pxd":265
|
||||
* cdef PetscTAO tao
|
||||
*
|
||||
* ctypedef public api class TAOLineSearch(Object) [ # <<<<<<<<<<<<<<
|
||||
* type PyPetscTAOLineSearch_Type,
|
||||
* object PyPetscTAOLineSearchObject,
|
||||
*/
|
||||
struct PyPetscTAOLineSearchObject {
|
||||
struct PyPetscObjectObject __pyx_base;
|
||||
TaoLineSearch taols;
|
||||
};
|
||||
typedef struct PyPetscTAOLineSearchObject PyPetscTAOLineSearchObject;
|
||||
|
||||
/* "petsc4py/PETSc.pxd":272
|
||||
*
|
||||
*
|
||||
* ctypedef public api class AO(Object) [ # <<<<<<<<<<<<<<
|
||||
* type PyPetscAO_Type,
|
||||
* object PyPetscAOObject,
|
||||
@ -367,7 +381,7 @@ struct PyPetscAOObject {
|
||||
};
|
||||
typedef struct PyPetscAOObject PyPetscAOObject;
|
||||
|
||||
/* "petsc4py/PETSc.pxd":271
|
||||
/* "petsc4py/PETSc.pxd":278
|
||||
* cdef PetscAO ao
|
||||
*
|
||||
* ctypedef public api class DM(Object) [ # <<<<<<<<<<<<<<
|
||||
@ -380,7 +394,7 @@ struct PyPetscDMObject {
|
||||
};
|
||||
typedef struct PyPetscDMObject PyPetscDMObject;
|
||||
|
||||
/* "petsc4py/PETSc.pxd":277
|
||||
/* "petsc4py/PETSc.pxd":284
|
||||
* cdef PetscDM dm
|
||||
*
|
||||
* ctypedef public api class DMPlexTransform(Object) [ # <<<<<<<<<<<<<<
|
||||
@ -393,7 +407,7 @@ struct PyPetscDMPlexTransformObject {
|
||||
};
|
||||
typedef struct PyPetscDMPlexTransformObject PyPetscDMPlexTransformObject;
|
||||
|
||||
/* "petsc4py/PETSc.pxd":283
|
||||
/* "petsc4py/PETSc.pxd":290
|
||||
* cdef PetscDMPlexTransform tr
|
||||
*
|
||||
* ctypedef public api class DS(Object) [ # <<<<<<<<<<<<<<
|
||||
@ -406,7 +420,7 @@ struct PyPetscDSObject {
|
||||
};
|
||||
typedef struct PyPetscDSObject PyPetscDSObject;
|
||||
|
||||
/* "petsc4py/PETSc.pxd":289
|
||||
/* "petsc4py/PETSc.pxd":296
|
||||
* cdef PetscDS ds
|
||||
*
|
||||
* ctypedef public api class Partitioner(Object) [ # <<<<<<<<<<<<<<
|
||||
@ -419,7 +433,7 @@ struct PyPetscPartitionerObject {
|
||||
};
|
||||
typedef struct PyPetscPartitionerObject PyPetscPartitionerObject;
|
||||
|
||||
/* "petsc4py/PETSc.pxd":295
|
||||
/* "petsc4py/PETSc.pxd":302
|
||||
* cdef PetscPartitioner part
|
||||
*
|
||||
* ctypedef public api class DMLabel(Object) [ # <<<<<<<<<<<<<<
|
||||
@ -434,7 +448,16 @@ typedef struct PyPetscDMLabelObject PyPetscDMLabelObject;
|
||||
|
||||
#ifndef __PYX_HAVE_API__petsc4py__PETSc
|
||||
|
||||
#ifndef __PYX_EXTERN_C
|
||||
#ifdef CYTHON_EXTERN_C
|
||||
#undef __PYX_EXTERN_C
|
||||
#define __PYX_EXTERN_C CYTHON_EXTERN_C
|
||||
#elif defined(__PYX_EXTERN_C)
|
||||
#ifdef _MSC_VER
|
||||
#pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.")
|
||||
#else
|
||||
#warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.
|
||||
#endif
|
||||
#else
|
||||
#ifdef __cplusplus
|
||||
#define __PYX_EXTERN_C extern "C"
|
||||
#else
|
||||
@ -470,6 +493,7 @@ __PYX_EXTERN_C DL_IMPORT(PyTypeObject) PyPetscKSP_Type;
|
||||
__PYX_EXTERN_C DL_IMPORT(PyTypeObject) PyPetscSNES_Type;
|
||||
__PYX_EXTERN_C DL_IMPORT(PyTypeObject) PyPetscTS_Type;
|
||||
__PYX_EXTERN_C DL_IMPORT(PyTypeObject) PyPetscTAO_Type;
|
||||
__PYX_EXTERN_C DL_IMPORT(PyTypeObject) PyPetscTAOLineSearch_Type;
|
||||
__PYX_EXTERN_C DL_IMPORT(PyTypeObject) PyPetscAO_Type;
|
||||
__PYX_EXTERN_C DL_IMPORT(PyTypeObject) PyPetscDM_Type;
|
||||
__PYX_EXTERN_C DL_IMPORT(PyTypeObject) PyPetscDMPlexTransform_Type;
|
||||
@ -499,7 +523,22 @@ __PYX_EXTERN_C PetscErrorCode PetscPythonRegisterAll(void);
|
||||
#if PY_MAJOR_VERSION < 3
|
||||
PyMODINIT_FUNC initPETSc(void);
|
||||
#else
|
||||
/* WARNING: Use PyImport_AppendInittab("PETSc", PyInit_PETSc) instead of calling PyInit_PETSc directly from Python 3.5 */
|
||||
PyMODINIT_FUNC PyInit_PETSc(void);
|
||||
|
||||
#if PY_VERSION_HEX >= 0x03050000 && (defined(__GNUC__) || defined(__clang__) || defined(_MSC_VER) || (defined(__cplusplus) && __cplusplus >= 201402L))
|
||||
#if defined(__cplusplus) && __cplusplus >= 201402L
|
||||
[[deprecated("Use PyImport_AppendInittab(\"PETSc\", PyInit_PETSc) instead of calling PyInit_PETSc directly.")]] inline
|
||||
#elif defined(__GNUC__) || defined(__clang__)
|
||||
__attribute__ ((__deprecated__("Use PyImport_AppendInittab(\"PETSc\", PyInit_PETSc) instead of calling PyInit_PETSc directly."), __unused__)) __inline__
|
||||
#elif defined(_MSC_VER)
|
||||
__declspec(deprecated("Use PyImport_AppendInittab(\"PETSc\", PyInit_PETSc) instead of calling PyInit_PETSc directly.")) __inline
|
||||
#endif
|
||||
static PyObject* __PYX_WARN_IF_PyInit_PETSc_INIT_CALLED(PyObject* res) {
|
||||
return res;
|
||||
}
|
||||
#define PyInit_PETSc() __PYX_WARN_IF_PyInit_PETSc_INIT_CALLED(PyInit_PETSc())
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* !__PYX_HAVE__petsc4py__PETSc */
|
@ -1,448 +0,0 @@
|
||||
/* Generated by Cython 0.29.36 */
|
||||
|
||||
#ifndef __PYX_HAVE_API__petsc4py__PETSc
|
||||
#define __PYX_HAVE_API__petsc4py__PETSc
|
||||
#ifdef __MINGW64__
|
||||
#define MS_WIN64
|
||||
#endif
|
||||
#include "Python.h"
|
||||
#include "PETSc.h"
|
||||
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_Comm = 0;
|
||||
#define PyPetscComm_Type (*__pyx_ptype_8petsc4py_5PETSc_Comm)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_Object = 0;
|
||||
#define PyPetscObject_Type (*__pyx_ptype_8petsc4py_5PETSc_Object)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_Viewer = 0;
|
||||
#define PyPetscViewer_Type (*__pyx_ptype_8petsc4py_5PETSc_Viewer)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_Random = 0;
|
||||
#define PyPetscRandom_Type (*__pyx_ptype_8petsc4py_5PETSc_Random)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_Device = 0;
|
||||
#define PyPetscDevice_Type (*__pyx_ptype_8petsc4py_5PETSc_Device)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_DeviceContext = 0;
|
||||
#define PyPetscDeviceContext_Type (*__pyx_ptype_8petsc4py_5PETSc_DeviceContext)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_IS = 0;
|
||||
#define PyPetscIS_Type (*__pyx_ptype_8petsc4py_5PETSc_IS)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_LGMap = 0;
|
||||
#define PyPetscLGMap_Type (*__pyx_ptype_8petsc4py_5PETSc_LGMap)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_SF = 0;
|
||||
#define PyPetscSF_Type (*__pyx_ptype_8petsc4py_5PETSc_SF)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_Vec = 0;
|
||||
#define PyPetscVec_Type (*__pyx_ptype_8petsc4py_5PETSc_Vec)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_Space = 0;
|
||||
#define PyPetscSpace_Type (*__pyx_ptype_8petsc4py_5PETSc_Space)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_DualSpace = 0;
|
||||
#define PyPetscDualSpace_Type (*__pyx_ptype_8petsc4py_5PETSc_DualSpace)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_FE = 0;
|
||||
#define PyPetscFE_Type (*__pyx_ptype_8petsc4py_5PETSc_FE)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_Quad = 0;
|
||||
#define PyPetscQuad_Type (*__pyx_ptype_8petsc4py_5PETSc_Quad)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_Scatter = 0;
|
||||
#define PyPetscScatter_Type (*__pyx_ptype_8petsc4py_5PETSc_Scatter)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_Section = 0;
|
||||
#define PyPetscSection_Type (*__pyx_ptype_8petsc4py_5PETSc_Section)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_Mat = 0;
|
||||
#define PyPetscMat_Type (*__pyx_ptype_8petsc4py_5PETSc_Mat)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_MatPartitioning = 0;
|
||||
#define PyPetscMatPartitioning_Type (*__pyx_ptype_8petsc4py_5PETSc_MatPartitioning)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_NullSpace = 0;
|
||||
#define PyPetscNullSpace_Type (*__pyx_ptype_8petsc4py_5PETSc_NullSpace)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_PC = 0;
|
||||
#define PyPetscPC_Type (*__pyx_ptype_8petsc4py_5PETSc_PC)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_KSP = 0;
|
||||
#define PyPetscKSP_Type (*__pyx_ptype_8petsc4py_5PETSc_KSP)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_SNES = 0;
|
||||
#define PyPetscSNES_Type (*__pyx_ptype_8petsc4py_5PETSc_SNES)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_TS = 0;
|
||||
#define PyPetscTS_Type (*__pyx_ptype_8petsc4py_5PETSc_TS)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_TAO = 0;
|
||||
#define PyPetscTAO_Type (*__pyx_ptype_8petsc4py_5PETSc_TAO)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_AO = 0;
|
||||
#define PyPetscAO_Type (*__pyx_ptype_8petsc4py_5PETSc_AO)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_DM = 0;
|
||||
#define PyPetscDM_Type (*__pyx_ptype_8petsc4py_5PETSc_DM)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_DMPlexTransform = 0;
|
||||
#define PyPetscDMPlexTransform_Type (*__pyx_ptype_8petsc4py_5PETSc_DMPlexTransform)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_DS = 0;
|
||||
#define PyPetscDS_Type (*__pyx_ptype_8petsc4py_5PETSc_DS)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_Partitioner = 0;
|
||||
#define PyPetscPartitioner_Type (*__pyx_ptype_8petsc4py_5PETSc_Partitioner)
|
||||
static PyTypeObject *__pyx_ptype_8petsc4py_5PETSc_DMLabel = 0;
|
||||
#define PyPetscDMLabel_Type (*__pyx_ptype_8petsc4py_5PETSc_DMLabel)
|
||||
|
||||
static int (*__pyx_api_f_8petsc4py_5PETSc_PyPetscError_Set)(PetscErrorCode) = 0;
|
||||
#define PyPetscError_Set __pyx_api_f_8petsc4py_5PETSc_PyPetscError_Set
|
||||
static PyObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscComm_New)(MPI_Comm) = 0;
|
||||
#define PyPetscComm_New __pyx_api_f_8petsc4py_5PETSc_PyPetscComm_New
|
||||
static MPI_Comm (*__pyx_api_f_8petsc4py_5PETSc_PyPetscComm_Get)(PyObject *) = 0;
|
||||
#define PyPetscComm_Get __pyx_api_f_8petsc4py_5PETSc_PyPetscComm_Get
|
||||
static MPI_Comm *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscComm_GetPtr)(PyObject *) = 0;
|
||||
#define PyPetscComm_GetPtr __pyx_api_f_8petsc4py_5PETSc_PyPetscComm_GetPtr
|
||||
static PyObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscObject_New)(PetscObject) = 0;
|
||||
#define PyPetscObject_New __pyx_api_f_8petsc4py_5PETSc_PyPetscObject_New
|
||||
static PetscObject (*__pyx_api_f_8petsc4py_5PETSc_PyPetscObject_Get)(PyObject *) = 0;
|
||||
#define PyPetscObject_Get __pyx_api_f_8petsc4py_5PETSc_PyPetscObject_Get
|
||||
static PetscObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscObject_GetPtr)(PyObject *) = 0;
|
||||
#define PyPetscObject_GetPtr __pyx_api_f_8petsc4py_5PETSc_PyPetscObject_GetPtr
|
||||
static PyObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscViewer_New)(PetscViewer) = 0;
|
||||
#define PyPetscViewer_New __pyx_api_f_8petsc4py_5PETSc_PyPetscViewer_New
|
||||
static PetscViewer (*__pyx_api_f_8petsc4py_5PETSc_PyPetscViewer_Get)(PyObject *) = 0;
|
||||
#define PyPetscViewer_Get __pyx_api_f_8petsc4py_5PETSc_PyPetscViewer_Get
|
||||
static PyObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscRandom_New)(PetscRandom) = 0;
|
||||
#define PyPetscRandom_New __pyx_api_f_8petsc4py_5PETSc_PyPetscRandom_New
|
||||
static PetscRandom (*__pyx_api_f_8petsc4py_5PETSc_PyPetscRandom_Get)(PyObject *) = 0;
|
||||
#define PyPetscRandom_Get __pyx_api_f_8petsc4py_5PETSc_PyPetscRandom_Get
|
||||
static struct PyPetscDeviceObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscDevice_New)(PetscDevice) = 0;
|
||||
#define PyPetscDevice_New __pyx_api_f_8petsc4py_5PETSc_PyPetscDevice_New
|
||||
static PetscDevice (*__pyx_api_f_8petsc4py_5PETSc_PyPetscDevice_Get)(PyObject *) = 0;
|
||||
#define PyPetscDevice_Get __pyx_api_f_8petsc4py_5PETSc_PyPetscDevice_Get
|
||||
static struct PyPetscDeviceContextObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscDeviceContext_New)(PetscDeviceContext) = 0;
|
||||
#define PyPetscDeviceContext_New __pyx_api_f_8petsc4py_5PETSc_PyPetscDeviceContext_New
|
||||
static PetscDeviceContext (*__pyx_api_f_8petsc4py_5PETSc_PyPetscDeviceContext_Get)(PyObject *) = 0;
|
||||
#define PyPetscDeviceContext_Get __pyx_api_f_8petsc4py_5PETSc_PyPetscDeviceContext_Get
|
||||
static PyObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscIS_New)(IS) = 0;
|
||||
#define PyPetscIS_New __pyx_api_f_8petsc4py_5PETSc_PyPetscIS_New
|
||||
static IS (*__pyx_api_f_8petsc4py_5PETSc_PyPetscIS_Get)(PyObject *) = 0;
|
||||
#define PyPetscIS_Get __pyx_api_f_8petsc4py_5PETSc_PyPetscIS_Get
|
||||
static PyObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscLGMap_New)(ISLocalToGlobalMapping) = 0;
|
||||
#define PyPetscLGMap_New __pyx_api_f_8petsc4py_5PETSc_PyPetscLGMap_New
|
||||
static ISLocalToGlobalMapping (*__pyx_api_f_8petsc4py_5PETSc_PyPetscLGMap_Get)(PyObject *) = 0;
|
||||
#define PyPetscLGMap_Get __pyx_api_f_8petsc4py_5PETSc_PyPetscLGMap_Get
|
||||
static PyObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscSF_New)(PetscSF) = 0;
|
||||
#define PyPetscSF_New __pyx_api_f_8petsc4py_5PETSc_PyPetscSF_New
|
||||
static PetscSF (*__pyx_api_f_8petsc4py_5PETSc_PyPetscSF_Get)(PyObject *) = 0;
|
||||
#define PyPetscSF_Get __pyx_api_f_8petsc4py_5PETSc_PyPetscSF_Get
|
||||
static PyObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscVec_New)(Vec) = 0;
|
||||
#define PyPetscVec_New __pyx_api_f_8petsc4py_5PETSc_PyPetscVec_New
|
||||
static Vec (*__pyx_api_f_8petsc4py_5PETSc_PyPetscVec_Get)(PyObject *) = 0;
|
||||
#define PyPetscVec_Get __pyx_api_f_8petsc4py_5PETSc_PyPetscVec_Get
|
||||
static PyObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscScatter_New)(VecScatter) = 0;
|
||||
#define PyPetscScatter_New __pyx_api_f_8petsc4py_5PETSc_PyPetscScatter_New
|
||||
static VecScatter (*__pyx_api_f_8petsc4py_5PETSc_PyPetscScatter_Get)(PyObject *) = 0;
|
||||
#define PyPetscScatter_Get __pyx_api_f_8petsc4py_5PETSc_PyPetscScatter_Get
|
||||
static PyObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscSection_New)(PetscSection) = 0;
|
||||
#define PyPetscSection_New __pyx_api_f_8petsc4py_5PETSc_PyPetscSection_New
|
||||
static PetscSection (*__pyx_api_f_8petsc4py_5PETSc_PyPetscSection_Get)(PyObject *) = 0;
|
||||
#define PyPetscSection_Get __pyx_api_f_8petsc4py_5PETSc_PyPetscSection_Get
|
||||
static PyObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscMat_New)(Mat) = 0;
|
||||
#define PyPetscMat_New __pyx_api_f_8petsc4py_5PETSc_PyPetscMat_New
|
||||
static Mat (*__pyx_api_f_8petsc4py_5PETSc_PyPetscMat_Get)(PyObject *) = 0;
|
||||
#define PyPetscMat_Get __pyx_api_f_8petsc4py_5PETSc_PyPetscMat_Get
|
||||
static PyObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscMatPartitioning_New)(MatPartitioning) = 0;
|
||||
#define PyPetscMatPartitioning_New __pyx_api_f_8petsc4py_5PETSc_PyPetscMatPartitioning_New
|
||||
static MatPartitioning (*__pyx_api_f_8petsc4py_5PETSc_PyPetscMatPartitioning_Get)(PyObject *) = 0;
|
||||
#define PyPetscMatPartitioning_Get __pyx_api_f_8petsc4py_5PETSc_PyPetscMatPartitioning_Get
|
||||
static PyObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscPC_New)(PC) = 0;
|
||||
#define PyPetscPC_New __pyx_api_f_8petsc4py_5PETSc_PyPetscPC_New
|
||||
static PC (*__pyx_api_f_8petsc4py_5PETSc_PyPetscPC_Get)(PyObject *) = 0;
|
||||
#define PyPetscPC_Get __pyx_api_f_8petsc4py_5PETSc_PyPetscPC_Get
|
||||
static PyObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscKSP_New)(KSP) = 0;
|
||||
#define PyPetscKSP_New __pyx_api_f_8petsc4py_5PETSc_PyPetscKSP_New
|
||||
static KSP (*__pyx_api_f_8petsc4py_5PETSc_PyPetscKSP_Get)(PyObject *) = 0;
|
||||
#define PyPetscKSP_Get __pyx_api_f_8petsc4py_5PETSc_PyPetscKSP_Get
|
||||
static PyObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscSNES_New)(SNES) = 0;
|
||||
#define PyPetscSNES_New __pyx_api_f_8petsc4py_5PETSc_PyPetscSNES_New
|
||||
static SNES (*__pyx_api_f_8petsc4py_5PETSc_PyPetscSNES_Get)(PyObject *) = 0;
|
||||
#define PyPetscSNES_Get __pyx_api_f_8petsc4py_5PETSc_PyPetscSNES_Get
|
||||
static PyObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscTS_New)(TS) = 0;
|
||||
#define PyPetscTS_New __pyx_api_f_8petsc4py_5PETSc_PyPetscTS_New
|
||||
static TS (*__pyx_api_f_8petsc4py_5PETSc_PyPetscTS_Get)(PyObject *) = 0;
|
||||
#define PyPetscTS_Get __pyx_api_f_8petsc4py_5PETSc_PyPetscTS_Get
|
||||
static PyObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscTAO_New)(Tao) = 0;
|
||||
#define PyPetscTAO_New __pyx_api_f_8petsc4py_5PETSc_PyPetscTAO_New
|
||||
static Tao (*__pyx_api_f_8petsc4py_5PETSc_PyPetscTAO_Get)(PyObject *) = 0;
|
||||
#define PyPetscTAO_Get __pyx_api_f_8petsc4py_5PETSc_PyPetscTAO_Get
|
||||
static PyObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscAO_New)(AO) = 0;
|
||||
#define PyPetscAO_New __pyx_api_f_8petsc4py_5PETSc_PyPetscAO_New
|
||||
static AO (*__pyx_api_f_8petsc4py_5PETSc_PyPetscAO_Get)(PyObject *) = 0;
|
||||
#define PyPetscAO_Get __pyx_api_f_8petsc4py_5PETSc_PyPetscAO_Get
|
||||
static PyObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscDM_New)(DM) = 0;
|
||||
#define PyPetscDM_New __pyx_api_f_8petsc4py_5PETSc_PyPetscDM_New
|
||||
static DM (*__pyx_api_f_8petsc4py_5PETSc_PyPetscDM_Get)(PyObject *) = 0;
|
||||
#define PyPetscDM_Get __pyx_api_f_8petsc4py_5PETSc_PyPetscDM_Get
|
||||
static PyObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscDS_New)(PetscDS) = 0;
|
||||
#define PyPetscDS_New __pyx_api_f_8petsc4py_5PETSc_PyPetscDS_New
|
||||
static PetscDS (*__pyx_api_f_8petsc4py_5PETSc_PyPetscDS_Get)(PyObject *) = 0;
|
||||
#define PyPetscDS_Get __pyx_api_f_8petsc4py_5PETSc_PyPetscDS_Get
|
||||
static PyObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscPartitioner_New)(PetscPartitioner) = 0;
|
||||
#define PyPetscPartitioner_New __pyx_api_f_8petsc4py_5PETSc_PyPetscPartitioner_New
|
||||
static PetscPartitioner (*__pyx_api_f_8petsc4py_5PETSc_PyPetscPartitioner_Get)(PyObject *) = 0;
|
||||
#define PyPetscPartitioner_Get __pyx_api_f_8petsc4py_5PETSc_PyPetscPartitioner_Get
|
||||
static PyObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscFE_New)(PetscFE) = 0;
|
||||
#define PyPetscFE_New __pyx_api_f_8petsc4py_5PETSc_PyPetscFE_New
|
||||
static PetscFE (*__pyx_api_f_8petsc4py_5PETSc_PyPetscFE_Get)(PyObject *) = 0;
|
||||
#define PyPetscFE_Get __pyx_api_f_8petsc4py_5PETSc_PyPetscFE_Get
|
||||
static PyObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscQuad_New)(PetscQuadrature) = 0;
|
||||
#define PyPetscQuad_New __pyx_api_f_8petsc4py_5PETSc_PyPetscQuad_New
|
||||
static PetscQuadrature (*__pyx_api_f_8petsc4py_5PETSc_PyPetscQuad_Get)(PyObject *) = 0;
|
||||
#define PyPetscQuad_Get __pyx_api_f_8petsc4py_5PETSc_PyPetscQuad_Get
|
||||
static PyObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscDMLabel_New)(DMLabel) = 0;
|
||||
#define PyPetscDMLabel_New __pyx_api_f_8petsc4py_5PETSc_PyPetscDMLabel_New
|
||||
static DMLabel (*__pyx_api_f_8petsc4py_5PETSc_PyPetscDMLabel_Get)(PyObject *) = 0;
|
||||
#define PyPetscDMLabel_Get __pyx_api_f_8petsc4py_5PETSc_PyPetscDMLabel_Get
|
||||
static PyObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscSpace_New)(PetscSpace) = 0;
|
||||
#define PyPetscSpace_New __pyx_api_f_8petsc4py_5PETSc_PyPetscSpace_New
|
||||
static PetscSpace (*__pyx_api_f_8petsc4py_5PETSc_PyPetscSpace_Get)(PyObject *) = 0;
|
||||
#define PyPetscSpace_Get __pyx_api_f_8petsc4py_5PETSc_PyPetscSpace_Get
|
||||
static PyObject *(*__pyx_api_f_8petsc4py_5PETSc_PyPetscDualSpace_New)(PetscDualSpace) = 0;
|
||||
#define PyPetscDualSpace_New __pyx_api_f_8petsc4py_5PETSc_PyPetscDualSpace_New
|
||||
static PetscDualSpace (*__pyx_api_f_8petsc4py_5PETSc_PyPetscDualSpace_Get)(PyObject *) = 0;
|
||||
#define PyPetscDualSpace_Get __pyx_api_f_8petsc4py_5PETSc_PyPetscDualSpace_Get
|
||||
#if !defined(__Pyx_PyIdentifier_FromString)
|
||||
#if PY_MAJOR_VERSION < 3
|
||||
#define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s)
|
||||
#else
|
||||
#define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef __PYX_HAVE_RT_ImportFunction_0_29_36
|
||||
#define __PYX_HAVE_RT_ImportFunction_0_29_36
|
||||
static int __Pyx_ImportFunction_0_29_36(PyObject *module, const char *funcname, void (**f)(void), const char *sig) {
|
||||
PyObject *d = 0;
|
||||
PyObject *cobj = 0;
|
||||
union {
|
||||
void (*fp)(void);
|
||||
void *p;
|
||||
} tmp;
|
||||
d = PyObject_GetAttrString(module, (char *)"__pyx_capi__");
|
||||
if (!d)
|
||||
goto bad;
|
||||
cobj = PyDict_GetItemString(d, funcname);
|
||||
if (!cobj) {
|
||||
PyErr_Format(PyExc_ImportError,
|
||||
"%.200s does not export expected C function %.200s",
|
||||
PyModule_GetName(module), funcname);
|
||||
goto bad;
|
||||
}
|
||||
#if PY_VERSION_HEX >= 0x02070000
|
||||
if (!PyCapsule_IsValid(cobj, sig)) {
|
||||
PyErr_Format(PyExc_TypeError,
|
||||
"C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
|
||||
PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj));
|
||||
goto bad;
|
||||
}
|
||||
tmp.p = PyCapsule_GetPointer(cobj, sig);
|
||||
#else
|
||||
{const char *desc, *s1, *s2;
|
||||
desc = (const char *)PyCObject_GetDesc(cobj);
|
||||
if (!desc)
|
||||
goto bad;
|
||||
s1 = desc; s2 = sig;
|
||||
while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; }
|
||||
if (*s1 != *s2) {
|
||||
PyErr_Format(PyExc_TypeError,
|
||||
"C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
|
||||
PyModule_GetName(module), funcname, sig, desc);
|
||||
goto bad;
|
||||
}
|
||||
tmp.p = PyCObject_AsVoidPtr(cobj);}
|
||||
#endif
|
||||
*f = tmp.fp;
|
||||
if (!(*f))
|
||||
goto bad;
|
||||
Py_DECREF(d);
|
||||
return 0;
|
||||
bad:
|
||||
Py_XDECREF(d);
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef __PYX_HAVE_RT_ImportType_proto_0_29_36
|
||||
#define __PYX_HAVE_RT_ImportType_proto_0_29_36
|
||||
#if __STDC_VERSION__ >= 201112L
|
||||
#include <stdalign.h>
|
||||
#endif
|
||||
#if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L
|
||||
#define __PYX_GET_STRUCT_ALIGNMENT_0_29_36(s) alignof(s)
|
||||
#else
|
||||
#define __PYX_GET_STRUCT_ALIGNMENT_0_29_36(s) sizeof(void*)
|
||||
#endif
|
||||
enum __Pyx_ImportType_CheckSize_0_29_36 {
|
||||
__Pyx_ImportType_CheckSize_Error_0_29_36 = 0,
|
||||
__Pyx_ImportType_CheckSize_Warn_0_29_36 = 1,
|
||||
__Pyx_ImportType_CheckSize_Ignore_0_29_36 = 2
|
||||
};
|
||||
static PyTypeObject *__Pyx_ImportType_0_29_36(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_0_29_36 check_size);
|
||||
#endif
|
||||
|
||||
#ifndef __PYX_HAVE_RT_ImportType_0_29_36
|
||||
#define __PYX_HAVE_RT_ImportType_0_29_36
|
||||
static PyTypeObject *__Pyx_ImportType_0_29_36(PyObject *module, const char *module_name, const char *class_name,
|
||||
size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_0_29_36 check_size)
|
||||
{
|
||||
PyObject *result = 0;
|
||||
char warning[200];
|
||||
Py_ssize_t basicsize;
|
||||
Py_ssize_t itemsize;
|
||||
#ifdef Py_LIMITED_API
|
||||
PyObject *py_basicsize;
|
||||
PyObject *py_itemsize;
|
||||
#endif
|
||||
result = PyObject_GetAttrString(module, class_name);
|
||||
if (!result)
|
||||
goto bad;
|
||||
if (!PyType_Check(result)) {
|
||||
PyErr_Format(PyExc_TypeError,
|
||||
"%.200s.%.200s is not a type object",
|
||||
module_name, class_name);
|
||||
goto bad;
|
||||
}
|
||||
#ifndef Py_LIMITED_API
|
||||
basicsize = ((PyTypeObject *)result)->tp_basicsize;
|
||||
itemsize = ((PyTypeObject *)result)->tp_itemsize;
|
||||
#else
|
||||
py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
|
||||
if (!py_basicsize)
|
||||
goto bad;
|
||||
basicsize = PyLong_AsSsize_t(py_basicsize);
|
||||
Py_DECREF(py_basicsize);
|
||||
py_basicsize = 0;
|
||||
if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
|
||||
goto bad;
|
||||
py_itemsize = PyObject_GetAttrString(result, "__itemsize__");
|
||||
if (!py_itemsize)
|
||||
goto bad;
|
||||
itemsize = PyLong_AsSsize_t(py_itemsize);
|
||||
Py_DECREF(py_itemsize);
|
||||
py_itemsize = 0;
|
||||
if (itemsize == (Py_ssize_t)-1 && PyErr_Occurred())
|
||||
goto bad;
|
||||
#endif
|
||||
if (itemsize) {
|
||||
if (size % alignment) {
|
||||
alignment = size % alignment;
|
||||
}
|
||||
if (itemsize < (Py_ssize_t)alignment)
|
||||
itemsize = (Py_ssize_t)alignment;
|
||||
}
|
||||
if ((size_t)(basicsize + itemsize) < size) {
|
||||
PyErr_Format(PyExc_ValueError,
|
||||
"%.200s.%.200s size changed, may indicate binary incompatibility. "
|
||||
"Expected %zd from C header, got %zd from PyObject",
|
||||
module_name, class_name, size, basicsize);
|
||||
goto bad;
|
||||
}
|
||||
if (check_size == __Pyx_ImportType_CheckSize_Error_0_29_36 && (size_t)basicsize != size) {
|
||||
PyErr_Format(PyExc_ValueError,
|
||||
"%.200s.%.200s size changed, may indicate binary incompatibility. "
|
||||
"Expected %zd from C header, got %zd from PyObject",
|
||||
module_name, class_name, size, basicsize);
|
||||
goto bad;
|
||||
}
|
||||
else if (check_size == __Pyx_ImportType_CheckSize_Warn_0_29_36 && (size_t)basicsize > size) {
|
||||
PyOS_snprintf(warning, sizeof(warning),
|
||||
"%s.%s size changed, may indicate binary incompatibility. "
|
||||
"Expected %zd from C header, got %zd from PyObject",
|
||||
module_name, class_name, size, basicsize);
|
||||
if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
|
||||
}
|
||||
return (PyTypeObject *)result;
|
||||
bad:
|
||||
Py_XDECREF(result);
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
static int import_petsc4py__PETSc(void) {
|
||||
PyObject *module = 0;
|
||||
module = PyImport_ImportModule("petsc4py.PETSc");
|
||||
if (!module) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscError_Set", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscError_Set, "int (PetscErrorCode)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscComm_New", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscComm_New, "PyObject *(MPI_Comm)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscComm_Get", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscComm_Get, "MPI_Comm (PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscComm_GetPtr", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscComm_GetPtr, "MPI_Comm *(PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscObject_New", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscObject_New, "PyObject *(PetscObject)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscObject_Get", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscObject_Get, "PetscObject (PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscObject_GetPtr", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscObject_GetPtr, "PetscObject *(PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscViewer_New", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscViewer_New, "PyObject *(PetscViewer)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscViewer_Get", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscViewer_Get, "PetscViewer (PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscRandom_New", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscRandom_New, "PyObject *(PetscRandom)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscRandom_Get", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscRandom_Get, "PetscRandom (PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscDevice_New", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscDevice_New, "struct PyPetscDeviceObject *(PetscDevice)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscDevice_Get", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscDevice_Get, "PetscDevice (PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscDeviceContext_New", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscDeviceContext_New, "struct PyPetscDeviceContextObject *(PetscDeviceContext)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscDeviceContext_Get", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscDeviceContext_Get, "PetscDeviceContext (PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscIS_New", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscIS_New, "PyObject *(IS)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscIS_Get", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscIS_Get, "IS (PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscLGMap_New", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscLGMap_New, "PyObject *(ISLocalToGlobalMapping)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscLGMap_Get", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscLGMap_Get, "ISLocalToGlobalMapping (PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscSF_New", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscSF_New, "PyObject *(PetscSF)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscSF_Get", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscSF_Get, "PetscSF (PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscVec_New", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscVec_New, "PyObject *(Vec)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscVec_Get", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscVec_Get, "Vec (PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscScatter_New", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscScatter_New, "PyObject *(VecScatter)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscScatter_Get", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscScatter_Get, "VecScatter (PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscSection_New", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscSection_New, "PyObject *(PetscSection)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscSection_Get", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscSection_Get, "PetscSection (PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscMat_New", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscMat_New, "PyObject *(Mat)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscMat_Get", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscMat_Get, "Mat (PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscMatPartitioning_New", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscMatPartitioning_New, "PyObject *(MatPartitioning)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscMatPartitioning_Get", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscMatPartitioning_Get, "MatPartitioning (PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscPC_New", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscPC_New, "PyObject *(PC)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscPC_Get", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscPC_Get, "PC (PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscKSP_New", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscKSP_New, "PyObject *(KSP)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscKSP_Get", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscKSP_Get, "KSP (PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscSNES_New", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscSNES_New, "PyObject *(SNES)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscSNES_Get", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscSNES_Get, "SNES (PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscTS_New", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscTS_New, "PyObject *(TS)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscTS_Get", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscTS_Get, "TS (PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscTAO_New", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscTAO_New, "PyObject *(Tao)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscTAO_Get", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscTAO_Get, "Tao (PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscAO_New", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscAO_New, "PyObject *(AO)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscAO_Get", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscAO_Get, "AO (PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscDM_New", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscDM_New, "PyObject *(DM)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscDM_Get", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscDM_Get, "DM (PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscDS_New", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscDS_New, "PyObject *(PetscDS)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscDS_Get", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscDS_Get, "PetscDS (PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscPartitioner_New", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscPartitioner_New, "PyObject *(PetscPartitioner)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscPartitioner_Get", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscPartitioner_Get, "PetscPartitioner (PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscFE_New", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscFE_New, "PyObject *(PetscFE)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscFE_Get", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscFE_Get, "PetscFE (PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscQuad_New", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscQuad_New, "PyObject *(PetscQuadrature)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscQuad_Get", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscQuad_Get, "PetscQuadrature (PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscDMLabel_New", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscDMLabel_New, "PyObject *(DMLabel)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscDMLabel_Get", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscDMLabel_Get, "DMLabel (PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscSpace_New", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscSpace_New, "PyObject *(PetscSpace)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscSpace_Get", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscSpace_Get, "PetscSpace (PyObject *)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscDualSpace_New", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscDualSpace_New, "PyObject *(PetscDualSpace)") < 0) goto bad;
|
||||
if (__Pyx_ImportFunction_0_29_36(module, "PyPetscDualSpace_Get", (void (**)(void))&__pyx_api_f_8petsc4py_5PETSc_PyPetscDualSpace_Get, "PetscDualSpace (PyObject *)") < 0) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_Comm = __Pyx_ImportType_0_29_36(module, "petsc4py.PETSc", "Comm", sizeof(struct PyPetscCommObject), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct PyPetscCommObject),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_8petsc4py_5PETSc_Comm) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_Object = __Pyx_ImportType_0_29_36(module, "petsc4py.PETSc", "Object", sizeof(struct PyPetscObjectObject), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct PyPetscObjectObject),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_8petsc4py_5PETSc_Object) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_Viewer = __Pyx_ImportType_0_29_36(module, "petsc4py.PETSc", "Viewer", sizeof(struct PyPetscViewerObject), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct PyPetscViewerObject),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_8petsc4py_5PETSc_Viewer) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_Random = __Pyx_ImportType_0_29_36(module, "petsc4py.PETSc", "Random", sizeof(struct PyPetscRandomObject), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct PyPetscRandomObject),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_8petsc4py_5PETSc_Random) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_Device = __Pyx_ImportType_0_29_36(module, "petsc4py.PETSc", "Device", sizeof(struct PyPetscDeviceObject), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct PyPetscDeviceObject),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_8petsc4py_5PETSc_Device) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_DeviceContext = __Pyx_ImportType_0_29_36(module, "petsc4py.PETSc", "DeviceContext", sizeof(struct PyPetscDeviceContextObject), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct PyPetscDeviceContextObject),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_8petsc4py_5PETSc_DeviceContext) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_IS = __Pyx_ImportType_0_29_36(module, "petsc4py.PETSc", "IS", sizeof(struct PyPetscISObject), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct PyPetscISObject),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_8petsc4py_5PETSc_IS) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_LGMap = __Pyx_ImportType_0_29_36(module, "petsc4py.PETSc", "LGMap", sizeof(struct PyPetscLGMapObject), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct PyPetscLGMapObject),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_8petsc4py_5PETSc_LGMap) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_SF = __Pyx_ImportType_0_29_36(module, "petsc4py.PETSc", "SF", sizeof(struct PyPetscSFObject), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct PyPetscSFObject),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_8petsc4py_5PETSc_SF) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_Vec = __Pyx_ImportType_0_29_36(module, "petsc4py.PETSc", "Vec", sizeof(struct PyPetscVecObject), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct PyPetscVecObject),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_8petsc4py_5PETSc_Vec) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_Space = __Pyx_ImportType_0_29_36(module, "petsc4py.PETSc", "Space", sizeof(struct PyPetscSpaceObject), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct PyPetscSpaceObject),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_8petsc4py_5PETSc_Space) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_DualSpace = __Pyx_ImportType_0_29_36(module, "petsc4py.PETSc", "DualSpace", sizeof(struct PyPetscDualSpaceObject), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct PyPetscDualSpaceObject),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_8petsc4py_5PETSc_DualSpace) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_FE = __Pyx_ImportType_0_29_36(module, "petsc4py.PETSc", "FE", sizeof(struct PyPetscFEObject), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct PyPetscFEObject),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_8petsc4py_5PETSc_FE) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_Quad = __Pyx_ImportType_0_29_36(module, "petsc4py.PETSc", "Quad", sizeof(struct PyPetscQuadObject), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct PyPetscQuadObject),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_8petsc4py_5PETSc_Quad) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_Scatter = __Pyx_ImportType_0_29_36(module, "petsc4py.PETSc", "Scatter", sizeof(struct PyPetscScatterObject), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct PyPetscScatterObject),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_8petsc4py_5PETSc_Scatter) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_Section = __Pyx_ImportType_0_29_36(module, "petsc4py.PETSc", "Section", sizeof(struct PyPetscSectionObject), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct PyPetscSectionObject),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_8petsc4py_5PETSc_Section) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_Mat = __Pyx_ImportType_0_29_36(module, "petsc4py.PETSc", "Mat", sizeof(struct PyPetscMatObject), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct PyPetscMatObject),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_8petsc4py_5PETSc_Mat) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_MatPartitioning = __Pyx_ImportType_0_29_36(module, "petsc4py.PETSc", "MatPartitioning", sizeof(struct PyPetscMatPartitioningObject), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct PyPetscMatPartitioningObject),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_8petsc4py_5PETSc_MatPartitioning) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_NullSpace = __Pyx_ImportType_0_29_36(module, "petsc4py.PETSc", "NullSpace", sizeof(struct PyPetscNullSpaceObject), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct PyPetscNullSpaceObject),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_8petsc4py_5PETSc_NullSpace) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_PC = __Pyx_ImportType_0_29_36(module, "petsc4py.PETSc", "PC", sizeof(struct PyPetscPCObject), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct PyPetscPCObject),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_8petsc4py_5PETSc_PC) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_KSP = __Pyx_ImportType_0_29_36(module, "petsc4py.PETSc", "KSP", sizeof(struct PyPetscKSPObject), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct PyPetscKSPObject),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_8petsc4py_5PETSc_KSP) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_SNES = __Pyx_ImportType_0_29_36(module, "petsc4py.PETSc", "SNES", sizeof(struct PyPetscSNESObject), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct PyPetscSNESObject),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_8petsc4py_5PETSc_SNES) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_TS = __Pyx_ImportType_0_29_36(module, "petsc4py.PETSc", "TS", sizeof(struct PyPetscTSObject), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct PyPetscTSObject),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_8petsc4py_5PETSc_TS) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_TAO = __Pyx_ImportType_0_29_36(module, "petsc4py.PETSc", "TAO", sizeof(struct PyPetscTAOObject), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct PyPetscTAOObject),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_8petsc4py_5PETSc_TAO) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_AO = __Pyx_ImportType_0_29_36(module, "petsc4py.PETSc", "AO", sizeof(struct PyPetscAOObject), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct PyPetscAOObject),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_8petsc4py_5PETSc_AO) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_DM = __Pyx_ImportType_0_29_36(module, "petsc4py.PETSc", "DM", sizeof(struct PyPetscDMObject), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct PyPetscDMObject),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_8petsc4py_5PETSc_DM) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_DMPlexTransform = __Pyx_ImportType_0_29_36(module, "petsc4py.PETSc", "DMPlexTransform", sizeof(struct PyPetscDMPlexTransformObject), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct PyPetscDMPlexTransformObject),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_8petsc4py_5PETSc_DMPlexTransform) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_DS = __Pyx_ImportType_0_29_36(module, "petsc4py.PETSc", "DS", sizeof(struct PyPetscDSObject), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct PyPetscDSObject),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_8petsc4py_5PETSc_DS) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_Partitioner = __Pyx_ImportType_0_29_36(module, "petsc4py.PETSc", "Partitioner", sizeof(struct PyPetscPartitionerObject), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct PyPetscPartitionerObject),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_8petsc4py_5PETSc_Partitioner) goto bad;
|
||||
__pyx_ptype_8petsc4py_5PETSc_DMLabel = __Pyx_ImportType_0_29_36(module, "petsc4py.PETSc", "DMLabel", sizeof(struct PyPetscDMLabelObject), __PYX_GET_STRUCT_ALIGNMENT_0_29_36(struct PyPetscDMLabelObject),__Pyx_ImportType_CheckSize_Warn_0_29_36); if (!__pyx_ptype_8petsc4py_5PETSc_DMLabel) goto bad;
|
||||
Py_DECREF(module); module = 0;
|
||||
return 0;
|
||||
bad:
|
||||
Py_XDECREF(module);
|
||||
return -1;
|
||||
}
|
||||
|
||||
#endif /* !__PYX_HAVE_API__petsc4py__PETSc */
|
67
petsc.spec
67
petsc.spec
@ -3,7 +3,7 @@
|
||||
%undefine _package_note_file
|
||||
|
||||
# Disable LTO
|
||||
# undefined-non-weak-symbol libpetsc.so.3.17.4_glibcxx_assert_fail
|
||||
# undefined-non-weak-symbol libpetsc.so.3.*_glibcxx_assert_fail
|
||||
%undefine _ld_as_needed
|
||||
%global _lto_cflags %{nil}
|
||||
|
||||
@ -53,13 +53,8 @@
|
||||
%bcond_without blas64
|
||||
%endif
|
||||
|
||||
%if 0%{?fedora} || 0%{?rhel} >= 9
|
||||
%global blaslib flexiblas
|
||||
%global blasvar %{nil}
|
||||
%else
|
||||
%global blaslib openblas
|
||||
%global blasvar %{nil}
|
||||
%endif
|
||||
|
||||
#
|
||||
## PETSC looks incompatible with serial MUMPS
|
||||
@ -78,18 +73,9 @@
|
||||
#
|
||||
|
||||
## SuperLUDIST needs parmetis
|
||||
%if 0%{?fedora} || 0%{?rhel} > 7
|
||||
%bcond_without superludist >= 6.3.0
|
||||
%bcond_with cgns
|
||||
%bcond_without hdf5
|
||||
%else
|
||||
# Needed superludist >= 6.3.0
|
||||
%bcond_with superludist
|
||||
## hdf5 is required by cgns
|
||||
## See rhbz#1904164
|
||||
%bcond_with cgns
|
||||
%bcond_with hdf5
|
||||
%endif
|
||||
%bcond_with superlumt
|
||||
#
|
||||
|
||||
@ -99,9 +85,7 @@
|
||||
|
||||
## Metis
|
||||
%bcond_without metis
|
||||
%if 0%{?fedora} || 0%{?rhel} < 8
|
||||
%bcond_without metis64
|
||||
%endif
|
||||
#
|
||||
|
||||
# 'scalapack' is required by 'MUMPS'
|
||||
@ -257,7 +241,11 @@
|
||||
%endif \
|
||||
%if %{with ptscotch} \
|
||||
--with-ptscotch=1 \\\
|
||||
%if 0%{?rhel} \
|
||||
--with-ptscotch-include=$MPI_INCLUDE \\\
|
||||
%else \
|
||||
--with-ptscotch-include=$MPI_INCLUDE/scotch \\\
|
||||
%endif \
|
||||
--with-ptscotch-lib="-L$MPI_LIB -lptscotch -lscotch -lptscotcherr -lscotcherr" \\\
|
||||
%endif \
|
||||
%if %{with mumps} \
|
||||
@ -299,18 +287,17 @@
|
||||
|
||||
Name: petsc
|
||||
Summary: Portable Extensible Toolkit for Scientific Computation
|
||||
Version: %{releasever}.2
|
||||
Release: %autorelease -e 0.riscv64
|
||||
Version: %{releasever}.6
|
||||
Release: %autorelease
|
||||
License: BSD-2-Clause
|
||||
URL: https://petsc.org/
|
||||
Source0: https://web.cels.anl.gov/projects/%{name}/download/release-snapshots/%{name}-with-docs-%{version}.tar.gz
|
||||
|
||||
# These files have been generated by Cython-0.29.36
|
||||
# PETSC-3.19 is not compatible with Cython-3.0.0 yet
|
||||
# See https://gitlab.com/petsc/petsc/-/issues/1431
|
||||
Source2: %{name}-PETSc_cython0.29.36.c
|
||||
Source3: %{name}-PETSc_cython0.29.36.h
|
||||
Source4: %{name}-PETSc_api_cython0.29.36.h
|
||||
# These files have been generated by Cython-3.0.6
|
||||
# PETSC-3.20+ needs Cython-3.0.0, these files are used in EPEL9
|
||||
Source1: %{name}-3.20-PETSc_cython3.0.6.c
|
||||
Source2: %{name}-3.20-PETSc_cython3.0.6.h
|
||||
Source3: %{name}-3.20-PETSc_api_cython3.0.6.h
|
||||
|
||||
## Remove rpath flags
|
||||
Patch0: %{name}-3.11-no-rpath.patch
|
||||
@ -322,6 +309,9 @@ Patch4: %{name}-3.19.4-fix_metis64.patch
|
||||
Patch6: %{name}-3.14.1-fix_pkgconfig_file.patch
|
||||
Patch7: %{name}-3.17.0-avoid_fake_MKL_detection.patch
|
||||
|
||||
Patch100: no-xdrlib.patch
|
||||
Patch101: no-parse_makefile.patch
|
||||
|
||||
%if %{with superlu}
|
||||
BuildRequires: SuperLU-devel >= 5.2.0
|
||||
%endif
|
||||
@ -329,7 +319,7 @@ BuildRequires: SuperLU-devel >= 5.2.0
|
||||
BuildRequires: SuperLUMT-devel
|
||||
%endif
|
||||
%if %{with mumps_serial}
|
||||
BuildRequires: MUMPS-devel >= 5.2.1
|
||||
BuildRequires: MUMPS-devel
|
||||
%endif
|
||||
%if %{with metis}
|
||||
BuildRequires: metis-devel >= 5.1.0
|
||||
@ -429,7 +419,7 @@ BuildRequires: blacs-openmpi-devel
|
||||
%endif
|
||||
%endif
|
||||
%if %{with mumps}
|
||||
BuildRequires: MUMPS-openmpi-devel >= 5.2.1
|
||||
BuildRequires: MUMPS-openmpi-devel
|
||||
%endif
|
||||
%if %{with sundials}
|
||||
BuildRequires: sundials-openmpi-devel
|
||||
@ -470,7 +460,11 @@ BuildRequires: hdf5-openmpi-devel
|
||||
BuildRequires: scalapack-openmpi-devel
|
||||
BuildRequires: ptscotch-openmpi-devel
|
||||
BuildRequires: python3-numpy
|
||||
%if 0%{?rhel}
|
||||
BuildRequires: python3-pip
|
||||
%else
|
||||
BuildRequires: python3-Cython
|
||||
%endif
|
||||
Requires: petsc-openmpi%{?_isa}
|
||||
Requires: hdf5-openmpi%{?_isa}
|
||||
Requires: scalapack-openmpi%{?_isa}
|
||||
@ -513,7 +507,7 @@ BuildRequires: blacs-mpich-devel
|
||||
%endif
|
||||
%endif
|
||||
%if %{with mumps}
|
||||
BuildRequires: MUMPS-mpich-devel >= 5.2.1
|
||||
BuildRequires: MUMPS-mpich-devel
|
||||
%endif
|
||||
%if %{with sundials}
|
||||
BuildRequires: sundials-mpich-devel
|
||||
@ -555,7 +549,11 @@ BuildRequires: hdf5-mpich-devel
|
||||
BuildRequires: scalapack-mpich-devel
|
||||
BuildRequires: ptscotch-mpich-devel
|
||||
BuildRequires: python3-numpy
|
||||
%if 0%{?rhel}
|
||||
BuildRequires: python3-pip
|
||||
%else
|
||||
BuildRequires: python3-Cython
|
||||
%endif
|
||||
Requires: petsc-mpich%{?_isa}
|
||||
Requires: hdf5-mpich%{?_isa}
|
||||
Requires: scalapack-mpich%{?_isa}
|
||||
@ -592,6 +590,8 @@ done
|
||||
|
||||
pushd %{name}-%{version}
|
||||
%patch -P 7 -p1 -b .backup
|
||||
%patch -P 100 -p1
|
||||
%patch -P 101 -p1
|
||||
popd
|
||||
|
||||
# Remove pregenerated Cython C sources
|
||||
@ -616,10 +616,20 @@ popd
|
||||
|
||||
%if %{with openmpi}
|
||||
cp -a %{name}-%{version} buildopenmpi_dir
|
||||
%if 0%{?rhel}
|
||||
cp %{SOURCE1} buildopenmpi_dir/src/binding/petsc4py/src/petsc4py/PETSc.c
|
||||
cp %{SOURCE2} buildopenmpi_dir/src/binding/petsc4py/src/petsc4py/PETSc.h
|
||||
cp %{SOURCE3} buildopenmpi_dir/src/binding/petsc4py/src/petsc4py/PETSc_api.h
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%if %{with mpich}
|
||||
cp -a %{name}-%{version} buildmpich_dir
|
||||
%if 0%{?rhel}
|
||||
cp %{SOURCE1} buildmpich_dir/src/binding/petsc4py/src/petsc4py/PETSc.c
|
||||
cp %{SOURCE2} buildmpich_dir/src/binding/petsc4py/src/petsc4py/PETSc.h
|
||||
cp %{SOURCE3} buildmpich_dir/src/binding/petsc4py/src/petsc4py/PETSc_api.h
|
||||
%endif
|
||||
%endif
|
||||
|
||||
# Do NOT move up this patch
|
||||
@ -1195,4 +1205,3 @@ xvfb-run -a make MAKE_NP=$RPM_BUILD_NCPUS all test -C build64 V=1 MPIEXEC='%{_bu
|
||||
|
||||
%changelog
|
||||
%autochangelog
|
||||
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (petsc-with-docs-3.20.2.tar.gz) = 4d5ae43b5ca35a547da97604d70dbad7045a61054b5874e70b2696b22f8e894dddb67c9d6451662ad4fb6f57c7c7890f466c0d34c9bfaacf7be804a575d92b0f
|
||||
SHA512 (petsc-with-docs-3.20.6.tar.gz) = 9af17dba10fd4d6bc10b767eaddfd2935084f29aa20a2733a9c094e85333e33c217703ea3bcb7343c36421af2b248a46851a61a6a334bd88dadb339cb53bf116
|
||||
|
Loading…
Reference in New Issue
Block a user