24 G_debug(2,
"G_math_cholesky_sband_decomposition(): n=%d bandwidth=%d",
27 for (i = 0; i < rows; i++) {
32 for (k = 1; k < end; k++)
33 sum -= T[i - k][k] * T[i - k][0 + k];
35 G_fatal_error(
_(
"Decomposition failed at row %i and col %i"), i, 0);
38#pragma omp parallel for schedule(static) private(j, k, end, sum) \
39 shared(A, T, i, bandwidth)
43 for (k = 1; k < end; k++)
44 sum -= T[i - k][k] * T[i - k][
j + k];
45 T[i][
j] = sum / T[i][0];
101 x[0] =
b[0] / T[0][0];
102 for (i = 1; i < rows; i++) {
107 for (
j = start;
j < i;
j++)
108 x[i] -= T[
j][i -
j] *
x[
j];
109 x[i] =
x[i] / T[i][0];
113 x[rows - 1] =
x[rows - 1] / T[rows - 1][0];
114 for (i = rows - 2; i >= 0; i--) {
118 for (
j = i + 1;
j < end;
j++)
119 x[i] -= T[i][
j - i] *
x[
j];
120 x[i] =
x[i] / T[i][0];
144 for (i = 0; i < rows; i++) {
145 T[i][0] = 1.0 / T[i][0];
149 for (i = 0; i < rows; i++) {
152 for (
j = i + 1;
j < rows;
j++) {
157 for (k = start; k <
j; k++) {
158 sum -= vect[k - i] * T[k][
j - k];
160 vect[
j - i] = sum * T[
j][0];
192 for (i = 0; i < rows; i++) {
193 T[i][0] = 1.0 / T[i][0];
197 for (i = 0; i < rows; i++) {
200 for (
j = i + 1;
j < rows;
j++) {
205 for (k = start; k <
j; k++) {
206 sum -= vect[k - i] * T[k][
j - k];
208 vect[
j - i] = sum * T[
j][0];
void G_percent(long, long, int)
Print percent complete messages.
void void void void G_fatal_error(const char *,...) __attribute__((format(printf
int G_debug(int, const char *,...) __attribute__((format(printf
void G_free_matrix(double **)
Matrix memory deallocation.
double * G_alloc_vector(size_t)
Vector matrix memory allocation.
double ** G_alloc_matrix(int, int)
Matrix memory allocation.
void G_free_vector(double *)
Vector memory deallocation.
void G_math_solver_cholesky_sband(double **A, double *x, double *b, int rows, int bandwidth)
Cholesky symmetric band matrix solver for linear equation systems of type Ax = b.
void G_math_cholesky_sband_substitution(double **T, double *x, double *b, int rows, int bandwidth)
Forward and backward substitution of a lower tringular symmetric band matrix of A from system Ax = b.
void G_math_cholesky_sband_decomposition(double **A, double **T, int rows, int bandwidth)
Cholesky decomposition of a symmetric band matrix.
void G_math_solver_cholesky_sband_invert(double **A, double *x, double *b, double *invAdiag, int rows, int bandwidth)
void G_math_cholesky_sband_invert(double **A, double *invAdiag, int rows, int bandwidth)