Second Midterm Exam
Second Midterm Exam
Docente:
2021
COMPUTATIONAL SOLUTIONS OF ENGINEERING PROBLEMS 2
Solving linear systems of equations has always been a valued approach to solve real
solve the stability problems with explicit integration methods. Articulated rigid bodies are
It should be added that in now a days different advances have been carried out in the
computer field for the solution of linear systems by implementing Computer graphics
processors (GPU), which is the objective of this investigative work, present some results of
these advances, with their respective explanation and proposed solution in a simple program
or script example.
First at all, we must understand that linear systems equations help us to solve divers
problems, from those that occur in our daily lives to problems that happen in engineering,
physics, mathematics, economics, and other sciences, like electromagnetics, fluid mechanics,
implemented two classes of methods: direct and iterative methods. The direct methods use a
COMPUTATIONAL SOLUTIONS OF ENGINEERING PROBLEMS 3
finite sequence of operations to solve the problem while the iterative methods use an initial
guess of the result and generate approximate solutions and tries to make the iterations
converge.
I must be said that the classical approach for solving a linear system using iterative
methods consists in Jacobi, Gauss-Seidel and SOR methods that are well known are
Scheme of the algorithm of the solution of the iterative methods, Jacobi to solve linear
systems of equations.
In each step the components of the new vector x are calculated through the previous
As well as the Jacobi methos, the structure of the Gauss-Seidel has a similar structure
in which the components of the new vector x are calculated through the previous vector z
If 𝐴 ∈ 𝑀𝑛 (ℝ) is a strictly dominant matrix in the diagonal sense, then for any choice
of the initial approximation 𝑥̅ (0) , both the Jacobi and Gauss-Seidel methods converge to the
The following code solves by the same Gauss-Seidel method but in the C program.
COMPUTATIONAL SOLUTIONS OF ENGINEERING PROBLEMS 5
Unlike the Jacobi method, this scheme is fully sequential. However, it can be
efficiently implemented without storing the solution of the previous step, with a saving of
memory storage.
COMPUTATIONAL SOLUTIONS OF ENGINEERING PROBLEMS 6
We can compute the reduced QR factorization with the following (somewhat more
The classical Gram-Schmidt algorithm is not ideal for numerical calculations since it
is known to be unstable. But, the Gram-Schmidt algorithm yields an existence proof for the
QR factorization.
Hermitian, positive-definite matrix into the product of a lower triangular matrix and its
conjugate transpose.
decomposition of the form 𝐴 = [𝐿][𝐿]𝑇 , where L is a lower triangular matrix with real and
positive diagonal entries, and 𝐿𝑇 denotes the conjugate transpose of L. Every Hermitian
positive-definite matrix (and thus also every real-valued symmetric positive-definite matrix)
// Cholesky Decomposition
#include <bits/stdc++.h>
int n)
int lower[n][n];
memset(lower, 0, sizeof(lower));
int sum = 0;
{
COMPUTATIONAL SOLUTIONS OF ENGINEERING PROBLEMS 8
lower[j][j] = sqrt(matrix[j][j] -
sum);
} else {
lower[j][j];
// Lower Triangular
// Driver Code
int main()
int n = 3;
{ -16, -43, 98 } };
Cholesky_Decomposition(matrix, n);
return 0;
diagonal. For simplicity and also because pivoting is not used, the assumption that D is
diagonal has been made, although D can also be block-diagonal, with blocks of size 1 × 1 or
2×2, when pivoting is applied. The matrix A can also be factorized as 𝐴 = 𝑈𝐷𝑈𝑇 , where U is
unit upper triangular. The algorithm for the lower triangular case (L) can straightforwardly be
COMPUTATIONAL SOLUTIONS OF ENGINEERING PROBLEMS 10
extended to the upper triangular case (U) and therefore only the development of the former is
presented.
Direct method: LU
The code for the forward substitution algorithm to solve Lx=b is:
COMPUTATIONAL SOLUTIONS OF ENGINEERING PROBLEMS 11
Referencias
Apellidos, n. s. (Año). Título del artículo. Título del diario, Páginas desde - hasta.
Rémy, A (2015). Solving dense linear systems on accelerated multicore architectures, 1- 20.
Weber, D., Bender, J., Schnoes, M., Stork, A., Fellner, D. (2013). Efficient GPU Data
Molero, J. M., Garzón, E. M., García, I., Quintana-Ortí., E. S., Plazo, A. Solución de
Bogdan, O., Tudorel, A., Raluca, M. D. Improving the performance of the linear systems
Becker, D., Faverge, M., Dongarra, J. J. (2011). Towards a Parallel Tile LDL Factorization
Lang, N., Hermann, M., Saak, J. (2014). On the benefits of the 𝐿𝐷𝐿𝑇 factorization for large-