From f83dd72b4fe92b495bd2509545cdcd61659562ec Mon Sep 17 00:00:00 2001 From: Kyle Gerard Felker Date: Mon, 10 Jul 2023 21:35:23 -0500 Subject: [PATCH] Rename pb to bsq --- src/cr/cr.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/cr/cr.cpp b/src/cr/cr.cpp index b46517118c..cd71b650cc 100644 --- a/src/cr/cr.cpp +++ b/src/cr/cr.cpp @@ -175,9 +175,9 @@ inline void DefaultStreaming(MeshBlock *pmb, AthenaArray &u_cr, for(int i=is; i<=ie; ++i) { Real inv_sqrt_rho = 1.0/std::sqrt(prim(IDN,k,j,i)); - Real pb= bcc(IB1,k,j,i)*bcc(IB1,k,j,i) - +bcc(IB2,k,j,i)*bcc(IB2,k,j,i) - +bcc(IB3,k,j,i)*bcc(IB3,k,j,i); + Real bsq = bcc(IB1,k,j,i)*bcc(IB1,k,j,i) + +bcc(IB2,k,j,i)*bcc(IB2,k,j,i) + +bcc(IB3,k,j,i)*bcc(IB3,k,j,i); Real b_grad_pc = bcc(IB1,k,j,i) * grad_pc(0,k,j,i) + bcc(IB2,k,j,i) * grad_pc(1,k,j,i) @@ -187,7 +187,7 @@ inline void DefaultStreaming(MeshBlock *pmb, AthenaArray &u_cr, Real va2 = bcc(IB2,k,j,i) * inv_sqrt_rho; Real va3 = bcc(IB3,k,j,i) * inv_sqrt_rho; - Real va = std::sqrt(pb) * inv_sqrt_rho; + Real va = std::sqrt(bsq) * inv_sqrt_rho; Real dpc_sign = 0.0; if (b_grad_pc > TINY_NUMBER) dpc_sign = 1.0; @@ -198,7 +198,7 @@ inline void DefaultStreaming(MeshBlock *pmb, AthenaArray &u_cr, pcr->v_adv(1,k,j,i) = -va2 * dpc_sign; pcr->v_adv(2,k,j,i) = -va3 * dpc_sign; if (va > TINY_NUMBER) { - pcr->sigma_adv(0,k,j,i) = std::abs(b_grad_pc)/(std::sqrt(pb) * va * + pcr->sigma_adv(0,k,j,i) = std::abs(b_grad_pc)/(std::sqrt(bsq) * va * (4.0/3.0) * invlim * u_cr(CRE,k,j,i)); pcr->sigma_adv(1,k,j,i) = pcr->max_opacity; pcr->sigma_adv(2,k,j,i) = pcr->max_opacity;