ThunderEgg
1.0.0
MatrixHelper2d.h
Go to the documentation of this file.
1
/***************************************************************************
2
* ThunderEgg, a library for solvers on adaptively refined block-structured
3
* Cartesian grids.
4
*
5
* Copyright (c) 2018-2021 Scott Aiton
6
*
7
* This program is free software: you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation, either version 3 of the License, or
10
* (at your option) any later version.
11
*
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
16
*
17
* You should have received a copy of the GNU General Public License
18
* along with this program. If not, see <https://www.gnu.org/licenses/>.
19
***************************************************************************/
20
21
#ifndef THUNDEREGG_POISSON_MATRIXHELPER2D_H
22
#define THUNDEREGG_POISSON_MATRIXHELPER2D_H
23
29
#include <
ThunderEgg/Domain.h
>
30
#include <petscmat.h>
31
32
namespace
ThunderEgg::Poisson
{
36
class
MatrixHelper2d
37
{
38
private
:
39
Domain<2>
domain;
40
std::bitset<4> neumann;
41
42
public
:
49
MatrixHelper2d
(
const
Domain<2>
& domain, std::bitset<4> neumann);
50
56
Mat
formCRSMatrix
(
double
lambda = 0);
57
};
58
}
// namespace ThunderEgg::Poisson
59
#endif
ThunderEgg::Poisson::MatrixHelper2d
Create a matrix for the 2D second-order Laplacian operator.
Definition:
MatrixHelper2d.h:36
ThunderEgg::Domain< 2 >
ThunderEgg::Poisson
Classes specific to the Poisson equation.
Definition:
DFTPatchSolver.h:40
ThunderEgg::Poisson::MatrixHelper2d::formCRSMatrix
Mat formCRSMatrix(double lambda=0)
Form the matrix.
ThunderEgg::Poisson::MatrixHelper2d::MatrixHelper2d
MatrixHelper2d(const Domain< 2 > &domain, std::bitset< 4 > neumann)
Create a MatrixHelper for a given domain.
Domain.h
Domain class.
src
ThunderEgg
Poisson
MatrixHelper2d.h
Generated by
1.8.17