MyraMath
|
Helper routines for reordering/filling 1D 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::Natural1D |
A helper class that generates a natural ordering on a 1D structured grid of size I. More... | |
Functions | |
Pattern | myra::stencil1 (int I) |
Returns the Pattern of 3-point stencil on a 2D structured grid of size I. | |
template<class Number > | |
SparseMatrix< Number > | myra::laplacian1 (int I) |
Returns the graph laplacian of a 1D structured grid of size I. | |
template<> | |
SparseMatrix< NumberS > | myra::laplacian1< NumberS > (int I) |
template<> | |
SparseMatrix< NumberD > | myra::laplacian1< NumberD > (int I) |
template<> | |
SparseMatrix< NumberC > | myra::laplacian1< NumberC > (int I) |
template<> | |
SparseMatrix< NumberZ > | myra::laplacian1< NumberZ > (int I) |
Permutation | myra::bisect1 (int I) |
Reorders stencil1() / laplacian1() unknowns using nested bisection. | |
Pattern | myra::stencil1_unsymmetric (int I, double density=0.5) |
Like stencil1(), but with entries randomly dropped to make it unsymmetric. | |
Helper routines for reordering/filling 1D structured grids. Used by many unit tests.
For sake of example, the connectivity of laplacian1(5) is:
0—1—2—3—4
That is, a linear grid where nearest neighbors are connected with structural nonzeros.