|
MyraMath
|
Helper routines for reordering/filling 2D structured grids. Used by many unit tests. More...
#include <myramath/MYRAMATH_EXPORT.h>#include <myramath/utility/Number.h>#include <utility>#include <vector>Go to the source code of this file.
Classes | |
| class | myra::SparseMatrix< Number > |
| Stores an IxJ matrix A in compressed sparse column format. More... | |
| class | myra::Natural2D |
| A helper class that generates a natural ordering on a 2D structured grid of size IxJ. More... | |
Functions | |
| Pattern | myra::stencil2 (int I, int J) |
| Returns the Pattern of 5-point stencil on a 2D structured grid of size IxJ. | |
| template<class Number > | |
| SparseMatrix< Number > | myra::laplacian2 (int I, int J) |
| Returns the graph laplacian of a 2D structured grid of size IxJ. | |
| template<> | |
| SparseMatrix< NumberS > | myra::laplacian2< NumberS > (int I, int J) |
| template<> | |
| SparseMatrix< NumberD > | myra::laplacian2< NumberD > (int I, int J) |
| template<> | |
| SparseMatrix< NumberC > | myra::laplacian2< NumberC > (int I, int J) |
| template<> | |
| SparseMatrix< NumberZ > | myra::laplacian2< NumberZ > (int I, int J) |
| Permutation | myra::bisect2 (int I, int J) |
| Reorders stencil2() / laplacian2() unknowns using nested bisection. | |
| Pattern | myra::stencil2_unsymmetric (int I, int J, double density=0.5) |
| Like stencil2(), but with entries randomly dropped to make it unsymmetric. | |
Helper routines for reordering/filling 2D structured grids. Used by many unit tests.
For sake of example, the connectivity of laplacian2(5,5) is:
0—5–10–15–20 | | | | | 1—6–11–16–21 | | | | | 2—7–12–17–22 | | | | | 3—8–13–18–23 | | | | | 4—9–14–19–24
That is, a structured grid where orthogonal neighbors are connected with structural nonzeros.
1.8.13