#include <stdlib.h>#include <stdio.h>#include <string.h>#include <math.h>#include <stdbool.h>#include <assert.h>#include <omp.h>#include "./lah_bcrs.h"#include "../lah_intf.h"#include "../../include/pch_intf.h"#include "lin_alg_intf.h"#include "uth_system.h"
Defines | |
| #define | TIME_TEST_ILU |
| #define | MIN_DOF_DGEMV 10000 |
| #define | SMALL 1e-15 |
| #define | TOL 1e-9 |
| #define | MAX_BL_BL 20 |
| #define | LAC_END_OF_LIST -7 |
| #define | LAC_PUT_LIST_NOT_FOUND -6 |
| #define | LAC_PUT_LIST_FOUND -5 |
| #define | LAC_PUT_LIST_FULL -4 |
Functions | |
| int | lar_util_chk_list_bcrs (int Num, int *List, int Ll) |
| int | lar_util_put_list_bcrs (int Num, int *List, int Ll) |
| int | lar_sort_short (int *A, int p, int k) |
| int | lar_allocate_SM_and_LV_bcrs (int Nrdof_glob, int Max_SM_size, int Block_size, int *Nroffbl, int **L_offbl) |
| int | lar_initialize_SM_and_LV_bcrs (int Matrix_id, int Scope) |
| double | lar_get_storage_bcrs (int Matrix_id) |
| int | lar_fill_assembly_table_int_ent_bcrs (int Matrix_id, int Nr_dof_bl, int *L_bl_id, int *L_bl_nrdof, int *Assembly_table_int_ent) |
| int | lar_assemble_SM_and_LV_with_table_bcrs (int Matrix_id, int Scope, int Nr_dof_bl, int *Assembly_table_int_ent, int *Local_to_global_int_ent, double *Stiff_mat, double *Rhs_vect, char *Rewr_dofs) |
| int | lar_assemble_SM_and_LV_bcrs (int Matrix_id, int Scope, int Nr_dof_bl, int *L_bl_id, int *L_bl_nrdof, double *Stiff_mat, double *Rhs_vect, char *Rewr_dofs) |
| int | lar_allocate_preconditioner_bcrs (int Matrix_id, int Precon, int ILU_k) |
| int | lar_fill_preconditioner_bcrs (int Matrix_id) |
| int | lar_free_preconditioner_bcrs (int Matrix_id) |
| int | lar_free_SM_and_LV_bcrs (int Matrix_id) |
| void | lar_compute_residual_bcrs (int Matrix_id, int Use_rhs, int Ini_zero, int Ndof, double *X, double *B, double *V) |
| void | lar_perform_BJ_or_GS_iterations_bcrs (int Matrix_id, int Use_rhs, int Ini_zero, int Nr_prec, int Ndof, double *V, double *B) |
| void | lar_perform_rhsub_bcrs (int Matrix_id, int Ndof, double *V, double *B) |
| int | lar_get_SM_and_LV_crs_from_bcrs (int Matrix_id, int offset, int **crs_row, int **crs_col, double **crs_val, double **rhs) |
| int | lar_get_SM_and_LV_coo_from_bcrs (int Matrix_id, int *nnz, int offset, int **coo_row, int **coo_col, double **coo_val, double **rhs) |
Variables | |
| int | itv_nr_bcrs_matrices = 0 |
| itt_bcrs_matrices | itv_bcrs_matrices [LAC_MAX_MATRICES] |
| #define LAC_END_OF_LIST -7 |
| #define LAC_PUT_LIST_FOUND -5 |
| #define LAC_PUT_LIST_FULL -4 |
| #define LAC_PUT_LIST_NOT_FOUND -6 |
| #define MAX_BL_BL 20 |
| #define MIN_DOF_DGEMV 10000 |
| #define SMALL 1e-15 |
| #define TIME_TEST_ILU |
| #define TOL 1e-9 |
| int lar_allocate_preconditioner_bcrs | ( | int | Matrix_id, | |
| int | Precon, | |||
| int | ILU_k | |||
| ) |
-------------------------------------------------------- lar_allocate_preconditioner_bcrs - to allocate space for preconditioner ---------------------------------------------------------


| int lar_allocate_SM_and_LV_bcrs | ( | int | Nrdof_glob, | |
| int | Max_SM_size, | |||
| int | Block_size, | |||
| int * | Nroffbl, | |||
| int ** | L_offbl | |||
| ) |


| int lar_assemble_SM_and_LV_bcrs | ( | int | Matrix_id, | |
| int | Scope, | |||
| int | Nr_dof_bl, | |||
| int * | L_bl_id, | |||
| int * | L_bl_nrdof, | |||
| double * | Stiff_mat, | |||
| double * | Rhs_vect, | |||
| char * | Rewr_dofs | |||
| ) |

| int lar_assemble_SM_and_LV_with_table_bcrs | ( | int | Matrix_id, | |
| int | Scope, | |||
| int | Nr_dof_bl, | |||
| int * | Assembly_table_int_ent, | |||
| int * | Local_to_global_int_ent, | |||
| double * | Stiff_mat, | |||
| double * | Rhs_vect, | |||
| char * | Rewr_dofs | |||
| ) |

| void lar_compute_residual_bcrs | ( | int | Matrix_id, | |
| int | Use_rhs, | |||
| int | Ini_zero, | |||
| int | Ndof, | |||
| double * | X, | |||
| double * | B, | |||
| double * | V | |||
| ) |

| int lar_fill_assembly_table_int_ent_bcrs | ( | int | Matrix_id, | |
| int | Nr_dof_bl, | |||
| int * | L_bl_id, | |||
| int * | L_bl_nrdof, | |||
| int * | Assembly_table_int_ent | |||
| ) |
----------------------------------------------------------- lar_fill_assembly_table_int_ent_bcrs - to fill a part of the global assembly table related to one integration entity, for which lists of DOF blocks (their global positions) are provided ------------------------------------------------------------

| int lar_fill_preconditioner_bcrs | ( | int | Matrix_id | ) |
-------------------------------------------------------- lar_fill_preconditioner_bcrs - to fill preconditioner ---------------------------------------------------------


| int lar_free_preconditioner_bcrs | ( | int | Matrix_id | ) |
-------------------------------------------------------- lar_free_preconditioner_bcrs - to free space for a block structure ---------------------------------------------------------

| int lar_free_SM_and_LV_bcrs | ( | int | Matrix_id | ) |

| int lar_get_SM_and_LV_coo_from_bcrs | ( | int | Matrix_id, | |
| int * | nnz, | |||
| int | offset, | |||
| int ** | coo_row, | |||
| int ** | coo_col, | |||
| double ** | coo_val, | |||
| double ** | rhs | |||
| ) |

| int lar_get_SM_and_LV_crs_from_bcrs | ( | int | Matrix_id, | |
| int | offset, | |||
| int ** | crs_row, | |||
| int ** | crs_col, | |||
| double ** | crs_val, | |||
| double ** | rhs | |||
| ) |

| double lar_get_storage_bcrs | ( | int | Matrix_id | ) |
-------------------------------------------------------- lar_get_storage_bcrs - to compute storage of SM, LV and preconditioner ---------------------------------------------------------

| int lar_initialize_SM_and_LV_bcrs | ( | int | Matrix_id, | |
| int | Scope | |||
| ) |
-------------------------------------------------------- lar_initialize_SM_and_LV_bcrs - to initialize stiffness matrix and/or load vector ---------------------------------------------------------

| void lar_perform_BJ_or_GS_iterations_bcrs | ( | int | Matrix_id, | |
| int | Use_rhs, | |||
| int | Ini_zero, | |||
| int | Nr_prec, | |||
| int | Ndof, | |||
| double * | V, | |||
| double * | B | |||
| ) |
-------------------------------------------------------- lar_perform_BJ_or_GS_iterations_bcrs - to perform one iteration of block Gauss-Seidel or block Jacobi algorithm: v_out = v_in + M^-1 * ( b - A * v_in ) where M^-1 results from stored preconditioner matrix and the algorithm ---------------------------------------------------------


| void lar_perform_rhsub_bcrs | ( | int | Matrix_id, | |
| int | Ndof, | |||
| double * | V, | |||
| double * | B | |||
| ) |
-------------------------------------------------------- lar_perform_rhsub_bcrs - to perform forward reduction and back-substitution for ILU preconditioning ---------------------------------------------------------


| int lar_sort_short | ( | int * | A, | |
| int | p, | |||
| int | k | |||
| ) |


| int lar_util_chk_list_bcrs | ( | int | Num, | |
| int * | List, | |||
| int | Ll | |||
| ) |
| int lar_util_put_list_bcrs | ( | int | Num, | |
| int * | List, | |||
| int | Ll | |||
| ) |

| itt_bcrs_matrices itv_bcrs_matrices[LAC_MAX_MATRICES] |
| int itv_nr_bcrs_matrices = 0 |
1.6.1