PyNucleus_base package

PyNucleus_base.REAL

alias of float64

PyNucleus_base.INDEX

alias of int32

PyNucleus_base.COMPLEX

alias of complex128

class PyNucleus_base.driver(comm=None, setCommExitHandler=True, masterRank=0, description=None)[source]

Bases: object

__init__(comm=None, setCommExitHandler=True, masterRank=0, description=None)[source]
setIdentifier(identifier)[source]
property identifier
setLogFile(filename=None)[source]
addGroup(name)[source]
add(name, defaultValue=None, acceptedValues=[], help='No help defined', argInterpreter=None, group=None)[source]
addPositional(name, nargs=1, group=None)[source]
addToProcessHook(fun)[source]
process(override={})[source]
set(key, value)[source]
getLogger()[source]
property logger
getTimer()[source]
property timer
addOutputGroup(name, group=None, aTol=None, rTol=None, tested=False)[source]
addStatsOutputGroup(name, group=None, aTol=None, rTol=None, tested=False)[source]
addOutputSeries(name, aTol=None, rTol=None, tested=False)[source]
outputToDict(tested=False)[source]
timerReport()[source]
saveOutput()[source]
property display_available
declareFigure(name, description='No help defined', default=True)[source]
willPlot(name)[source]
startPlot(name, **kwargs)[source]
savePlot(name, filenameSuffix='', **kwargs)[source]
finishPlots(**kwargs)[source]
finish(**kwargs)[source]
class PyNucleus_base.problem(driver)[source]

Bases: classWithComputedDependencies, driverAddon

__init__(driver)[source]
processCmdline(params)[source]
process(params)[source]

PyNucleus_base.blas module

PyNucleus_base.blas.uninitialized(*args, **kwargs)
PyNucleus_base.blas.uninitializedINDEX(tuple shape) array
PyNucleus_base.blas.uninitializedREAL(tuple shape) array
PyNucleus_base.blas.uninitialized_like(like, **kwargs)

PyNucleus_base.convergence module

class PyNucleus_base.convergence.convergenceClient(Comm masterComm, INDEX_t masterRank)

Bases: object

__init__(*args, **kwargs)
class PyNucleus_base.convergence.convergenceCriterion(REAL_t tol, INDEX_t maxiter, overlaps, BOOL_t accumulated)

Bases: object

__init__(*args, **kwargs)
class PyNucleus_base.convergence.convergenceMaster(Comm masterComm, INDEX_t masterRank, INDEX_t clientRank=0)

Bases: object

__init__(*args, **kwargs)
class PyNucleus_base.convergence.noOpConvergenceClient

Bases: convergenceClient

class PyNucleus_base.convergence.noOpConvergenceCriterion(REAL_t tol, INDEX_t maxiter, overlaps, BOOL_t accumulated)

Bases: convergenceCriterion

__init__(*args, **kwargs)
class PyNucleus_base.convergence.noOpConvergenceMaster(Comm masterComm, INDEX_t masterRank, INDEX_t clientRank=0)

Bases: convergenceMaster

__init__(*args, **kwargs)
class PyNucleus_base.convergence.synchronousConvergenceClient(Comm masterComm, INDEX_t masterRank, tag=200)

Bases: convergenceClient

__init__(*args, **kwargs)
class PyNucleus_base.convergence.synchronousConvergenceClientSubcomm(Comm masterComm, INDEX_t masterRank, Comm comm, tag=200)

Bases: convergenceClient

__init__(*args, **kwargs)
class PyNucleus_base.convergence.synchronousConvergenceCriterion(REAL_t tol, INDEX_t maxiter, overlaps, BOOL_t accumulated)

Bases: convergenceCriterion

__init__(*args, **kwargs)
class PyNucleus_base.convergence.synchronousConvergenceMaster(Comm masterComm, INDEX_t masterRank, INDEX_t clientRank=0)

Bases: convergenceMaster

__init__(*args, **kwargs)

PyNucleus_base.factory module

class PyNucleus_base.factory.factory[source]

Bases: object

__init__()[source]
getCanonicalName(name)[source]
register(name, classType, params={}, aliases=[])[source]
isRegistered(name)[source]
__call__(name, *args, **kwargs)[source]

Call self as a function.

build(name, *args, **kwargs)[source]
numRegistered(countAliases=False)[source]

PyNucleus_base.intTuple module

class PyNucleus_base.intTuple.intTuple

Bases: object

static create2Py(INDEX_t a, INDEX_t b)
static create3Py(INDEX_t a, INDEX_t b, INDEX_t c)
static createPy(INDEX_t[::1] t)
class PyNucleus_base.intTuple.productIterator(INDEX_t m, INDEX_t dim)

Bases: object

__init__(*args, **kwargs)

PyNucleus_base.ip.norm module

class PyNucleus_base.ip_norm.complexNormBase

Bases: object

__call__(*args, **kwargs)

Call self as a function.

__init__(*args, **kwargs)
class PyNucleus_base.ip_norm.complexipBase

Bases: object

__call__(*args, **kwargs)

Call self as a function.

__init__(*args, **kwargs)
class PyNucleus_base.ip_norm.ipBase

Bases: object

__call__(*args, **kwargs)

Call self as a function.

__init__(*args, **kwargs)
class PyNucleus_base.ip_norm.ip_distributed(overlap, INDEX_t level=-1)

Bases: ipBase

__init__(*args, **kwargs)
temporaryMemory

temporaryMemory: ‘vector_t’

class PyNucleus_base.ip_norm.ip_distributed_nonoverlapping(comm)

Bases: ipBase

__init__(*args, **kwargs)
class PyNucleus_base.ip_norm.ip_noop

Bases: ipBase

class PyNucleus_base.ip_norm.ip_serial

Bases: ipBase

class PyNucleus_base.ip_norm.normBase

Bases: object

__call__(*args, **kwargs)

Call self as a function.

__init__(*args, **kwargs)
class PyNucleus_base.ip_norm.norm_distributed(overlap, INDEX_t level=-1)

Bases: normBase

__init__(*args, **kwargs)
temporaryMemory

temporaryMemory: ‘vector_t’

class PyNucleus_base.ip_norm.norm_distributed_nonoverlapping(comm)

Bases: normBase

__init__(*args, **kwargs)
class PyNucleus_base.ip_norm.norm_noop

Bases: normBase

class PyNucleus_base.ip_norm.norm_serial

Bases: normBase

class PyNucleus_base.ip_norm.wrapRealInnerToComplex(ipBase inner)

Bases: complexipBase

__init__(*args, **kwargs)
class PyNucleus_base.ip_norm.wrapRealNormToComplex(normBase norm)

Bases: complexNormBase

__init__(*args, **kwargs)

PyNucleus_base.linalg module

class PyNucleus_base.linalg.ILU_solver(num_rows)

Bases: object

Ldata

Ldata: ‘REAL_t[::1]’

Lindices

Lindices: ‘INDEX_t[::1]’

Lindptr

Lindptr: ‘INDEX_t[::1]’

Udata

Udata: ‘REAL_t[::1]’

Uindices

Uindices: ‘INDEX_t[::1]’

Uindptr

Uindptr: ‘INDEX_t[::1]’

__init__(*args, **kwargs)
asPreconditioner(self)
perm_c

perm_c: ‘INDEX_t[::1]’

perm_r

perm_r: ‘INDEX_t[::1]’

setup(self, A, fill_factor=1.)
solve(self, REAL_t[::1] b, REAL_t[::1] x)
PyNucleus_base.linalg.UniformOnUnitSphere(dim, samples=1, norm=normSeq)

Uniform distribution on the unit sphere.

PyNucleus_base.linalg.accumulate_serial(REAL_t[::1] x) REAL_t
PyNucleus_base.linalg.arnoldi(LinearOperator A, REAL_t[::1] x0=None, int maxiter=20, REAL_t tol=1e-10, LinearOperator Lprecond=None, LinearOperator Rprecond=None, ipBase inner=ip_serial(), normBase norm=norm_serial(), REAL_t[::1] temporaryMemory=None, REAL_t[::1, :] temporaryMemoryQ=None, REAL_t[::1, :] temporaryMemoryH=None)

GMRES iteration.

In a distributed solve, we want: A: accumulated to distributed Lprecond: distributed to accumulated b: distributed x0: accumulated x: accumulated

In the unpreconditioned distributed case, set Lprecond to accumulate.

Memory requirement: dim * (maxiter+1) for Q (maxiter+1) * maxiter for H (4*maxiter + 2) + 2*dim for c,s,gamma,y and r,Ar

PyNucleus_base.linalg.bicgstab(LinearOperator A, const REAL_t[::1] b, REAL_t[::1] x, REAL_t[::1] x0=None, REAL_t tol=1e-10, int maxiter=20, list residuals=None, LinearOperator precond=None, ipBase inner=ip_serial(), normBase norm=norm_serial(), accumulate=accumulate_serial, BOOL_t use2norm=True, REAL_t[::1] temporaryMemory=None) void

Stabilized Biconjugate Gradient iteration.

In a distributed solve, we want: A: accumulated to distributed precond: distributed to accumulated b: distributed x: accumulated x0: accumulated

In the unpreconditioned distributed case, set precond to accumulate.

If use2norm is False, use Preconditioner norm of residual as stopping criterion, otherwise use 2-norm of residual.

Memory requirement: 8*dim with preconditioner, 6*dim without.

PyNucleus_base.linalg.bicgstabComplex(ComplexLinearOperator A, const double complex[::1] b, double complex[::1] x, double complex[::1] x0=None, REAL_t tol=1e-10, int maxiter=20, list residuals=None, ComplexLinearOperator precond=None, complexipBase inner=wrapRealInnerToComplex(ip_serial()), complexNormBase norm=wrapRealNormToComplex(norm_serial()), BOOL_t use2norm=True, double complex[::1] temporaryMemory=None) void

Stabilized Biconjugate Gradient iteration.

In a distributed solve, we want: A: accumulated to distributed precond: distributed to accumulated b: distributed x: accumulated x0: accumulated

In the unpreconditioned distributed case, set precond to accumulate.

If use2norm is False, use Preconditioner norm of residual as stopping criterion, otherwise use 2-norm of residual.

Memory requirement: 8*dim with preconditioner, 6*dim without.

PyNucleus_base.linalg.cg(LinearOperator A, REAL_t[::1] b, REAL_t[::1] x, REAL_t[::1] x0=None, REAL_t tol=1e-10, int maxiter=20, list residuals=None, LinearOperator precond=None, ipBase inner=ip_serial(), normBase norm=norm_serial(), BOOL_t use2norm=False, BOOL_t relativeTolerance=False) int
PyNucleus_base.linalg.estimateSpectralRadius(LinearOperator A, normBase norm=norm_serial(), REAL_t eps=1e-3, INDEX_t kMax=100)

Estimate the absolute value of the largest eigenvalue using the power method.

PyNucleus_base.linalg.flexible_cg(A, REAL_t[::1] b, x0=None, REAL_t tol=1e-10, int maxiter=20, residuals=None, precond=None, inner=ip_serial)
PyNucleus_base.linalg.gmres(LinearOperator A, REAL_t[::1] b, REAL_t[::1] x, REAL_t[::1] x0=None, int maxiter=20, int restarts=1, REAL_t tol=1e-5, list residuals=None, LinearOperator Lprecond=None, LinearOperator Rprecond=None, ipBase inner=ip_serial(), normBase norm=norm_serial(), convergenceMaster convMaster=None, convergenceClient convClient=None, BOOL_t flexible=False, BOOL_t relativeTolerance=False) int
PyNucleus_base.linalg.gmresComplex(ComplexLinearOperator A, double complex[::1] b, double complex[::1] x, double complex[::1] x0=None, int maxiter=20, int restarts=1, REAL_t tol=1e-5, list residuals=None, ComplexLinearOperator Lprecond=None, ComplexLinearOperator Rprecond=None, complexipBase inner=wrapRealInnerToComplex(ip_serial()), complexNormBase norm=wrapRealNormToComplex(norm_serial()), convergenceMaster convMaster=None, convergenceClient convClient=None, BOOL_t flexible=False, BOOL_t relativeTolerance=False) int
PyNucleus_base.linalg.ichol_csr(A)
PyNucleus_base.linalg.ichol_sss(SSS_LinearOperator A)
PyNucleus_base.linalg.lanczos(A, x=None, numIter=5)
PyNucleus_base.linalg.lanczos2(A, M, Minv, x=None, numIter=5)
PyNucleus_base.linalg.solve_LU(INDEX_t[::1] Lindptr, INDEX_t[::1] Lindices, REAL_t[::1] Ldata, INDEX_t[::1] Uindptr, INDEX_t[::1] Uindices, REAL_t[::1] Udata, INDEX_t[::1] perm_r, INDEX_t[::1] perm_c, REAL_t[::1] b)
PyNucleus_base.linalg.solve_cholesky(INDEX_t[::1] Lindptr, INDEX_t[::1] Lindices, REAL_t[::1] Ldata, REAL_t[::1] b)

PyNucleus_base.linear.operators module

class PyNucleus_base.linear_operators.CSR_LinearOperator(INDEX_t[::1] indices, INDEX_t[::1] indptr, REAL_t[::1] data, int NoThreads=1)

Bases: LinearOperator

static HDF5read(node)
HDF5write(self, node)
NoThreads

NoThreads: ‘int’

__init__(*args, **kwargs)
copy(self)
data

data: ‘REAL_t[::1]’

property diagonal

CSR_LinearOperator.get_diagonal(self)

eliminate_zeros(self)
static from_csr(matrix)
static from_dense(matrix, REAL_t tolerance=0.)
getBlockDiagonal(self, sparseGraph blocks) CSR_LinearOperator
getMemorySize(self)
get_diagonal(self)
getnnz(self)
indices

indices: ‘INDEX_t[::1]’

indices_sorted

indices_sorted: ‘BOOL_t’

indptr

indptr: ‘INDEX_t[::1]’

isSorted(self)

Check if column indices are sorted.

isSparse(self)
property nnz

CSR_LinearOperator.getnnz(self)

restrictMatrix(self, LinearOperator A, LinearOperator Ac)
scale(self, REAL_t scaling)
scaleLeft(self, REAL_t[::1] scaling)
scaleRight(self, REAL_t[::1] scaling)
setZero(self)
sliceColumns(self, INDEX_t[::1] columnIndices)
sliceRows(self, INDEX_t[::1] rowIndices)
sort_indices(self)
to_csr(self)
to_csr_linear_operator(self)
to_sss(self)
toarray(self)
transpose(self)
class PyNucleus_base.linear_operators.CSR_VectorLinearOperator(INDEX_t[::1] indices, INDEX_t[::1] indptr, REAL_t[:, ::1] data)

Bases: VectorLinearOperator

__init__(*args, **kwargs)
copy(self)
data

data: ‘REAL_t[:, ::1]’

getMemorySize(self)
getnnz(self)
indices

indices: ‘INDEX_t[::1]’

indices_sorted

indices_sorted: ‘BOOL_t’

indptr

indptr: ‘INDEX_t[::1]’

isSorted(self)

Check if column indices are sorted.

isSparse(self)
property nnz

CSR_VectorLinearOperator.getnnz(self)

setZero(self)
to_csr_linear_operator(self)
toarray(self)
class PyNucleus_base.linear_operators.ComplexCSR_LinearOperator(INDEX_t[::1] indices, INDEX_t[::1] indptr, double complex[::1] data, int NoThreads=1)

Bases: ComplexLinearOperator

static HDF5read(node)
HDF5write(self, node)
NoThreads

NoThreads: ‘int’

__init__(*args, **kwargs)
copy(self)
data

data: ‘double complex[::1]’

property diagonal

ComplexCSR_LinearOperator.get_diagonal(self)

eliminate_zeros(self)
static from_csr(matrix)
static from_dense(matrix, REAL_t tolerance=0.)
getBlockDiagonal(self, sparseGraph blocks) ComplexCSR_LinearOperator
getMemorySize(self)
get_diagonal(self)
getnnz(self)
indices

indices: ‘INDEX_t[::1]’

indices_sorted

indices_sorted: ‘BOOL_t’

indptr

indptr: ‘INDEX_t[::1]’

isSorted(self)

Check if column indices are sorted.

isSparse(self)
property nnz

ComplexCSR_LinearOperator.getnnz(self)

restrictMatrix(self, ComplexLinearOperator A, ComplexLinearOperator Ac)
scale(self, double complex scaling)
scaleLeft(self, double complex[::1] scaling)
scaleRight(self, double complex[::1] scaling)
setZero(self)
sliceColumns(self, INDEX_t[::1] columnIndices)
sliceRows(self, INDEX_t[::1] rowIndices)
sort_indices(self)
to_csr(self)
to_csr_linear_operator(self)
to_sss(self)
toarray(self)
transpose(self)
class PyNucleus_base.linear_operators.ComplexCSR_VectorLinearOperator(INDEX_t[::1] indices, INDEX_t[::1] indptr, double complex[:, ::1] data)

Bases: ComplexVectorLinearOperator

__init__(*args, **kwargs)
copy(self)
data

data: ‘double complex[:, ::1]’

getMemorySize(self)
getnnz(self)
indices

indices: ‘INDEX_t[::1]’

indices_sorted

indices_sorted: ‘BOOL_t’

indptr

indptr: ‘INDEX_t[::1]’

isSorted(self)

Check if column indices are sorted.

isSparse(self)
property nnz

ComplexCSR_VectorLinearOperator.getnnz(self)

setZero(self)
to_csr_linear_operator(self)
toarray(self)
class PyNucleus_base.linear_operators.ComplexDense_LinearOperator(double complex[:, ::1] data)

Bases: ComplexLinearOperator

static HDF5read(node)
HDF5write(self, node)
__init__(*args, **kwargs)
data

data: ‘double complex[:, ::1]’

diagonal
static empty(INDEX_t num_rows, INDEX_t num_columns)
getMemorySize(self)
isSparse(self)
static ones(INDEX_t num_rows, INDEX_t num_columns)
scale(self, double complex scaling)
toarray(self)
transpose(self)
static zeros(INDEX_t num_rows, INDEX_t num_columns)
class PyNucleus_base.linear_operators.ComplexDense_SubBlock_LinearOperator(INDEX_t[::1] I, INDEX_t[::1] J, INDEX_t num_rows, INDEX_t num_columns, double complex[:, :] mem=None)

Bases: ComplexLinearOperator

__init__(*args, **kwargs)
data

data: ‘double complex[:, :]’

class PyNucleus_base.linear_operators.ComplexDense_VectorLinearOperator(double complex[:, :, ::1] data)

Bases: ComplexVectorLinearOperator

__init__(*args, **kwargs)
data

data: ‘double complex[:, :, ::1]’

static empty(INDEX_t num_rows, INDEX_t num_columns, INDEX_t vectorSize)
getMemorySize(self)
isSparse(self)
static ones(INDEX_t num_rows, INDEX_t num_columns, INDEX_t vectorSize)
toarray(self)
static zeros(INDEX_t num_rows, INDEX_t num_columns, INDEX_t vectorSize)
class PyNucleus_base.linear_operators.ComplexIJOperator(INDEX_t numRows, INDEX_t numCols)

Bases: ComplexLinearOperator

__init__(*args, **kwargs)
getData(self)
to_csr_linear_operator(self)
class PyNucleus_base.linear_operators.ComplexLinearOperator(int num_rows, int num_columns)

Bases: object

static HDF5read(node)
T
__call__(*args, **kwargs)

Call self as a function.

__init__(*args, **kwargs)
addToEntry_py(self, INDEX_t I, INDEX_t J, double complex val)
property diagonal

ComplexLinearOperator.get_diagonal(self)

dot(self, double complex[::1] x)
dotMV(self, double complex[:, ::1] x)
getDenseOpFromApply(self)
getEntry_py(self, INDEX_t I, INDEX_t J)
getMemorySize(self)
get_diagonal(self)
isSparse(self)
num_columns

num_columns: ‘INDEX_t’

num_rows

num_rows: ‘INDEX_t’

residual_py(self, double complex[::1] x, double complex[::1] rhs, double complex[::1] result, BOOL_t simpleResidual=False)
setEntry_py(self, INDEX_t I, INDEX_t J, double complex val)
set_diagonal(self, double complex[::1] diagonal)
shape
toLinearOperator(self)
to_csr(self)
to_dense(self)
toarray(self)
class PyNucleus_base.linear_operators.ComplexLinearOperator_wrapper(INDEX_t num_rows, INDEX_t num_columns, matvec, double complex[::1] diagonal=None)

Bases: ComplexLinearOperator

__init__(*args, **kwargs)
class PyNucleus_base.linear_operators.ComplexMultiply_Linear_Operator(ComplexLinearOperator A, double complex factor)

Bases: ComplexLinearOperator

A

A: PyNucleus_base.linear_operators.ComplexLinearOperator

__init__(*args, **kwargs)
property diagonal

ComplexMultiply_Linear_Operator.get_diagonal(self)

factor

factor: ‘double complex’

getMemorySize(self)
get_diagonal(self)
isSparse(self)
to_csr(self)
to_csr_linear_operator(self)
toarray(self)
class PyNucleus_base.linear_operators.ComplexProduct_Linear_Operator(ComplexLinearOperator A, ComplexLinearOperator B, double complex[::1] temporaryMemory=None)

Bases: ComplexLinearOperator

A

A: PyNucleus_base.linear_operators.ComplexLinearOperator

B

B: PyNucleus_base.linear_operators.ComplexLinearOperator

__init__(*args, **kwargs)
getMemorySize(self)
isSparse(self)
temporaryMemory

temporaryMemory: ‘double complex[::1]’

to_csr(self)
to_csr_linear_operator(self)
toarray(self)
class PyNucleus_base.linear_operators.ComplexSSS_LinearOperator(INDEX_t[::1] indices, INDEX_t[::1] indptr, double complex[::1] data, double complex[::1] diagonal, int NoThreads=1)

Bases: ComplexLinearOperator

Sparse symmetric matrix that saves the lower triangular part.

static HDF5read(node)
HDF5write(self, node)
NoThreads

NoThreads: ‘int’

T
__init__(*args, **kwargs)
copy(self)
data

data: ‘double complex[::1]’

diagonal

diagonal: ‘double complex[::1]’

getMemorySize(self)
getnnz(self)
indices

indices: ‘INDEX_t[::1]’

indices_sorted

indices_sorted: ‘BOOL_t’

indptr

indptr: ‘INDEX_t[::1]’

isSparse(self)
property nnz

ComplexSSS_LinearOperator.getnnz(self)

scale(self, double complex scaling)
setZero(self)
sort_indices(self)
to_csc(self)
to_csr(self)
to_csr_linear_operator(self)
to_lower_csc(self)
class PyNucleus_base.linear_operators.ComplexSSS_VectorLinearOperator(INDEX_t[::1] indices, INDEX_t[::1] indptr, double complex[:, ::1] data, double complex[:, ::1] diagonal)

Bases: ComplexVectorLinearOperator

Sparse symmetric matrix that saves the lower triangular part.

__init__(*args, **kwargs)
copy(self)
data

data: ‘double complex[:, ::1]’

diagonal

diagonal: ‘double complex[:, ::1]’

getMemorySize(self)
getnnz(self)
indices

indices: ‘INDEX_t[::1]’

indices_sorted

indices_sorted: ‘BOOL_t’

indptr

indptr: ‘INDEX_t[::1]’

isSparse(self)
property nnz

ComplexSSS_VectorLinearOperator.getnnz(self)

setZero(self)
toarray(self)
class PyNucleus_base.linear_operators.ComplexTimeStepperLinearOperator(ComplexLinearOperator M, ComplexLinearOperator S, double complex facS, double complex facM=1.0)

Bases: ComplexLinearOperator

M

M: PyNucleus_base.linear_operators.ComplexLinearOperator

S

S: PyNucleus_base.linear_operators.ComplexLinearOperator

__init__(*args, **kwargs)
property diagonal

ComplexTimeStepperLinearOperator.get_diagonal(self)

facM

facM: ‘double complex’

facS

facS: ‘double complex’

getMemorySize(self)
get_diagonal(self)
getnnz(self)
isSparse(self)
property nnz

ComplexTimeStepperLinearOperator.getnnz(self)

to_csr(self)
to_csr_linear_operator(self)
toarray(self)
class PyNucleus_base.linear_operators.ComplexTranspose_Linear_Operator(ComplexLinearOperator A)

Bases: ComplexLinearOperator

A

A: PyNucleus_base.linear_operators.ComplexLinearOperator

__init__(*args, **kwargs)
property diagonal

ComplexTranspose_Linear_Operator.get_diagonal(self)

getMemorySize(self)
get_diagonal(self)
isSparse(self)
to_csr(self)
to_csr_linear_operator(self)
toarray(self)
class PyNucleus_base.linear_operators.ComplexVectorLinearOperator(int num_rows, int num_columns, int vectorSize)

Bases: object

__call__(*args, **kwargs)

Call self as a function.

__init__(*args, **kwargs)
addToEntry_py(self, INDEX_t I, INDEX_t J, double complex[::1] val)
getEntry_py(self, INDEX_t I, INDEX_t J, double complex[::1] val)
isSparse(self)
num_columns

num_columns: ‘INDEX_t’

num_rows

num_rows: ‘INDEX_t’

setEntry_py(self, INDEX_t I, INDEX_t J, double complex[::1] val)
shape
toLinearOperator(self)
to_csr(self)
to_dense(self)
toarray(self)
vectorSize

vectorSize: ‘INDEX_t’

class PyNucleus_base.linear_operators.ComplexdiagonalOperator(double complex[::1] diagonal)

Bases: ComplexLinearOperator

static HDF5read(node)
HDF5write(self, node)
__init__(*args, **kwargs)
data

data: ‘double complex[::1]’

property diagonal

ComplexdiagonalOperator.get_diagonal(self)

get_diagonal(self)
isSparse(self)
to_csr(self)
to_csr_linear_operator(self)
class PyNucleus_base.linear_operators.ComplexinvDiagonal(ComplexLinearOperator A)

Bases: ComplexdiagonalOperator

__init__(*args, **kwargs)
class PyNucleus_base.linear_operators.Dense_LinearOperator(REAL_t[:, ::1] data)

Bases: LinearOperator

static HDF5read(node)
HDF5write(self, node)
__init__(*args, **kwargs)
data

data: ‘REAL_t[:, ::1]’

diagonal
static empty(INDEX_t num_rows, INDEX_t num_columns)
getMemorySize(self)
isSparse(self)
static ones(INDEX_t num_rows, INDEX_t num_columns)
scale(self, REAL_t scaling)
toarray(self)
transpose(self)
static zeros(INDEX_t num_rows, INDEX_t num_columns)
class PyNucleus_base.linear_operators.Dense_SubBlock_LinearOperator(INDEX_t[::1] I, INDEX_t[::1] J, INDEX_t num_rows, INDEX_t num_columns, REAL_t[:, :] mem=None)

Bases: LinearOperator

__init__(*args, **kwargs)
data

data: ‘REAL_t[:, :]’

class PyNucleus_base.linear_operators.Dense_VectorLinearOperator(REAL_t[:, :, ::1] data)

Bases: VectorLinearOperator

__init__(*args, **kwargs)
data

data: ‘REAL_t[:, :, ::1]’

static empty(INDEX_t num_rows, INDEX_t num_columns, INDEX_t vectorSize)
getMemorySize(self)
isSparse(self)
static ones(INDEX_t num_rows, INDEX_t num_columns, INDEX_t vectorSize)
toarray(self)
static zeros(INDEX_t num_rows, INDEX_t num_columns, INDEX_t vectorSize)
class PyNucleus_base.linear_operators.HelmholtzShiftOperator(CSR_LinearOperator S, CSR_LinearOperator M, double complex shift)

Bases: ComplexLinearOperator

__init__(*args, **kwargs)
property diagonal

HelmholtzShiftOperator.get_diagonal(self)

get_diagonal(self)
getnnz(self)
property nnz

HelmholtzShiftOperator.getnnz(self)

setShift(self, double complex shift)
set_diagonal(self, double complex[::1] diagonal)
to_csr(self)
to_csr_linear_operator(self)
class PyNucleus_base.linear_operators.IJOperator(INDEX_t numRows, INDEX_t numCols)

Bases: LinearOperator

__init__(*args, **kwargs)
getData(self)
to_csr_linear_operator(self)
class PyNucleus_base.linear_operators.LinearOperator(int num_rows, int num_columns)

Bases: object

static HDF5read(node)
T
__call__(*args, **kwargs)

Call self as a function.

__init__(*args, **kwargs)
addToEntry_py(self, INDEX_t I, INDEX_t J, REAL_t val)
property diagonal

LinearOperator.get_diagonal(self)

dot(self, REAL_t[::1] x)
dotMV(self, REAL_t[:, ::1] x)
getDenseOpFromApply(self)
getEntry_py(self, INDEX_t I, INDEX_t J)
getMemorySize(self)
get_diagonal(self)
isSparse(self)
num_columns

num_columns: ‘INDEX_t’

num_rows

num_rows: ‘INDEX_t’

residual_py(self, REAL_t[::1] x, REAL_t[::1] rhs, REAL_t[::1] result, BOOL_t simpleResidual=False)
setEntry_py(self, INDEX_t I, INDEX_t J, REAL_t val)
set_diagonal(self, REAL_t[::1] diagonal)
shape
toLinearOperator(self)
to_csr(self)
to_dense(self)
toarray(self)
class PyNucleus_base.linear_operators.LinearOperator_wrapper(INDEX_t num_rows, INDEX_t num_columns, matvec, REAL_t[::1] diagonal=None)

Bases: LinearOperator

__init__(*args, **kwargs)
class PyNucleus_base.linear_operators.Multiply_Linear_Operator(LinearOperator A, REAL_t factor)

Bases: LinearOperator

A

A: PyNucleus_base.linear_operators.LinearOperator

__init__(*args, **kwargs)
property diagonal

Multiply_Linear_Operator.get_diagonal(self)

factor

factor: ‘REAL_t’

getMemorySize(self)
get_diagonal(self)
isSparse(self)
to_csr(self)
to_csr_linear_operator(self)
toarray(self)
class PyNucleus_base.linear_operators.Product_Linear_Operator(LinearOperator A, LinearOperator B, REAL_t[::1] temporaryMemory=None)

Bases: LinearOperator

A

A: PyNucleus_base.linear_operators.LinearOperator

B

B: PyNucleus_base.linear_operators.LinearOperator

__init__(*args, **kwargs)
getMemorySize(self)
isSparse(self)
temporaryMemory

temporaryMemory: ‘REAL_t[::1]’

to_csr(self)
to_csr_linear_operator(self)
toarray(self)
class PyNucleus_base.linear_operators.SSS_LinearOperator(INDEX_t[::1] indices, INDEX_t[::1] indptr, REAL_t[::1] data, REAL_t[::1] diagonal, int NoThreads=1)

Bases: LinearOperator

Sparse symmetric matrix that saves the lower triangular part.

static HDF5read(node)
HDF5write(self, node)
NoThreads

NoThreads: ‘int’

T
__init__(*args, **kwargs)
copy(self)
data

data: ‘REAL_t[::1]’

diagonal

diagonal: ‘REAL_t[::1]’

getMemorySize(self)
getnnz(self)
indices

indices: ‘INDEX_t[::1]’

indices_sorted

indices_sorted: ‘BOOL_t’

indptr

indptr: ‘INDEX_t[::1]’

isSparse(self)
property nnz

SSS_LinearOperator.getnnz(self)

scale(self, REAL_t scaling)
setZero(self)
sort_indices(self)
to_csc(self)
to_csr(self)
to_csr_linear_operator(self)
to_lower_csc(self)
class PyNucleus_base.linear_operators.SSS_VectorLinearOperator(INDEX_t[::1] indices, INDEX_t[::1] indptr, REAL_t[:, ::1] data, REAL_t[:, ::1] diagonal)

Bases: VectorLinearOperator

Sparse symmetric matrix that saves the lower triangular part.

__init__(*args, **kwargs)
copy(self)
data

data: ‘REAL_t[:, ::1]’

diagonal

diagonal: ‘REAL_t[:, ::1]’

getMemorySize(self)
getnnz(self)
indices

indices: ‘INDEX_t[::1]’

indices_sorted

indices_sorted: ‘BOOL_t’

indptr

indptr: ‘INDEX_t[::1]’

isSparse(self)
property nnz

SSS_VectorLinearOperator.getnnz(self)

setZero(self)
toarray(self)
class PyNucleus_base.linear_operators.TimeStepperLinearOperator(LinearOperator M, LinearOperator S, REAL_t facS, REAL_t facM=1.0)

Bases: LinearOperator

M

M: PyNucleus_base.linear_operators.LinearOperator

S

S: PyNucleus_base.linear_operators.LinearOperator

__init__(*args, **kwargs)
property diagonal

TimeStepperLinearOperator.get_diagonal(self)

facM

facM: ‘REAL_t’

facS

facS: ‘REAL_t’

getMemorySize(self)
get_diagonal(self)
getnnz(self)
isSparse(self)
property nnz

TimeStepperLinearOperator.getnnz(self)

to_csr(self)
to_csr_linear_operator(self)
toarray(self)
class PyNucleus_base.linear_operators.Transpose_Linear_Operator(LinearOperator A)

Bases: LinearOperator

A

A: PyNucleus_base.linear_operators.LinearOperator

__init__(*args, **kwargs)
property diagonal

Transpose_Linear_Operator.get_diagonal(self)

getMemorySize(self)
get_diagonal(self)
isSparse(self)
to_csr(self)
to_csr_linear_operator(self)
toarray(self)
class PyNucleus_base.linear_operators.Triple_Product_Linear_Operator(LinearOperator A, LinearOperator B, LinearOperator C, REAL_t[::1] temporaryMemory=None, REAL_t[::1] temporaryMemory2=None)

Bases: LinearOperator

A

A: PyNucleus_base.linear_operators.LinearOperator

B

B: PyNucleus_base.linear_operators.LinearOperator

C

C: PyNucleus_base.linear_operators.LinearOperator

__init__(*args, **kwargs)
temporaryMemory

temporaryMemory: ‘REAL_t[::1]’

temporaryMemory2

temporaryMemory2: ‘REAL_t[::1]’

class PyNucleus_base.linear_operators.VectorLinearOperator(int num_rows, int num_columns, int vectorSize)

Bases: object

__call__(*args, **kwargs)

Call self as a function.

__init__(*args, **kwargs)
addToEntry_py(self, INDEX_t I, INDEX_t J, REAL_t[::1] val)
getEntry_py(self, INDEX_t I, INDEX_t J, REAL_t[::1] val)
isSparse(self)
num_columns

num_columns: ‘INDEX_t’

num_rows

num_rows: ‘INDEX_t’

setEntry_py(self, INDEX_t I, INDEX_t J, REAL_t[::1] val)
shape
toLinearOperator(self)
to_csr(self)
to_dense(self)
toarray(self)
vectorSize

vectorSize: ‘INDEX_t’

class PyNucleus_base.linear_operators.blockDiagonalOperator(list diagonalBlocks)

Bases: blockOperator

__init__(*args, **kwargs)
class PyNucleus_base.linear_operators.blockLowerInverse(subblocks, diagonalInverses)

Bases: blockOperator

__init__(*args, **kwargs)
class PyNucleus_base.linear_operators.blockOperator(list subblocks)

Bases: LinearOperator

__init__(*args, **kwargs)
isSparse(self)
subblocks

subblocks: list

toarray(self)
class PyNucleus_base.linear_operators.blockUpperInverse(subblocks, diagonalInverses)

Bases: blockOperator

__init__(*args, **kwargs)
class PyNucleus_base.linear_operators.debugOperator(LinearOperator A, str name='')

Bases: LinearOperator

__init__(*args, **kwargs)
class PyNucleus_base.linear_operators.delayedConstructionOperator(INDEX_t numRows, INDEX_t numCols)

Bases: LinearOperator

A

A: PyNucleus_base.linear_operators.LinearOperator

HDF5write(self, node)
__init__(*args, **kwargs)
assure_constructed(self) int
construct(self)
property diagonal

delayedConstructionOperator.get_diagonal(self)

get_diagonal(self)
getnnz(self)
isConstructed

isConstructed: ‘BOOL_t’

isSparse(self)
property nnz

delayedConstructionOperator.getnnz(self)

params

params: dict

setParams(self, **kwargs)
to_csr(self)
toarray(self)
class PyNucleus_base.linear_operators.diagonalOperator(REAL_t[::1] diagonal)

Bases: LinearOperator

static HDF5read(node)
HDF5write(self, node)
__init__(*args, **kwargs)
data

data: ‘REAL_t[::1]’

property diagonal

diagonalOperator.get_diagonal(self)

get_diagonal(self)
isSparse(self)
to_csr(self)
to_csr_linear_operator(self)
class PyNucleus_base.linear_operators.identityOperator(INDEX_t num_rows, REAL_t alpha=1.0)

Bases: LinearOperator

__init__(*args, **kwargs)
property diagonal

identityOperator.get_diagonal(self)

get_diagonal(self)
isSparse(self)
to_csr(self)
toarray(self)
class PyNucleus_base.linear_operators.interpolationOperator(list ops, REAL_t[::1] nodes, REAL_t left, REAL_t right)

Bases: sumMultiplyOperator

static HDF5read(node)
HDF5write(self, node)
W

W: ‘REAL_t[:, ::1]’

W_2prime

W_2prime: ‘REAL_t[:, ::1]’

W_prime

W_prime: ‘REAL_t[:, ::1]’

__init__(*args, **kwargs)
assure_constructed(self) void
derivative

derivative: ‘INDEX_t’

getNumInterpolationNodes(self)
left

left: ‘REAL_t’

nodes

nodes: ‘REAL_t[::1]’

property numInterpolationNodes

interpolationOperator.getNumInterpolationNodes(self)

right

right: ‘REAL_t’

set(self, REAL_t val, int derivative=0)
val

val: ‘REAL_t’

class PyNucleus_base.linear_operators.invDiagonal(LinearOperator A)

Bases: diagonalOperator

__init__(*args, **kwargs)
class PyNucleus_base.linear_operators.multiIntervalInterpolationOperator(list intervals, list nodes, list ops)

Bases: LinearOperator

static HDF5read(node)
HDF5write(self, node)
__init__(*args, **kwargs)
assure_constructed(self) void
property diagonal

multiIntervalInterpolationOperator.get_diagonal(self)

get(self)
getNumInterpolationNodes(self)
getSelectedOp(self)
get_diagonal(self)
isSparse(self)
left
property numInterpolationNodes

multiIntervalInterpolationOperator.getNumInterpolationNodes(self)

ops

ops: list

right
set(self, REAL_t val, BOOL_t derivative=False)
to_csr(self)
toarray(self)
PyNucleus_base.linear_operators.multiply(CSR_LinearOperator R, LinearOperator A, LinearOperator Ac)
PyNucleus_base.linear_operators.multiply2(CSR_LinearOperator P, LinearOperator A, LinearOperator Ac)
PyNucleus_base.linear_operators.multiply_restr(restrictionOp R, LinearOperator A, LinearOperator Ac)
class PyNucleus_base.linear_operators.nullOperator(INDEX_t num_rows, INDEX_t num_columns)

Bases: LinearOperator

__init__(*args, **kwargs)
property diagonal

nullOperator.get_diagonal(self)

get_diagonal(self)
toarray(self)
class PyNucleus_base.linear_operators.prolongationOp(INDEX_t[::1] indices, INDEX_t[::1] indptr, INDEX_t num_rows, INDEX_t num_columns, int NoThreads=1)

Bases: sparseGraph

static HDF5read(node)
HDF5write(self, node)
NoThreads

NoThreads: ‘int’

__init__(*args, **kwargs)
to_csr(self)
to_csr_linear_operator(self)
class PyNucleus_base.linear_operators.restrictionOp(INDEX_t[::1] indices, INDEX_t[::1] indptr, INDEX_t num_rows, INDEX_t num_columns, int NoThreads=1)

Bases: sparseGraph

static HDF5read(node)
HDF5write(self, node)
NoThreads

NoThreads: ‘int’

__init__(*args, **kwargs)
restrictMatrix(self, LinearOperator A, LinearOperator Ac)
to_csr(self)
to_csr_linear_operator(self)
class PyNucleus_base.linear_operators.sparseGraph(INDEX_t[::1] indices, INDEX_t[::1] indptr, INDEX_t num_rows, INDEX_t num_columns)

Bases: LinearOperator

static HDF5read(node)
HDF5write(self, node)
__init__(*args, **kwargs)
copy(self)
getnnz(self)
getshape(self)
indices

indices: ‘INDEX_t[::1]’

indices_sorted

indices_sorted: ‘BOOL_t’

indptr

indptr: ‘INDEX_t[::1]’

isSorted(self)

Check if column indices are sorted.

property nnz

sparseGraph.getnnz(self)

setshape(self, val)
property shape

sparseGraph.getshape(self)

sliceColumn(self, slice)
sliceRow(self, slice)
sort_indices(self)
to_csr(self)
todense(self)
transpose(self)
class PyNucleus_base.linear_operators.split_CSR_LinearOperator(CSR_LinearOperator A1, CSR_LinearOperator A2)

Bases: LinearOperator

A1

A1: PyNucleus_base.linear_operators.CSR_LinearOperator

A2

A2: PyNucleus_base.linear_operators.CSR_LinearOperator

static HDF5read(node)
HDF5write(self, node)
__init__(*args, **kwargs)
get_indices_sorted(self)
getnnz(self)
property indices_sorted

split_CSR_LinearOperator.get_indices_sorted(self)

property nnz

split_CSR_LinearOperator.getnnz(self)

sort_indices(self)
to_csr(self)
class PyNucleus_base.linear_operators.sumMultiplyOperator(list ops, REAL_t[::1] coeffs)

Bases: LinearOperator

__init__(*args, **kwargs)
coeffs

coeffs: ‘REAL_t[::1]’

property diagonal

sumMultiplyOperator.get_diagonal(self)

get_diagonal(self)
isSparse(self)
ops

ops: list

to_csr(self)
toarray(self)
PyNucleus_base.linear_operators.transpose(S, inplace=True)
class PyNucleus_base.linear_operators.wrapRealToComplex(LinearOperator A)

Bases: ComplexLinearOperator

__init__(*args, **kwargs)
to_csr(self)
to_csr_linear_operator(self)
class PyNucleus_base.linear_operators.wrapRealToComplexCSR(CSR_LinearOperator A)

Bases: ComplexLinearOperator

__init__(*args, **kwargs)
to_csr(self)
to_csr_linear_operator(self)

PyNucleus_base.memProfile module

PyNucleus_base.myTypes module

PyNucleus_base.performanceLogger module

class PyNucleus_base.performanceLogger.FakePLogger

Bases: object

Timer(self, str key, BOOL_t manualDataEntry=False) FakeTimer
__init__(*args, **kwargs)
addValue(self, str key, value) void
empty(self) void
class PyNucleus_base.performanceLogger.FakeTimer(str key='')

Bases: object

__init__(*args, **kwargs)
enterData(self) void
class PyNucleus_base.performanceLogger.LoggingPLogger(logger, loggerLevel, process=None)

Bases: PLogger

Timer(self, str key, BOOL_t manualDataEntry=False) FakeTimer
__init__(*args, **kwargs)
class PyNucleus_base.performanceLogger.LoggingTimer(logger, loggerLevel, str key, FakePLogger parent, BOOL_t manualDataEntry=False, Comm comm=None, BOOL_t sync=False, str StartMessage='')

Bases: Timer

__init__(*args, **kwargs)
class PyNucleus_base.performanceLogger.PLogger(process=None)

Bases: FakePLogger

Timer(self, str key, BOOL_t manualDataEntry=False) FakeTimer
__init__(*args, **kwargs)
addValue(self, str key, value) void
empty(self) void
report(self, totalsOnly=True)
values

values: OrderedDict_t

class PyNucleus_base.performanceLogger.Timer(str key, FakePLogger parent, BOOL_t manualDataEntry=False, Comm comm=None, BOOL_t sync=False, BOOL_t forceMemRegionOff=False)

Bases: FakeTimer

__init__(*args, **kwargs)
property diffMemory

Timer.getMemoryDiff(self)

endMem
enterData(self) void
getInterval(self)
getIntervalUnsynced(self)
getMemoryDiff(self)
property interval

Timer.getInterval(self)

property interval_unsynced

Timer.getIntervalUnsynced(self)

startMem
PyNucleus_base.performanceLogger.endMemRegion(str key) void
PyNucleus_base.performanceLogger.startMemRegion(str key) void

PyNucleus_base.plot.utils module

PyNucleus_base.plot_utils.latexOptions(fig_width=None, fig_height=None, ratio=None, fontsize=10, otherMPL=None)[source]
PyNucleus_base.plot_utils.latexContext(fig_width=None, fig_height=None, ratio=None, fontsize=10, otherMPL=None)[source]
PyNucleus_base.plot_utils.beamerContext(fig_width=None, fig_height=None, ratio=None, fontsize=8, otherMPL=None)[source]
PyNucleus_base.plot_utils.posterContext(fig_width=None, fig_height=None, ratio=None, fontsize=25, otherMPL=None)[source]
PyNucleus_base.plot_utils.plot_with_latex(fun, fig_width=None, fig_height=None, ratio=None, fontsize=10, otherMPL=None)[source]
PyNucleus_base.plot_utils.plot_with_beamer(fun, fig_width=None, fig_height=None, ratio=None, fontsize=8, otherMPL=None)[source]
PyNucleus_base.plot_utils.plot_for_poster(fun, fig_width=None, fig_height=None, ratio=None, fontsize=25, otherMPL=None)[source]
PyNucleus_base.plot_utils.plotTriangle(x, y, fac, ax=None)[source]
PyNucleus_base.plot_utils.tabulate(x, results, floatfmt=None, groups=False, **kwargs)[source]
PyNucleus_base.plot_utils.formatScientificLatex(a, useEnotation=True)[source]
PyNucleus_base.plot_utils.latexFormatRate(r, digits=2)[source]
class PyNucleus_base.plot_utils.movieCreator(u, outputFolder, plot_kwargs={})[source]

Bases: object

__init__(u, outputFolder, plot_kwargs={})[source]
addFrame(u)[source]
generateMovie()[source]

PyNucleus_base.solver.factory module

class PyNucleus_base.solver_factory.solverFactory[source]

Bases: factory

__init__()[source]
isRegistered(name)[source]
isRegisteredComboSolver(name)[source]
register(name, classType, isMultilevelSolver=False, aliases=[])[source]
build(name, **kwargs)[source]

PyNucleus_base.solvers module

class PyNucleus_base.solvers.bicgstab_solver(LinearOperator A=None, INDEX_t num_rows=-1)

Bases: krylov_solver

Stabilized Biconjugate Gradient iteration.

In a distributed solve, we want: A: accumulated to distributed precond: distributed to accumulated b: distributed x: accumulated x0: accumulated

In the unpreconditioned distributed case, set precond to accumulate.

If use2norm is False, use Preconditioner norm of residual as stopping criterion, otherwise use 2-norm of residual.

Memory requirement: 8*dim with preconditioner, 6*dim without.

__init__(*args, **kwargs)
setPreconditioner(self, LinearOperator prec, BOOL_t left=True) void
setup(self, LinearOperator A=None) void
use2norm

use2norm: ‘BOOL_t’

class PyNucleus_base.solvers.cg_solver(LinearOperator A=None, INDEX_t num_rows=-1)

Bases: krylov_solver

Conjugate Gradient iteration.

In a distributed solve, we want: A: accumulated to distributed precond: distributed to accumulated b: distributed x: accumulated x0: accumulated

In the unpreconditioned distributed case, set precond to accumulate.

If use2norm is False, use Preconditioner norm of residual as stopping criterion, otherwise use 2-norm of residual.

Memory requirement: 4*dim with preconditioner, 3*dim without.

__init__(*args, **kwargs)
setPreconditioner(self, LinearOperator prec, BOOL_t left=True) void
setup(self, LinearOperator A=None) void
use2norm

use2norm: ‘BOOL_t’

class PyNucleus_base.solvers.chol_solver(LinearOperator A, INDEX_t num_rows=-1)

Bases: solver

__init__(*args, **kwargs)
setup(self, LinearOperator A=None) void
class PyNucleus_base.solvers.complex_gmres_solver(ComplexLinearOperator A=None, INDEX_t num_rows=-1)

Bases: complex_krylov_solver

GMRES iteration.

In a distributed solve, we want: A: accumulated to distributed Lprecond: distributed to accumulated Rprecond: distributed to accumulated b: distributed x0: accumulated x: accumulated

In the unpreconditioned distributed case, set Lprecond to accumulate.

Memory requirement: dim * (maxiter+1) for Q (maxiter+1) * maxiter for H (4*maxiter + 2) + 2*dim for c,s,gamma,y and r, Ar dim * (maxiter+1) for Z if flexible

__init__(*args, **kwargs)
flexible

flexible: ‘BOOL_t’

restarts

restarts: ‘INDEX_t’

setPreconditioner(self, ComplexLinearOperator prec, BOOL_t left=True) void
setup(self, ComplexLinearOperator A=None) void
use2norm

use2norm: ‘BOOL_t’

class PyNucleus_base.solvers.complex_iterative_solver(ComplexLinearOperator A=None, INDEX_t num_rows=-1)

Bases: complex_solver

__init__(*args, **kwargs)
inner

inner: PyNucleus_base.ip_norm.complexipBase

maxIter

maxIter: ‘INDEX_t’

norm

norm: PyNucleus_base.ip_norm.complexNormBase

relativeTolerance

relativeTolerance: ‘BOOL_t’

residuals

residuals: list

setInitialGuess(self, complex_vector_t x0=None) void
setNormInner(self, complexNormBase norm, complexipBase inner) void
setOverlapNormInner(self, overlaps, level=-1) void
setup(self, ComplexLinearOperator A=None) void
tolerance

tolerance: ‘REAL_t’

class PyNucleus_base.solvers.complex_krylov_solver(ComplexLinearOperator A=None, INDEX_t num_rows=-1)

Bases: complex_iterative_solver

__init__(*args, **kwargs)
convClient

convClient: PyNucleus_base.convergence.convergenceClient

convMaster

convMaster: PyNucleus_base.convergence.convergenceMaster

prec

prec: PyNucleus_base.linear_operators.ComplexLinearOperator

setPreconditioner(self, ComplexLinearOperator prec, BOOL_t left=True) void
setup(self, ComplexLinearOperator A=None) void
class PyNucleus_base.solvers.complex_lu_solver(ComplexLinearOperator A, INDEX_t num_rows=-1)

Bases: complex_solver

__init__(*args, **kwargs)
setup(self, ComplexLinearOperator A=None) void
class PyNucleus_base.solvers.complex_preconditioner(complex_solver solOp, dict ctxAttrs={})

Bases: ComplexLinearOperator

__init__(*args, **kwargs)
ctxAttrs

ctxAttrs: dict

solOp

solOp: PyNucleus_base.solvers.complex_solver

class PyNucleus_base.solvers.complex_solver(ComplexLinearOperator A=None, INDEX_t num_rows=-1)

Bases: object

PLogger

PLogger: PyNucleus_base.performanceLogger.FakePLogger

__call__(*args, **kwargs)

Call self as a function.

__init__(*args, **kwargs)
asPreconditioner(self)
initialized

initialized: ‘BOOL_t’

num_rows

num_rows: ‘INDEX_t’

setup(self, ComplexLinearOperator A=None) void
class PyNucleus_base.solvers.gmres_solver(LinearOperator A=None, INDEX_t num_rows=-1)

Bases: krylov_solver

GMRES iteration.

In a distributed solve, we want: A: accumulated to distributed Lprecond: distributed to accumulated Rprecond: distributed to accumulated b: distributed x0: accumulated x: accumulated

In the unpreconditioned distributed case, set Lprecond to accumulate.

Memory requirement: dim * (maxiter+1) for Q (maxiter+1) * maxiter for H (4*maxiter + 2) + 2*dim for c,s,gamma,y and r, Ar dim * (maxiter+1) for Z if flexible

__init__(*args, **kwargs)
flexible

flexible: ‘BOOL_t’

restarts

restarts: ‘INDEX_t’

setPreconditioner(self, LinearOperator prec, BOOL_t left=True) void
setup(self, LinearOperator A=None) void
use2norm

use2norm: ‘BOOL_t’

class PyNucleus_base.solvers.ichol_solver(LinearOperator A=None, INDEX_t num_rows=-1)

Bases: solver

__init__(*args, **kwargs)
data

data: ‘REAL_t[::1]’

diagonal

diagonal: ‘REAL_t[::1]’

indices

indices: ‘INDEX_t[::1]’

indptr

indptr: ‘INDEX_t[::1]’

setup(self, LinearOperator A=None) void
temp

temp: ‘REAL_t[::1]’

class PyNucleus_base.solvers.ilu_solver(LinearOperator A=None, INDEX_t num_rows=-1)

Bases: solver

Ldata

Ldata: ‘REAL_t[::1]’

Lindices

Lindices: ‘INDEX_t[::1]’

Lindptr

Lindptr: ‘INDEX_t[::1]’

Udata

Udata: ‘REAL_t[::1]’

Uindices

Uindices: ‘INDEX_t[::1]’

Uindptr

Uindptr: ‘INDEX_t[::1]’

__init__(*args, **kwargs)
fill_factor

fill_factor: ‘REAL_t’

perm_c

perm_c: ‘INDEX_t[::1]’

perm_r

perm_r: ‘INDEX_t[::1]’

setup(self, LinearOperator A=None) void
class PyNucleus_base.solvers.iterative_solver(LinearOperator A=None, INDEX_t num_rows=-1)

Bases: solver

__init__(*args, **kwargs)
inner

inner: PyNucleus_base.ip_norm.ipBase

maxIter

maxIter: ‘INDEX_t’

norm

norm: PyNucleus_base.ip_norm.normBase

relativeTolerance

relativeTolerance: ‘BOOL_t’

residuals

residuals: list

setInitialGuess(self, vector_t x0=None) void
setNormInner(self, normBase norm, ipBase inner) void
setOverlapNormInner(self, overlaps, level=-1) void
setup(self, LinearOperator A=None) void
tolerance

tolerance: ‘REAL_t’

class PyNucleus_base.solvers.jacobi_solver(LinearOperator A=None, INDEX_t num_rows=-1)

Bases: solver

__init__(*args, **kwargs)
setup(self, LinearOperator A=None) void
class PyNucleus_base.solvers.krylov_solver(LinearOperator A=None, INDEX_t num_rows=-1)

Bases: iterative_solver

__init__(*args, **kwargs)
convClient

convClient: PyNucleus_base.convergence.convergenceClient

convMaster

convMaster: PyNucleus_base.convergence.convergenceMaster

prec

prec: PyNucleus_base.linear_operators.LinearOperator

setPreconditioner(self, LinearOperator prec, BOOL_t left=True) void
setup(self, LinearOperator A=None) void
class PyNucleus_base.solvers.lu_solver(LinearOperator A, INDEX_t num_rows=-1)

Bases: solver

__init__(*args, **kwargs)
setup(self, LinearOperator A=None) void
class PyNucleus_base.solvers.noop_solver(LinearOperator A, INDEX_t num_rows=-1)

Bases: solver

__init__(*args, **kwargs)
setup(self, LinearOperator A=None) void
class PyNucleus_base.solvers.preconditioner(solver solOp, dict ctxAttrs={})

Bases: LinearOperator

__init__(*args, **kwargs)
ctxAttrs

ctxAttrs: dict

solOp

solOp: PyNucleus_base.solvers.solver

class PyNucleus_base.solvers.solver(LinearOperator A=None, INDEX_t num_rows=-1)

Bases: object

A

A: PyNucleus_base.linear_operators.LinearOperator

PLogger

PLogger: PyNucleus_base.performanceLogger.FakePLogger

__call__(*args, **kwargs)

Call self as a function.

__init__(*args, **kwargs)
asPreconditioner(self)
initialized

initialized: ‘BOOL_t’

num_rows

num_rows: ‘INDEX_t’

setup(self, LinearOperator A=None) void

PyNucleus_base.sparseGraph module

class PyNucleus_base.sparseGraph.combinedOperator(operators, factors=None)

Bases: LinearOperator

__init__(self, operators, factors=None)
matvec(self, x)
sliceColumn(self, slice)
sliceRow(self, slice)
toCSR(self)
PyNucleus_base.sparseGraph.cuthill_mckee(sparseGraph graph, INDEX_t[::1] order, BOOL_t reverse=False) void

Cuthill-McKee ordering of a sparse symmetric CSR or CSC matrix. We follow the original Cuthill-McKee paper and always start the routine at a node of lowest degree for each connected component.

PyNucleus_base.sparseGraph.dropColsInPlace(S, INDEX_t[::1] col_idx)
PyNucleus_base.sparseGraph.dropRowsInPlace(S, INDEX_t[::1] rowIndices)

PyNucleus_base.sparsityPattern module

class PyNucleus_base.sparsityPattern.sparsityPattern(INDEX_t num_dofs, uint16_t initial_length=9)

Bases: object

__init__(*args, **kwargs)
add_python(self, INDEX_t I, INDEX_t J)
freeze_python(self)

PyNucleus_base.tupleDict module

class PyNucleus_base.tupleDict.arrayIndexSet(INDEX_t[::1] indexArray=None, BOOL_t sorted=False)

Bases: indexSet

__init__(*args, **kwargs)
empty(self) void
fromSet(self, set s) void
inter(self, indexSet other_) indexSet
setminus(self, indexSet other_) indexSet
toArray(self) INDEX_t[::1]
toSet(self) set
union(self, indexSet other_) indexSet
class PyNucleus_base.tupleDict.arrayIndexSetIterator(arrayIndexSet aIS=None)

Bases: indexSetIterator

__init__(*args, **kwargs)
class PyNucleus_base.tupleDict.bitArray(size_t hintMaxLength=1, INDEX_t maxElement=0)

Bases: indexSet

__init__(*args, **kwargs)
empty(self) void
fromSet(self, set s) void
inter(self, indexSet other_) indexSet
length
set_py(self, INDEX_t i)
toSet(self) set
union(self, indexSet other_) indexSet
class PyNucleus_base.tupleDict.bitArrayIterator(bitArray bA=None)

Bases: indexSetIterator

__init__(*args, **kwargs)
class PyNucleus_base.tupleDict.indexSet

Bases: object

empty(self) void
fromSet(self, set s) void
getIter_py(self)
inSet_py(self, INDEX_t i)
inter(self, indexSet other) indexSet
isSorted(self) BOOL_t
setminus(self, indexSet other) indexSet
toArray(self) INDEX_t[::1]
toSet(self) set
union(self, indexSet other) indexSet
class PyNucleus_base.tupleDict.indexSetIterator

Bases: object

__init__(*args, **kwargs)
i
class PyNucleus_base.tupleDict.rangeIndexSet(INDEX_t start, INDEX_t end, INDEX_t increment=1)

Bases: indexSet

__init__(*args, **kwargs)
class PyNucleus_base.tupleDict.rangeIndexSetIterator(rangeIndexSet rIS=None)

Bases: indexSetIterator

__init__(*args, **kwargs)
class PyNucleus_base.tupleDict.tupleDictINDEX(INDEX_t num_dofs, uint8_t initial_length=0, uint8_t length_inc=3, BOOL_t deleteHits=True, BOOL_t logicalAndHits=False)

Bases: object

__init__(*args, **kwargs)
enterValue_py(self, const INDEX_t[::1] e, INDEX_t val) INDEX_t
invalid

invalid: ‘INDEX_t’

isCorrect(self)
merge(self, tupleDictINDEX other) void
mergeData(self, uint8_t[::1] counts, INDEX_t[::1] indexL, INDEX_t[::1] vals) void
nnz
removeValue_py(self, const INDEX_t[::1] e) INDEX_t
toDict(self)
class PyNucleus_base.tupleDict.unsortedArrayIndexSet(INDEX_t[::1] indexArray=None)

Bases: arrayIndexSet

__init__(*args, **kwargs)
empty(self) void
fromSet(self, set s) void
inter(self, indexSet other) indexSet
setminus(self, indexSet other) indexSet
toArray(self) INDEX_t[::1]
toSet(self) set
union(self, indexSet other) indexSet

PyNucleus_base.utilsCy module

PyNucleus_base.utilsCy.FakeComm(rank, size)
class PyNucleus_base.utilsCy.FakeComm_class

Bases: Comm

Barrier(self)
allreduce(self, v, *args, **kwargs)
rank

rank of this process in communicator

setRankSize(self, rank, size)
size

number of processes in communicator

values

values: dict

PyNucleus_base.utilsFem module

PyNucleus_base.utilsFem.setSyncDefault(sync)[source]
class PyNucleus_base.utilsFem.TimerManager(logger, comm=None, print_rank=0, prefix='', myPLogger=None, memoryProfiling=False, loggingSubTimers=False)[source]

Bases: object

__init__(logger, comm=None, print_rank=0, prefix='', myPLogger=None, memoryProfiling=False, loggingSubTimers=False)[source]
getTimer(FinalMessage=None, StartMessage=None, level=20, overrideComm=None, sync=False)[source]
__call__(*args, **kwargs)[source]

Call self as a function.

setOutputGroup(rank, oG)[source]
getSubManager(logger)[source]
PyNucleus_base.utilsFem.getLoggingTimer(logger, comm=None, print_rank=0, prefix='', rootOutput=False)[source]
PyNucleus_base.utilsFem.computeErrors(levels, solutions, norm, timeVals=None)[source]
PyNucleus_base.utilsFem.roc(idx, val, FillUp=False, exp=False)[source]

Calculates the rate of convergence.

class PyNucleus_base.utilsFem.exitHandler(comm)[source]

Bases: object

__init__(comm)[source]
exit(code=0)[source]
exc_handler(exc_type, exc, *args)[source]
atExitHandler()[source]
PyNucleus_base.utilsFem.saveDictToHDF5(params, f, ignore={})[source]
PyNucleus_base.utilsFem.loadDictFromHDF5(f)[source]
PyNucleus_base.utilsFem.processDictForYaml(params)[source]
PyNucleus_base.utilsFem.updateFromDefaults(params, defaults)[source]
PyNucleus_base.utilsFem.getMPIinfo(grp, verbose=False)[source]
PyNucleus_base.utilsFem.getEnvVariables(grp, envVars=[('OMP_NUM_THREADS', True)])[source]
PyNucleus_base.utilsFem.getSystemInfo(grp, argv=None, envVars=[('OMP_NUM_THREADS', True)])[source]
class PyNucleus_base.utilsFem.MPIFileHandler(filename, comm, mode=5)[source]

Bases: Handler

A handler class which writes formatted logging records to disk files.

__init__(filename, comm, mode=5)[source]

Initializes the instance - basically setting the formatter to None and the filter list to empty.

emit(record)[source]

Do whatever it takes to actually log the specified logging record.

This version is intended to be implemented by subclasses and so raises a NotImplementedError.

sync()[source]
close()[source]

Closes the stream.

PyNucleus_base.utilsFem.columns(lines, returnColWidth=False, colWidth=0)[source]
class PyNucleus_base.utilsFem.outputParam(label, value, format=None, aTol=None, rTol=None, tested=False)[source]

Bases: object

__init__(label, value, format=None, aTol=None, rTol=None, tested=False)[source]
class PyNucleus_base.utilsFem.outputGroup(aTol=None, rTol=None, tested=False, driver=None)[source]

Bases: object

__init__(aTol=None, rTol=None, tested=False, driver=None)[source]
add(label, value, format=None, aTol=None, rTol=None, tested=None)[source]
log()[source]
toDict(tested=False)[source]
fromDict(d)[source]
diff(d)[source]
class PyNucleus_base.utilsFem.statisticOutputGroup(comm, driver=None)[source]

Bases: outputGroup

__init__(comm, driver=None)[source]
add(label, value, format=None, aTol=None, rTol=None, tested=None, sumOverRanks=True)[source]
class PyNucleus_base.utilsFem.timerOutputGroup(driver=None)[source]

Bases: outputGroup

__init__(driver=None)[source]
class PyNucleus_base.utilsFem.seriesOutputGroup(name, aTol=None, rTol=None, tested=False, driver=None)[source]

Bases: object

__init__(name, aTol=None, rTol=None, tested=False, driver=None)[source]
addGroup(label)[source]
get(keyName, valueNames=[], sortBy=None, reverse=False)[source]
getPair(keyName, valueName, sortBy=None, reverse=False)[source]
roc(keyName, valueName, reverse=False)[source]
toDict(tested=False)[source]
fromDict(d)[source]
getTable(keyName, valueNames=[], reverse=False)[source]
plot(keyName, valueName, bnd=None, **kwargs)[source]
diff(d)[source]
class PyNucleus_base.utilsFem.driverArgGroup(parent, group)[source]

Bases: object

__init__(parent, group)[source]
add(*args, **kwargs)[source]
class PyNucleus_base.utilsFem.driver(comm=None, setCommExitHandler=True, masterRank=0, description=None)[source]

Bases: object

__init__(comm=None, setCommExitHandler=True, masterRank=0, description=None)[source]
setIdentifier(identifier)[source]
property identifier
setLogFile(filename=None)[source]
addGroup(name)[source]
add(name, defaultValue=None, acceptedValues=[], help='No help defined', argInterpreter=None, group=None)[source]
addPositional(name, nargs=1, group=None)[source]
addToProcessHook(fun)[source]
process(override={})[source]
set(key, value)[source]
getLogger()[source]
property logger
getTimer()[source]
property timer
addOutputGroup(name, group=None, aTol=None, rTol=None, tested=False)[source]
addStatsOutputGroup(name, group=None, aTol=None, rTol=None, tested=False)[source]
addOutputSeries(name, aTol=None, rTol=None, tested=False)[source]
outputToDict(tested=False)[source]
timerReport()[source]
saveOutput()[source]
property display_available
declareFigure(name, description='No help defined', default=True)[source]
willPlot(name)[source]
startPlot(name, **kwargs)[source]
savePlot(name, filenameSuffix='', **kwargs)[source]
finishPlots(**kwargs)[source]
finish(**kwargs)[source]
PyNucleus_base.utilsFem.diffDict(d1, d2, aTol, relTol)[source]
PyNucleus_base.utilsFem.runDriver(path, py, python=None, timeout=900, ranks=None, cacheDir='', overwriteCache=False, aTol=1e-12, relTol=0.01, extra=None)[source]
class PyNucleus_base.utilsFem.parametrizedArg(name, params=[])[source]

Bases: object

__init__(name, params=[])[source]
match(s)[source]
interpret(s)[source]
class PyNucleus_base.utilsFem.propertyBuilder(baseObj, fun)[source]

Bases: object

__init__(baseObj, fun)[source]
declareGeneratedProperty(prop)[source]
declareGeneratedProperties(props)[source]
__call__()[source]

Call self as a function.

PyNucleus_base.utilsFem.generates(properties)[source]
class PyNucleus_base.utilsFem.classWithComputedDependencies[source]

Bases: object

generates()
__init__()[source]
getState(prop)[source]
setState(prop, state)[source]
getValue(prop)[source]
setValue(prop, value)[source]
directlyGetWithoutChecks(prop)[source]
directlySetWithoutChecks(prop, value)[source]
property allProperties
addProperty(prop, method=None, postProcess=None)[source]

Adds property that is generated by calling “method” The generated value is then cached.

invalidateDependencies(prop)[source]

Invalidate all properties that get generated by builders that depend on “prop”.

addProperties(properties, method=None, postProcess=None)[source]

Adds multiple properties that are generated by calling “method”.

addRemoteRequiredProperty(obj, prop)[source]

Adds a property of another object to self.

addRemoteRequiredProperties(obj, properties)[source]

Adds multiple properties of another object.

addRemoteGeneratedProperty(obj, prop)[source]
addRemote(obj)[source]
getGraph(includeRemote=False)[source]
plot(includeRemote=False, layout='dot')[source]
changeLogLevel(properties, logLevel)[source]
class PyNucleus_base.utilsFem.driverAddon(driver)[source]

Bases: object

__init__(driver)[source]
addParametrizedArg(name, params=[])[source]
parametrizedArg(name)[source]
argInterpreter(parametrizedArgs, acceptedValues=[])[source]
conversionInterpreter()[source]
setDriverFlag(*args, **kwargs)[source]
setDriverArgs()[source]
property timer
processCmdline(params)[source]
getIdentifier(params)[source]
process(params)[source]
class PyNucleus_base.utilsFem.problem(driver)[source]

Bases: classWithComputedDependencies, driverAddon

__init__(driver)[source]
processCmdline(params)[source]
process(params)[source]