-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #43 from exapde/eos
New feature: nonlinear equation of state
- Loading branch information
Showing
370 changed files
with
8,051 additions
and
1,788 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
Applications/ConvectionDiffusion/subproblem/app/cpuApp.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#ifndef __CPUAPP | ||
#define __CPUAPP | ||
|
||
#include <math.h> | ||
#include <omp.h> | ||
|
||
#include "cpuFlux.cpp" | ||
#include "cpuSource.cpp" | ||
#include "cpuSourcew.cpp" | ||
#include "cpuEoS.cpp" | ||
#include "cpuEoSdu.cpp" | ||
#include "cpuEoSdw.cpp" | ||
#include "cpuTdfunc.cpp" | ||
#include "cpuAvfield.cpp" | ||
#include "cpuOutput.cpp" | ||
#include "cpuFbou.cpp" | ||
#include "cpuUbou.cpp" | ||
#include "cpuFhat.cpp" | ||
#include "cpuUhat.cpp" | ||
#include "cpuStab.cpp" | ||
#include "cpuInitu.cpp" | ||
#include "cpuInitq.cpp" | ||
#include "cpuInitudg.cpp" | ||
#include "cpuInitwdg.cpp" | ||
#include "cpuInitodg.cpp" | ||
|
||
#endif | ||
|
13 changes: 13 additions & 0 deletions
13
Applications/ConvectionDiffusion/subproblem/app/cpuAvfield.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#include "cpuAvfield1.cpp" | ||
#include "cpuAvfield2.cpp" | ||
|
||
template <typename T> void cpuAvfield(T *f, T *xdg, T *udg, T *odg, T *wdg, T *uinf, T *param, T time, int modelnumber, int ng, int nc, int ncu, int nd, int ncx, int nco, int ncw, int nce, int npe, int ne) | ||
{ | ||
if (modelnumber == 1) | ||
cpuAvfield1(f, xdg, udg, odg, wdg, uinf, param, time, modelnumber, ng, nc, ncu, nd, ncx, nco, ncw, nce, npe, ne); | ||
else if (modelnumber == 2) | ||
cpuAvfield2(f, xdg, udg, odg, wdg, uinf, param, time, modelnumber, ng, nc, ncu, nd, ncx, nco, ncw, nce, npe, ne); | ||
} | ||
|
||
template void cpuAvfield(double *, double *, double *, double *, double *, double *, double *, double, int, int, int, int, int, int, int, int, int, int, int); | ||
template void cpuAvfield(float *, float *, float *, float *, float *, float *, float *, float, int, int, int, int, int, int, int, int, int, int, int); |
6 changes: 6 additions & 0 deletions
6
Applications/ConvectionDiffusion/subproblem/app/cpuAvfield1.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
template <typename T> void cpuAvfield1(T *f, T *xdg, T *udg, T *odg, T *wdg, T *uinf, T *param, T time, int modelnumber, int ng, int nc, int ncu, int nd, int ncx, int nco, int ncw, int nce, int npe, int ne) | ||
{ | ||
} | ||
|
||
template void cpuAvfield1(double *, double *, double *, double *, double *, double *, double *, double, int, int, int, int, int, int, int, int, int, int, int); | ||
template void cpuAvfield1(float *, float *, float *, float *, float *, float *, float *, float, int, int, int, int, int, int, int, int, int, int, int); |
6 changes: 6 additions & 0 deletions
6
Applications/ConvectionDiffusion/subproblem/app/cpuAvfield2.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
template <typename T> void cpuAvfield2(T *f, T *xdg, T *udg, T *odg, T *wdg, T *uinf, T *param, T time, int modelnumber, int ng, int nc, int ncu, int nd, int ncx, int nco, int ncw, int nce, int npe, int ne) | ||
{ | ||
} | ||
|
||
template void cpuAvfield2(double *, double *, double *, double *, double *, double *, double *, double, int, int, int, int, int, int, int, int, int, int, int); | ||
template void cpuAvfield2(float *, float *, float *, float *, float *, float *, float *, float, int, int, int, int, int, int, int, int, int, int, int); |
13 changes: 13 additions & 0 deletions
13
Applications/ConvectionDiffusion/subproblem/app/cpuEoS.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#include "cpuEoS1.cpp" | ||
#include "cpuEoS2.cpp" | ||
|
||
template <typename T> void cpuEoS(T *f, T *xdg, T *udg, T *odg, T *wdg, T *uinf, T *param, T time, int modelnumber, int ng, int nc, int ncu, int nd, int ncx, int nco, int ncw, int nce, int npe, int ne) | ||
{ | ||
if (modelnumber == 1) | ||
cpuEoS1(f, xdg, udg, odg, wdg, uinf, param, time, modelnumber, ng, nc, ncu, nd, ncx, nco, ncw, nce, npe, ne); | ||
else if (modelnumber == 2) | ||
cpuEoS2(f, xdg, udg, odg, wdg, uinf, param, time, modelnumber, ng, nc, ncu, nd, ncx, nco, ncw, nce, npe, ne); | ||
} | ||
|
||
template void cpuEoS(double *, double *, double *, double *, double *, double *, double *, double, int, int, int, int, int, int, int, int, int, int, int); | ||
template void cpuEoS(float *, float *, float *, float *, float *, float *, float *, float, int, int, int, int, int, int, int, int, int, int, int); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
template <typename T> void cpuEoS1(T *f, T *xdg, T *udg, T *odg, T *wdg, T *uinf, T *param, T time, int modelnumber, int ng, int nc, int ncu, int nd, int ncx, int nco, int ncw, int nce, int npe, int ne) | ||
{ | ||
} | ||
|
||
template void cpuEoS1(double *, double *, double *, double *, double *, double *, double *, double, int, int, int, int, int, int, int, int, int, int, int); | ||
template void cpuEoS1(float *, float *, float *, float *, float *, float *, float *, float, int, int, int, int, int, int, int, int, int, int, int); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
template <typename T> void cpuEoS2(T *f, T *xdg, T *udg, T *odg, T *wdg, T *uinf, T *param, T time, int modelnumber, int ng, int nc, int ncu, int nd, int ncx, int nco, int ncw, int nce, int npe, int ne) | ||
{ | ||
} | ||
|
||
template void cpuEoS2(double *, double *, double *, double *, double *, double *, double *, double, int, int, int, int, int, int, int, int, int, int, int); | ||
template void cpuEoS2(float *, float *, float *, float *, float *, float *, float *, float, int, int, int, int, int, int, int, int, int, int, int); |
13 changes: 13 additions & 0 deletions
13
Applications/ConvectionDiffusion/subproblem/app/cpuEoSdu.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#include "cpuEoSdu1.cpp" | ||
#include "cpuEoSdu2.cpp" | ||
|
||
template <typename T> void cpuEoSdu(T *f, T *xdg, T *udg, T *odg, T *wdg, T *uinf, T *param, T time, int modelnumber, int ng, int nc, int ncu, int nd, int ncx, int nco, int ncw, int nce, int npe, int ne) | ||
{ | ||
if (modelnumber == 1) | ||
cpuEoSdu1(f, xdg, udg, odg, wdg, uinf, param, time, modelnumber, ng, nc, ncu, nd, ncx, nco, ncw, nce, npe, ne); | ||
else if (modelnumber == 2) | ||
cpuEoSdu2(f, xdg, udg, odg, wdg, uinf, param, time, modelnumber, ng, nc, ncu, nd, ncx, nco, ncw, nce, npe, ne); | ||
} | ||
|
||
template void cpuEoSdu(double *, double *, double *, double *, double *, double *, double *, double, int, int, int, int, int, int, int, int, int, int, int); | ||
template void cpuEoSdu(float *, float *, float *, float *, float *, float *, float *, float, int, int, int, int, int, int, int, int, int, int, int); |
6 changes: 6 additions & 0 deletions
6
Applications/ConvectionDiffusion/subproblem/app/cpuEoSdu1.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
template <typename T> void cpuEoSdu1(T *f, T *xdg, T *udg, T *odg, T *wdg, T *uinf, T *param, T time, int modelnumber, int ng, int nc, int ncu, int nd, int ncx, int nco, int ncw, int nce, int npe, int ne) | ||
{ | ||
} | ||
|
||
template void cpuEoSdu1(double *, double *, double *, double *, double *, double *, double *, double, int, int, int, int, int, int, int, int, int, int, int); | ||
template void cpuEoSdu1(float *, float *, float *, float *, float *, float *, float *, float, int, int, int, int, int, int, int, int, int, int, int); |
6 changes: 6 additions & 0 deletions
6
Applications/ConvectionDiffusion/subproblem/app/cpuEoSdu2.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
template <typename T> void cpuEoSdu2(T *f, T *xdg, T *udg, T *odg, T *wdg, T *uinf, T *param, T time, int modelnumber, int ng, int nc, int ncu, int nd, int ncx, int nco, int ncw, int nce, int npe, int ne) | ||
{ | ||
} | ||
|
||
template void cpuEoSdu2(double *, double *, double *, double *, double *, double *, double *, double, int, int, int, int, int, int, int, int, int, int, int); | ||
template void cpuEoSdu2(float *, float *, float *, float *, float *, float *, float *, float, int, int, int, int, int, int, int, int, int, int, int); |
13 changes: 13 additions & 0 deletions
13
Applications/ConvectionDiffusion/subproblem/app/cpuEoSdw.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#include "cpuEoSdw1.cpp" | ||
#include "cpuEoSdw2.cpp" | ||
|
||
template <typename T> void cpuEoSdw(T *f, T *xdg, T *udg, T *odg, T *wdg, T *uinf, T *param, T time, int modelnumber, int ng, int nc, int ncu, int nd, int ncx, int nco, int ncw, int nce, int npe, int ne) | ||
{ | ||
if (modelnumber == 1) | ||
cpuEoSdw1(f, xdg, udg, odg, wdg, uinf, param, time, modelnumber, ng, nc, ncu, nd, ncx, nco, ncw, nce, npe, ne); | ||
else if (modelnumber == 2) | ||
cpuEoSdw2(f, xdg, udg, odg, wdg, uinf, param, time, modelnumber, ng, nc, ncu, nd, ncx, nco, ncw, nce, npe, ne); | ||
} | ||
|
||
template void cpuEoSdw(double *, double *, double *, double *, double *, double *, double *, double, int, int, int, int, int, int, int, int, int, int, int); | ||
template void cpuEoSdw(float *, float *, float *, float *, float *, float *, float *, float, int, int, int, int, int, int, int, int, int, int, int); |
6 changes: 6 additions & 0 deletions
6
Applications/ConvectionDiffusion/subproblem/app/cpuEoSdw1.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
template <typename T> void cpuEoSdw1(T *f, T *xdg, T *udg, T *odg, T *wdg, T *uinf, T *param, T time, int modelnumber, int ng, int nc, int ncu, int nd, int ncx, int nco, int ncw, int nce, int npe, int ne) | ||
{ | ||
} | ||
|
||
template void cpuEoSdw1(double *, double *, double *, double *, double *, double *, double *, double, int, int, int, int, int, int, int, int, int, int, int); | ||
template void cpuEoSdw1(float *, float *, float *, float *, float *, float *, float *, float, int, int, int, int, int, int, int, int, int, int, int); |
6 changes: 6 additions & 0 deletions
6
Applications/ConvectionDiffusion/subproblem/app/cpuEoSdw2.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
template <typename T> void cpuEoSdw2(T *f, T *xdg, T *udg, T *odg, T *wdg, T *uinf, T *param, T time, int modelnumber, int ng, int nc, int ncu, int nd, int ncx, int nco, int ncw, int nce, int npe, int ne) | ||
{ | ||
} | ||
|
||
template void cpuEoSdw2(double *, double *, double *, double *, double *, double *, double *, double, int, int, int, int, int, int, int, int, int, int, int); | ||
template void cpuEoSdw2(float *, float *, float *, float *, float *, float *, float *, float, int, int, int, int, int, int, int, int, int, int, int); |
13 changes: 13 additions & 0 deletions
13
Applications/ConvectionDiffusion/subproblem/app/cpuFbou.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#include "cpuFbou1.cpp" | ||
#include "cpuFbou2.cpp" | ||
|
||
template <typename T> void cpuFbou(T *f, T *xdg, T *udg, T *odg, T *wdg, T *uhg, T *nlg, T *tau, T *uinf, T *param, T time, int modelnumber, int ib, int ng, int nc, int ncu, int nd, int ncx, int nco, int ncw) | ||
{ | ||
if (modelnumber == 1) | ||
cpuFbou1(f, xdg, udg, odg, wdg, uhg, nlg, tau, uinf, param, time, modelnumber, ib, ng, nc, ncu, nd, ncx, nco, ncw); | ||
else if (modelnumber == 2) | ||
cpuFbou2(f, xdg, udg, odg, wdg, uhg, nlg, tau, uinf, param, time, modelnumber, ib, ng, nc, ncu, nd, ncx, nco, ncw); | ||
} | ||
|
||
template void cpuFbou(double *, double *, double *, double *, double *, double *, double *, double *, double *, double *, double, int, int, int, int, int, int, int, int, int); | ||
template void cpuFbou(float *, float *, float *, float *, float *, float *, float *, float *, float *, float *, float, int, int, int, int, int, int, int, int, int); |
25 changes: 25 additions & 0 deletions
25
Applications/ConvectionDiffusion/subproblem/app/cpuFbou1.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
template <typename T> void cpuFbou11(T *f, T *xdg, T *udg, T *odg, T *wdg, T *uhg, T *nlg, T *tau, T *uinf, T *param, T time, int modelnumber, int ng, int nc, int ncu, int nd, int ncx, int nco, int ncw) | ||
{ | ||
#pragma omp parallel for | ||
for (int i = 0; i <ng; i++) { | ||
T param1 = param[0]; | ||
T tau1 = tau[0]; | ||
T udg1 = udg[0*ng+i]; | ||
T udg2 = udg[1*ng+i]; | ||
T udg3 = udg[2*ng+i]; | ||
T wdg2 = wdg[1*ng+i]; | ||
T wdg3 = wdg[2*ng+i]; | ||
T nlg1 = nlg[0*ng+i]; | ||
T nlg2 = nlg[1*ng+i]; | ||
f[0*ng+i] = tau1*udg1+nlg1*(param1*udg2+udg1*wdg2)+nlg2*(param1*udg3+udg1*wdg3); | ||
} | ||
} | ||
|
||
template <typename T> void cpuFbou1(T *f, T *xdg, T *udg, T *odg, T *wdg, T *uhg, T *nlg, T *tau, T *uinf, T *param, T time, int modelnumber, int ib, int ng, int nc, int ncu, int nd, int ncx, int nco, int ncw) | ||
{ | ||
if (ib == 1) | ||
cpuFbou11(f, xdg, udg, odg, wdg, uhg, nlg, tau, uinf, param, time, modelnumber, ng, nc, ncu, nd, ncx, nco, ncw); | ||
} | ||
|
||
template void cpuFbou1(double *, double *, double *, double *, double *, double *, double *, double *, double *, double *, double, int, int, int, int, int, int, int, int, int); | ||
template void cpuFbou1(float *, float *, float *, float *, float *, float *, float *, float *, float *, float *, float, int, int, int, int, int, int, int, int, int); |
22 changes: 22 additions & 0 deletions
22
Applications/ConvectionDiffusion/subproblem/app/cpuFbou2.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
template <typename T> void cpuFbou21(T *f, T *xdg, T *udg, T *odg, T *wdg, T *uhg, T *nlg, T *tau, T *uinf, T *param, T time, int modelnumber, int ng, int nc, int ncu, int nd, int ncx, int nco, int ncw) | ||
{ | ||
#pragma omp parallel for | ||
for (int i = 0; i <ng; i++) { | ||
T tau1 = tau[0]; | ||
T udg1 = udg[0*ng+i]; | ||
T udg2 = udg[1*ng+i]; | ||
T udg3 = udg[2*ng+i]; | ||
T nlg1 = nlg[0*ng+i]; | ||
T nlg2 = nlg[1*ng+i]; | ||
f[0*ng+i] = nlg1*udg2+nlg2*udg3+tau1*udg1; | ||
} | ||
} | ||
|
||
template <typename T> void cpuFbou2(T *f, T *xdg, T *udg, T *odg, T *wdg, T *uhg, T *nlg, T *tau, T *uinf, T *param, T time, int modelnumber, int ib, int ng, int nc, int ncu, int nd, int ncx, int nco, int ncw) | ||
{ | ||
if (ib == 1) | ||
cpuFbou21(f, xdg, udg, odg, wdg, uhg, nlg, tau, uinf, param, time, modelnumber, ng, nc, ncu, nd, ncx, nco, ncw); | ||
} | ||
|
||
template void cpuFbou2(double *, double *, double *, double *, double *, double *, double *, double *, double *, double *, double, int, int, int, int, int, int, int, int, int); | ||
template void cpuFbou2(float *, float *, float *, float *, float *, float *, float *, float *, float *, float *, float, int, int, int, int, int, int, int, int, int); |
13 changes: 13 additions & 0 deletions
13
Applications/ConvectionDiffusion/subproblem/app/cpuFhat.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#include "cpuFhat1.cpp" | ||
#include "cpuFhat2.cpp" | ||
|
||
template <typename T> void cpuFhat(T *f, T *xdg, T *udg1, T *udg2, T *odg1, T *odg2, T *wdg1, T *wdg2, T *uhg, T *nlg, T *tau, T *uinf, T *param, T time, int modelnumber, int ng, int nc, int ncu, int nd, int ncx, int nco, int ncw) | ||
{ | ||
if (modelnumber == 1) | ||
cpuFhat1(f, xdg, udg1, udg2, odg1, odg2, wdg1, wdg2, uhg, nlg, tau, uinf, param, time, modelnumber, ng, nc, ncu, nd, ncx, nco, ncw); | ||
else if (modelnumber == 2) | ||
cpuFhat2(f, xdg, udg1, udg2, odg1, odg2, wdg1, wdg2, uhg, nlg, tau, uinf, param, time, modelnumber, ng, nc, ncu, nd, ncx, nco, ncw); | ||
} | ||
|
||
template void cpuFhat(double *, double *, double *, double *, double *, double *, double *, double *, double *, double *, double *, double *, double *, double time, int, int, int, int, int, int, int, int); | ||
template void cpuFhat(float *, float *, float *, float *, float *, float *, float *, float *, float *, float *, float *, float *, float *, float time, int, int, int, int, int, int, int, int); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
template <typename T> void cpuFhat1(T *f, T *xdg, T *udg1, T *udg2, T *odg1, T *odg2, T *wdg1, T *wdg2, T *uhg, T *nlg, T *tau, T *uinf, T *param, T time, int modelnumber, int ng, int nc, int ncu, int nd, int ncx, int nco, int ncw) | ||
{ | ||
} | ||
|
||
template void cpuFhat1(double *, double *, double *, double *, double *, double *, double *, double *, double *, double *, double *, double *, double *, double, int, int, int, int, int, int, int, int); | ||
template void cpuFhat1(float *, float *, float *, float *, float *, float *, float *, float *, float *, float *, float *, float *, float *, float, int, int, int, int, int, int, int, int); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
template <typename T> void cpuFhat2(T *f, T *xdg, T *udg1, T *udg2, T *odg1, T *odg2, T *wdg1, T *wdg2, T *uhg, T *nlg, T *tau, T *uinf, T *param, T time, int modelnumber, int ng, int nc, int ncu, int nd, int ncx, int nco, int ncw) | ||
{ | ||
} | ||
|
||
template void cpuFhat2(double *, double *, double *, double *, double *, double *, double *, double *, double *, double *, double *, double *, double *, double, int, int, int, int, int, int, int, int); | ||
template void cpuFhat2(float *, float *, float *, float *, float *, float *, float *, float *, float *, float *, float *, float *, float *, float, int, int, int, int, int, int, int, int); |
13 changes: 13 additions & 0 deletions
13
Applications/ConvectionDiffusion/subproblem/app/cpuFlux.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#include "cpuFlux1.cpp" | ||
#include "cpuFlux2.cpp" | ||
|
||
template <typename T> void cpuFlux(T *f, T *xdg, T *udg, T *odg, T *wdg, T *uinf, T *param, T time, int modelnumber, int ng, int nc, int ncu, int nd, int ncx, int nco, int ncw) | ||
{ | ||
if (modelnumber == 1) | ||
cpuFlux1(f, xdg, udg, odg, wdg, uinf, param, time, modelnumber, ng, nc, ncu, nd, ncx, nco, ncw); | ||
else if (modelnumber == 2) | ||
cpuFlux2(f, xdg, udg, odg, wdg, uinf, param, time, modelnumber, ng, nc, ncu, nd, ncx, nco, ncw); | ||
} | ||
|
||
template void cpuFlux(double *, double *, double *, double *, double *, double *, double *, double, int, int, int, int, int, int, int, int); | ||
template void cpuFlux(float *, float *, float *, float *, float *, float *, float *, float, int, int, int, int, int, int, int, int); |
17 changes: 17 additions & 0 deletions
17
Applications/ConvectionDiffusion/subproblem/app/cpuFlux1.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
template <typename T> void cpuFlux1(T *f, T *xdg, T *udg, T *odg, T *wdg, T *uinf, T *param, T time, int modelnumber, int ng, int nc, int ncu, int nd, int ncx, int nco, int ncw) | ||
{ | ||
#pragma omp parallel for | ||
for (int i = 0; i <ng; i++) { | ||
T param1 = param[0]; | ||
T udg1 = udg[0*ng+i]; | ||
T udg2 = udg[1*ng+i]; | ||
T udg3 = udg[2*ng+i]; | ||
T wdg2 = wdg[1*ng+i]; | ||
T wdg3 = wdg[2*ng+i]; | ||
f[0*ng+i] = param1*udg2+udg1*wdg2; | ||
f[1*ng+i] = param1*udg3+udg1*wdg3; | ||
} | ||
} | ||
|
||
template void cpuFlux1(double *, double *, double *, double *, double *, double *, double *, double, int, int, int, int, int, int, int, int); | ||
template void cpuFlux1(float *, float *, float *, float *, float *, float *, float *, float, int, int, int, int, int, int, int, int); |
13 changes: 13 additions & 0 deletions
13
Applications/ConvectionDiffusion/subproblem/app/cpuFlux2.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
template <typename T> void cpuFlux2(T *f, T *xdg, T *udg, T *odg, T *wdg, T *uinf, T *param, T time, int modelnumber, int ng, int nc, int ncu, int nd, int ncx, int nco, int ncw) | ||
{ | ||
#pragma omp parallel for | ||
for (int i = 0; i <ng; i++) { | ||
T udg2 = udg[1*ng+i]; | ||
T udg3 = udg[2*ng+i]; | ||
f[0*ng+i] = udg2; | ||
f[1*ng+i] = udg3; | ||
} | ||
} | ||
|
||
template void cpuFlux2(double *, double *, double *, double *, double *, double *, double *, double, int, int, int, int, int, int, int, int); | ||
template void cpuFlux2(float *, float *, float *, float *, float *, float *, float *, float, int, int, int, int, int, int, int, int); |
13 changes: 13 additions & 0 deletions
13
Applications/ConvectionDiffusion/subproblem/app/cpuInitodg.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#include "cpuInitodg1.cpp" | ||
#include "cpuInitodg2.cpp" | ||
|
||
template <typename T> void cpuInitodg(T *f, T *xdg, T *uinf, T *param, int modelnumber, int ng, int ncx, int nce, int npe, int ne) | ||
{ | ||
if (modelnumber == 1) | ||
cpuInitodg1(f, xdg, uinf, param, modelnumber, ng, ncx, nce, npe, ne); | ||
else if (modelnumber == 2) | ||
cpuInitodg2(f, xdg, uinf, param, modelnumber, ng, ncx, nce, npe, ne); | ||
} | ||
|
||
template void cpuInitodg(double *, double *, double *, double *, int, int, int, int, int, int); | ||
template void cpuInitodg(float *, float *, float *, float *, int, int, int, int, int, int); |
6 changes: 6 additions & 0 deletions
6
Applications/ConvectionDiffusion/subproblem/app/cpuInitodg1.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
template <typename T> void cpuInitodg1(T *f, T *xdg, T *uinf, T *param, int modelnumber, int ng, int ncx, int nce, int npe, int ne) | ||
{ | ||
} | ||
|
||
template void cpuInitodg1(double *, double *, double *, double *, int, int, int, int, int, int); | ||
template void cpuInitodg1(float *, float *, float *, float *, int, int, int, int, int, int); |
6 changes: 6 additions & 0 deletions
6
Applications/ConvectionDiffusion/subproblem/app/cpuInitodg2.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
template <typename T> void cpuInitodg2(T *f, T *xdg, T *uinf, T *param, int modelnumber, int ng, int ncx, int nce, int npe, int ne) | ||
{ | ||
} | ||
|
||
template void cpuInitodg2(double *, double *, double *, double *, int, int, int, int, int, int); | ||
template void cpuInitodg2(float *, float *, float *, float *, int, int, int, int, int, int); |
13 changes: 13 additions & 0 deletions
13
Applications/ConvectionDiffusion/subproblem/app/cpuInitq.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#include "cpuInitq1.cpp" | ||
#include "cpuInitq2.cpp" | ||
|
||
template <typename T> void cpuInitq(T *f, T *xdg, T *uinf, T *param, int modelnumber, int ng, int ncx, int nce, int npe, int ne) | ||
{ | ||
if (modelnumber == 1) | ||
cpuInitq1(f, xdg, uinf, param, modelnumber, ng, ncx, nce, npe, ne); | ||
else if (modelnumber == 2) | ||
cpuInitq2(f, xdg, uinf, param, modelnumber, ng, ncx, nce, npe, ne); | ||
} | ||
|
||
template void cpuInitq(double *, double *, double *, double *, int, int, int, int, int, int); | ||
template void cpuInitq(float *, float *, float *, float *, int, int, int, int, int, int); |
6 changes: 6 additions & 0 deletions
6
Applications/ConvectionDiffusion/subproblem/app/cpuInitq1.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
template <typename T> void cpuInitq1(T *f, T *xdg, T *uinf, T *param, int modelnumber, int ng, int ncx, int nce, int npe, int ne) | ||
{ | ||
} | ||
|
||
template void cpuInitq1(double *, double *, double *, double *, int, int, int, int, int, int); | ||
template void cpuInitq1(float *, float *, float *, float *, int, int, int, int, int, int); |
6 changes: 6 additions & 0 deletions
6
Applications/ConvectionDiffusion/subproblem/app/cpuInitq2.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
template <typename T> void cpuInitq2(T *f, T *xdg, T *uinf, T *param, int modelnumber, int ng, int ncx, int nce, int npe, int ne) | ||
{ | ||
} | ||
|
||
template void cpuInitq2(double *, double *, double *, double *, int, int, int, int, int, int); | ||
template void cpuInitq2(float *, float *, float *, float *, int, int, int, int, int, int); |
13 changes: 13 additions & 0 deletions
13
Applications/ConvectionDiffusion/subproblem/app/cpuInitu.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#include "cpuInitu1.cpp" | ||
#include "cpuInitu2.cpp" | ||
|
||
template <typename T> void cpuInitu(T *f, T *xdg, T *uinf, T *param, int modelnumber, int ng, int ncx, int nce, int npe, int ne) | ||
{ | ||
if (modelnumber == 1) | ||
cpuInitu1(f, xdg, uinf, param, modelnumber, ng, ncx, nce, npe, ne); | ||
else if (modelnumber == 2) | ||
cpuInitu2(f, xdg, uinf, param, modelnumber, ng, ncx, nce, npe, ne); | ||
} | ||
|
||
template void cpuInitu(double *, double *, double *, double *, int, int, int, int, int, int); | ||
template void cpuInitu(float *, float *, float *, float *, int, int, int, int, int, int); |
14 changes: 14 additions & 0 deletions
14
Applications/ConvectionDiffusion/subproblem/app/cpuInitu1.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
template <typename T> void cpuInitu1(T *f, T *xdg, T *uinf, T *param, int modelnumber, int ng, int ncx, int nce, int npe, int ne) | ||
{ | ||
#pragma omp parallel for | ||
for (int i = 0; i <ng; i++) { | ||
int j = i%npe; | ||
int k = (i-j)/npe; | ||
T xdg1 = xdg[j+npe*0+npe*ncx*k]; | ||
T xdg2 = xdg[j+npe*1+npe*ncx*k]; | ||
f[j+npe*0+npe*nce*k] = 0.0; | ||
} | ||
} | ||
|
||
template void cpuInitu1(double *, double *, double *, double *, int, int, int, int, int, int); | ||
template void cpuInitu1(float *, float *, float *, float *, int, int, int, int, int, int); |
Oops, something went wrong.