Mimetic Operators Library Enhanced 4.0
Loading...
Searching...
No Matches
laplacian.cpp
Go to the documentation of this file.
1#include "laplacian.h"
2
3// 1-D Constructor
4Laplacian::Laplacian(u16 k, u32 m, Real dx)
5{
6 Divergence div(k, m, dx);
7 Gradient grad(k, m, dx);
8
9 // Dimensions = m+2, m+2
10 *this = (sp_mat)div*(sp_mat)grad;
11}
12
13// 2-D Constructor
14Laplacian::Laplacian(u16 k, u32 m, u32 n, Real dx, Real dy)
15{
16 Divergence div(k, m, n, dx, dy);
17 Gradient grad(k, m, n, dx, dy);
18
19 // Dimensions = (m+2)*(n+2), (m+2)*(n+2)
20 *this = (sp_mat)div*(sp_mat)grad;
21}
22
23// 3-D Constructor
24Laplacian::Laplacian(u16 k, u32 m, u32 n, u32 o, Real dx, Real dy, Real dz)
25{
26 Divergence div(k, m, n, o, dx, dy, dz);
27 Gradient grad(k, m, n, o, dx, dy, dz);
28
29 // Dimensions = (m+2)*(n+2)*(o+2), (m+2)*(n+2)*(o+2)
30 *this = (sp_mat)div*(sp_mat)grad;
31}
Laplacian(u16 k, u32 m, Real dx)
Definition laplacian.cpp:4
double Real
Definition utils.h:8