numerical-collection-cpp 0.10.0
A collection of algorithms in numerical analysis implemented in C++
|
Class to create matrices of Laplacian on a 2-dimensional grid. More...
#include <num_prob_collect/linear/laplacian_2d_grid.h>
Public Types | |
using | matrix_type = Matrix |
Type of the matrix. | |
using | scalar_type = typename Matrix::Scalar |
Type of the scalars. | |
Public Member Functions | |
laplacian_2d_grid (num_collect::index_type grid_rows, num_collect::index_type grid_cols, typename Matrix::value_type grid_width) | |
Constructor. | |
auto | diag_coeff () const noexcept -> scalar_type |
Get the coefficient of diagonal elements. | |
auto | grid_cols () const noexcept -> num_collect::index_type |
Get the number of columns in the grid. | |
auto | grid_rows () const noexcept -> num_collect::index_type |
Get the number of rows in the grid. | |
auto | index (num_collect::index_type x, num_collect::index_type y) const noexcept -> num_collect::index_type |
Calculate an index in the matrix. | |
auto | mat () const noexcept -> const Matrix & |
Get the Laplacian matrix. | |
auto | mat_size () const noexcept -> num_collect::index_type |
Get the size of the matrix. | |
auto | off_diag_coeff () const noexcept -> scalar_type |
Get the coefficient of off-diagonal elements. | |
Private Member Functions | |
void | calc () |
Calculate matrices. | |
Private Attributes | |
scalar_type | diag_coeff_ {} |
Coefficient of diagonal elements. | |
num_collect::index_type | grid_cols_ |
Number of columns in the grid. | |
num_collect::index_type | grid_rows_ |
Number of rows in the grid. | |
scalar_type | grid_width_ |
Width of squares in the grid. | |
Matrix | mat_ |
Laplacian matrix. | |
num_collect::index_type | mat_size_ |
Number of rows in the Laplacian matrix. | |
scalar_type | off_diag_coeff_ {} |
Coefficient of off-diagonal elements. | |
Class to create matrices of Laplacian on a 2-dimensional grid.
Matrix | Type of the matrix. |
Definition at line 42 of file laplacian_2d_grid.h.
using num_prob_collect::linear::laplacian_2d_grid< Matrix >::matrix_type = Matrix |
Type of the matrix.
Definition at line 45 of file laplacian_2d_grid.h.
using num_prob_collect::linear::laplacian_2d_grid< Matrix >::scalar_type = typename Matrix::Scalar |
Type of the scalars.
Definition at line 48 of file laplacian_2d_grid.h.
|
inline |
Constructor.
[in] | grid_rows | Number of rows in the grid. |
[in] | grid_cols | Number of columns in the grid. (Excluding boundaries.) |
[in] | grid_width | Width of squares in the grid. |
Definition at line 58 of file laplacian_2d_grid.h.
|
inlineprivate |
Calculate matrices.
Definition at line 140 of file laplacian_2d_grid.h.
|
inlinenodiscardnoexcept |
Get the coefficient of diagonal elements.
Definition at line 104 of file laplacian_2d_grid.h.
|
inlinenodiscardnoexcept |
Get the number of columns in the grid.
Definition at line 86 of file laplacian_2d_grid.h.
|
inlinenodiscardnoexcept |
Get the number of rows in the grid.
Definition at line 77 of file laplacian_2d_grid.h.
|
inlinenodiscardnoexcept |
Calculate an index in the matrix.
[in] | x | Index of x in grid. |
[in] | y | Index of y in grid. |
Definition at line 131 of file laplacian_2d_grid.h.
|
inlinenodiscardnoexcept |
Get the Laplacian matrix.
Definition at line 122 of file laplacian_2d_grid.h.
|
inlinenodiscardnoexcept |
Get the size of the matrix.
Definition at line 95 of file laplacian_2d_grid.h.
|
inlinenodiscardnoexcept |
Get the coefficient of off-diagonal elements.
Definition at line 113 of file laplacian_2d_grid.h.
|
private |
Coefficient of diagonal elements.
Definition at line 192 of file laplacian_2d_grid.h.
|
private |
Number of columns in the grid.
Definition at line 183 of file laplacian_2d_grid.h.
|
private |
Number of rows in the grid.
Definition at line 180 of file laplacian_2d_grid.h.
|
private |
Width of squares in the grid.
Definition at line 189 of file laplacian_2d_grid.h.
|
private |
Laplacian matrix.
Definition at line 198 of file laplacian_2d_grid.h.
|
private |
Number of rows in the Laplacian matrix.
Definition at line 186 of file laplacian_2d_grid.h.
|
private |
Coefficient of off-diagonal elements.
Definition at line 195 of file laplacian_2d_grid.h.