Utilities¶
Plotting¶
-
eldraw2(ex, ey, [plotpar=[1,1,0], elnum=zeros(0)])¶ Draws the 2D mesh defined by
ex,ey.
-
eldisp2(ex, ey, ed, [plotpar=[1,1,0], sfac=1.0])¶ Draws the displaced 2D mesh defined by
ex,eyand the displacements given ined.
Solving system of equations¶
-
solveq(K, f, bc[, symmetric=false]) → a, fb¶ Solves the equation system Ka = f taking into account the Dirichlet boundary conditions in the matrix
bc. Returns the solution vectoraand reaction forcesfbIfsymmetricis set totrue, the matrix will be factorized with Cholesky factorization.
Coordinate extraction¶
-
extract(edof, a)¶ Extracts the element displacements from the global solution vector
agiven anedofmatrix. This assumes all elements to have the same number of dofs.
-
coordxtr(Edof, Coord, Dof, nen) → Ex, Ey, Ez¶ Extracts the coordinates of the nodes of the elements.
This function can be slow for large number of elements.
-
topologyxtr(Edof, Coord, Dof, nen) → topology¶ Extracts the connectivity matrix.
This function can be slow for large number of elements.