[Commits] [svn:einsteintoolkit] IllinoisGRMHD/trunk/ (Rev. 21)
zachetie at gmail.com
zachetie at gmail.com
Tue Mar 25 11:29:20 CDT 2014
User: zetienne
Date: 2014/03/25 11:29 AM
Modified:
/trunk/
interface.ccl, param.ccl, schedule.ccl
Log:
Huge update, part 2: CCL files. (1) add Illinois-style outgoing outer boundary conditions to GRMHD variables; (2) rewrite the con2prim to make the coding style compatible with the rest of IllinoisGRMHD; (3) combine remaining duplicated functions into a library of inlined functions
File Changes:
Directory: /trunk/
==================
File [modified]: interface.ccl
Delta lines: +1 -1
===================================================================
--- trunk/interface.ccl 2014-03-25 16:28:18 UTC (rev 20)
+++ trunk/interface.ccl 2014-03-25 16:29:20 UTC (rev 21)
@@ -72,7 +72,7 @@
#^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^#
#vvvvvvv BSSN-based quantities, computed from ADM quantities.v vvvvvvv#
-cctk_real BSSN_quantities type = GF TAGS='Checkpoint="no"'
+cctk_real BSSN_quantities type = GF TAGS='Checkpoint="no"' TAGS='InterpNumTimelevels=1 prolongation="none"'
{
gtxx,gtxy,gtxz,gtyy,gtyz,gtzz,gtupxx,gtupxy,gtupxz,gtupyy,gtupyz,gtupzz,phi,psi_bssn,lapm1,Axx,Axy,Axz,Ayy,Ayz,Azz,trK
}
File [modified]: param.ccl
Delta lines: +28 -10
===================================================================
--- trunk/param.ccl 2014-03-25 16:28:18 UTC (rev 20)
+++ trunk/param.ccl 2014-03-25 16:29:20 UTC (rev 21)
@@ -18,6 +18,14 @@
#########################################################
restricted:
+#########################################################
+# SPEED LIMIT: Set maximum relativistic gamma factor
+#
+REAL GAMMA_SPEED_LIMIT "Maximum relativistic gamma factor. This must be compatible with ONE_MINUS_ONE_OVER_GAMMA_SQUARED (below)!"
+{
+ 1:* :: "Positive > 1, though you'll likely have troubles far above 10."
+} 10.0
+#########################################################
#########################################################
# CONSERV TO PRIMS PARAMETERS
@@ -66,17 +74,21 @@
#########################################################
#########################################################
-# BOUNDARY CONDITION PARAMS
-#INT Matter_BC "Chosen Matter boundary condition: OUTFLOW = 1,FREEZE = 2,COPY = 3,LINEAR = 4,QUADRATIC = 5,PLANAR = 6"
-#{
-# *:* :: "Any integer"
-#} 1
-#
-#INT EM_BC "EM field boundary condition"
-#{
-# 1:5 :: "COPY=1, FREEZE=2, EXTRAP=3, QUAD=4, PLANAR=5"
-#} 1
+# OUTER BOUNDARY CONDITION CHOICE
+INT Matter_BC "Chosen Matter boundary condition: OUTFLOW = 1,FREEZE = 2"
+{
+ 1:2 :: "Any integer"
+} 1
+INT EM_BC "EM field boundary condition"
+{
+ 1:2 :: "COPY=1, FREEZE=2"
+} 1
+#########################################################
+
+
+
+#########################################################
# SYMMETRY BOUNDARY PARAMS. Needed for handling staggered gridfunctions.
INT Symmetry "Symmetry: 0=NOSYMM, 1=EQUATORIAL. FIXME: Add more symmetries."
{
@@ -92,6 +104,12 @@
###############################################################################################
private:
+KEYWORD bound "Type of boundary condition to use"
+{
+ "none" :: "No boundary condition"
+ "flat" :: "Flat boundary condition"
+ "radiation" :: "Radiation boundary condition"
+} "none"
#########################################################
# EVOLUTION PARAMS
File [modified]: schedule.ccl
Delta lines: +80 -35
===================================================================
--- trunk/schedule.ccl 2014-03-25 16:28:18 UTC (rev 20)
+++ trunk/schedule.ccl 2014-03-25 16:29:20 UTC (rev 21)
@@ -4,7 +4,6 @@
STORAGE: IllinoisGRMHD::BSSN_quantities
-
STORAGE: grmhd_conservatives[3],em_Ax[3],em_Ay[3],em_Az[3],em_psi6phi[3]
STORAGE: grmhd_primitives_allbutBi,grmhd_primitives_Bi,grmhd_primitives_reconstructed_temps,grmhd_conservatives_rhs,em_Ax_rhs,em_Ay_rhs,em_Az_rhs,em_psi6phi_rhs,grmhd_cmin_cmax_temps,grmhd_flux_temps,TUPmunu
STORAGE: eos_params_arrays1,eos_params_arrays2,eos_params_scalar
@@ -22,75 +21,121 @@
{
LANG: C
} "Schedule symmetries"
+####################
-schedule GROUP ABE_PostInitial at CCTK_POSTPOSTINITIAL before MoL_PostStep
-{
-} "ABE Post-initial data routines"
+####################
+# POSTPOSTINITIAL
+# HydroBase_Con2Prim in CCTK_POSTPOSTINITIAL sets conserv to prim then
+# outer boundaries (OBs, which are technically disabled). The post OB
+# SYNCs actually reprolongate the conservative variables, making cons
+# and prims INCONSISTENT. So here we redo the con2prim, avoiding the
+# SYNC afterward, then copy the result to other timelevels"
-schedule compute_B_and_Bstagger_from_A in ABE_PostInitial as compute_b after postid after empostid after lapsepostid
+schedule GROUP IllinoisGRMHD_PostPostInitial at CCTK_POSTPOSTINITIAL before MoL_PostStep after HydroBase_Con2Prim
{
- OPTIONS: GLOBAL,loop-local
+} "HydroBase_Con2Prim in CCTK_POSTPOSTINITIAL sets conserv to prim then outer boundaries (OBs, which are technically disabled). The post OB SYNCs actually reprolongate the conservative variables, making cons and prims INCONSISTENT. So here we redo the con2prim, avoiding the SYNC afterward, then copy the result to other timelevels"
+
+# Easiest primitives to solve for: B^i
+schedule compute_B_and_Bstagger_from_A in IllinoisGRMHD_PostPostInitial as compute_b after postid after empostid after lapsepostid
+{
+ # This is strictly a processor sync, as prolongation is disabled for all primitives & B^i's.
SYNC: grmhd_primitives_Bi
LANG: C
} "Compute B and B_stagger from A SYNC: grmhd_primitives_Bi"
-####################
+# Nontrivial primitives solve, for P,rho_b,vx,vy,vz:
+schedule conserv_to_prims in IllinoisGRMHD_PostPostInitial after compute_b
+{
+ LANG: C
+} "Compute primitive variables from conservatives. This is non-trivial, requiring a Newton-Raphson root-finder."
-
-#FIXME:
-# Probably want to add this, so that initial data thorns don't need to set conservative variables...
-#schedule driver_prims_to_conserv in ABE_PostInitial as p2c after compute_b
-#{
-# OPTIONS: GLOBAL,loop-local
-# LANG: C
-#} "Compute conservative variables from primitive variables. This is simple and algebraic, unlike the inverse operation!"
-#schedule conserv_to_prims in ABE_PostInitial as mhd_conserv2prims after compute_b before mhdpostid
-#{
-# OPTIONS: GLOBAL,loop-local
-# LANG: C
-#} "Compute primitive variables from conservatives. This is non-trivial, requiring a Newton-Raphson root-finder."
-
-schedule IllinoisGRMHD_PostInitialData in ABE_PostInitial as mhdpostid after compute_b after p2c
+# Copy data to other timelevels.
+schedule PostPostInitial_Set_Symmetries__Copy_Timelevels in IllinoisGRMHD_PostPostInitial as mhdpostid after compute_b after p2c
{
LANG: C
- OPTIONS: GLOBAL,loop-local
} "Compute post-initialdata quantities"
####################
+
####################
# RHS EVALUATION
schedule driver_evaluate_MHD_rhs in MoL_CalcRHS as IllinoisGRMHD_RHS_eval after bssn_rhs after shift_rhs
{
LANG: C
-#FIXME: Not sure these SYNC's are necessary...
-# SYNC: grmhd_conservatives,em_Ax,em_Ay,em_Az,em_psi6phi
} "Evaluate RHSs of GR Hydro & GRMHD equations"
####################
+############################################################
+# COMPUTE B FROM A & RE-SOLVE FOR PRIMITIVES
+# After a full timestep, there are two types of boundaries that need filling:
+# (A) Outer boundaries (on coarsest level)
+# (B) AMR grid refinement boundaries
-##########################################################
-# AFTER RESTRICT, COMPUTE B FROM A & RE-SOLVE FOR PRIMITIVES
+# (A) OUTER BOUNDARY STEPS:
+# ( 0) Synchronize (prolongate/restrict) all evolved variables
+# ( 1) Apply outer boundary conditions (BCs) on A_{\mu}
+# ( 2) Compute B^i from A_i everywhere, synchronize (processor sync) B^i
+# ( 3) Call con2prim to get consistent primitives {P,rho_b,vx,vy,vz} and conservatives at all points (if no restriction, really only need interior)
+# ( 4) Apply outer BCs on {P,rho_b,vx,vy,vz}, recompute conservatives.
-# this will become selectbc
-#schedule IllinoisGRMHD_InitSymBound at CCTK_POSTRESTRICT as post_restrict_SYNCs before compute_B_postrestrict after fish_postregrid_update0 after MoL_PostStep
-schedule IllinoisGRMHD_InitSymBound in HydroBase_Boundaries as post_restrict_SYNCs before compute_B_postrestrict
+# (B) AMR GRID REFINEMENT BOUNDARY STEPS:
+# Same as steps 0,2,3 above. Just need if() statements in steps 1,4 to prevent "outer boundaries" being updated
+# Problem: all the sync's in outer boundary updates might just overwrite prolongated values.
+############################################################
+
+schedule IllinoisGRMHD_InitSymBound in HydroBase_Boundaries as Boundary_SYNCs before compute_B_postrestrict
{
- OPTIONS: LEVEL #,LOOP-LOCAL
SYNC: grmhd_conservatives,em_Ax,em_Ay,em_Az,em_psi6phi
LANG: C
-} "Schedule symmetries -- Actually just a placeholder function to ensure prolongation / processor syncs are done BEFORE the primitives solver."
+} "Schedule symmetries -- Actually just a placeholder function to ensure prolongations / processor syncs are done BEFORE outer boundaries are updated."
-############################################################
+schedule outer_boundaries_on_A_mu in HydroBase_Boundaries after Boundary_SYNCs before mhd_conserv2prims_postrestrict
+{
+# SYNC: em_Ax,em_Ay,em_Az,em_psi6phi
+ LANG: C
+} "Apply linear extrapolation BCs on A_{\mu}, so that BCs are flat on B^i."
-schedule compute_B_and_Bstagger_from_A in HydroBase_Con2Prim as compute_B_and_Bstagger_from_A after post_restrict_SYNCs before mhd_conserv2prims_postrestrict
+# Easiest primitives to solve for: B^i.
+# Note however that B^i depends on derivatives of A_{\mu}, so a SYNC is necessary on B^i.
+schedule compute_B_and_Bstagger_from_A in HydroBase_Boundaries after outer_boundaries_on_A_mu
{
+ # This is strictly a processor sync, as prolongation is disabled for all primitives & B^i's.
SYNC: grmhd_primitives_Bi
LANG: C
} "Compute B and B_stagger from A"
-schedule conserv_to_prims in HydroBase_Con2Prim as mhd_conserv2prims after compute_B_and_Bstagger_from_A
+# Nontrivial primitives solve, for P,rho_b,vx,vy,vz.
+schedule conserv_to_prims in HydroBase_Boundaries after compute_B_and_Bstagger_from_A
{
LANG: C
} "Compute primitive variables from conservatives. This is non-trivial, requiring a Newton-Raphson root-finder."
+
+schedule outer_boundaries_on_P_rho_b_vx_vy_vz in HydroBase_Boundaries after conserv_to_prims
+{
+# We must sync {P,rho_b,vx,vy,vz} AND conservatives here.
+# SYNC: grmhd_primitives_allbutBi,grmhd_conservatives
+ SYNC: grmhd_primitives_allbutBi
+ LANG: C
+} "Apply outflow-only, flat BCs on {P,rho_b,vx,vy,vz}. Outflow only == velocities pointed inward from outer boundary are set to zero."
##########################################################
+
+##########################################################
+# CON2PRIM STUFF
+# ( 1) Compute B^i from A_i everywhere, synchronize B^i
+# ( 2) Call con2prim to get primitives on all points (really only need interior, but who cares)
+
+## Easiest primitives to solve for: B^i
+#schedule compute_B_and_Bstagger_from_A in HydroBase_Con2Prim
+#{
+## This is strictly a processor sync, as prolongation is disabled for all primitives & B^i's.
+# SYNC: grmhd_primitives_Bi
+# LANG: C
+#} "Compute B and B_stagger from A"
+#
+## Nontrivial primitives solve, for P,rho_b,vx,vy,vz:
+#schedule conserv_to_prims in HydroBase_Con2Prim after compute_B_and_Bstagger_from_A
+#{
+# LANG: C
+#} "Compute primitive variables from conservatives. This is non-trivial, requiring a Newton-Raphson root-finder."
+##########################################################
More information about the Commits
mailing list