Commit 2134f45e authored by Michael Dumbser's avatar Michael Dumbser
parents 25822185 daa47091
Pipeline #171199 passed with stage
......@@ -69,6 +69,9 @@ RECURSIVE SUBROUTINE METRIC ( xc, lapse, gp, gm, shift, Kex, g_cov, g_contr, phi
REAL :: lx, ly, lz, HH, SS, detg, rho, r_hz, sig, theta, a, M
REAL :: st, st2, delta, rho2, sigma, zz, V0Z4(54),V070(70)
REAL :: transl(3), xGP(3),Mbh_loc,rbar
#if defined(RNSTOV)
REAL :: qloc(NSTOV_nODE)
#endif
REAL, DIMENSION(3) :: xGP_loc,xGP_sph
!
Kex = 0.0
......@@ -375,14 +378,14 @@ RECURSIVE SUBROUTINE METRIC ( xc, lapse, gp, gm, shift, Kex, g_cov, g_contr, phi
r=XGP_sph(1)
!
#ifdef SPHERICAL ! then we are in the original coordinate system
CALL NSTOV_x(r,NSTOVVar%qloc)
CALL NSTOV_x(r,qloc)
#elif CYLINDRICAL
PRINT *, 'CYLINDRICAL COORDINATES NOT TESTED FOR RNSTOV'
#else
CALL NSTOV_rbar(r,NSTOVVar%qloc)
CALL NSTOV_rbar(r,qloc)
#endif
!
lapse = EXP(NSTOVVar%qloc(2))
lapse = EXP(qloc(2))
shift(1:3) = 0.
!gammaij(1:6) = 0.
!gammaij(1) = 1.0
......@@ -390,16 +393,16 @@ RECURSIVE SUBROUTINE METRIC ( xc, lapse, gp, gm, shift, Kex, g_cov, g_contr, phi
!gammaij(6) = 1.0
g_cov = 0.
#ifdef SPHERICAL
g_cov(1,1) = 1.0/(1.0-2.0*NSTOVVar%qloc(1)/r)
g_cov(1,1) = 1.0/(1.0-2.0*qloc(1)/r)
g_cov(2,2) = r**2
g_cov(3,3) = SIN(xGP_sph(2))**2*r**2
!
#else
!rbar = r !*NSTOVVar%C*exp(NSTOVVar%q(4,n))
!rbar = 0.5*r/NSTOVVar%radius*(SQRT(NSTOVVar%radius**2-2*NSTOVVar%q(1,NSTOVVar%iradius)*NSTOVVar%radius)+NSTOVVar%radius-NSTOVVar%q(1,NSTOVVar%iradius))*EXP(NSTOVVar%qloc(4)-NSTOVVar%q(4,NSTOVVar%iradius))
g_cov(1,1) = 1.0/(NSTOVVar%C**2*exp(2.0*NSTOVVar%qloc(4))) ! rbar**2/(r+1e-14)**2
g_cov(2,2) = 1.0/(NSTOVVar%C**2*exp(2.0*NSTOVVar%qloc(4))) ! rbar**2/(r+1e-14)**2
g_cov(3,3) = 1.0/(NSTOVVar%C**2*exp(2.0*NSTOVVar%qloc(4))) ! rbar**2/(r+1e-14)**2
!rbar = 0.5*r/NSTOVVar%radius*(SQRT(NSTOVVar%radius**2-2*NSTOVVar%q(1,NSTOVVar%iradius)*NSTOVVar%radius)+NSTOVVar%radius-NSTOVVar%q(1,NSTOVVar%iradius))*EXP(qloc(4)-NSTOVVar%q(4,NSTOVVar%iradius))
g_cov(1,1) = 1.0/(NSTOVVar%C**2*exp(2.0*qloc(4))) ! rbar**2/(r+1e-14)**2
g_cov(2,2) = 1.0/(NSTOVVar%C**2*exp(2.0*qloc(4))) ! rbar**2/(r+1e-14)**2
g_cov(3,3) = 1.0/(NSTOVVar%C**2*exp(2.0*qloc(4))) ! rbar**2/(r+1e-14)**2
!
#endif
g_contr=0.
......
......@@ -424,6 +424,7 @@ END SUBROUTINE RoeMatrix
RECURSIVE SUBROUTINE HLLEMFluxFV(FL,FR,QL,QR,QavL,QavR,NormalNonZero)
USE Parameters, ONLY : nVar, nDim, nLin
USE iso_c_binding
IMPLICIT NONE
! Local variables
INTEGER, INTENT(IN) :: NormalNonZero
REAL, INTENT(IN) :: QL(nVar)
......@@ -433,7 +434,7 @@ RECURSIVE SUBROUTINE HLLEMFluxFV(FL,FR,QL,QR,QavL,QavR,NormalNonZero)
REAL :: QavL(nVar), QavR(nVar)
! Local variables
INTEGER :: i,j,k,l, ml(1)
REAL :: smax, Qav(nVar)
REAL :: smax, Qav(nVar),sL,sR
REAL :: nv(nDim), flattener(nLin)
REAL :: absA(nVar,nVar), amax, minL, maxR, minM, maxM
REAL :: QM(nVar),LL(nVar),LR(nVar),LM(nVar)
......
......@@ -199,7 +199,7 @@ template <typename SolverType>
void computeGradQ(double* gradQ, const double* const u, const tarch::la::Vector<DIMENSIONS, double>& sizeOfPatch) {
const int numberOfVariables = SolverType::NumberOfVariables;
const int order = SolverType::Order;
computeGradQ(gradQ, u, sizeOfPatch, numberOfVariables, order);
computeGradQ(gradQ, u, sizeOfPatch, numberOfVariables, order);
}
/// Convenience also for computeGradQi
......
......@@ -203,7 +203,7 @@ template <typename SolverType>
void computeGradQ(double* gradQ, const double* const u, const tarch::la::Vector<DIMENSIONS, double>& sizeOfPatch) {
const int numberOfVariables = SolverType::NumberOfVariables;
const int order = SolverType::Order;
computeGradQ(gradQ, u, SolverType::dudx, sizeOfPatch, numberOfVariables, order);
computeGradQ(gradQ, u, kernels::legendre::dudx, sizeOfPatch, numberOfVariables, order);
}
/// Convenience also for computeGradQi
......@@ -211,7 +211,7 @@ template <typename SolverType>
void computeGradQi(double* gradQi, const double* const u, const int requestedDirection, const int requestedVariableIndex, const tarch::la::Vector<DIMENSIONS, double>& sizeOfPatch) {
const int numberOfVariables = SolverType::NumberOfVariables;
const int order = SolverType::Order;
computeGradQi(gradQi, u, SolverType::dudx, requestedDirection, requestedVariableIndex, sizeOfPatch, numberOfVariables, order);
computeGradQi(gradQi, u, kernels::legendre::dudx, requestedDirection, requestedVariableIndex, sizeOfPatch, numberOfVariables, order);
}
......
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