rdomain.h File Reference

Domain type and its operations. More...

#include "utils.h"
#include "rarray.h"

Go to the source code of this file.

Classes

struct  RDOM
 Domain type. More...

Functions

int rd_a_setnull (RDOM *dom)
 Set domain (all fields) to zeros.
int rd_setnull (RDOM *dom, int iarr)
 Set all fields in the specified array of the domain to zeros.
int rd_a_create_s (RDOM *dom, int narr, IPNT dgs[], IPNT dn[])
 Create all arrays in a domain (given start indices (dgs) and sizes (dn)).
int rd_a_create_e (RDOM *dom, int narr, IPNT dge[], IPNT dn[])
 Create all arrays in a domain (given end indices (dge) and sizes (dn)).
int rd_a_create (RDOM *dom, int narr, IPNT dgs[], IPNT dge[])
 Create all arrays in a domain (given start indices (dgs) and end indices (dge)).
int rd_create_s (RDOM *dom, IPNT gs, IPNT n)
 Create next array in a domain (given start indices (gs) and sizes (n) of the next array).
int rd_create_e (RDOM *dom, IPNT ge, IPNT n)
 Create next array in a domain (given end indices (ge) and sizes (n) of the next array).
int rd_create (RDOM *dom, IPNT gs, IPNT ge)
 Create next array in a domain (given start indices (gs) and end indices (ge) of the next array).
int rd_a_declare_s (RDOM *dom, int narr, IPNT dgs[], IPNT dn[])
 Declare all arrays in a domain (given dgs and dn).
int rd_a_declare_e (RDOM *dom, int narr, IPNT dge[], IPNT dn[])
 Declare all arrays in a domain (given dge and dn).
int rd_a_declare (RDOM *dom, int narr, IPNT dgs[], IPNT dge[])
 Declare all arrays in a domain (given dgs and dge).
int rd_declare_s (RDOM *dom, IPNT gs, IPNT n)
 Declare the next array in a domain (given gs and n).
int rd_declare_e (RDOM *dom, IPNT ge, IPNT n)
 Declare the next array in a domain (given ge and n).
int rd_declare (RDOM *dom, IPNT gs, IPNT ge)
 Declare the next array in a domain (given gs and ge).
int rd_a_allocate (RDOM *dom)
 Allocate memory for all arrays in a domain.
int rd_allocate (RDOM *dom, int iarr)
 Allocate memory for a specified array in a domain.
int rd_a_destroy (RDOM *dom)
 Destroy domain (STORAGE DEALLOCATION).
int rd_a_greset (RDOM *dom, IPNT dgs[], IPNT dge[])
 Reset all the working (computational virtual) arrays in a domain (given dgs and dge) (NO STORAGE ALLOCATION).
int rd_greset_s (RDOM *dom, int iarr, IPNT gs, IPNT n)
 Reset a specified working (computational virtual) arrays in a domain (given gs and n) (NO STORAGE ALLOCATION).
int rd_greset_e (RDOM *dom, int iarr, IPNT ge, IPNT n)
 Reset a specified working (computational virtual) arrays in a domain (given ge and n) (NO STORAGE ALLOCATION).
int rd_greset (RDOM *dom, int iarr, IPNT gs, IPNT ge)
 Reset a specified working (computational virtual) arrays in a domain (given gs and ge) (NO STORAGE ALLOCATION).
int rd_offset_s (RDOM *dom, int iarr, IPNT os, IPNT n)
 Reset a specified working (computational virtual) array in a domain (given os and n) (NO STORAGE ALLOCATION).
int rd_offset_e (RDOM *dom, int iarr, IPNT oe, IPNT n)
 Reset a specified working (computational virtual) array in a domain (given oe and n) (NO STORAGE ALLOCATION).
int rd_offset (RDOM *dom, int iarr, IPNT os, IPNT oe)
 Reset a specified working (computational virtual) array in a domain (given os and oe) (NO STORAGE ALLOCATION).
int rd_a_dump (const RDOM *dom, FILE *stream)
 Dump information of all arrays in a domain.
int rd_dump (const RDOM *dom, int iarr, FILE *stream)
 Dump information of a specified arrays in a domain.
int rd_a_print (RDOM *dom, FILE *stream)
 Output all the working (computational virtual) arrays in a domain to a stream.
int rd_a_fprint (RDOM *dom, const char *path)
 Output all the working (computational virtual) arrays in a domain to a file.
int rd_a_fsprint (RDOM *dom, const char *path)
 Output each the working (computational virtual) array in a domain to a corresponding file.
int rd_print (RDOM *dom, int iarr, FILE *stream)
 Output a specified working (computational virtual) array in a domain to a stream.
int rd_fprint (RDOM *dom, int iarr, const char *path)
 Output a specified working (computational virtual) arrays in a domain to a file.
int rd_write (RDOM *dom, int iarr, FILE *stream)
 Output a specified working (computational virtual) array in a domain to a stream.
int rd_fwrite (RDOM *dom, int iarr, const char *path)
 Output a specified working (computational virtual) array in a domain to a file.
int rd_printslice (RDOM *dom, int iarr, FILE *stream, int idim, int islice)
 Output a slice of a specified working (computational virtual) array in a domain to a stream.
int rd_fprintslice (RDOM *dom, int iarr, const char *path, int idim, int islice)
 Output a slice of a specified working (computational virtual) array in a domain to a stream.
int rd_writeslice (RDOM *dom, int iarr, FILE *stream, int idim, int islice)
 Output a slice of a specified working (computational virtual) array in a domain to a binary stream.
int rd_fwriteslice (RDOM *dom, int iarr, const char *path, int idim, int islice)
 Output a slice of a specified working (computational virtual) array in a domain to a binary file.
ireal rd_get (const RDOM *dom, int iarr, IPNT li)
 Get value at a local index relative to gs in a specified working (computational virtual) array.
ireal rd_gget (const RDOM *dom, int iarr, IPNT gi)
 Get value at a global index in a specified working (computational virtual) array.
void rd_set (RDOM *dom, int iarr, IPNT li, ireal r)
 Set value at a local index relative to gs in a specified working (computational virtual) array.
void rd_gset (RDOM *dom, int iarr, IPNT gi, ireal r)
 Set value at a global index in a specified working (computational virtual) array.
int rd_size (RDOM *dom, int iarr, IPNT n)
 Get size of a specified working (computational virtual) array in a domain.
int rd_a_size (RDOM *dom, int iarr, IPNT n)
 Get size of a specified allocated array in a domain.
int rd_gse (const RDOM *dom, int iarr, IPNT gs, IPNT ge)
 Get the start and end indices of a specified working (computational virtual) array in a domain.
int rd_a_gse (const RDOM *dom, int iarr, IPNT gs, IPNT ge)
 Get the start and end indices of a specified allocated array in a domain.
int rd_ndim (const RDOM *dom, int iarr, int *ndim)
 Get number of dimensions of a specified array.
int rd_a_narr (const RDOM *dom, int *narr)
 Get number of arrays in a domain.
int rd_setempty (RDOM *dom, int iarr)
 Set a specified working (computational virtual) array in a domain empty.
int rd_empty (RDOM *dom, int iarr, int *empty)
 empty query for a specified array in a domain.
int rd_setexchangeinfo (RDOM *dom, int iarr, EXCHANGEINFO *einfo)
 Populates exchange info for a specified array in a domain.
int rd_overlap (RDOM *dom1, int iarr1, RDOM *dom2, int iarr2, int *overlap)
 Checks if two specified working (computational virtual) arrays in two domains overlap.
int rd_setoverlap (RDOM *dom1, int iarr1, RDOM *dom2, int iarr2)
 Set the first working (computational virtual) array's dimension info in dom1 to be that of the overlap part of the two working (computational virtual) arrays in dom1 and dom2.
int rd_a_inner (RDOM const *dom1, RDOM const *dom2, ireal *ip)
int rd_a_zero (RDOM *dom)
int rd_a_scale (RDOM *dom, int iarr, ireal fac)


Detailed Description

Domain type and its operations.

Replicates array functions and has additional group operations.

Definition in file rdomain.h.


Function Documentation

int rd_a_setnull ( RDOM dom  ) 

Set domain (all fields) to zeros.

Parameters:
[out] dom - (RDOM *) domain pointer
Returns:
0

int rd_setnull ( RDOM dom,
int  iarr 
)

Set all fields in the specified array of the domain to zeros.

Parameters:
[out] dom - (RDOM *) domain pointer
[in] iarr - (int) array index
Returns:
0 on successful completion, else error code as in base/include/utils.h. One of the errors arises when iarr>=narr.

int rd_a_create_s ( RDOM dom,
int  narr,
IPNT  dgs[],
IPNT  dn[] 
)

Create all arrays in a domain (given start indices (dgs) and sizes (dn)).

Parameters:
[out] dom - (RDOM *) domain pointer
[in] narr - (int) number of arrays
[in] dgs - (IPNT []) an IPNT vector storing the global start indices for every array
[in] dn - (IPNT []) an IPNT vector storing the sizes for every array
Returns:
0 on successful completion, else error code as in base/include/utils.h.

int rd_a_create_e ( RDOM dom,
int  narr,
IPNT  dge[],
IPNT  dn[] 
)

Create all arrays in a domain (given end indices (dge) and sizes (dn)).

Parameters:
[out] dom - (RDOM *) domain pointer
[in] narr - (int) number of arrays
[in] dge - (IPNT []) an IPNT vector storing the global end indices for every array
[in] dn - (IPNT []) an IPNT vector storing the sizes for every array
Returns:
0 on successful completion, else error code as in base/include/utils.h.

int rd_a_create ( RDOM dom,
int  narr,
IPNT  dgs[],
IPNT  dge[] 
)

Create all arrays in a domain (given start indices (dgs) and end indices (dge)).

Parameters:
[out] dom - (RDOM *) domain pointer
[in] narr - (int) number of arrays
[in] dgs - (IPNT []) an IPNT vector storing the global start indices for every array
[in] dge - (IPNT []) an IPNT vector storing the global end indices for every array
Returns:
0 on successful completion, else error code as in base/include/utils.h.

int rd_create_s ( RDOM dom,
IPNT  gs,
IPNT  n 
)

Create next array in a domain (given start indices (gs) and sizes (n) of the next array).

Parameters:
[out] dom - (RDOM *) domain pointer
[in] gs - (IPNT) the global start indices for the next array
[in] n - (IPNT) sizes of the next array in this domain
Returns:
0 on successful completion, else error code as in base/include/utils.h.

int rd_create_e ( RDOM dom,
IPNT  ge,
IPNT  n 
)

Create next array in a domain (given end indices (ge) and sizes (n) of the next array).

Parameters:
[out] dom - (RDOM *) domain pointer
[in] ge - (IPNT) the global end indices for the next array
[in] n - (IPNT) sizes of the next array in this domain
Returns:
0 on successful completion, else error code as in base/include/utils.h.

int rd_create ( RDOM dom,
IPNT  gs,
IPNT  ge 
)

Create next array in a domain (given start indices (gs) and end indices (ge) of the next array).

Parameters:
[out] dom - (RDOM *) domain pointer
[in] gs - (IPNT) the global start indices for the next array
[in] ge - (IPNT) the global end indices for the next array
Returns:
0 on successful completion, else error code as in base/include/utils.h.

int rd_a_declare_s ( RDOM dom,
int  narr,
IPNT  dgs[],
IPNT  dn[] 
)

Declare all arrays in a domain (given dgs and dn).

Works like create, but does not allocate memory.

Parameters:
[out] dom - (RDOM *) domain pointer
[in] narr - (int) number of arrays
[in] dgs - (IPNT []) an IPNT vector storing the global start indices for every array
[in] dn - (IPNT []) an IPNT vector storing the sizes for every array
Returns:
0 on successful completion, else error code as in base/include/utils.h.

int rd_a_declare_e ( RDOM dom,
int  narr,
IPNT  dge[],
IPNT  dn[] 
)

Declare all arrays in a domain (given dge and dn).

Works like create, but does not allocate memory.

Parameters:
[out] dom - (RDOM *) domain pointer
[in] narr - (int) number of arrays
[in] dge - (IPNT []) an IPNT vector storing the global end indices for every array
[in] dn - (IPNT []) an IPNT vector storing the sizes for every array
Returns:
0 on successful completion, else error code as in base/include/utils.h.

int rd_a_declare ( RDOM dom,
int  narr,
IPNT  dgs[],
IPNT  dge[] 
)

Declare all arrays in a domain (given dgs and dge).

Works like create, but does not allocate memory.

Parameters:
[out] dom - (RDOM *) domain pointer
[in] narr - (int) number of arrays
[in] dgs - (IPNT []) an IPNT vector storing the global start indices for every array
[in] dge - (IPNT []) an IPNT vector storing the global end indices for every array
Returns:
0 on successful completion, else error code as in base/include/utils.h.

int rd_declare_s ( RDOM dom,
IPNT  gs,
IPNT  n 
)

Declare the next array in a domain (given gs and n).

Works like create, but does not allocate memory.

Parameters:
[out] dom - (RDOM *) domain pointer
[in] gs - (IPNT) the global start indices for the next array
[in] n - (IPNT) sizes of the next array in this domain
Returns:
0 on successful completion, else error code as in base/include/utils.h.

int rd_declare_e ( RDOM dom,
IPNT  ge,
IPNT  n 
)

Declare the next array in a domain (given ge and n).

Works like create, but does not allocate memory.

Parameters:
[out] dom - (RDOM *) domain pointer
[in] ge - (IPNT) the global end indices for the next array
[in] n - (IPNT) sizes of the next array in this domain
Returns:
0 on successful completion, else error code as in base/include/utils.h.

int rd_declare ( RDOM dom,
IPNT  gs,
IPNT  ge 
)

Declare the next array in a domain (given gs and ge).

Works like create, but does not allocate memory.

Parameters:
[out] dom - (RDOM *) domain pointer
[in] gs - (IPNT) the global start indices for the next array
[in] ge - (IPNT) the global end indices for the next array
Returns:
0 on successful completion, else error code as in base/include/utils.h.

int rd_a_allocate ( RDOM dom  ) 

Allocate memory for all arrays in a domain.

Parameters:
[out] dom - (RDOM *) domain pointer
Returns:
0 on successful completion, else error code as in base/include/utils.h. NOTE: rd_a_allocate supresses E_ALREADYALLOC errors!

int rd_allocate ( RDOM dom,
int  iarr 
)

Allocate memory for a specified array in a domain.

Parameters:
[out] dom - (RDOM *) domain pointer
[in] iarr - (int) array index
Returns:
0 on successful completion, else error code as in base/include/utils.h. One of the errors arises when iarr>=narr.

int rd_a_destroy ( RDOM dom  ) 

Destroy domain (STORAGE DEALLOCATION).

int rd_a_greset ( RDOM dom,
IPNT  dgs[],
IPNT  dge[] 
)

Reset all the working (computational virtual) arrays in a domain (given dgs and dge) (NO STORAGE ALLOCATION).

Parameters:
[out] dom - (RDOM *) domain pointer
[in] dgs - (IPNT []) an IPNT vector storing the global start indices for every working (computational virtual) array
[in] dge - (IPNT []) an IPNT vector storing the global end indices for every working (computational virtual) array *
Returns:
0 on successful completion, else error code as in base/include/utils.h.

int rd_greset_s ( RDOM dom,
int  iarr,
IPNT  gs,
IPNT  n 
)

Reset a specified working (computational virtual) arrays in a domain (given gs and n) (NO STORAGE ALLOCATION).

Parameters:
[out] dom - (RDOM *) domain pointer
[in] iarr - (int) array index
[in] gs - (IPNT) the global start indices for the next array
[in] n - (IPNT) sizes of the next array in this domain
Returns:
0 on successful completion, else error code as in base/include/utils.h.

int rd_greset_e ( RDOM dom,
int  iarr,
IPNT  ge,
IPNT  n 
)

Reset a specified working (computational virtual) arrays in a domain (given ge and n) (NO STORAGE ALLOCATION).

Parameters:
[out] dom - (RDOM *) domain pointer
[in] iarr - (int) array index
[in] ge - (IPNT) the global end indices for the next array
[in] (n - (IPNT) sizes of the next array in this domain
Returns:
0 on successful completion, else error code as in base/include/utils.h.

int rd_greset ( RDOM dom,
int  iarr,
IPNT  gs,
IPNT  ge 
)

Reset a specified working (computational virtual) arrays in a domain (given gs and ge) (NO STORAGE ALLOCATION).

Parameters:
[out] dom - (RDOM *) domain pointer
[in] iarr - (int) array index
[in] gs - (IPNT) the global start indices for the next array
[in] ge - (IPNT) the global end indices for the next array
Returns:
0 on successful completion, else error code as in base/include/utils.h.

int rd_offset_s ( RDOM dom,
int  iarr,
IPNT  os,
IPNT  n 
)

Reset a specified working (computational virtual) array in a domain (given os and n) (NO STORAGE ALLOCATION).

Refer to ra_offset_s.

Parameters:
[out] dom - (RDOM *) domain pointer
[in] iarr - (int) array index
[in] os - (IPNT) start index offsets (forward) of the working (computational virtual) array
[in] n - (IPNT) sizes of the working (computational virtual) array
Returns:
0 on successful completion, else error code as in base/include/utils.h.

int rd_offset_e ( RDOM dom,
int  iarr,
IPNT  oe,
IPNT  n 
)

Reset a specified working (computational virtual) array in a domain (given oe and n) (NO STORAGE ALLOCATION).

Refer to ra_offset_e.

Parameters:
[out] dom - (RDOM *) domain pointer
[in] iarr - (int) array index
[in] oe - (IPNT) end index offsets (backward) of the working (computational virtual) array
[in] n - (IPNT) sizes of the working (computational virtual) array
Returns:
0 on successful completion, else error code as in base/include/utils.h.

int rd_offset ( RDOM dom,
int  iarr,
IPNT  os,
IPNT  oe 
)

Reset a specified working (computational virtual) array in a domain (given os and oe) (NO STORAGE ALLOCATION).

Refer to ra_offset.

Parameters:
[out] dom - (RDOM *) domain pointer
[in] iarr - (int) array index
[in] os - (IPNT) start index offsets (forward) of the working (computational virtual) array
[in] oe - (IPNT) end index offsets (backward) of the working (computational virtual) array
Returns:
0 on successful completion, else error code as in base/include/utils.h.

int rd_a_dump ( const RDOM dom,
FILE *  stream 
)

Dump information of all arrays in a domain.

int rd_dump ( const RDOM dom,
int  iarr,
FILE *  stream 
)

Dump information of a specified arrays in a domain.

Parameters:
[in] dom - (const RDOM *) domain pointer
[in] iarr - (int) array index
[in] stream - (FILE *) file pointer
Returns:
0

int rd_a_print ( RDOM dom,
FILE *  stream 
)

Output all the working (computational virtual) arrays in a domain to a stream.

Format: formatted ASCII

Parameters:
[in] dom - (RDOM *) domain pointer
[in] stream - (FILE *) file pointer
Returns:
0 on successful completion, else error code as in base/include/utils.h.

int rd_a_fprint ( RDOM dom,
const char *  path 
)

Output all the working (computational virtual) arrays in a domain to a file.

Format: formatted ASCII

Parameters:
[in] dom - (RDOM *) domain pointer
[in] path - (const char *) file name
Returns:
0 on successful completion, else error code as in base/include/utils.h.

int rd_a_fsprint ( RDOM dom,
const char *  path 
)

Output each the working (computational virtual) array in a domain to a corresponding file.

the i'th array is stored in the file named 'str(path)+str(i)' Format: formatted ASCII

Parameters:
[in] dom - (RDOM *) domain pointer
[in] path - (const char *) file name (general)
Returns:
0 on successful completion, else error code as in base/include/utils.h.

int rd_print ( RDOM dom,
int  iarr,
FILE *  stream 
)

Output a specified working (computational virtual) array in a domain to a stream.

Format: formatted ASCII

Parameters:
[in] dom - (RDOM *) domain pointer
[in] iarr - (int) array index
[in] stream - (FILE *) file pointer
Returns:
0 on successful completion, else error code as in base/include/utils.h.

int rd_fprint ( RDOM dom,
int  iarr,
const char *  path 
)

Output a specified working (computational virtual) arrays in a domain to a file.

Format: formatted ASCII

Parameters:
[in] dom - (RDOM *) domain pointer
[in] iarr - (int) array index
[in] path - (const char *) file name
Returns:
0 on successful completion, else error code as in base/include/utils.h.

int rd_write ( RDOM dom,
int  iarr,
FILE *  stream 
)

Output a specified working (computational virtual) array in a domain to a stream.

Format: binary

Parameters:
[in] dom - (RDOM *) domain pointer
[in] iarr - (int) array index
[in] stream - (FILE *) file pointer
Returns:
0 on successful completion, else error code as in base/include/utils.h.

int rd_fwrite ( RDOM dom,
int  iarr,
const char *  path 
)

Output a specified working (computational virtual) array in a domain to a file.

Format: binary

Parameters:
[in] dom - (RDOM *) domain pointer
[in] iarr - (int) array index
[in] path - (const char *) file name
Returns:
0 on successful completion, else error code as in base/include/utils.h.

int rd_printslice ( RDOM dom,
int  iarr,
FILE *  stream,
int  idim,
int  islice 
)

Output a slice of a specified working (computational virtual) array in a domain to a stream.

check if iarr < narr. Then call ra_printslice.

int rd_fprintslice ( RDOM dom,
int  iarr,
const char *  path,
int  idim,
int  islice 
)

Output a slice of a specified working (computational virtual) array in a domain to a stream.

check if iarr < narr. Then call ra_fprintslice.

int rd_writeslice ( RDOM dom,
int  iarr,
FILE *  stream,
int  idim,
int  islice 
)

Output a slice of a specified working (computational virtual) array in a domain to a binary stream.

check if iarr < narr. Then call ra_writeslice.

int rd_fwriteslice ( RDOM dom,
int  iarr,
const char *  path,
int  idim,
int  islice 
)

Output a slice of a specified working (computational virtual) array in a domain to a binary file.

check if iarr < narr. Then call ra_fwriteslice.

ireal rd_get ( const RDOM dom,
int  iarr,
IPNT  li 
)

Get value at a local index relative to gs in a specified working (computational virtual) array.

Refer to ra_get.

Parameters:
[in] dom - (RDOM *) domain pointer
[in] iarr - (int) array index
[in] li - (IPNT) local index relative to gs
Returns:
the value at the specified entry, else error code as in base/include/utils.h.

ireal rd_gget ( const RDOM dom,
int  iarr,
IPNT  gi 
)

Get value at a global index in a specified working (computational virtual) array.

Refer to ra_gget.

Parameters:
[in] dom - (RDOM *) domain pointer
[in] iarr - (int) array index
[in] gi - (IPNT) global index
Returns:
the value at the specified entry, else error code as in base/include/utils.h.

void rd_set ( RDOM dom,
int  iarr,
IPNT  li,
ireal  r 
)

Set value at a local index relative to gs in a specified working (computational virtual) array.

Refer to ra_set. [No difference with ra_gset, since gs is alway 0]

Parameters:
[out] dom - (RDOM *) domain pointer
[in] iarr - (int) array index
[in] li - (IPNT) local index relative to gs
[in] r - (ireal) the value to be set
Returns:
the value at the specified entry, else error code as in base/include/utils.h.

void rd_gset ( RDOM dom,
int  iarr,
IPNT  gi,
ireal  r 
)

Set value at a global index in a specified working (computational virtual) array.

Refer to ra_gset.

Parameters:
[out] dom - (RDOM *) domain pointer
[in] iarr - (int) array index
[in] gi - (IPNT) global index
[in] r - (ireal) the value to be set
Returns:
the value at the specified entry, else error code as in base/include/utils.h.

int rd_size ( RDOM dom,
int  iarr,
IPNT  n 
)

Get size of a specified working (computational virtual) array in a domain.

Refer to ra_size.

int rd_a_size ( RDOM dom,
int  iarr,
IPNT  n 
)

Get size of a specified allocated array in a domain.

Refer to ra_a_size.

int rd_gse ( const RDOM dom,
int  iarr,
IPNT  gs,
IPNT  ge 
)

Get the start and end indices of a specified working (computational virtual) array in a domain.

Refer to ra_gse.

int rd_a_gse ( const RDOM dom,
int  iarr,
IPNT  gs,
IPNT  ge 
)

Get the start and end indices of a specified allocated array in a domain.

Refer to ra_a_gse.

int rd_ndim ( const RDOM dom,
int  iarr,
int *  ndim 
)

Get number of dimensions of a specified array.

Parameters:
[in] dom - (const RDOM *) domain pointer
[in] iarr - (int) array index
[out] ndim - (int *) number of dimensions
Returns:
0 on successful completion, if iarr >= narr, return E_BADARRINDEX as in base/include/utils.h.

int rd_a_narr ( const RDOM dom,
int *  narr 
)

Get number of arrays in a domain.

int rd_setempty ( RDOM dom,
int  iarr 
)

Set a specified working (computational virtual) array in a domain empty.

Error arises if iarr >= narr.

int rd_empty ( RDOM dom,
int  iarr,
int *  empty 
)

empty query for a specified array in a domain.

Parameters:
[in] dom - (RDOM *) domain pointer
[in] iarr - (int) array index
[out] empty - (int *) 0: nonempty, 1: empty
Returns:
0

int rd_setexchangeinfo ( RDOM dom,
int  iarr,
EXCHANGEINFO einfo 
)

Populates exchange info for a specified array in a domain.

Creates MPI_Datatype inside - do not forget to destroy. Refers to ra_setexchangeinfo and IMODEL::ld_r and IMODEL::ld_s.

Parameters:
[in] dom - (RDOM *) domain pointer
[in] iarr - (int) array index
[out] einfo - (EXCHANGEINFO *)
Returns:
0 on successful completion, else error code as in base/include/utils.h.

int rd_overlap ( RDOM dom1,
int  iarr1,
RDOM dom2,
int  iarr2,
int *  overlap 
)

Checks if two specified working (computational virtual) arrays in two domains overlap.

Refers to ra_overlap.

Parameters:
[in] dom1,dom2 - (RARR *) domain pointers
[in] iarr1,iarr2 - (int) array indices
[out] overlap - (int *) 0: not overlap, 1: overlap
Returns:
0 on successful completion, else error code as in base/include/utils.h.

int rd_setoverlap ( RDOM dom1,
int  iarr1,
RDOM dom2,
int  iarr2 
)

Set the first working (computational virtual) array's dimension info in dom1 to be that of the overlap part of the two working (computational virtual) arrays in dom1 and dom2.

Refer to ra_setoverlap.

Parameters:
[in,out] dom1 - (RDOM *) domain pointer
[in] dom2 - (RDOM *) domain pointer
[in] iarr1,iarr2 - (int) array indices
Returns:
0 on successful completion, else error code as in base/include/utils.h. One of the errors arises when iarr1 >= narr1 or iarr2 >= narr2.

int rd_a_inner ( RDOM const *  dom1,
RDOM const *  dom2,
ireal ip 
)

int rd_a_zero ( RDOM dom  ) 

int rd_a_scale ( RDOM dom,
int  iarr,
ireal  fac 
)


Generated on 5 Jan 2017 for IWAVECORE by  doxygen 1.4.7