SpM Handbook 1.2.4
|
#include "common.h"
#include "spm_drivers.h"
#include "drivers/laplacian.h"
Go to the source code of this file.
Functions | |
static void | laplacian_usage (void) |
Print the usage information to generate correct Laplacian matrices. | |
int | genLaplacian (const char *filename, spmatrix_t *spm) |
Generate a Laplacian of size spm->n. | |
int | genExtendedLaplacian (const char *filename, spmatrix_t *spm) |
Generate a extended Laplacian of size spm->n. | |
SPM driver | |
int | spmParseLaplacianInfo (const char *filename, spm_coeftype_t *flttype, spm_int_t *dim1, spm_int_t *dim2, spm_int_t *dim3, double *alpha, double *beta, spm_int_t *dof) |
Parse information given through the filename string to configure the laplacian matrix to generate. | |
Variables | |
static void(* | laplacian_7points [6])(spmatrix_t *, spm_int_t, spm_int_t, spm_int_t, spm_fixdbl_t, spm_fixdbl_t) |
Pointers to the 7 points Laplacian generator functions. | |
static void(* | laplacian_27points [6])(spmatrix_t *, spm_int_t, spm_int_t, spm_int_t, spm_fixdbl_t, spm_fixdbl_t) |
Pointers to the 27 points Laplacian generator functions. | |
Definition in file laplacian.c.
|
static |
Print the usage information to generate correct Laplacian matrices.
Definition at line 27 of file laplacian.c.
Referenced by spmParseLaplacianInfo().
int genLaplacian | ( | const char * | filename, |
spmatrix_t * | spm | ||
) |
Generate a Laplacian of size spm->n.
[in] | filename | Configuration string of the Laplacian. [type:]dim1[:dim2[:dim3]] type p = pattern only " s = real simple\n" d = real double [default] " c = complex simple\n" z = complex double " dim1 size of the first dimension of the 1D|2D|3D laplacian\n" dim2 size of the second dimension of the 2D|3D laplacian " dim3 size of the third dimension of the 3D laplacian\n" |
[in,out] | spm | At start, an allocated spm structure. At exit, contains a laplacian matrix in the spm format. |
SPM_SUCCESS | if the matrix has been generated successfully |
SPM_ERR_BADPARAMETER | if the configuration string is incorrect |
Definition at line 291 of file laplacian.c.
References spmatrix_s::dof, spmatrix_s::flttype, spmatrix_s::gN, laplacian_7points, SPM_SUCCESS, spmDofExtend(), spmExit(), spmParseLaplacianInfo(), and spmUpdateComputedFields().
Referenced by spm_read_driver().
int genExtendedLaplacian | ( | const char * | filename, |
spmatrix_t * | spm | ||
) |
Generate a extended Laplacian of size spm->n.
[in] | filename | Configuration string of the Laplacian. [type:]dim1[:dim2[:dim3]] type p = pattern only s = real simple d = real double [default] c = complex simple z = complex double dim1 size of the first dimension of the 1D|2D|3D laplacian dim2 size of the second dimension of the 2D|3D laplacian dim3 size of the third dimension of the 3D laplacian |
[in,out] | spm | At start, an allocated spm structure. At exit, contains a laplacian matrix in the spm format. |
SPM_SUCCESS | if the matrix has been generated successfully |
SPM_ERR_BADPARAMETER | if the configuration string is incorrect |
Definition at line 367 of file laplacian.c.
References spmatrix_s::dof, spmatrix_s::flttype, spmatrix_s::gN, laplacian_27points, SPM_ERR_UNKNOWN, SPM_SUCCESS, spmDofExtend(), spmExit(), spmParseLaplacianInfo(), and spmUpdateComputedFields().
Referenced by spm_read_driver().
|
static |
Pointers to the 7 points Laplacian generator functions.
Definition at line 234 of file laplacian.c.
Referenced by genLaplacian().
|
static |
Pointers to the 27 points Laplacian generator functions.
Definition at line 249 of file laplacian.c.
Referenced by genExtendedLaplacian().