solveqΒΆ

Purpose:

Solve equation system.

Syntax:

a = cfc.solveq(K, f)
a = cfc.solveq(K, f, bcPrescr, bcVal)
a, r = cfc.solveq(K, f, bcPrescr, bcVal)
Description:

The function solveq solves the equation system

\[\mathbf{K}\;\mathbf{a} = \mathbf{f}\]

where \(\mathbf{K}\) is a matrix and \(\mathbf{a}\) and \(\mathbf{f}\) are vectors.

The matrix \(\mathbf{K}\) and the vector \(\mathbf{f}\) must be predefined. The solution of the system of equations is stored in a vector \(\mathbf{a}\) which is created by the function.

If some values of \(\mathbf{a}\) are to be prescribed, the row number and the corresponding values are given in the boundary condition matrices

bcPresc\(= \left[ \begin{array}{c} dof_1 \\ dof_2 \\ \vdots \\ dof_{nbc} \end{array} \right]\) \(\qquad\) bcVal\(= \left[ \begin{array}{c} u_1 \\ u_2 \\ \vdots \\ u_{nbc} \end{array} \right]\)

where bcPresc contains the row numbers and bcVal the corresponding prescribed values. If bcVal is omitted, all prescribed values are assumed to be 0.

If r is given in the function, support forces are computed according to

mathbf{r}\(= \mathbf{K}\;\mathbf{a} - \mathbf{f}\)