Collection of example matrices.
More...
|
| template<typename Method , typename MatrixType > |
| void | cusp::gallery::diffusion (MatrixType &matrix, const size_t m, const size_t n, const double eps=1e-5, const double theta=M_PI/4.0) |
| |
| template<typename MatrixType > |
| void | cusp::gallery::grid2d (MatrixType &matrix, const size_t m, const size_t n) |
| |
| template<typename MatrixType > |
| void | cusp::gallery::grid3d (MatrixType &matrix, const size_t m, const size_t n, const size_t l) |
| |
| template<typename MatrixType > |
| void | cusp::gallery::poisson5pt (MatrixType &matrix, const size_t m, const size_t n) |
| |
| template<typename MatrixType > |
| void | cusp::gallery::poisson9pt (MatrixType &matrix, const size_t m, const size_t n) |
| |
| template<typename MatrixType > |
| void | cusp::gallery::poisson7pt (MatrixType &matrix, const size_t m, const size_t n, const size_t k) |
| |
| template<typename MatrixType > |
| void | cusp::gallery::poisson27pt (MatrixType &matrix, const size_t m, const size_t n, const size_t l) |
| |
| template<typename MatrixType > |
| void | cusp::gallery::random (MatrixType &matrix, const size_t m, const size_t n, const size_t num_samples) |
| |
Collection of example matrices.
◆ diffusion()
template<typename Method , typename MatrixType >
| void cusp::gallery::diffusion |
( |
MatrixType & |
matrix, |
|
|
const size_t |
m, |
|
|
const size_t |
n, |
|
|
const double |
eps = 1e-5, |
|
|
const double |
theta = M_PI/4.0 |
|
) |
| |
diffusion: Create a matrix representing an anisotropic Poisson problem discretized on an m by n grid with the a given direction.
- Parameters
-
| matrix | output |
| m | number of grid rows |
| n | number of grid columns |
| eps | magnitude of anisotropy |
| theta | angle of anisotropy in radians |
- Template Parameters
-
| MatrixType | matrix container |
◆ grid2d()
template<typename MatrixType >
| void cusp::gallery::grid2d |
( |
MatrixType & |
matrix, |
|
|
const size_t |
m, |
|
|
const size_t |
n |
|
) |
| |
grid2d: Create a matrix representing a 2d m by n grid.
- Parameters
-
| matrix | output |
| m | number of grid rows |
| n | number of grid columns |
- Template Parameters
-
| MatrixType | matrix container |
int main(void)
{
return 0;
}
Coordinate (COO) representation a sparse matrix.
Coordinate matrix format.
void grid2d(MatrixType &matrix, const size_t m, const size_t n)
void print(const Printable &p)
print a textual representation of an object
Print textual representation of an object.
◆ grid3d()
template<typename MatrixType >
| void cusp::gallery::grid3d |
( |
MatrixType & |
matrix, |
|
|
const size_t |
m, |
|
|
const size_t |
n, |
|
|
const size_t |
l |
|
) |
| |
grid3d: Create a matrix representing a 3d m by n by l grid.
- Parameters
-
| matrix | output |
| m | number of grid rows |
| n | number of grid columns |
| l | number of grid layers |
- Template Parameters
-
| MatrixType | matrix container |
int main(void)
{
return 0;
}
void grid3d(MatrixType &matrix, const size_t m, const size_t n, const size_t l)
◆ poisson27pt()
template<typename MatrixType >
| void cusp::gallery::poisson27pt |
( |
MatrixType & |
matrix, |
|
|
const size_t |
m, |
|
|
const size_t |
n, |
|
|
const size_t |
l |
|
) |
| |
poisson27pt: Create a matrix representing a 27pt Poisson problem discretized on an m by n by l grid with the standard 3D 27-point finite-difference stencil.
- Parameters
-
| matrix | output |
| m | number of grid rows |
| n | number of grid columns |
| l | number of grid layers |
- Template Parameters
-
| MatrixType | matrix container |
int main(void)
{
return 0;
}
void poisson27pt(MatrixType &matrix, const size_t m, const size_t n, const size_t l)
Poisson matrix generators.
◆ poisson5pt()
template<typename MatrixType >
| void cusp::gallery::poisson5pt |
( |
MatrixType & |
matrix, |
|
|
const size_t |
m, |
|
|
const size_t |
n |
|
) |
| |
poisson5pt: Create a matrix representing a 5pt Poisson problem discretized on an m by n grid with the standard 2D 5-point finite-difference stencil.
- Parameters
-
| matrix | output |
| m | number of grid rows |
| n | number of grid columns |
- Template Parameters
-
| MatrixType | matrix container |
int main(void)
{
return 0;
}
void poisson5pt(MatrixType &matrix, const size_t m, const size_t n)
◆ poisson7pt()
template<typename MatrixType >
| void cusp::gallery::poisson7pt |
( |
MatrixType & |
matrix, |
|
|
const size_t |
m, |
|
|
const size_t |
n, |
|
|
const size_t |
k |
|
) |
| |
poisson7pt: Create a matrix representing a 7pt Poisson problem discretized on an m by n by k grid with the standard 3D 7-point finite-difference stencil.
- Parameters
-
| matrix | output |
| m | number of grid rows |
| n | number of grid columns |
| k | number of grid layers |
- Template Parameters
-
| MatrixType | matrix container |
int main(void)
{
return 0;
}
void poisson7pt(MatrixType &matrix, const size_t m, const size_t n, const size_t k)
◆ poisson9pt()
template<typename MatrixType >
| void cusp::gallery::poisson9pt |
( |
MatrixType & |
matrix, |
|
|
const size_t |
m, |
|
|
const size_t |
n |
|
) |
| |
poisson9pt: Create a matrix representing a 9pt Poisson problem discretized on an m by n grid with the standard 2D 9-point finite-difference stencil.
- Parameters
-
| matrix | output |
| m | number of grid rows |
| n | number of grid columns |
- Template Parameters
-
| MatrixType | matrix container |
int main(void)
{
return 0;
}
void poisson9pt(MatrixType &matrix, const size_t m, const size_t n)
◆ random()
template<typename MatrixType >
| void cusp::gallery::random |
( |
MatrixType & |
matrix, |
|
|
const size_t |
m, |
|
|
const size_t |
n, |
|
|
const size_t |
num_samples |
|
) |
| |
random: Create a matrix with random connections
- Parameters
-
| matrix | output |
| m | number of grid rows |
| n | number of grid columns |
| num_samples | number of random edges |
- Template Parameters
-
| MatrixType | matrix container |
int main(void)
{
return 0;
}
void random(MatrixType &matrix, const size_t m, const size_t n, const size_t num_samples)
Random matrix generators.