solveqΒΆ
- Purpose:
Solve equation system.
- Syntax:
a = solveq(K, f)
a = solveq(K, f, bcP, bc)
[a, r] = solveq(K, f, bc)
- Description:
The function
solveqsolves 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 matrix
bc\(= \left[ \begin{array}{c} dof_1 \\ dof_2 \\ \vdots \\ dof_{nbc} \end{array} \quad \begin{array}{c} u_1 \\ u_2 \\ \vdots \\ u_{nbc} \end{array} \right]\)where the first column contains the row numbers and the second column the corresponding prescribed values.
If
ris given in the function, support forces are computed according tomathbf{r}\(= \mathbf{K}\;\mathbf{a} - \mathbf{f}\)