Fast Auxiliary Space Preconditioning  1.8.4 Feb/15/2016
fasp.h File Reference

Main header file for FASP. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "fasp_const.h"

Go to the source code of this file.

Data Structures

struct  ddenmat
 Dense matrix of REAL type. More...
 
struct  idenmat
 Dense matrix of INT type. More...
 
struct  dCSRmat
 Sparse matrix of REAL type in CSR format. More...
 
struct  iCSRmat
 Sparse matrix of INT type in CSR format. More...
 
struct  dCOOmat
 Sparse matrix of REAL type in COO (or IJ) format. More...
 
struct  iCOOmat
 Sparse matrix of INT type in COO (or IJ) format. More...
 
struct  dCSRLmat
 Sparse matrix of REAL type in CSRL format. More...
 
struct  dSTRmat
 Structure matrix of REAL type. More...
 
struct  dvector
 Vector with n entries of REAL type. More...
 
struct  ivector
 Vector with n entries of INT type. More...
 
struct  ILU_param
 Parameters for ILU. More...
 
struct  ILU_data
 Data for ILU setup. More...
 
struct  Schwarz_param
 Parameters for Schwarz method. More...
 
struct  Mumps_data
 Parameters for MUMPS interface. More...
 
struct  Pardiso_data
 Parameters for Intel MKL PARDISO interface. More...
 
struct  Schwarz_data
 Data for Schwarz methods. More...
 
struct  AMG_param
 Parameters for AMG solver. More...
 
struct  AMG_data
 Data for AMG solvers. More...
 
struct  precond_data
 Data passed to the preconditioners. More...
 
struct  precond_data_str
 Data passed to the preconditioner for dSTRmat matrices. More...
 
struct  precond_diagstr
 Data passed to diagonal preconditioner for dSTRmat matrices. More...
 
struct  precond
 Preconditioner data and action. More...
 
struct  mxv_matfree
 Matrix-vector multiplication, replace the actual matrix. More...
 
struct  input_param
 Input parameters. More...
 
struct  itsolver_param
 Parameters passed to iterative solvers. More...
 
struct  grid2d
 Two dimensional grid data structure. More...
 
struct  Link
 Struct for Links. More...
 
struct  linked_list
 A linked list node. More...
 

Macros

#define __FASP_HEADER__
 
#define FASP_VERSION   1.8
 For external software package support. More...
 
#define FASP_USE_ILU   ON
 
#define DLMALLOC   OFF
 
#define NEDMALLOC   OFF
 
#define RS_C1   ON
 Flags for internal uses. More...
 
#define DIAGONAL_PREF   OFF
 
#define SHORT   short
 FASP integer and floating point numbers. More...
 
#define INT   int
 
#define LONG   long
 
#define LONGLONG   long long
 
#define REAL   double
 
#define MAX(a, b)   (((a)>(b))?(a):(b))
 Definition of max, min, abs. More...
 
#define MIN(a, b)   (((a)<(b))?(a):(b))
 
#define ABS(a)    (((a)>=0.0)?(a):-(a))
 
#define GT(a, b)   (((a)>(b))?(TRUE):(FALSE))
 Definition of >, >=, <, <=, and isnan. More...
 
#define GE(a, b)   (((a)>=(b))?(TRUE):(FALSE))
 
#define LS(a, b)   (((a)<(b))?(TRUE):(FALSE))
 
#define LE(a, b)   (((a)<=(b))?(TRUE):(FALSE))
 
#define ISNAN(a)   (((a)!=(a))?(TRUE):(FALSE))
 
#define PUT_INT(A)   printf("### DEBUG: %s = %d\n", #A, (A))
 Definition of print command in DEBUG mode. More...
 
#define PUT_REAL(A)   printf("### DEBUG: %s = %e\n", #A, (A))
 
#define FASP_GSRB   1
 

Typedefs

typedef struct ddenmat ddenmat
 
typedef struct idenmat idenmat
 
typedef struct dCSRmat dCSRmat
 
typedef struct iCSRmat iCSRmat
 
typedef struct dCOOmat dCOOmat
 
typedef struct iCOOmat iCOOmat
 
typedef struct dCSRLmat dCSRLmat
 
typedef struct dSTRmat dSTRmat
 
typedef struct dvector dvector
 
typedef struct ivector ivector
 
typedef struct grid2d grid2d
 
typedef grid2dpgrid2d
 
typedef const grid2dpcgrid2d
 
typedef struct linked_list ListElement
 
typedef ListElementLinkList
 

Variables

unsigned INT total_alloc_mem
 
unsigned INT total_alloc_count
 Total allocated memory amount. More...
 
INT nx_rb
 
INT ny_rb
 
INT nz_rb
 
INTIMAP
 
INT MAXIMAP
 
INT count
 

Detailed Description

Main header file for FASP.

This header file contains general constants and data structures for FASP.

Note
Only define macros and data structures, no function declarations.
Created by Chensong Zhang on 08/12/2010. Modified by Chensong Zhang on 12/13/2011. Modified by Chensong Zhang on 12/25/2011. Modified by Chensong Zhang on 01/25/2015: clean up code Modified by Chensong Zhang on 01/27/2015: remove N2C, C2N, ISTART Modified by Ludmil Zikatanov on 20151011: cosmetics.

Modified by Hongxuan Zhang on 11/28/2015: add Intel MKL PARDISO support.

Definition in file fasp.h.

Macro Definition Documentation

#define __FASP_HEADER__

indicate fasp.h has been included before

Definition at line 36 of file fasp.h.

#define ABS (   a)    (((a)>=0.0)?(a):-(a))

absolute value of a

Definition at line 74 of file fasp.h.

#define DIAGONAL_PREF   OFF

order each row such that diagonal appears first

Definition at line 58 of file fasp.h.

#define DLMALLOC   OFF

use dlmalloc instead of standard malloc

Definition at line 47 of file fasp.h.

#define FASP_GSRB   1

MG level 0 use RedBlack Gauss Seidel Smoothing

Definition at line 1199 of file fasp.h.

#define FASP_USE_ILU   ON

enable ILU or not

Definition at line 46 of file fasp.h.

#define FASP_VERSION   1.8

For external software package support.

faspsolver version

Definition at line 45 of file fasp.h.

#define GE (   a,
 
)    (((a)>=(b))?(TRUE):(FALSE))

is a >= b?

Definition at line 80 of file fasp.h.

#define GT (   a,
 
)    (((a)>(b))?(TRUE):(FALSE))

Definition of >, >=, <, <=, and isnan.

is a > b?

Definition at line 79 of file fasp.h.

#define INT   int

regular integer type: int or long

Definition at line 64 of file fasp.h.

#define ISNAN (   a)    (((a)!=(a))?(TRUE):(FALSE))

is a == NAN?

Definition at line 83 of file fasp.h.

#define LE (   a,
 
)    (((a)<=(b))?(TRUE):(FALSE))

is a <= b?

Definition at line 82 of file fasp.h.

#define LONG   long

long integer type

Definition at line 65 of file fasp.h.

#define LONGLONG   long long

long integer type

Definition at line 66 of file fasp.h.

#define LS (   a,
 
)    (((a)<(b))?(TRUE):(FALSE))

is a < b?

Definition at line 81 of file fasp.h.

#define MAX (   a,
 
)    (((a)>(b))?(a):(b))

Definition of max, min, abs.

bigger one in a and b

Definition at line 72 of file fasp.h.

#define MIN (   a,
 
)    (((a)<(b))?(a):(b))

smaller one in a and b

Definition at line 73 of file fasp.h.

#define NEDMALLOC   OFF

use nedmalloc instead of standard malloc

Definition at line 48 of file fasp.h.

#define PUT_INT (   A)    printf("### DEBUG: %s = %d\n", #A, (A))

Definition of print command in DEBUG mode.

print an integer

Definition at line 88 of file fasp.h.

#define PUT_REAL (   A)    printf("### DEBUG: %s = %e\n", #A, (A))

print a real num

Definition at line 89 of file fasp.h.

#define REAL   double

float type

Definition at line 67 of file fasp.h.

#define RS_C1   ON

Flags for internal uses.

Warning
Change the following marcos with caution!CF splitting of RS: check C1 Criterion

Definition at line 56 of file fasp.h.

#define SHORT   short

FASP integer and floating point numbers.

short integer type

Definition at line 63 of file fasp.h.

Typedef Documentation

typedef struct dCOOmat dCOOmat

Sparse matrix of REAL type in COO format

typedef struct dCSRLmat dCSRLmat

Sparse matrix of REAL type in CSRL format

typedef struct dCSRmat dCSRmat

Sparse matrix of REAL type in CSR format

typedef struct ddenmat ddenmat

Dense matrix of REAL type

typedef struct dSTRmat dSTRmat

Structured matrix of REAL type

typedef struct dvector dvector

Vector of REAL type

typedef struct grid2d grid2d

2D grid type for plotting

typedef struct iCOOmat iCOOmat

Sparse matrix of INT type in COO format

typedef struct iCSRmat iCSRmat

Sparse matrix of INT type in CSR format

typedef struct idenmat idenmat

Dense matrix of INT type

typedef struct ivector ivector

Vector of INT type

List of linkslinked list

Definition at line 1194 of file fasp.h.

typedef struct linked_list ListElement

Linked element in list

typedef const grid2d* pcgrid2d

Grid in 2d

Definition at line 1148 of file fasp.h.

typedef grid2d* pgrid2d

Grid in 2d

Definition at line 1146 of file fasp.h.

Variable Documentation

INT count

Counter for multiple calls

INT* IMAP

Red Black Gs Smoother imap

INT MAXIMAP

Red Black Gs Smoother max DOFs of reservoir

INT nx_rb

Red Black Gs Smoother Nx

INT ny_rb

Red Black Gs Smoother Ny

INT nz_rb

Red Black Gs Smoother Nz

unsigned INT total_alloc_count

Total allocated memory amount.

total allocation times

Definition at line 35 of file memory.c.

unsigned INT total_alloc_mem

total allocated memory

Definition at line 34 of file memory.c.