aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrhaas <rhaas@ac85fae7-cede-4708-beff-ae01c7fa1c26>2012-08-09 06:21:04 +0000
committerrhaas <rhaas@ac85fae7-cede-4708-beff-ae01c7fa1c26>2012-08-09 06:21:04 +0000
commitfbccd7b0ae4dcfb199afa0c610c53c82f5a9ff5c (patch)
tree33d9d8e731bf1131d84bcd0f1bea17ef7884bf09
parent2416dc30c2c575142a7ab8ce986d85a4439ecced (diff)
A couple of changes:
1) Calculate divergence of B in MoL PseudoEvolution and set its Prolongation="Restrict". 2) Correct the source terms and fluxes for the Bfield and the divergence cleaning field when having a non-flat space-time. 3) Make sure alpha factors match between UpdateCalculation and fluxes definition. 4) Include 1/sqrt(detg) factor in calculation of \epsilon^{\muijk} in the cross product to obtain the Bfield form the vector potential. From: Philipp Moesta <pmoesta@tapir.caltech.edu> git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinInitialData/GRHydro_InitData/trunk@137 ac85fae7-cede-4708-beff-ae01c7fa1c26
-rw-r--r--src/GRHydro_PoloidalMagFieldM.F9011
1 files changed, 7 insertions, 4 deletions
diff --git a/src/GRHydro_PoloidalMagFieldM.F90 b/src/GRHydro_PoloidalMagFieldM.F90
index df74d75..47ce06c 100644
--- a/src/GRHydro_PoloidalMagFieldM.F90
+++ b/src/GRHydro_PoloidalMagFieldM.F90
@@ -58,6 +58,7 @@ subroutine GRHydro_PoloidalMagFieldM(CCTK_ARGUMENTS)
CCTK_INT :: i, j, k, nx, ny, nz
CCTK_REAL :: det
+ CCTK_REAL :: sdet
CCTK_REAL :: dx,dy,dz
CCTK_REAL :: rhofac, delPcut, maxP_Pcut
CCTK_REAL :: Aphi, Ax, Ay, Az
@@ -112,12 +113,14 @@ subroutine GRHydro_PoloidalMagFieldM(CCTK_ARGUMENTS)
Ay_dx = Aphi + x(i,j,k)*Aphi_dx
Ay_dz = x(i,j,k)*Aphi_dz
- Bvecx(i,j,k) = alp(i,j,k)*Ay_dz
- Bvecy(i,j,k) = -alp(i,j,k)*Ax_dz
- Bvecz(i,j,k) = alp(i,j,k)*(Ax_dy-Ay_dx)
det=SPATIAL_DETERMINANT(gxx(i,j,k),gxy(i,j,k),gxz(i,j,k),gyy(i,j,k),gyz(i,j,k),gzz(i,j,k))
-
+ sdet = sqrt(det)
+
+ Bvecx(i,j,k) = Ay_dz/sdet
+ Bvecy(i,j,k) = - Ax_dz/sdet
+ Bvecz(i,j,k) = (Ax_dy-Ay_dx)/sdet
+
if (CCTK_EQUALS(GRHydro_eos_type,"Polytype")) then
call Prim2ConPolyM(GRHydro_eos_handle,gxx(i,j,k),gxy(i,j,k),&
gxz(i,j,k),gyy(i,j,k),gyz(i,j,k),gzz(i,j,k),&