Commit 934f416f authored by Philippe Helluy's avatar Philippe Helluy

last bug in dt fixed

parent b465350d
...@@ -415,9 +415,9 @@ void DGVolume(int ie, // 1: macrocel index ...@@ -415,9 +415,9 @@ void DGVolume(int ie, // 1: macrocel index
// ref coordinates // ref coordinates
float hx = 1. / _RAF; float hx = 1. / (float)_RAF;
float hy = 1. / _RAF; float hy = 1. / (float)_RAF;
float hz = 1. / _RAF; float hz = 1. / (float)_RAF;
int offset[3] = {gauss_lob_offset[_DEG] + p[0], int offset[3] = {gauss_lob_offset[_DEG] + p[0],
gauss_lob_offset[_DEG] + p[1], gauss_lob_offset[_DEG] + p[1],
...@@ -484,10 +484,10 @@ void DGVolume(int ie, // 1: macrocel index ...@@ -484,10 +484,10 @@ void DGVolume(int ie, // 1: macrocel index
NumFlux(wL, wL, dphi, flux); // 3m mults when using NumFlux NumFlux(wL, wL, dphi, flux); // 3m mults when using NumFlux
int ipgR = (ix + iq) % _NP + _NPG_ROW * (iy + _NPG_ROW * iz); int ipgR = q[0] + icL[0] * _NP + _NPG_ROW * (iy + _NPG_ROW * iz);
for(int iv = 0; iv < _M; iv++) { for(int iv = 0; iv < _M; iv++) {
int imemR = Varindex(ipgR, iv) + woffset; int imemR = Varindex(ipgR, iv) + woffset;
printf("imemR=%d wpg=%f\n",imemR,wpg); //printf("imemR=%d wpg=%f\n",imemR,wpg);
dtwn[imemR] += flux[iv] * wpg; dtwn[imemR] += flux[iv] * wpg;
} }
...@@ -626,14 +626,14 @@ void DGFlux(int ie, // 1: macrocell index ...@@ -626,14 +626,14 @@ void DGFlux(int ie, // 1: macrocell index
for(int iv = 0; iv < _M; ++iv) { for(int iv = 0; iv < _M; ++iv) {
if (ipgL >= 0){ if (ipgL >= 0){
int imemL = Varindex(ipgL, iv) + woffset; int imemL = Varindex(ipgL, iv) + woffset;
printf("imemL=%d wpgs=%f\n",imemL,wpgs); //printf("imemL=%d wpgs=%f\n",imemL,wpgs);
dtwn[imemL] -= flux[iv] * wpgs; dtwn[imemL] -= flux[iv] * wpgs;
} }
if (ipgR >= 0){ if (ipgR >= 0){
int imemR = Varindex(ipgR, iv) + woffset; int imemR = Varindex(ipgR, iv) + woffset;
printf("imemR=%d\n",imemR); //printf("imemR=%d\n",imemR);
dtwn[imemR] += flux[iv] * wpgs; dtwn[imemR] += flux[iv] * wpgs;
} }
} }
......
...@@ -9,7 +9,7 @@ with open('kernels.cl', 'r') as f: ...@@ -9,7 +9,7 @@ with open('kernels.cl', 'r') as f:
source = f.read() source = f.read()
m = 2 m = 2
raf = 1 raf = 2
deg = 1 deg = 1
source = source.replace("THE_DEG", str(deg)) source = source.replace("THE_DEG", str(deg))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment