class ansys.mapdl.core.math.MapdlMath(mapdl)

Abstract mapdl math class. Created from a Mapdl instance.


Create an instance.

>>> from ansys.mapdl.core import launch_mapdl
>>> mapdl = launch_mapdl()
>>> mm = mapdl.math

Vector addition

>>> v1 = mm.ones(10)
>>> v2 = mm.ones(10)
>>> v3 = v1 + v2

Matrix multiplcation (not yet available)

>>> v1 = mm.ones(10)
>>> m1 = mm.rand(10, 10)
>>> v2 = m1*v1


MapdlMath.add(obj1, obj2)

Add two APDLMath vectors or matrices.

MapdlMath.damp([dtype, fname, asarray])

Load the damping matrix from the full file., vec_b)

Dot product between two ANSYS vector objects.

MapdlMath.eigs(nev, k[, m, c, phi, algo, ...])

Solve an eigenproblem.


Factorize a matrix.

Delete all vectors.

MapdlMath.get_vec([dtype, fname, mat_id, ...])

Load a vector from a file.

MapdlMath.load_matrix_from_file([dtype, ...])

Import a matrix from an existing FULL file.

MapdlMath.mass([dtype, fname, asarray])

Load the mass matrix from a full file.

MapdlMath.mat([nrow, ncol, dtype, init, name])

Create an APDLMath matrix.

MapdlMath.matrix(matrix[, name, triu])

Send a scipy matrix or numpy array to MAPDL.

MapdlMath.mgs(mat[, thresh])

Apply Modified Gram-Schmidt algorithm to a matrix.

MapdlMath.norm(obj[, order])

Matrix or vector norm.

MapdlMath.ones(nrow[, ncol, dtype])

Create a vector or matrix containing all ones

MapdlMath.rand(nrow[, ncol, dtype])

Create a vector or matrix containing all random values

MapdlMath.rhs([dtype, fname, asarray])

Return the load vector from a full file.

MapdlMath.set_vec(data[, name])

Push a numpy array or Python list to the MAPDL memory workspace.

MapdlMath.sparse(mat[, thresh])

Sparsify a existing matrix based on a threshold value.


Print out the status of all APDLMath Objects.

MapdlMath.stiff([dtype, fname, asarray])

Load the stiffness matrix from a full file.

MapdlMath.subtract(obj1, obj2)

Subtract two ANSYS vectors or matrices.

MapdlMath.svd(mat[, thresh, sig, v])

Apply an SVD Algorithm on a matrix.

MapdlMath.vec([size, dtype, init, name])

Create a vector.

MapdlMath.zeros(nrow[, ncol, dtype])

Create a vector or matrix containing all zeros.