-
Notifications
You must be signed in to change notification settings - Fork 22
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the issue:
Hi all,
I think there is a problem with the reconstruction of the normal field in ghost cells in the J direction, in spherical coordinates when the axis boundary is used.
idefix/src/fluid/boundary/boundary.hpp
Lines 464 to 492 in ede2e1f
| if(dir==JDIR) { | |
| nstart = data->beg[JDIR]-1; | |
| nend = data->end[JDIR]; | |
| if(!this->haveAxis) { | |
| idefix_for("ReconstructBX2s",0,data->np_tot[KDIR],0,data->np_tot[IDIR], | |
| KOKKOS_LAMBDA (int k, int i) { | |
| if(reconstructLeft) { | |
| for(int j = nstart ; j>=0 ; j-- ) { | |
| Vs(BX2s,k,j,i) = 1.0 / Ax2(k,j,i) * ( Ax2(k,j+1,i)*Vs(BX2s,k,j+1,i) | |
| +(D_EXPAND( Ax1(k,j,i+1) * Vs(BX1s,k,j,i+1) - Ax1(k,j,i) * Vs(BX1s,k,j,i) , | |
| , | |
| + Ax3(k+1,j,i) * Vs(BX3s,k+1,j,i) - Ax3(k,j,i) * Vs(BX3s,k,j,i) ))); | |
| } | |
| } | |
| if(reconstructRight) { | |
| for(int j = nend ; j<nx2 ; j++ ) { | |
| Vs(BX2s,k,j+1,i) = 1.0 / Ax2(k,j+1,i) * ( Ax2(k,j,i)*Vs(BX2s,k,j,i) | |
| -(D_EXPAND( Ax1(k,j,i+1) * Vs(BX1s,k,j,i+1) - Ax1(k,j,i) * Vs(BX1s,k,j,i) , | |
| , | |
| + Ax3(k+1,j,i) * Vs(BX3s,k+1,j,i) - Ax3(k,j,i) * Vs(BX3s,k,j,i) ))); | |
| } | |
| } | |
| } | |
| ); | |
| } else { | |
| // We have an axis, ask myAxis to do that job for us | |
| axis->ReconstructBx2s(); | |
| } | |
| } |
If only one of the two boudaries is set to
axis, and the other is not (reflective or outflow for example), because of line 467,
if(!this->haveAxis) {Idefix only reconstructs the axis boundary and not the other side. This causes my code to crash when I use a grid with reflective condition at
Error message:
runtime information:
Idefix V2.2.01
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working