MumpsContext¶
- class MumpsContext(*args)¶
GetFEM MumpsContext object
General constructor for MumpsContext objects
CTX = MumpsContext(string sym, string datatype)
The argument sym should be ‘symmetric’ or ‘general symmetric’, ‘symmetric positive definite’, ‘unsymmetric’, or empty. Default value (empty) is ‘unsymmetric’ (MUMPS option 0). The option ‘symmetric’ is equivalent to ‘general symmetric’ (MUMPS option 2). The argument datatype should be ‘real’ or ‘complex’ or empty. Default value (empty) is ‘real’.
- CNTL(ind, val)¶
Set the scalar option at 1-based index ind in the CNTL vector of the mumps_context object to value val.
Capital naming convention is used to imply Fortran indexing.
- ICNTL(ind)¶
Output the ICNTL array entry at 1-based index ind stored in the mumps_context object.
Capital naming convention is used to imply Fortran indexing.
- INFOG(ind)¶
Output the INFOG array entry at 1-based index ind stored in the mumps_context object.
Capital naming convention is used to imply Fortran indexing.
- RINFO(ind)¶
Output the RINFO array entry at 1-based index ind stored in the mumps_context object.
Capital naming convention is used to imply Fortran indexing.
- RINFOG(ind)¶
Output the RINFOG array entry at 1-based index ind stored in the mumps_context object.
Capital naming convention is used to imply Fortran indexing.
- analyze()¶
Run the MUMPS analysis job for the mumps_context object.
- analyze_and_factorize()¶
Run the MUMPS analysis and factorization jobs for the mumps_context object.
- analyze_factorize_and_solve()¶
Run the MUMPS analysis, factorization and solve jobs for the mumps_context object. An error check is also performed after the solve.
It returns the solution vector (on all processes if MPI is used).
- display()¶
Display a short summary for a mumps_context object.
- distributed_matrix()¶
The mumps_context object in the scripting API cannot return a reference to the ija matrix stored in C++. It just displays information about the stored matrix.
- error_check()¶
Check the error status of the mumps_context object.
- factorize()¶
Run the MUMPS factorization job for the mumps_context object.
- factorize_and_solve()¶
Run the MUMPS factorization and solve jobs for the mumps_context object.
The analysis job needs to be run first before calling this function. An error check is performed after the solve.
It returns the solution vector (on all processes if MPI is used).
- matrix()¶
The mumps_context object in the scripting API cannot return a reference to the ija matrix stored in C++. It just displays information about the stored matrix.
- set_ICNTL(ind, val)¶
Set the integer option at 1-based index ind in the ICNTL vector of the mumps_context object to value val.
Capital naming convention is used to imply Fortran indexing.
- set_distributed_matrix(A, rows=None, *args)¶
Synopsis: MumpsContext.set_distributed_matrix(self, mat A[, vec rows[, vec cols]])
Set mat A(rows,cols) as the matrix A for the mumps_context object, distributed over all processes. It also sets ICNTL(5) to 0 and ICNTL(18) to 3.
Optional vectors vec rows and vec cols are used for selecting and/or permuting rows and columns from input matrix mat A. They are 0-based in Python and 1-based in Matlab/Octave.
- set_matrix(A, rows=None, *args)¶
Synopsis: MumpsContext.set_matrix(self, mat A[, vec rows[, vec cols]])
Set mat A(rows,cols) as the matrix for the mumps_context object.
Optional vectors vec rows and vec cols are used for selecting and/or permuting rows and columns from input matrix mat A. They are 0-based in Python and 1-based in Matlab/Octave.
- set_vector(b)¶
Set the right hand side vec b for the mumps_context object.
- solve()¶
Run the MUMPS solve job (only) for the mumps_context object.
The analysis and factorization jobs need to be run first before calling this function. An error check is performed after the solve.
It returns the solution vector (on all processes if MPI is used).
- vector()¶
Outputs a copy of the vector stored in the mumps_context object. Before the solution, it contains the right hand side of the system. After the solution, it contains the solution.