Commit 632029c2 authored by Geoffroy Lesur's avatar Geoffroy Lesur 👻
Browse files

Merge branch 'fix1ComponentRadial' into 'master'

fix compilation errors in some 1D/1C problems

See merge request discs/idefix!175
parents 581bec76 003fe2be
......@@ -330,6 +330,7 @@ void Hydro::HllMHD() {
fluxL[BX1] += -xH* ( Jx3*uL[BX1] );
fluxR[BX1] += -xH* ( Jx3*uR[BX1] );
#if COMPONENTS >= 2
fluxL[BX2] += -xH* ( Jx3*uL[BX2] );
fluxR[BX2] += -xH* ( Jx3*uR[BX2] );
......@@ -340,6 +341,7 @@ void Hydro::HllMHD() {
fluxL[BX2] += -xH* ( - Jx2*uL[BX3] );
fluxR[BX2] += -xH* ( - Jx2*uR[BX3] );
#endif
#endif
}
#if HAVE_ENERGY
......
......@@ -21,9 +21,11 @@ KOKKOS_FORCEINLINE_FUNCTION void K_StoreEMF( const int i, const int j, const int
const int BXt = (DIR == IDIR ? BX2 : BX1); ,
const int BXb = (DIR == KDIR ? BX2 : BX3); )
D_EXPAND( Et(k,j,i) = st*Flux(BXt,k,j,i); ,
,
Eb(k,j,i) = sb*Flux(BXb,k,j,i); )
#if COMPONENTS > 1
D_EXPAND( Et(k,j,i) = st*Flux(BXt,k,j,i); ,
,
Eb(k,j,i) = sb*Flux(BXb,k,j,i); )
#endif
}
template <const int DIR>
......@@ -60,9 +62,11 @@ KOKKOS_FORCEINLINE_FUNCTION void K_StoreHLL( const int i, const int j, const int
real al = std::fmin(ZERO_F, sl);
real scrh = ONE_F/(ar - al);
#if COMPONENTS > 1
EXPAND( Et(k,j,i) = -st*(ar*vL[Xt] - al*vR[Xt])*scrh; ,
,
Eb(k,j,i) = -sb*(ar*vL[Xb] - al*vR[Xb])*scrh; );
#endif
aL(k,j,i) = ar*scrh;
aR(k,j,i) = -al*scrh;
......@@ -196,9 +200,11 @@ KOKKOS_FORCEINLINE_FUNCTION void K_StoreHLLD( const int i, const int j, const in
dL(k,j,i) = HALF_F*lambda;
}
#if COMPONENTS > 1
EXPAND( Et(k,j,i) = -st*(ar*vL[Xt] - al*vR[Xt])*scrh; ,
,
Eb(k,j,i) = -sb*(ar*vL[Xb] - al*vR[Xb])*scrh; );
#endif
}
#endif //HYDRO_MHDSOLVERS_STOREFLUX_HPP_
......@@ -158,7 +158,7 @@ void Hydro::AddSourceTerms(real t, real dt) {
+Vc(BX3,k,j,i)*Vc(BX3,k,j,i) );
#endif
Uc(MX1,k,j,i) += dt*Sm/x1(i);
#if COMPONENTS >= 2
ct = 1.0/tanx2(j);
// Centrifugal
Sm = Vc(RHO,k,j,i) * (EXPAND( ZERO_F, - Vc(iVTH,k,j,i)*Vc(iVR,k,j,i), + ct*vphi*vphi));
......@@ -179,6 +179,7 @@ void Hydro::AddSourceTerms(real t, real dt) {
+Vc(BX3,k,j,i)*Vc(BX3,k,j,i)) );
#endif
Uc(MX2,k,j,i) += dt*Sm / rt(i);
#endif // COMPONENTS
#endif
}
);
......
......@@ -498,17 +498,13 @@ void RKLegendre::CalcParabolicRHS(real t) {
}
#endif // GEOMETRY==POLAR OR CYLINDRICAL
#if GEOMETRY == SPHERICAL
#if GEOMETRY == SPHERICAL && COMPONENTS == 3
if(dir==IDIR && nv==iMPHI) {
#if COMPONENTS == 3
Flux(iMPHI,k,j,i) = Flux(iMPHI,k,j,i) * FABS(x1m(i));
#endif // COMPONENTS == 3
} else if(dir==JDIR && nv==iMPHI) {
#if COMPONENTS == 3
Flux(iMPHI,k,j,i) = Flux(iMPHI,k,j,i) * FABS(sm(j));
#endif // COMPONENTS = 3
}
#endif // GEOMETRY == SPHERICAL
#endif // GEOMETRY == SPHERICAL && COMPONENTS == 3
}
);
......
Supports Markdown
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