[Commits] [svn:einsteintoolkit] GRHydro/trunk/src/ (Rev. 412)
rhaas at tapir.caltech.edu
rhaas at tapir.caltech.edu
Mon Aug 27 14:19:27 CDT 2012
User: rhaas
Date: 2012/08/27 02:19 PM
Modified:
/trunk/src/
GRHydro_TransformTensorBasis.c
Log:
GRHydro: use inverse Jacobian to transform Bvec back to global basis
From: Roland Haas <roland.haas at physics.gatech.edu>
File Changes:
Directory: /trunk/src/
======================
File [modified]: GRHydro_TransformTensorBasis.c
Delta lines: +5 -5
===================================================================
--- trunk/src/GRHydro_TransformTensorBasis.c 2012-08-27 19:19:22 UTC (rev 411)
+++ trunk/src/GRHydro_TransformTensorBasis.c 2012-08-27 19:19:26 UTC (rev 412)
@@ -431,11 +431,11 @@
if(*evolve_MHD)
{
- /* Transform primitive B-field from global to local basis.
- * Since B-field has contravariant index, use Jacobian */
- lBvec[idx1] = Bvec[idx1]*J11[idx] + Bvec[idx2]*J12[idx] + Bvec[idx3]*J13[idx];
- lBvec[idx2] = Bvec[idx1]*J21[idx] + Bvec[idx2]*J22[idx] + Bvec[idx3]*J23[idx];
- lBvec[idx3] = Bvec[idx1]*J31[idx] + Bvec[idx2]*J32[idx] + Bvec[idx3]*J33[idx];
+ /* Transform primitive B-field from local to global basis.
+ * Since B-field has contravariant index, use inverse Jacobian */
+ Bvec[idx1] = lBvec[idx1]*iJ11[idx] + lBvec[idx2]*iJ12[idx] + lBvec[idx3]*iJ13[idx];
+ Bvec[idx2] = lBvec[idx1]*iJ21[idx] + lBvec[idx2]*iJ22[idx] + lBvec[idx3]*iJ23[idx];
+ Bvec[idx3] = lBvec[idx1]*iJ31[idx] + lBvec[idx2]*iJ32[idx] + lBvec[idx3]*iJ33[idx];
}
}
More information about the Commits
mailing list