diff options
author | knarf <knarf@c83d129a-5a75-4d5a-9c4d-ed3a5855bf45> | 2009-11-18 16:36:37 +0000 |
---|---|---|
committer | knarf <knarf@c83d129a-5a75-4d5a-9c4d-ed3a5855bf45> | 2009-11-18 16:36:37 +0000 |
commit | aed5c4b5b94ef683f83c7597aee2174e34ec245f (patch) | |
tree | 6903142286d005e57a416cae7ce003f55edb61d4 /interface.ccl |
This is a _temporary_ repository to be able to start to work on the
code right now. I have put in the public version of Whisky to start from.
Everybody with commit rights should get commit messages (and the other
way around). It should not be a problem to add people to that list, just
ask. I don't want to get into political problems because someone feels
excluded, but I also don't want to give everyone access per se.
Frank
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinEvolve/GRHydro/trunk@3 c83d129a-5a75-4d5a-9c4d-ed3a5855bf45
Diffstat (limited to 'interface.ccl')
-rw-r--r-- | interface.ccl | 445 |
1 files changed, 445 insertions, 0 deletions
diff --git a/interface.ccl b/interface.ccl new file mode 100644 index 0000000..57a8a53 --- /dev/null +++ b/interface.ccl @@ -0,0 +1,445 @@ +# Interface definition for thorn Whisky + +#################################################################### +### Whisky needs to inherit the metric from Einstein. ### +### Other thorns will need to know what EOS we're using. They ### +### inherit to get the handle. ### +#################################################################### + +implements: Whisky +inherits: ADMBase, StaticConformal, Boundary, SpaceMask, ADMMacros, Tmunubase, HydroBase + +#INCLUDES SOURCE: Whisky_EMTensor.inc in CalcTmunu.inc +#INCLUDES: Whisky_EMTensor_temps.inc in CalcTmunu_temps.inc + +USES INCLUDE: FishEye.h +USES INCLUDE: EOS_Base.inc +USES INCLUDE: SpaceMask.h +USES INCLUDE: EOS_Base.h + +USES INCLUDE HEADER: carpet.hh + +############################################################### +### Provided functions. These are mainly to allow RNSID ### +### to convert back to primitive / conservative variables ### +### without having an explicit coupling to Whisky. ### +### NOTE: the function that converts conservative to ### +### primitive variables requires pointers to the conserved ### +### variables as well as these variables are reset if ### +### we're in the atmosphere. ### +############################################################### + +void FUNCTION SpatialDet(CCTK_REAL IN gxx, CCTK_REAL IN gxy, \ + CCTK_REAL IN gxz, CCTK_REAL IN gyy, \ + CCTK_REAL IN gyz, CCTK_REAL IN gzz, \ + CCTK_REAL OUT det) + +void FUNCTION UpperMet(CCTK_REAL OUT uxx, CCTK_REAL OUT uxy, \ + CCTK_REAL OUT uxz, CCTK_REAL OUT uyy, \ + CCTK_REAL OUT uyz, CCTK_REAL OUT uzz, \ + CCTK_REAL IN det, CCTK_REAL IN gxx, CCTK_REAL IN gxy, \ + CCTK_REAL IN gxz, CCTK_REAL IN gyy, CCTK_REAL IN gyz, \ + CCTK_REAL IN gzz) + +#void FUNCTION Con2Prim(CCTK_INT IN handle, \ +# CCTK_REAL OUT dens, \ +# CCTK_REAL OUT sx, CCTK_REAL OUT sy, CCTK_REAL OUT sz, \ +# CCTK_REAL OUT tau, \ +# CCTK_REAL OUT rho, \ +# CCTK_REAL OUT velx, CCTK_REAL OUT vely, CCTK_REAL OUT velz, \ +# CCTK_REAL OUT epsilon, CCTK_REAL OUT press, \ +# CCTK_REAL OUT w_lorentz, \ +# CCTK_REAL IN uxx, CCTK_REAL IN uxy, CCTK_REAL IN uxz, \ +# CCTK_REAL IN uyy, CCTK_REAL IN uyz, CCTK_REAL IN uzz, \ +# CCTK_REAL IN det, \ +# CCTK_REAL IN x, CCTK_REAL IN y, CCTK_REAL IN z, CCTK_REAL IN r, \ +# CCTK_INT OUT epsnegative, \ +# CCTK_REAL IN whisky_rho_min, CCTK_REAL IN pmin, \ +# CCTK_INT IN whisky_reflevel, CCTK_REAL IN whisky_C2P_failed) + +void FUNCTION Con2PrimPoly(CCTK_INT IN handle, CCTK_REAL OUT dens, \ + CCTK_REAL OUT sx, CCTK_REAL OUT sy, \ + CCTK_REAL OUT sz, CCTK_REAL OUT tau, \ + CCTK_REAL OUT rho, CCTK_REAL OUT velx, \ + CCTK_REAL OUT vely, CCTK_REAL OUT velz, \ + CCTK_REAL OUT epsilon, CCTK_REAL OUT press, \ + CCTK_REAL OUT w_lorentz, CCTK_REAL IN uxx, \ + CCTK_REAL IN uxy, CCTK_REAL IN uxz, \ + CCTK_REAL IN uyy, CCTK_REAL IN uyz, \ + CCTK_REAL IN uzz, CCTK_REAL IN det, \ + CCTK_REAL IN x, CCTK_REAL IN y, CCTK_REAL IN z, \ + CCTK_REAL IN r, CCTK_REAL IN rho_min, \ + CCTK_INT IN whisky_reflevel, CCTK_REAL IN whisky_C2P_failed) + +#void FUNCTION Prim2Con CCTK_INT handle, CCTK_REAL gxx, CCTK_REAL gxy, CCTK_REAL gxz, CCTK_REAL gyy, CCTK_REAL gyz, CCTK_REAL gzz, CCTK_REAL det, CCTK_REAL dens, CCTK_REAL sx, CCTK_REAL sy, CCTK_REAL sz, CCTK_REAL tau, CCTK_REAL rho, CCTK_REAL velx, CCTK_REAL vely, CCTK_REAL velz, CCTK_REAL epsilon, CCTK_REAL press, CCTK_REAL w_lorentz + +void FUNCTION Prim2ConGen(CCTK_INT IN handle, \ + CCTK_REAL IN gxx, CCTK_REAL IN gxy, \ + CCTK_REAL IN gxz, CCTK_REAL IN gyy, \ + CCTK_REAL IN gyz, CCTK_REAL IN gzz, \ + CCTK_REAL IN det, CCTK_REAL OUT dens, \ + CCTK_REAL OUT sx, CCTK_REAL OUT sy, \ + CCTK_REAL OUT sz, CCTK_REAL OUT tau, \ + CCTK_REAL IN rho, CCTK_REAL IN velx, \ + CCTK_REAL IN vely, \ + CCTK_REAL IN velz, CCTK_REAL IN epsilon, \ + CCTK_REAL OUT press, CCTK_REAL OUT w_lorentz) + +void FUNCTION Prim2ConPoly(CCTK_INT IN handle, \ + CCTK_REAL IN gxx, CCTK_REAL IN gxy, \ + CCTK_REAL IN gxz, CCTK_REAL IN gyy, \ + CCTK_REAL IN gyz, CCTK_REAL IN gzz, \ + CCTK_REAL IN det, CCTK_REAL OUT dens, \ + CCTK_REAL OUT sx, CCTK_REAL OUT sy, \ + CCTK_REAL OUT sz, CCTK_REAL OUT tau, \ + CCTK_REAL IN rho, CCTK_REAL IN velx, \ + CCTK_REAL IN vely, \ + CCTK_REAL IN velz, CCTK_REAL OUT epsilon, \ + CCTK_REAL OUT press, CCTK_REAL OUT w_lorentz) + +PROVIDES FUNCTION SpatialDet WITH SpatialDeterminant LANGUAGE Fortran +PROVIDES FUNCTION UpperMet WITH UpperMetric LANGUAGE Fortran +#PROVIDES FUNCTION Con2Prim WITH Con2Prim_pt LANGUAGE Fortran +PROVIDES FUNCTION Con2PrimPoly WITH Con2Prim_ptPolytype LANGUAGE Fortran +PROVIDES FUNCTION Prim2ConGen WITH prim2con LANGUAGE Fortran +PROVIDES FUNCTION Prim2ConPoly WITH prim2conpolytype LANGUAGE Fortran + +#################################################### +### Functions provided by MoL for registration ### +#################################################### + +CCTK_INT FUNCTION MoLRegisterEvolved(CCTK_INT IN EvolvedIndex, \ + CCTK_INT IN RHSIndex) +CCTK_INT FUNCTION MoLRegisterConstrained(CCTK_INT IN ConstrainedIndex) +CCTK_INT FUNCTION MoLRegisterEvolvedGroup(CCTK_INT IN EvolvedIndex, \ + CCTK_INT IN RHSIndex) +CCTK_INT FUNCTION MoLRegisterConstrainedGroup(CCTK_INT IN ConstrainedIndex) +CCTK_INT FUNCTION MoLRegisterSaveAndRestoreGroup(CCTK_INT IN SandRIndex) + +USES FUNCTION MoLRegisterEvolved +USES FUNCTION MoLRegisterConstrained +USES FUNCTION MoLRegisterEvolvedGroup +USES FUNCTION MoLRegisterConstrainedGroup +USES FUNCTION MoLRegisterSaveAndRestoreGroup + +######################################### +### Aliased functions from Boundary ### +######################################### + +CCTK_INT FUNCTION Boundary_SelectVarForBC(CCTK_POINTER_TO_CONST IN GH, \ + CCTK_INT IN faces, CCTK_INT IN boundary_width, CCTK_INT IN table_handle, \ + CCTK_STRING IN var_name, CCTK_STRING IN bc_name) +CCTK_INT FUNCTION Boundary_SelectGroupForBC(CCTK_POINTER_TO_CONST IN GH, \ + CCTK_INT IN faces, CCTK_INT IN boundary_width, CCTK_INT IN table_handle, \ + CCTK_STRING IN group_name, CCTK_STRING IN bc_name) + +USES FUNCTION Boundary_SelectVarForBC +USES FUNCTION Boundary_SelectGroupForBC + +############################################ +### Aliased function from DriftCorrect ### +############################################ + +void FUNCTION SetDriftCorrectPosition ( CCTK_POINTER_TO_CONST IN GH_Pointer, \ + CCTK_REAL IN x, \ + CCTK_REAL IN y, \ + CCTK_REAL IN z ) +USES FUNCTION SetDriftCorrectPosition + +############################################################## +### Functions provided by GZPatchSystem for registration ### +############################################################## + +CCTK_INT FUNCTION GZPatchSystem_register_sync(CCTK_STRING IN cactus_group_name) +USES FUNCTION GZPatchSystem_register_sync +CCTK_INT FUNCTION \ + GZPatchSystem_register_cxform(CCTK_INT IN time_level, \ + CCTK_STRING IN cactus_group_name) +USES FUNCTION GZPatchSystem_register_cxform + +####################################################### +### Functions provided by the general EOS interface ### +####################################################### + +CCTK_INT FUNCTION EOS_SetupCall(CCTK_INT IN table_handle) +USES FUNCTION EOS_SetupCall + +CCTK_INT FUNCTION EOS_SetGFs(CCTK_POINTER_TO_CONST IN GH, \ + CCTK_INT IN call_number) +USES FUNCTION EOS_SetGFs + +public: + +int whisky_eos_scalars type = SCALAR +{ + whisky_eos_handle + whisky_polytrope_handle +} "Handle number for EOS" + +real whisky_minima type = SCALAR +{ + whisky_rho_min +# whisky_dens_min +} "Atmosphere values" + +real dens type = GF Timelevels = 3 tags='ProlongationParameter="HydroBase::prolongation_type" tensortypealias="Scalar" tensorweight=+1.0 interpolator="matter"' "generalized particle number" + +real tau type = GF Timelevels = 3 tags='ProlongationParameter="HydroBase::prolongation_type" tensortypealias="Scalar" tensorweight=+1.0 interpolator="matter"' "internal energy" + +real scon[3] type = GF Timelevels = 3 tags='ProlongationParameter="HydroBase::prolongation_type" tensortypealias="D" tensorweight=+1.0 interpolator="matter"' "generalized momenta" + + +real whisky_tracers[number_of_tracers] type = GF Timelevels = 3 tags='ProlongationParameter="HydroBase::prolongation_type" tensortypealias="Scalar"' +{ + tracer +} "Tracers" + +real w_lorentz type = GF Timelevels = 3 tags='ProlongationParameter="HydroBase::prolongation_type" tensortypealias="Scalar" tensorweight=+1.0 interpolator="matter"' "Lorentz factor" + +real densrhs type = GF Timelevels = 1 tags='Prolongation="None" checkpoint="no"' "Update term for dens" +real taurhs type = GF Timelevels = 1 tags='Prolongation="None" checkpoint="no"' "Update term for tau" +real srhs[3] type = GF Timelevels = 1 tags='Prolongation="None" checkpoint="no"' "Update term for s" + +################################################## +### These variables are only protected so that ### +### the tests in init_data work. Should fix. ### +################################################## + +real whisky_prim_bext type = GF Timelevels = 1 tags='Prolongation="None" checkpoint="no"' +{ + rhoplus, velxplus, velyplus, velzplus, pressplus, epsplus, w_lorentzplus, + rhominus, velxminus, velyminus, velzminus, pressminus, epsminus, + w_lorentzminus +} "Primitive variables extended to the cell boundaries" + +int whisky_scalars type = SCALAR tags='checkpoint="no"' +{ + flux_direction, xoffset, yoffset, zoffset +} "Which direction are we taking the fluxes in and the offsets" + +int whisky_atmosphere_mask type = GF Timelevels = 1 tags='Prolongation="None"' +{ + atmosphere_mask +} "Flags to say whether a point needs to be reset to the atmosphere" + +int whisky_atmosphere_descriptors type=SCALAR +{ + atmosphere_field_descriptor + atmosphere_atmosp_descriptor + atmosphere_normal_descriptor +} + +real whisky_cons_tracers[number_of_tracers] TYPE=GF Timelevels = 3 tags='ProlongationParameter="HydroBase::prolongation_type" tensortypealias="Scalar"' +{ + cons_tracer +} "The conserved tracer variable" + +# For measuring separations +CCTK_REAL whisky_maxima_position TYPE=SCALAR tags='checkpoint="no"' +{ + maxima_x + maxima_y + maxima_z + maximum_density +} "The position (coordinate values) of the maximum value of rho" + +CCTK_REAL maxrho_global TYPE=SCALAR tags='checkpoint="no"' "store the global maximum of rho, for refinment-grid steering" + +# functions can be prolonged only if they are real (not integer). +CCTK_REAL whisky_C2P_failed TYPE=GF Timelevels = 1 tags='Prolongation="restrict" tensortypealias="Scalar" checkpoint="no"' "Mask that stores the points where C2P has failed" + +# Should we do the same for the atmo masks? + +private: + +int whisky_reflevel type = SCALAR tags='checkpoint="no"' "Refinement level Whisky is working on right now" + +real whisky_con_bext type = GF Timelevels = 1 tags='Prolongation="None" checkpoint="no"' +{ + densplus, sxplus, syplus, szplus, tauplus, + densminus, sxminus, syminus, szminus, tauminus +} "Conservative variables extended to the cell boundaries" + +real whisky_fluxes type = GF Timelevels = 1 tags='Prolongation="None" checkpoint="no"' +{ + densflux, sxflux, syflux, szflux, tauflux +} "Fluxes for each conserved variable" + +# real fluxweightvolume type = GF Timelevels = 1 +# { +# cell_volume +# cell_jdet +# } "Weighting factors for the interfaces for using FishEye" +# +# real cell_surface[3] type = GF Timelevels = 1 +# +# real whisky_fisheye_scalars type=GF timelevels=1 +# { +# frho +# fpress +# feps +# } "Whisky scalars in physical coordinates" +# +# real whisky_fisheye_vectors type=GF timelevels=1 +# { +# fvelx +# fvely +# fvelz +# } "Whisky vectors in physical coordinates" + +real whisky_coords type=GF timelevels=3 +{ + whisky_x + whisky_y + whisky_z +} "Coordinates to use with the comoving shift" + +real whisky_coords_rhs type=GF timelevels=1 tags='Prolongation="None"' +{ + whisky_x_rhs + whisky_y_rhs + whisky_z_rhs +} "RHS for coordinates to use with the comoving shift" + +#real whisky_hamiltonian type=GF tags='tensortypealias="Scalar"' +#{ +# whisky_hamnormalized +# whisky_ham +#} "Whisky hamiltonian constraints" + +#real whisky_momentum type=GF tags='tensortypealias="U" checkpoint="no"' +#{ +# whisky_momx, +# whisky_momy, +# whisky_momz +#} "Whisky momentum constraints" + +int whisky_trivial_rp_gf_group type=GF timelevels=1 tags='Prolongation="None"' +{ + whisky_trivial_rp_gf_x + whisky_trivial_rp_gf_y + whisky_trivial_rp_gf_z +} "set gf for triv. rp (only for debugging)" + + +real flux_splitting TYPE=GF tags='Prolongation="None" checkpoint="no"' +{ + densfplus, densfminus + sxfplus, sxfminus + syfplus, syfminus + szfplus, szfminus + taufplus, taufminus +} "Fluxes for use in the flux splitting" + +real fs_alpha TYPE=SCALAR +{ + fs_alpha1 + fs_alpha2 + fs_alpha3 + fs_alpha4 + fs_alpha5 +} "Maximum characteristic speeds for the flux splitting" + +real whisky_tracer_rhs[number_of_tracers] TYPE=GF tags='Prolongation="None" checkpoint="no"' +{ + cons_tracerrhs +} "RHS for the tracer" + +real whisky_tracer_flux[number_of_tracers] TYPE=GF tags='Prolongation="None" checkpoint="no"' +{ + cons_tracerflux +} "Flux for the tracer" + +real whisky_tracer_cons_bext[number_of_tracers] TYPE=GF tags='Prolongation="None" checkpoint="no"' +{ + cons_tracerplus, cons_tracerminus +} "Cell boundary values for the tracer" + +real whisky_tracer_prim_bext[number_of_tracers] TYPE=GF tags='Prolongation="None" checkpoint="no"' +{ + tracerplus, tracerminus +} "Primitive cell boundary values for the tracer" + +real whisky_tracer_flux_splitting[number_of_tracers] TYPE=GF tags='Prolongation="None" checkpoint="no"' +{ + tracerfplus, tracerfminus +} "Flux splitting for the tracer" + +real whisky_mppm_eigenvalues TYPE=GF tags='Prolongation="None" checkpoint="no"' +{ + whisky_mppm_eigenvalue_x_left, whisky_mppm_eigenvalue_x_right + whisky_mppm_eigenvalue_y_left, whisky_mppm_eigenvalue_y_right + whisky_mppm_eigenvalue_z_left, whisky_mppm_eigenvalue_z_right + whisky_mppm_xwind +} "debug variable for flux eigenvalues in mppm" + +CCTK_REAL particles TYPE=ARRAY DIM=1 TIMELEVELS=3 SIZE=number_of_particles GHOSTSIZE=0 DISTRIB=DEFAULT +{ + particle_x + particle_y + particle_z +} "Coordinates of particles to be tracked" + +CCTK_REAL particle_rhs TYPE=ARRAY DIM=1 TIMELEVELS=1 SIZE=number_of_particles GHOSTSIZE=0 DISTRIB=DEFAULT +{ + particle_x_rhs + particle_y_rhs + particle_z_rhs +} "RHS functions for particles to be tracked" + +CCTK_REAL particle_arrays TYPE=ARRAY DIM=1 TIMELEVELS=1 SIZE=number_of_particles GHOSTSIZE=0 DISTRIB=DEFAULT tags='checkpoint="no"' +{ + particle_vx + particle_vy + particle_vz + particle_alp + particle_betax + particle_betay + particle_betaz +} "Temporaries to hold interpolated values for particle tracking" + +# For measuring separations + +CCTK_REAL whisky_maxima_location TYPE=SCALAR tags='checkpoint="no"' +{ + maxima_i + maxima_j + maxima_k +} "The location (point index) of the maximum value of rho" + +CCTK_INT whisky_maxima_iteration TYPE=SCALAR "Iteration on which maximum was last set" + +CCTK_REAL whisky_maxima_separation TYPE=SCALAR tags='checkpoint="no"' +{ + whisky_separation + whisky_proper_separation +} "The distance between the centres (locations of maximum density) of a binary NS" + +CCTK_REAL DiffRho TYPE=GF tags='Prolongation="None" checkpoint="no"' "The first difference in rho" + +# For the new EOS interface a couple of temporaries are required + +CCTK_REAL EOS_temps TYPE=GF tags='Prolongation="None" checkpoint="no"' +{ + eos_cs2_p, eos_cs2_m + eos_dpdeps_p, eos_dpdeps_m +} "Temporaries for the EOS calls" + +CCTK_REAL RoeAverage_temps TYPE=GF tags='Prolongation="None" checkpoint="no"' +{ + rho_ave, velx_ave, vely_ave, velz_ave, eps_ave, press_ave + eos_cs2_ave, eos_dpdeps_ave +} "Temporaries for the Roe solver" + +CCTK_REAL Metric_temps TYPE=GF tags='Prolongation="None" checkpoint="no"' +{ + Whisky_det + Whisky_uxx,Whisky_uxy,Whisky_uxz,Whisky_uyy,Whisky_uyz,Whisky_uzz +} "Temporaries for the determinant of the 3-metric and the inverse metric" + +CCTK_REAL Con2Prim_temps TYPE=GF tags='Prolongation="None" checkpoint="no"' +{ + press_old, press_new + eos_dpdeps_temp, eos_dpdrho_temp +} "Temporaries for the conservative to primitive conversion" + |