Internal API
Macros
-
PARILU_INTERN
Declare a symbol as internal.
-
parilu_calloc(T, n)
Macro for allocating memory. This macro calls C standard library function
calloc()and casts the returned pointer as a pointer to typeT.- Parameters:
T – Type of the memory to be allocated.
n – Number of elements of type T to be allocated.
- Returns:
Pointer to the allocated memory.
-
parilu_free(p)
Macro for freeing memory. This macro calls parilu_free_() function.
- Parameters:
p – Pointer to the memory to be freed.
-
parilu_assert(condition, message)
Macro for asserting a condition. This macro calls parilu_assert_() function.
- Parameters:
condition – Condition to be asserted.
message – Message to be printed if the condition is not met.
Functions
-
void parilu_free_(void **ptr)
Function for freeing memory. parilu_free_() calls C standard library function
free()and sets the pointer to NULL.- Parameters:
ptr – Pointer to the memory address (pointer to a pointer) to be freed.
-
void parilu_set_log_level(const int32_t verbose)
Setup verbose level for parilu_log() function.
- Parameters:
verbose – Verbosity level.
-
void parilu_log(const struct comm *const c, const parilu_log_t type, const char *const fmt, ...)
Print a debug message if the verbosity level is greater than 0 based on the log type.
- Parameters:
c – MPI communicator wrapper from gslib.
type – Type of the debug message.
fmt – Format string.
... – Format string arguments.
-
void parilu_assert_(const int cond, const char *const msg, const char *const file, const unsigned line)
Assert a condition to be true and print a message if the assertion fails. Use the macro parilu_assert() instead of using this function directly.
- Parameters:
cond – Condition to be asserted.
msg – Message to be printed if the assertion fails.
file – Name of the file where the assertion is made.
line – Line number where the assertion is made.
Structures
-
struct parilu_handle_t
parILU handle returned by parilu_setup().
Public Members
-
uint un
Number of local unknowns.
-
struct gs_data *u2r
User vector to global vector mapping.
-
unsigned null_space
Is there a null space?
-
unsigned pivot
Use pivoting or not.
-
scalar tol
1st dropping rule: An entry a_ij is dropped abs(a_ij) < tol.
-
uint nnz_per_row
2nd dropping rule: Entries are dropped so that total nnz per row/col < p.
-
uint nlvls
Number of levels in the ILU factor.
-
uint *lvl_off
Level offsets.
-
ulong *perm
Permutation vector in case of pivoting.
-
struct crystal cr
Crystal router for communication.
-
uint un
-
struct parilu_options_t
Struct to hold the options for the ILU preconditioner.
Public Members
-
unsigned type
ILU type: ILU(0), ILUC, etc.
-
unsigned pivot
Use pivoting or not.
-
unsigned null_space
Is there a null space?
-
double tol
1st dropping rule: An entry a_ij is dropped abs(a_ij) < tol.
-
unsigned int nnz_per_row
2nd dropping rule: Entries are dropped so that total nnz per row/col < p.
-
unsigned type