Muscat.LinAlg.LinearSolver module

CheckIntegrity(GUI: bool = False)[source]
CheckSPQR(GUI)[source]
CheckSolver(GUI, solver)[source]
GenerateEigenConstructor(type)[source]
GetAvailableSolvers()[source]
class LinearProblem[source]

Bases: object

ComputeProjector(mesh, fields)[source]
GetNumberOfDofs()[source]
HasConstraints()[source]
SetAlgo(name, ops=None, withErrorIfNotFound=False)[source]
SetOp(op)[source]
SetTolerance(tol)[source]
Solve(rhs)[source]
property constraints
class LinearSolverBase[source]

Bases: object

ComputeProjector(op)[source]
GetConstraints()[source]
GetNumberOfDofs()[source]
HasConstraints()[source]
SetConstraints(constraints)[source]
SetOp(op)[source]
Solve(rhs, u0=None)[source]
class LinearSolverCG[source]

Bases: LinearSolverIterativeBase

class LinearSolverCholesky[source]

Bases: LinearSolverDirect

class LinearSolverDirect[source]

Bases: LinearSolverIterativeBase

class LinearSolverDispatcher[source]

Bases: LinearSolverIterativeBase

Class to select a linear solver depending on the size of the problem (number of dofs) at runtime

SetBigSizeSolver(solverName: str, ops={})[source]

Set the big solver name and the option to be used at creation

Parameters:
  • solverName (str) – the name of the solver to be used for “big” systems

  • ops (dict, optional) – option to be passed to the solver, by default {}

SetDofThreshold(threshold: int64)[source]

Set the threshold value to select the small/big solver.

Parameters:

threshold (MuscatIndex) – threshold value to select the small or the big solver.

SetSmallSizeSolver(solverName: str, ops={})[source]

Set the small solver name and the option to be used at creation

Parameters:
  • solverName (str) – the name of the solver to be used for “small” systems

  • ops (dict, optional) – option to be passed to the solver, by default {}

class LinearSolverEigen(subtype)[source]

Bases: LinearSolverIterativeBase

classmethod GetAvailableSolvers()[source]
GetSPQRRank()[source]
GetSPQR_P()[source]
GetSPQR_Q()[source]
GetSPQR_R()[source]
SetSolver(subtype)[source]
class LinearSolverIterativeBase[source]

Bases: LinearSolverBase

SetTolerance(tol)[source]
class LinearSolverPardiso[source]

Bases: LinearSolverDirect

FreeMemory()[source]
class LinearSolvergmres[source]

Bases: LinearSolverIterativeBase

class LinearSolverlAMG[source]

Bases: LinearSolverIterativeBase

class LinearSolverlgmres[source]

Bases: LinearSolverIterativeBase

class LinearSolverlsqr[source]

Bases: LinearSolverIterativeBase

RegisterSolverClass(name, classtype, constructor=None, withError=True)[source]
RegisterSolverClassUsingName(cls)[source]
class SolverFactory[source]

Bases: Factory