wecopttool.vec_to_dofmat

vec_to_dofmat(vec, ndof)[source]

Convert a vector back to a matrix with one column per DOF.

Returns a matrix with ndof columns. The number of rows is inferred from the size of the input vector.

Opposite of wecopttool.dofmat_to_vec().

Parameters:
  • vec (ArrayLike) – 1D array consisting of concatenated arrays of several DOFs, as vec = [vec_1, vec_2, ..., vec_ndof].

  • ndof (int) – Number of degrees of freedom.

Return type:

ndarray

See also

dofmat_to_vec