Skip to main content

optiSLang 3D Postprocessing Script API 2025 R1

SparseSolver Class Reference

Last update: 16.07.2025

The base class for sparse solvers. It provides a unified interface which can be used by generic algorithms. More...

Public Types

typedef number TScalar
 data type of matrix elements
 
typedef Eigen::SparseMatrix< TScalarTSparseMatrix
 the sparse matrix base type
 

Public Member Functions

virtual bool Compute (SparseMatrix A)
 computes the factorization, returns true if succeeded More...
 
virtual bool Compute (SymSparseMatrix A)
 computes the factorization, returns true if succeeded More...
 
virtual Matrix operator* (Matrix other)
 returns the matrix product inv(A)*B More...
 
 Solve (Matrix INPUT, Matrix **OUTPUT, bool **OUTPUT)
 Solves the given vector on return; returns true if succeeded. More...
 
 Solve (SparseMatrix INPUT, Matrix **OUTPUT, bool **OUTPUT)
 Solves the given sparse RHS on return; returns true if succeeded. More...
 
virtual bool SolveInPlace (Matrix b)
 Factorizes this matrix and solves the given vector in place;. More...
 
 SolveTransposed (Matrix INPUT, Matrix **OUTPUT, bool **OUTPUT)
 Solves the system (transpose(Matrix)*x=b for x; returns true if succeeded. More...
 
 SparseSolver ()
 destructor More...
 
virtual string typeIdent ()
 

Detailed Description

The base class for sparse solvers. It provides a unified interface which can be used by generic algorithms.

Constructor & Destructor Documentation

◆ SparseSolver()

destructor

default constructor

Member Function Documentation

◆ Compute() [1/2]

virtual bool Compute ( SparseMatrix  A)
virtual

computes the factorization, returns true if succeeded

Parameters
Athe matrix to be factorized
Returns
true of successful

Reimplemented in SparseLU, and MUMPS.

◆ Compute() [2/2]

virtual bool Compute ( SymSparseMatrix  A)
virtual

computes the factorization, returns true if succeeded

Parameters
Athe matrix to be factorized
Returns
true of successful

Reimplemented in SparseLU, and MUMPS.

◆ operator*()

virtual Matrix operator* ( Matrix  other)
virtual

returns the matrix product inv(A)*B

Parameters
otherthe second argument of inv(A)*B
Returns
the product of the factorized matrix multiplied with other

◆ Solve() [1/2]

Solve ( Matrix  INPUT,
Matrix **  OUTPUT,
bool **  OUTPUT 
)

Solves the given vector on return; returns true if succeeded.

Parameters
bthe right hand side
xthe solution
successthe return value of Solve(b,x) allow the SWIG syntax (x,bool)=Solve(b) for solving x in Ax=b in script bindings

◆ Solve() [2/2]

Solve ( SparseMatrix  INPUT,
Matrix **  OUTPUT,
bool **  OUTPUT 
)

Solves the given sparse RHS on return; returns true if succeeded.

Parameters
bthe right hand side
xthe solution
Returns
true if successfulallows the SWIG syntax (x,bool)=Solve(b) for solving x in Ax=b in script

◆ SolveInPlace()

virtual bool SolveInPlace ( Matrix  b)
virtual

Factorizes this matrix and solves the given vector in place;.

Returns
returns true if succeeded
Parameters
bon input: the right hand side. On output: the solution x

Reimplemented in SparseLU, and MUMPS.

◆ SolveTransposed()

SolveTransposed ( Matrix  INPUT,
Matrix **  OUTPUT,
bool **  OUTPUT 
)

Solves the system (transpose(Matrix)*x=b for x; returns true if succeeded.

Parameters
bthe right hand side
xthe solution
Returns
true if successful allows the SWIG syntax (x,bool)=Solve(b) for solving x in Ax=b in script.

◆ typeIdent()

virtual string typeIdent ( )
virtual
Returns
the name of the datatype

Connect with Ansys