00001 #ifndef GHOST_BLOCK_ASSEMBLING_UTIL_HPP
00002 #define GHOST_BLOCK_ASSEMBLING_UTIL_HPP
00003
00004 #include <stdio.h>
00005 #include <algorithm>
00006 #include <math.h>
00007 #include <petscmat.h>
00008
00009 void get_ghost_block_first_index_and_cnt(int* first_ghost_block_index, int* ghost_block_cnt, int Nrblocks, int* Nroffbl);
00010 void get_inefficient_preallocation_data(int* max_nonzeros_in_row_diagonal, int* max_nonzeros_in_row_off_diagonal,
00011 int Nrblocks, int* Nrdofbl, int first_ghost_block_index, int* Nroffbl, int** L_offbl);
00012 void get_efficient_preallocation_data_for_ns_supg_block_size_4(int** nonzeros_in_row_diagonal, int** nonzeros_in_row_off_diagonal,
00013 int Nrblocks, int* Nrdofbl, int first_ghost_block_index, int* Nroffbl, int** L_offbl);
00014 int shift_posglobs(int* posglobs, Mat matrix, int Nrblocks, int* Nroffbl);
00015
00016 #endif