stencil.h File Reference

#include "utils.h"

Go to the source code of this file.

Classes

struct  STENCIL_MASK
 Mask structure. More...
struct  STENCIL
 Stencil structure. More...

Functions

int mask_setnull (STENCIL_MASK *mask)
 Set all fields in a mask to zeros (NO DEALLOCATION).
int mask_create (STENCIL_MASK *mask, int ip, int ir, int n)
 Create mask.
int mask_destroy (STENCIL_MASK *mask)
 Destroy mask (STORAGE DEALLOCATION).
int mask_set (STENCIL_MASK *mask, int i, const IPNT ind)
 Set the i'th entry in the index set to be ind.
int mask_get (STENCIL_MASK *mask, int i, IPNT ind)
 Get the i'th entry in the index set and store it in ind.
int sten_setnull (STENCIL *sten)
 Set all fields in a stencil zeros.
int sten_create (STENCIL *sten, int nmask)
 Create stencil (STORAGE ALLOCATION).
int sten_destroy (STENCIL *sten)
 Destroy stencil (STORAGE DEALLOCATION).
int sten_set (STENCIL *sten, int imask, STENCIL_MASK *mask)
 Set the imask'th entry in the mask set to be (*mask).
int sten_get (STENCIL *sten, int imask, STENCIL_MASK *mask)
 Get the imask'th entry in the mask set and store it in (*mask).
int sten_out (STENCIL *sten, FILE *stream, const char *ind2str_fun(int))
 Output stencil (for tests).


Function Documentation

int mask_setnull ( STENCIL_MASK mask  ) 

Set all fields in a mask to zeros (NO DEALLOCATION).

int mask_create ( STENCIL_MASK mask,
int  ip,
int  ir,
int  n 
)

Create mask.

Parameters:
[out] mask - (STENCIL_MASK *) mask pointer
[in] ip - (int) index of participating array
[in] ir - (int) index of recomputed array
[in] n - index set size
Returns:
0 on successful completion, else error code as in base/include/utils.h.

int mask_destroy ( STENCIL_MASK mask  ) 

Destroy mask (STORAGE DEALLOCATION).

Free allocated memory pointed by s.

int mask_set ( STENCIL_MASK mask,
int  i,
const IPNT  ind 
)

Set the i'th entry in the index set to be ind.

mask->s[i] = ind

int mask_get ( STENCIL_MASK mask,
int  i,
IPNT  ind 
)

Get the i'th entry in the index set and store it in ind.

ind = mask->s[i]

int sten_setnull ( STENCIL sten  ) 

Set all fields in a stencil zeros.

int sten_create ( STENCIL sten,
int  nmask 
)

Create stencil (STORAGE ALLOCATION).

Parameters:
[out] sten - (STENCIL *) stencil pointer
[in] nmask - (int) number of masks
Returns:
0 on successful completion, else error code as in base/include/utils.h.

int sten_destroy ( STENCIL sten  ) 

Destroy stencil (STORAGE DEALLOCATION).

int sten_set ( STENCIL sten,
int  imask,
STENCIL_MASK mask 
)

Set the imask'th entry in the mask set to be (*mask).

sten->masks[imask] = *mask

int sten_get ( STENCIL sten,
int  imask,
STENCIL_MASK mask 
)

Get the imask'th entry in the mask set and store it in (*mask).

int sten_out ( STENCIL sten,
FILE *  stream,
const char *  ind2str_fun(int) 
)

Output stencil (for tests).

Parameters:
[in] sten - (STENCIL *) stencil pointer
[in] stream - (FILE *) file pointer
[in] ind2str_fun (const char *(int)) a function pointer transferring an integer (int) to the corresponding field variable name (char *)
Returns:
0 on successful completion, else error code as in base/include/utils.h.


Generated on 5 Jan 2017 for IWAVECORE by  doxygen 1.4.7