#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include "uth_log.h"
#include "../lah_intf.h"
#include "./lah_block.h"
#include "lin_alg_intf.h"
Defines | |
#define | MIN_DOF_DGEMV 10000 |
#define | SMALL 1e-15 |
#define | TOL 1e-9 |
#define | Max_dof_block_dia 1500 |
#define | MAX_BL_BL 20 |
Functions | |
int | lar_allocate_SM_and_LV_block (int Nrdof_glob, int Max_SM_size, int Nrblocks, int *Nrdofbl, int *Posglob, int *Nroffbl, int **L_offbl) |
int | lar_initialize_SM_and_LV_block (int Matrix_id, int Scope) |
double | lar_get_storage_block (int Matrix_id) |
int | lar_assemble_SM_and_LV_block (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_block (int Matrix_id, int Precon, int Block_type) |
int | lar_fill_preconditioner_block (int Matrix_id) |
int | lar_free_preconditioner_block (int Matrix_id) |
int | lar_free_SM_and_LV_block (int Matrix_id) |
void | lar_compute_residual_block (int Matrix_id, int Use_rhs, int Ini_zero, int Ndof, double *X, double *B, double *V) |
void | lar_perform_BJ_or_GS_iterations_block (int Matrix_id, int Use_rhs, int Ini_zero, int Nr_prec, int Ndof, double *V, double *B) |
void | lar_perform_rhsub_block (int Matrix_id, int Ndof, double *V, double *B) |
void | it_mfaiter (int Matrix_id, int Use_rhs, int Ini_zero, int Nr_prec, int Ndof, double *V, double *B) |
void | it_mfmiter (int Matrix_id, int Use_rhs, int Ini_zero, int Nr_prec, int Ndof, double *V, double *B) |
int | lar_block_print_matrix (int Matrix_id) |
Variables | |
const int | LAC_MAX_BL_NGB = 200 |
const int | LAC_MAX_BL_DIA_NGB = 200 |
int | itv_nr_matrices = 0 |
itt_matrices | itv_matrices [LAC_MAX_MATRICES] |
#define MAX_BL_BL 20 |
#define Max_dof_block_dia 1500 |
#define MIN_DOF_DGEMV 10000 |
#define SMALL 1e-15 |
#define TOL 1e-9 |
void it_mfaiter | ( | int | Matrix_id, | |
int | Use_rhs, | |||
int | Ini_zero, | |||
int | Nr_prec, | |||
int | Ndof, | |||
double * | V, | |||
double * | B | |||
) |
void it_mfmiter | ( | int | Matrix_id, | |
int | Use_rhs, | |||
int | Ini_zero, | |||
int | Nr_prec, | |||
int | Ndof, | |||
double * | V, | |||
double * | B | |||
) |
int lar_allocate_preconditioner_block | ( | int | Matrix_id, | |
int | Precon, | |||
int | Block_type | |||
) |
-------------------------------------------------------- lar_allocate_preconditioner_block - to allocate space for preconditioner ---------------------------------------------------------
int lar_allocate_SM_and_LV_block | ( | int | Nrdof_glob, | |
int | Max_SM_size, | |||
int | Nrblocks, | |||
int * | Nrdofbl, | |||
int * | Posglob, | |||
int * | Nroffbl, | |||
int ** | L_offbl | |||
) |
-------------------------------------------------------- lar_allocate_SM_and_LV_block - to allocate space for stiffness matrix and load vector ---------------------------------------------------------
int lar_assemble_SM_and_LV_block | ( | 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 | |||
) |
----------------------------------------------------------- lar_assemble_SM_and_LV_block - to assemble entries to the global stiffness matrix and the global load vector using the provided local stiffness matrix and load vector ------------------------------------------------------------
int lar_block_print_matrix | ( | int | Matrix_id | ) |
void lar_compute_residual_block | ( | int | Matrix_id, | |
int | Use_rhs, | |||
int | Ini_zero, | |||
int | Ndof, | |||
double * | X, | |||
double * | B, | |||
double * | V | |||
) |
-------------------------------------------------------- lar_compute_residual_block - to compute the residual of the not preconditioned system of equations, v = ( b - Ax ) ---------------------------------------------------------
int lar_fill_preconditioner_block | ( | int | Matrix_id | ) |
-------------------------------------------------------- lar_fill_preconditioner_block - to fill preconditioner ---------------------------------------------------------
int lar_free_preconditioner_block | ( | int | Matrix_id | ) |
-------------------------------------------------------- lar_free_preconditioner_block - to free space for a block structure ---------------------------------------------------------
int lar_free_SM_and_LV_block | ( | int | Matrix_id | ) |
-------------------------------------------------------- lar_free_SM_and_LV_block - to free space for a block structure ---------------------------------------------------------
double lar_get_storage_block | ( | int | Matrix_id | ) |
-------------------------------------------------------- lar_get_storage_block - to compute storage of SM, LV and preconditioner ---------------------------------------------------------
int lar_initialize_SM_and_LV_block | ( | int | Matrix_id, | |
int | Scope | |||
) |
-------------------------------------------------------- lar_initialize_SM_and_LV_block - to initialize stiffness matrix and/or load vector ---------------------------------------------------------
void lar_perform_BJ_or_GS_iterations_block | ( | int | Matrix_id, | |
int | Use_rhs, | |||
int | Ini_zero, | |||
int | Nr_prec, | |||
int | Ndof, | |||
double * | V, | |||
double * | B | |||
) |
-------------------------------------------------------- lar_perform_BJ_or_GS_iterations_block - 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_block | ( | int | Matrix_id, | |
int | Ndof, | |||
double * | V, | |||
double * | B | |||
) |
-------------------------------------------------------- lar_perform_rhsub_block - to perform forward reduction and back-substitution for ILU preconditioning ---------------------------------------------------------
itt_matrices itv_matrices[LAC_MAX_MATRICES] |
int itv_nr_matrices = 0 |
const int LAC_MAX_BL_DIA_NGB = 200 |
const int LAC_MAX_BL_NGB = 200 |