abl
crs_amg.c File Reference
#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <sys/stat.h>
#include <limits.h>
#include "gslib.h"
#include "crs_amg_io.h"
+ Include dependency graph for crs_amg.c:

Classes

struct  csr_mat
 
struct  Q
 
struct  crs_data
 
struct  rid
 
struct  id_data
 
struct  gnz
 
struct  find_id_map
 
struct  find_id_data
 
struct  find_id_work
 
struct  rnz
 
struct  labelled_rid
 

Macros

#define crs_setup   PREFIXED_NAME(crs_amg_setup)
 
#define crs_solve   PREFIXED_NAME(crs_amg_solve)
 
#define crs_stats   PREFIXED_NAME(crs_amg_stats)
 
#define crs_free   PREFIXED_NAME(crs_amg_free )
 
#define AMG_BLOCK_ROWS   2400
 
#define AMG_MAX_ROWS   12000
 
#define rid_equal(a, b)   ((a).p==(b).p && (a).i==(b).i)
 
#define nz_pos_equal(a, b)   (rid_equal((a).i,(b).i) && rid_equal((a).j,(b).j))
 
#define BUILD_LIST(k)
 

Enumerations

enum  mat_order { row_major, col_major }
 
enum  distr { row_distr, col_distr }
 

Functions

void crs_solve (double *x, struct crs_data *data, double *b)
 
void crs_stats (const struct crs_data *const data)
 
struct crs_datacrs_setup (uint n, const ulong *id, uint nz, const uint *Ai, const uint *Aj, const double *A, uint null_space, const struct comm *comm, const char *datafname, uint *ierr)
 
void crs_free (struct crs_data *data)
 

Macro Definition Documentation

◆ AMG_BLOCK_ROWS

#define AMG_BLOCK_ROWS   2400

◆ AMG_MAX_ROWS

#define AMG_MAX_ROWS   12000

◆ BUILD_LIST

#define BUILD_LIST (   k)
Value:
do { \
last_rid.p=UINT_MAX,last_rid.i=UINT_MAX; \
for(count=0,p=mat->ptr;p!=e;++p) { \
if(p->k.p==pid || rid_equal(last_rid,p->k)) continue; \
last_rid=p->k; ++count; \
} \
array_init(struct labelled_rid, nonlocal_id, count); \
nonlocal_id->n=count; out=nonlocal_id->ptr; \
last_rid.p=UINT_MAX,last_rid.i=UINT_MAX; \
for(p=mat->ptr;p!=e;++p) { \
if(p->k.p==pid || rid_equal(last_rid,p->k)) continue; \
(out++)->rid=last_rid=p->k; \
} \
} while(0)

◆ crs_free

#define crs_free   PREFIXED_NAME(crs_amg_free )

◆ crs_setup

#define crs_setup   PREFIXED_NAME(crs_amg_setup)

◆ crs_solve

#define crs_solve   PREFIXED_NAME(crs_amg_solve)

◆ crs_stats

#define crs_stats   PREFIXED_NAME(crs_amg_stats)

◆ nz_pos_equal

#define nz_pos_equal (   a,
 
)    (rid_equal((a).i,(b).i) && rid_equal((a).j,(b).j))

◆ rid_equal

#define rid_equal (   a,
 
)    ((a).p==(b).p && (a).i==(b).i)

Enumeration Type Documentation

◆ distr

enum distr
Enumerator
row_distr 
col_distr 

◆ mat_order

enum mat_order
Enumerator
row_major 
col_major 

Function Documentation

◆ crs_free()

void crs_free ( struct crs_data data)

◆ crs_setup()

struct crs_data* crs_setup ( uint  n,
const ulong *  id,
uint  nz,
const uint *  Ai,
const uint *  Aj,
const double *  A,
uint  null_space,
const struct comm *  comm,
const char *  datafname,
uint *  ierr 
)

◆ crs_solve()

void crs_solve ( double *  x,
struct crs_data data,
double *  b 
)

◆ crs_stats()

void crs_stats ( const struct crs_data *const  data)
rid
Definition: crs_amg.c:231
rid_equal
#define rid_equal(a, b)
Definition: crs_amg.c:1087
labelled_rid
Definition: crs_amg.c:1144