Functions to initialize dense matrices/vectors.
More...
|
ghost_error | ghost_densemat_init_rand (ghost_densemat *x) |
| Initializes a densemat from random values. More...
|
|
ghost_error | ghost_densemat_init_val (ghost_densemat *x, void *v) |
| Initializes a densemat from a scalar value. More...
|
|
ghost_error | ghost_densemat_init_func (ghost_densemat *x, ghost_densemat_srcfunc func, void *arg) |
| Initializes a densemat from a given callback function. More...
|
|
ghost_error | ghost_densemat_init_densemat (ghost_densemat *x, ghost_densemat *y, ghost_lidx roffs, ghost_lidx coffs) |
| Initializes a densemat from another densemat at a given column and row offset. More...
|
|
ghost_error | ghost_densemat_init_file (ghost_densemat *x, char *path, ghost_mpi_comm mpicomm) |
| Initializes a densemat from a file. More...
|
|
ghost_error | ghost_densemat_init_real (ghost_densemat *vec, ghost_densemat *re, ghost_densemat *im) |
| Initializes a complex densemat from two real ones (one holding the real, the other one the imaginary part). More...
|
|
ghost_error | ghost_densemat_init_complex (ghost_densemat *re, ghost_densemat *im, ghost_densemat *src) |
| Initializes two real densemats from a complex one. More...
|
|
Functions to initialize dense matrices/vectors.
Initializes two real densemats from a complex one.
- Parameters
-
re | The resulting real densemat holding the real part of the source. |
im | The resulting real densemat holding the imaginary part of the source. |
src | The complex source densemat. |
- Returns
- GHOST_SUCCESS on success or an error indicator.
Initializes a densemat from another densemat at a given column and row offset.
- Parameters
-
x | The densemat. |
y | The source. |
roffs | The first row to clone. |
coffs | The first column to clone. |
- Returns
- GHOST_SUCCESS on success or an error indicator.
Initializes a densemat from a file.
- Parameters
-
x | The densemat. |
path | Path to the file. |
mpicomm | If equal to MPI_COMM_SELF, each process will read from a separate file. Else, a combined file will be read with MPI I/O. |
- Returns
- GHOST_SUCCESS on success or an error indicator.
Initializes a densemat from a given callback function.
- Parameters
-
x | The densemat. |
func | The callback function pointer. |
arg | The argument which should be forwarded to the callback. |
- Returns
- GHOST_SUCCESS on success or an error indicator.
Initializes a densemat from random values.
- Parameters
-
- Returns
- GHOST_SUCCESS on success or an error indicator.
Initializes a complex densemat from two real ones (one holding the real, the other one the imaginary part).
- Parameters
-
vec | The densemat. |
re | The real source densemat. |
im | The imaginary source densemat. |
- Returns
- GHOST_SUCCESS on success or an error indicator.
Initializes a densemat from a scalar value.
- Parameters
-
- Returns
- GHOST_SUCCESS on success or an error indicator.