Mimetic Operators Library Enhanced
4.0
Loading...
Searching...
No Matches
laplacian.cpp
Go to the documentation of this file.
1
/*
2
* SPDX-License-Identifier: GPL-3.0-or-later
3
* © 2008-2024 San Diego State University Research Foundation (SDSURF).
4
* See LICENSE file or https://www.gnu.org/licenses/gpl-3.0.html for details.
5
*/
6
7
/*
8
* @file laplacian.cpp
9
*
10
* @brief Mimetic Laplacian Constructors
11
*
12
* @date 2024/10/15
13
*
14
*/
15
16
17
18
#include "
laplacian.h
"
19
20
// 1-D Constructor
21
Laplacian::Laplacian
(u16 k, u32 m,
Real
dx) {
22
Divergence
div(k, m, dx);
23
Gradient
grad(k, m, dx);
24
25
// Dimensions = m+2, m+2
26
*
this
= (sp_mat)div * (sp_mat)grad;
27
}
28
29
// 2-D Constructor
30
Laplacian::Laplacian
(u16 k, u32 m, u32 n,
Real
dx,
Real
dy) {
31
Divergence
div(k, m, n, dx, dy);
32
Gradient
grad(k, m, n, dx, dy);
33
34
// Dimensions = (m+2)*(n+2), (m+2)*(n+2)
35
*
this
= (sp_mat)div * (sp_mat)grad;
36
}
37
38
// 3-D Constructor
39
Laplacian::Laplacian
(u16 k, u32 m, u32 n, u32 o,
Real
dx,
Real
dy,
Real
dz) {
40
Divergence
div(k, m, n, o, dx, dy, dz);
41
Gradient
grad(k, m, n, o, dx, dy, dz);
42
43
// Dimensions = (m+2)*(n+2)*(o+2), (m+2)*(n+2)*(o+2)
44
*
this
= (sp_mat)div * (sp_mat)grad;
45
}
Divergence
Mimetic Divergence operator.
Definition
divergence.h:26
Gradient
Mimetic Gradient operator.
Definition
gradient.h:27
Laplacian::Laplacian
Laplacian(u16 k, u32 m, Real dx)
1-D Mimetic Laplacian Constructor
Definition
laplacian.cpp:21
laplacian.h
Real
double Real
Definition
utils.h:21
src
cpp
laplacian.cpp
Generated by
1.13.2