GVDNXZ5F2YHS3N2BQUMOAUMJVWIVETALDA24HCGYL5CVAJWSFF5QC
SFPX6AKCTONO4CGFC5HPDIZHSCVJMV23PIIULC3TKRFLEZI2FVGQC
DNSXJFJKNEMA4ZFID4NDMIYFZ2M5NOKNYUO4V642BHI4DJKOSH7AC
CCVN7PV3OLKVLSZQRO2MQHP3VUC5R4G22QQPEZ3VBZMMCS7OB3EQC
XFLAXC6NZLEO2YH34GCKBU5E5RSQPK3JI36SV42DOERSFVJ3CPLAC
VTDUSVEON4HPCZBSLNN4XUWV5WCDV7WFLXTQ336ADWT6S6MOZE3QC
H6GIS2UO4G25J7MFBEEC5TV4LVM66TRPJFHXXVXAMJTZIDVAWA7QC
" SYNC: BaikalX::evol_variables\n",
" WRITES: BaikalX::evol_variables(interior)\n",
" WRITES: aDD00GF(everywhere) aDD01GF(everywhere) aDD02GF(everywhere) aDD11GF(everywhere) aDD12GF(everywhere) aDD22GF(everywhere) \n",
" WRITES: alphaGF(everywhere) betU0GF(everywhere) betU1GF(everywhere) betU2GF(everywhere) cfGF(everywhere)\n",
" WRITES: hDD00GF(everywhere) hDD01GF(everywhere) hDD02GF(everywhere) hDD11GF(everywhere) hDD12GF(everywhere) hDD22GF(everywhere)\n",
" WRITES: trKGF(everywhere) vetU0GF(everywhere) vetU1GF(everywhere) vetU2GF(everywhere)\n",
"\n",
"schedule BaikalX_ADM_to_BSSN_lambdaU at CCTK_INITIAL after ADMBase_PostInitial after BaikalX_ADM_to_BSSN_all_but_lambdaU\n",
"{\n",
" LANG: C\n",
" SYNC: BaikalX::evol_variables\n",
" WRITES: lambdaU0GF(interior) lambdaU1GF(interior) lambdaU2GF(interior)\n",
" READS: hDD00GF(everywhere) hDD01GF(everywhere) hDD02GF(everywhere) hDD11GF(everywhere) hDD12GF(everywhere) hDD22GF(everywhere)\n",
"} \"Convert initial data into BSSN variables\"\n",
"\n",
" WRITES: ADMBase::metric(interior)\n",
" WRITES: ADMBase::curv(interior)\n",
" WRITES: ADMBASE::shift(interior)\n",
" WRITES: ADMBASE::lapse(interior)\n",
" WRITES: ADMBase::dtshift(interior)\n",
" WRITES: ADMBase::dtlapse(interior)\n",
" WRITES: ADMBase::metric(everywhere)\n",
" WRITES: ADMBase::curv(everywhere)\n",
" WRITES: ADMBASE::shift(everywhere)\n",
" WRITES: ADMBASE::lapse(everywhere)\n",
" WRITES: BaikalX::evol_variables(everywhere)\n",
" READS: ADMBase::metric(everywhere)\n",
" READS: ADMBase::curv(everywhere)\n",
" READS: ADMBASE::shift(everywhere)\n",
" READS: ADMBASE::lapse(everywhere)\n",
" READS: ADMBASE::dtlapse(everywhere)\n",
" # these run everywhere so thy cannot set dtshift since vet and beta differ by an advection term\n",
" READS: BaikalX::evol_variables(everywhere)\n",
" WRITES: ADMBase::metric(everywhere)\n",
" WRITES: ADMBase::curv(everywhere)\n",
" WRITES: ADMBASE::shift(everywhere)\n",
" WRITES: ADMBASE::dtshift(everywhere)\n",
" WRITES: ADMBASE::lapse(everywhere)\n",
"\"\"\")\n",
"# \"\"\" // make copies of ADMBase variables where we expect them\"\"\" \n",
"# copy_admbase_vars = []\n",
"# copy_admbase_vars.append(\"alphaSphorCartGF[CCTK_GFINDEX3D(cctkGH,i0,i1,i2)] = alp[CCTK_GFINDEX3D(cctkGH,i0,i1,i2)];\\n\")\n",
"# # It's ugly if we output code in the following ordering, so we'll first\n",
"# # output to a string and then sort the string to beautify the code a bit.\n",
"# for i in range(DIM):\n",
"# copy_admbase_vars.append(\"betaSphorCartU\"+str(i)+\"GF[CCTK_GFINDEX3D(cctkGH,i0,i1,i2)] = beta\"+chr(ord('x')+i)+\"[CCTK_GFINDEX3D(cctkGH,i0,i1,i2)];\\n\")\n",
"# copy_admbase_vars.append(\"BSphorCartU\"+str(i)+\"GF[CCTK_GFINDEX3D(cctkGH,i0,i1,i2)] = dtbeta\"+chr(ord('x')+i)+\"[CCTK_GFINDEX3D(cctkGH,i0,i1,i2)];\\n\")\n",
"# for j in range(i,DIM):\n",
"# copy_admbase_vars.append(\"gammaSphorCartDD\"+str(i)+str(j)+\"GF[CCTK_GFINDEX3D(cctkGH,i0,i1,i2)] = g\"+chr(ord('x')+i)+chr(ord('x')+j)+\"[CCTK_GFINDEX3D(cctkGH,i0,i1,i2)];\\n\")\n",
"# copy_admbase_vars.append(\"KSphorCartDD\"+str(i)+str(j)+\"GF[CCTK_GFINDEX3D(cctkGH,i0,i1,i2)] = k\"+chr(ord('x')+i)+chr(ord('x')+j)+\"[CCTK_GFINDEX3D(cctkGH,i0,i1,i2)];\\n\")\n",
"# copy_admbase_vars.sort()\n",
"# file.write(lp.loop([\"i2\",\"i1\",\"i0\"],[\"0\", \"0\", \"0\"],\n",
"# [\"cctk_lsh[2]\",\"cctk_lsh[1]\",\"cctk_lsh[0]\"],\n",
"# [\"1\",\"1\",\"1\"],\n",
"# [\"#pragma omp parallel for\",\"\",\"\",],\"\",\"\".join(copy_admbase_vars)))\n",
"\n",
" file.write(\"\"\"\n",
" \n",
" file.write(\"\"\"\n",
"}\n",
"\"\"\")\n",
" file.write(\"\"\"\n",
"void BaikalX_ADM_to_BSSN_lambdaU(CCTK_ARGUMENTS) {\n",
" DECLARE_CCTK_ARGUMENTS_BaikalX_ADM_to_BSSN_lambdaU;\n",
" DECLARE_CCTK_PARAMETERS;\n",
" \n",
"\n",
"\"\"\")\n",
" adm_to_bssn_gfs = []\n",
" for i in range(DIM):\n",
" adm_to_bssn_gfs.append(\"lambdaU\"+str(i)+\"GF\")\n",
" for j in range(i,DIM):\n",
" adm_to_bssn_gfs.append(\"hDD\"+str(i)+str(j)+\"GF\")\n",
" for gf in adm_to_bssn_gfs:\n",
" file.write(\"Loop::GF3D<CCTK_REAL,0,0,0> \"+gf+\"_(cctkGH,\"+gf+\");\\n\")\n",
" file.write(\"\\n\")\n",