00001 #ifndef LAH_AMG_INTERFACE_H
00002 #define LAH_AMG_INTERFACE_H
00003
00004 #include "../../lsd_mkb/amg_ext/lah_petsc_interface.h"
00005 #include "../lad_petsc/las_petsc_intf.hpp"
00006
00007
00008 extern "C" int lar_allocate_SM_and_LV_petsc(
00009 int Max_SM_size,
00010 int Nrblocks,
00011 int Nrdof_glob,
00012 int* Nrdofbl,
00013 int* Posglob,
00014 int* Nroffbl,
00015 int** L_offbl);
00016
00017 extern "C" int lar_initialize_SM_and_LV_petsc(int Matrix_id, int Comp_type);
00018
00019 extern "C" double lar_get_storage_petsc(int Matrix_id);
00020
00021 extern "C" int lar_assemble_SM_and_LV_petsc(
00022 int Matrix_id,
00023 int Comp_type,
00024 int Nr_dof_bl,
00025 int* L_bl_id,
00026 int* L_bl_nrdof,
00027 double* Stiff_mat,
00028 double* Rhs_vect,
00029 char* Rewr_dofs);
00030
00031 extern "C" int lar_allocate_preconditioner_petsc(int Matrix_id);
00032
00033 extern "C" int lar_fill_preconditioner_petsc(int Matrix_id);
00034
00035 extern "C" int lar_free_preconditioner_petsc(int Matrix_id);
00036
00037 extern "C" int lar_free_SM_and_LV_petsc(int Matrix_id);
00038
00039 extern "C" void lar_compute_residual_petsc(int Matrix_id, int Use_rhs, int Ini_zero, int Ndof, double* X, double* B, double* V);
00040
00041 extern "C" void lar_perform_BJ_or_GS_iterations_petsc(
00042 int Matrix_id,
00043 int Use_rhs,
00044 int Ini_zero,
00045 int Nr_prec,
00046 int Ndof,
00047 double* V,
00048 double* B);
00049
00050 extern "C" void lar_perform_rhsub_petsc(int Matrix_id, int Ndof, double* V, double* B);
00051
00052 extern "C" int lar_block_print_matrix_petsc(int Matrix_id);
00053
00054 #endif