void onestep( struct domain * theDomain , double RK , double dt , int first_step , int last_step ){ adjust_RK_cons( theDomain , RK ); radial_flux( theDomain , dt ); add_source( theDomain , dt ); if( first_step ) move_cells( theDomain , RK , dt ); calc_dr( theDomain ); calc_prim( theDomain ); if( last_step ){ AMR( theDomain ); } boundary( theDomain ); exchangeData( theDomain ); }
void substep(struct grid *g, double rkfac1, double rkfac2, double dt, struct parList *pars) { //Calculate gradients of grid quantities calc_grad(g, pars); //Solve Riemann problems. add_fluxes(g, dt, pars); //Add Sources. add_sources(g, dt, pars); //Update prims. calc_prim(g, pars); //Boundary Conditions. bc_1L(g, pars); bc_1R(g, pars); bc_2L(g, pars); bc_2R(g, pars); //Re-update cons. calc_cons(g, pars); }