forked from PrincetonUniversity/athena
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path25.scalar_flux.patch
71 lines (70 loc) · 3.39 KB
/
25.scalar_flux.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 850e3b45..a9c8d88c 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -4,6 +4,7 @@ include_directories(
${CMAKE_SOURCE_DIR}/src
${CMAKE_CURRENT_SOURCE_DIR}/..
${CMAKE_BINARY_DIR}
+ ${EIGEN3_INCLUDE_DIR}
)
set(namel athenapp)
diff --git a/src/scalars/calculate_scalar_fluxes.cpp b/src/scalars/calculate_scalar_fluxes.cpp
index 66cb16a8..25e16d23 100644
--- a/src/scalars/calculate_scalar_fluxes.cpp
+++ b/src/scalars/calculate_scalar_fluxes.cpp
@@ -78,6 +78,10 @@ void PassiveScalars::CalculateFluxes(AthenaArray<Real> &r, const int order) {
pmb->precon->DonorCellX1(k, j, is-1, ie+1, r, rl_, rr_);
} else if (order == 2) {
pmb->precon->PiecewiseLinearX1(k, j, is-1, ie+1, r, rl_, rr_);
+ } else if (order == 3) {
+ pmb->precon->Weno3X1(k, j, is-1, ie+1, r, rl_, rr_);
+ } else if (order == 5) {
+ pmb->precon->Weno5X1(k, j, is-1, ie+1, r, rl_, rr_);
} else {
pmb->precon->PiecewiseParabolicX1(k, j, is-1, ie+1, r, rl_, rr_);
for (int n=0; n<NSCALARS; ++n) {
@@ -166,6 +170,10 @@ void PassiveScalars::CalculateFluxes(AthenaArray<Real> &r, const int order) {
pmb->precon->DonorCellX2(k, js-1, il, iu, r, rl_, rr_);
} else if (order == 2) {
pmb->precon->PiecewiseLinearX2(k, js-1, il, iu, r, rl_, rr_);
+ } else if (order == 3) {
+ pmb->precon->Weno3X2(k, js-1, il, iu, r, rl_, rr_);
+ } else if (order == 5) {
+ pmb->precon->Weno5X2(k, js-1, il, iu, r, rl_, rr_);
} else {
pmb->precon->PiecewiseParabolicX2(k, js-1, il, iu, r, rl_, rr_);
for (int n=0; n<NSCALARS; ++n) {
@@ -182,6 +190,10 @@ void PassiveScalars::CalculateFluxes(AthenaArray<Real> &r, const int order) {
pmb->precon->DonorCellX2(k, j, il, iu, r, rlb_, rr_);
} else if (order == 2) {
pmb->precon->PiecewiseLinearX2(k, j, il, iu, r, rlb_, rr_);
+ } else if (order == 3) {
+ pmb->precon->Weno3X2(k, j, il, iu, r, rlb_, rr_);
+ } else if (order == 5) {
+ pmb->precon->Weno5X2(k, j, il, iu, r, rlb_, rr_);
} else {
pmb->precon->PiecewiseParabolicX2(k, j, il, iu, r, rlb_, rr_);
for (int n=0; n<NSCALARS; ++n) {
@@ -267,6 +279,10 @@ void PassiveScalars::CalculateFluxes(AthenaArray<Real> &r, const int order) {
pmb->precon->DonorCellX3(ks-1, j, il, iu, r, rl_, rr_);
} else if (order == 2) {
pmb->precon->PiecewiseLinearX3(ks-1, j, il, iu, r, rl_, rr_);
+ } else if (order == 3) {
+ pmb->precon->Weno3X3(ks-1, j, il, iu, r, rl_, rr_);
+ } else if (order == 5) {
+ pmb->precon->Weno5X3(ks-1, j, il, iu, r, rl_, rr_);
} else {
pmb->precon->PiecewiseParabolicX3(ks-1, j, il, iu, r, rl_, rr_);
for (int n=0; n<NSCALARS; ++n) {
@@ -283,6 +299,10 @@ void PassiveScalars::CalculateFluxes(AthenaArray<Real> &r, const int order) {
pmb->precon->DonorCellX3(k, j, il, iu, r, rlb_, rr_);
} else if (order == 2) {
pmb->precon->PiecewiseLinearX3(k, j, il, iu, r, rlb_, rr_);
+ } else if (order == 3) {
+ pmb->precon->Weno3X3(k, j, il, iu, r, rlb_, rr_);
+ } else if (order == 5) {
+ pmb->precon->Weno5X3(k, j, il, iu, r, rlb_, rr_);
} else {
pmb->precon->PiecewiseParabolicX3(k, j, il, iu, r, rlb_, rr_);
for (int n=0; n<NSCALARS; ++n) {