/*@@ @file bnoamr_Init.C @date 02/09/99 @author Manish Parashar @desc @enddesc @@*/ #define f_boundary FORTRAN_NAME(updatebndry3_, UPDATEBNDRY3, updatebndry3) #define f_average FORTRAN_NAME(average3_, AVERAGE3, average3) #define f_pythnorm FORTRAN_NAME(pythnorm3_, PYTHNORM3, pythnorm3) #define f_smooth FORTRAN_NAME(smooth3_, SMOOTH3, smooth3) #include "cctk.h" #include "cctk_Flesh.h" #include "cctk_Groups.h" #include "rfrConstants.h" #include "GrACE_extension.h" #include "GrACEDefs.h" void grace_FillcGH(cGH* cgh, const int iteration, const int l, const int c, const int ident); extern "C" int CCTK_rfrTraverse(cGH *GH, int rfrpoint); int BnoAMR_Initialize(cGH *cgh) { GrACEGH* ggh = (GrACEGH*) cgh->extensions[GrACE_GHExtension]; GridHierarchy& GH = *ggh->theGH; GridFunction(3) &tempGF = *((GridFunction(3) *)ggh->tempGF); INTEGER l = 0; INTEGER t = CurrentTime(GH,l,DAGH_Main); INTEGER idt = TimeStep(GH,l,DAGH_Main); INTEGER iteration = 0; // Load in initial data // { //const int name2(tempGF,_T) = (tempGF).dagh_timeindex(t,l); //const int name2(tempGF,_CU) = (tempGF).len(); //for (int c = 0; c < name2(tempGF,_CU); c++) { // if(!(tempGF).exists(t,l,c)) ; else { forall(tempGF, t, l, c) { // First Setup cGH grace_FillcGH(cgh, iteration, l, c, DAGH_Main); // Now tell CCTK to call f_initial_data CCTK_rfrTraverse(cgh, CCTK_PARAMCHECK); CCTK_rfrTraverse(cgh, CCTK_BASEGRID); CCTK_rfrTraverse(cgh, CCTK_INITIAL); } end_forall; // Now do it all on the shadow l = 0; t = CurrentTime(GH,l,DAGH_Shadow); idt = TimeStep(GH,l,DAGH_Shadow); // Load in initial data forall(tempGF, t, l, c) { // First Setup cGH grace_FillcGH(cgh, iteration, l, c, DAGH_Shadow); // Now tell CCTK to call f_initial_data CCTK_rfrTraverse(cgh, CCTK_PARAMCHECK); CCTK_rfrTraverse(cgh, CCTK_BASEGRID); CCTK_rfrTraverse(cgh, CCTK_INITIAL0); } end_forall; #if 0 /* Loops like this should go eventually... */ for (int Rstep = CCTK_INITIAL; Rstep <= CCTK_INITIAL9; Rstep++) { CCTK_rfrTraverse(cgh,Rstep); } #endif return 0; }