Matrix operations#

These APDL Math commands can be used to create, manipulate, and solve matrices.

Note

See the PyAnsys Math overview for a more pythonic way of interacting with APDLMath.

Mapdl.axpy([vr, vi, m1, wr, wi, m2])

Performs the matrix operation M2= v*M1 + w*M2.

Mapdl.comp([matrix, algorithm, threshold])

Compresses the columns of a matrix using a specified algorithm.

Mapdl.dmat([matrix, type_, method, val1, ...])

Creates a dense matrix.

Mapdl.dot([vector1, vector2, par_real, par_imag])

Computes the dot (or inner) product of two vectors.

Mapdl.eigen([kmatrix, mmatrix, cmatrix, ...])

Performs a modal solution with unsymmetric or damping matrices.

Mapdl.export([matrix, format_, fname, val1, ...])

Exports a matrix to a file in the specified format.

Mapdl.fft([type_, inputdata, outputdata, ...])

Computes the fast Fourier transformation of a specified matrix or

Mapdl.free([name])

Deletes a matrix or a solver object and frees its memory allocation.

Mapdl.init([name, method, val1, val2, val3])

Initializes a vector or dense matrix.

Mapdl.itengine([type_, enginename, ...])

Performs a solution using an iterative solver.

Mapdl.lsbac([enginename, rhsvector, solvector])

Performs the solve (forward/backward substitution) of a factorized linear system.

Mapdl.lsdump([enginename, filename])

Dumps a linear solver engine to a binary File.

Mapdl.lsengine([type_, enginename, matrix, ...])

Creates a linear solver engine.

Mapdl.lsfactor([enginename, option])

Performs the numerical factorization of a linear solver system.

Mapdl.lsrestore([enginename, filename])

Restores a linear solver engine from a binary file.

Mapdl.merge([name1, name2, val1, val2])

Merges two dense matrices or vectors into one.

Mapdl.mult([m1, t1, m2, t2, m3])

Performs the matrix multiplication M3 = M1(T1)*M2(T2).

Mapdl.nrm([name, normtype, parr, normalize])

Computes the norm of the specified matrix or vector.

Mapdl.remove([name, val1, val2, val3])

Suppresses rows or columns of a dense matrix or a vector.

Mapdl.scal([name, val1, val2])

Scales a vector or matrix by a constant or a vector.

Mapdl.smat([matrix, type_, method, val1, ...])

Creates a sparse matrix.

Mapdl.starprint([matrix, fname])

Prints the matrix values to a file.

Mapdl.sort(**kwargs)

Specifies "Sort settings" as the subsequent status topic.

Mapdl.vec([vector, type_, method, val1, ...])

Creates a vector.

Mapdl.wrk([num])

Sets the active workspace number.