Mimetic Operators Library Enhanced 4.0
Loading...
Searching...
No Matches
operators.h
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 operators.h
9 *
10 * @brief Sparse operation inline definitions for mimetic class constructions
11 * @date 2024/10/15
12 */
13
14#ifndef OPERATORS_H
15#define OPERATORS_H
16
17#include "interpol.h"
18#include "laplacian.h"
19#include "mixedbc.h"
20#include "robinbc.h"
21
22inline sp_mat operator*(const Divergence &div, const Gradient &grad) {
23 return (sp_mat)div * (sp_mat)grad;
24}
25
26inline sp_mat operator+(const Laplacian &lap, const RobinBC &bc) {
27 return (sp_mat)lap + (sp_mat)bc;
28}
29
30inline sp_mat operator+(const Laplacian &lap, const MixedBC &bc) {
31 return (sp_mat)lap + (sp_mat)bc;
32}
33
34inline vec operator*(const Divergence &div, const vec &v) {
35 return (sp_mat)div * v;
36}
37
38inline vec operator*(const Gradient &grad, const vec &v) {
39 return (sp_mat)grad * v;
40}
41
42inline vec operator*(const Laplacian &lap, const vec &v) {
43 return (sp_mat)lap * v;
44}
45
46inline vec operator*(const Interpol &I, const vec &v) {
47 return (sp_mat)I * v;
48}
49
50#endif // OPERATORS_H
Mimetic Divergence operator.
Definition divergence.h:26
Mimetic Gradient operator.
Definition gradient.h:27
Mimetic Interpolator operator.
Definition interpol.h:25
Mimetic Laplacian operator.
Definition laplacian.h:25
Mimetic Mixed Boundary Condition operator.
Definition mixedbc.h:27
Mimetic Robin Boundary Condition operator.
Definition robinbc.h:23
sp_mat operator+(const Laplacian &lap, const RobinBC &bc)
Definition operators.h:26
sp_mat operator*(const Divergence &div, const Gradient &grad)
Definition operators.h:22