20 BL_PROFILE(
"Integrator::Integrator()");
31 pp_query(
"restart", restart_file_cell);
32 pp_query(
"restart_cell", restart_file_cell);
33 pp_query(
"restart_node", restart_file_node);
44 std::vector<std::string> ignore;
47 for (
unsigned int i = 0; i < ignore.size(); i++)
50 pp.remove(ignore[i].c_str());
80 nsubsteps.resize(maxLevel() + 1, 1);
81 int cnt = pp.countval(
"nsubsteps");
83 if (cnt == maxLevel()) {
85 nsubsteps.insert(nsubsteps.begin(), 1);
92 for (
int lev = 1; lev <= maxLevel(); ++lev) nsubsteps[lev] = nsubsteps_all;
95 Util::Abort(
INFO,
"number of nsubsteps input must equal either 1 or amr.max_level");
97 for (
int lev = 1; lev <= maxLevel(); ++lev)
98 nsubsteps[lev] = MaxRefRatio(lev - 1);
104 if (dynamictimestep.on)
138 for (
int ilev = 0; ilev < maxLevel(); ++ilev)
140 std::string strlo =
"lo" + std::to_string(ilev + 1);
141 std::string strhi =
"hi" + std::to_string(ilev + 1);
146 amrex::Vector<int> lodata, hidata;
149 amrex::IntVect lo(AMREX_D_DECL(lodata[0], lodata[1], lodata[2]));
150 amrex::IntVect hi(AMREX_D_DECL(hidata[0], hidata[1], hidata[2]));
152 explicitmesh.box.push_back(amrex::Box(lo, hi));
157 int nlevs_max = maxLevel() + 1;
159 istep.resize(nlevs_max, 0);
161 t_new.resize(nlevs_max, 0.0);
162 t_old.resize(nlevs_max, -1.e100);
163 SetTimestep(timestep);
212 BL_PROFILE(
"Integrator::MakeNewLevelFromCoarse");
214 for (
int n = 0; n < cell.number_of_fabs; n++)
216 const int ncomp = (*cell.fab_array[n])[lev - 1]->nComp();
217 const int nghost = (*cell.fab_array[n])[lev - 1]->nGrow();
219 (*cell.fab_array[n])[lev].reset(
new amrex::MultiFab(cgrids, dm, ncomp, nghost));
221 (*cell.fab_array[n])[lev]->setVal(0.0);
223 FillCoarsePatch(lev, time, *cell.fab_array[n], *cell.physbc_array[n], 0, ncomp);
226 amrex::BoxArray ngrids = cgrids;
227 ngrids.convert(amrex::IntVect::TheNodeVector());
229 for (
int n = 0; n < node.number_of_fabs; n++)
231 const int ncomp = (*node.fab_array[n])[lev - 1]->nComp();
232 const int nghost = (*node.fab_array[n])[lev - 1]->nGrow();
234 (*node.fab_array[n])[lev].reset(
new amrex::MultiFab(ngrids, dm, ncomp, nghost));
235 (*node.fab_array[n])[lev]->setVal(0.0);
237 FillCoarsePatch(lev, time, *node.fab_array[n], *node.physbc_array[n], 0, ncomp);
240 for (
unsigned int n = 0; n < m_basefields.size(); n++)
242 m_basefields[n]->MakeNewLevelFromCoarse(lev, time, cgrids, dm);
244 for (
unsigned int n = 0; n < m_basefields_cell.size(); n++)
246 m_basefields_cell[n]->MakeNewLevelFromCoarse(lev, time, cgrids, dm);
261 const amrex::BoxArray &cgrids,
262 const amrex::DistributionMapping &dm
265 BL_PROFILE(
"Integrator::RemakeLevel");
266 for (
int n = 0; n < cell.number_of_fabs; n++)
268 const int ncomp = (*cell.fab_array[n])[lev]->nComp();
269 const int nghost = (*cell.fab_array[n])[lev]->nGrow();
271 amrex::MultiFab new_state(cgrids, dm, ncomp, nghost);
273 new_state.setVal(0.0);
274 FillPatch(lev, time, *cell.fab_array[n], new_state, *cell.physbc_array[n], 0);
275 std::swap(new_state, *(*cell.fab_array[n])[lev]);
278 amrex::BoxArray ngrids = cgrids;
279 ngrids.convert(amrex::IntVect::TheNodeVector());
281 for (
int n = 0; n < node.number_of_fabs; n++)
283 const int ncomp = (*node.fab_array[n])[lev]->nComp();
284 const int nghost = (*node.fab_array[n])[lev]->nGrow();
286 amrex::MultiFab new_state(ngrids, dm, ncomp, nghost);
288 new_state.setVal(0.0);
289 FillPatch(lev, time, *node.fab_array[n], new_state, *node.physbc_array[n], 0);
290 std::swap(new_state, *(*node.fab_array[n])[lev]);
293 for (
unsigned int n = 0; n < m_basefields_cell.size(); n++)
295 m_basefields_cell[n]->RemakeLevel(lev, time, cgrids, dm);
297 for (
unsigned int n = 0; n < m_basefields.size(); n++)
299 m_basefields[n]->RemakeLevel(lev, time, cgrids, dm);
520 BL_PROFILE(
"Integrator::Restart");
522 if (a_nodal && node.fab_array.size() == 0)
527 if (!a_nodal && cell.fab_array.size() == 0)
533 std::string filename = dirname +
"/Header";
534 std::string chkptfilename = dirname +
"/Checkpoint";
535 amrex::VisMF::IO_Buffer io_buffer(amrex::VisMF::GetIOBufferSize());
536 amrex::Vector<char> fileCharPtr, chkptfileCharPtr;
537 amrex::ParallelDescriptor::ReadAndBcastFile(filename, fileCharPtr);
538 amrex::ParallelDescriptor::ReadAndBcastFile(chkptfilename, chkptfileCharPtr);
539 std::string fileCharPtrString(fileCharPtr.dataPtr());
540 std::string chkptfileCharPtrString(chkptfileCharPtr.dataPtr());
541 std::istringstream is(fileCharPtrString, std::istringstream::in);
542 std::istringstream chkpt_is(chkptfileCharPtrString, std::istringstream::in);
544 std::string line, word;
547 std::getline(is, line);
552 std::getline(is, line); tmp_numfabs = std::stoi(line);
554 std::vector<std::string> tmp_name_array;
556 for (
int i = 0; i < tmp_numfabs; i++)
558 std::getline(is, line);
559 tmp_name_array.push_back(line);
563 std::getline(is, line);
568 std::getline(is, line); tmp_time = std::stof(line);
Util::Message(
INFO,
"Current time: ", tmp_time);
569 for (
int i = 0; i < max_level + 1; i++)
571 t_new[i] = tmp_time; t_old[i] = tmp_time;
576 std::getline(is, line); tmp_max_level = std::stoi(line);
Util::Message(
INFO,
"Max AMR level: ", line);
577 if (tmp_max_level != max_level)
578 Util::Abort(
INFO,
"The max level specified (", max_level,
") does not match the max level in the restart file (", tmp_max_level,
")");
579 finest_level = tmp_max_level;
591 std::getline(is, line);
593 if (tmp_iters.size() != (
unsigned int)(max_level + 1))
Util::Abort(
INFO,
"Error reading in interation counts: line = ", line);
594 for (
int lev = 0; lev <= max_level; lev++) { istep[lev] = std::stoi(tmp_iters[lev]);
Util::Message(
INFO,
"Iter on level ", lev,
" = ", istep[lev]); }
596 amrex::Vector<amrex::MultiFab> tmpdata(tmp_max_level + 1);
599 if (a_nodal)
for (
unsigned int i = 0; i < node.fab_array.size(); i++) total_ncomp += node.ncomp_array[i];
600 else for (
unsigned int i = 0; i < cell.fab_array.size(); i++) total_ncomp += cell.ncomp_array[i];
602 int total_nghost = a_nodal ? 0 : cell.nghost_array[0];
604 for (
int lev = 0; lev <= max_level; lev++)
606 amrex::BoxArray tmp_ba;
607 tmp_ba.readFrom(chkpt_is);
608 SetBoxArray(lev, tmp_ba);
609 amrex::DistributionMapping tmp_dm(tmp_ba, amrex::ParallelDescriptor::NProcs());
610 SetDistributionMap(lev, tmp_dm);
614 amrex::BoxArray ngrids = grids[lev];
615 ngrids.convert(amrex::IntVect::TheNodeVector());
616 tmpdata[lev].define(ngrids, dmap[lev], total_ncomp, total_nghost);
620 tmpdata[lev].define(grids[lev], dmap[lev], total_ncomp, total_nghost);
622 amrex::VisMF::Read(tmpdata[lev],
623 amrex::MultiFabFileFullPrefix(lev, dirname,
"Level_",
"Cell"));
627 for (
int i = 0; i < node.number_of_fabs; i++)
629 amrex::BoxArray ngrids = grids[lev];
630 ngrids.convert(amrex::IntVect::TheNodeVector());
631 (*node.fab_array[i])[lev].reset(
new amrex::MultiFab(ngrids, dmap[lev], node.ncomp_array[i], node.nghost_array[i]));
632 (*node.fab_array[i])[lev]->setVal(0.);
635 for (
int i = 0; i < cell.number_of_fabs; i++)
636 (*cell.fab_array[i])[lev].reset(
new amrex::MultiFab(grids[lev], dmap[lev], cell.ncomp_array[i], cell.nghost_array[i]));
637 for (
int i = 0; i < tmp_numfabs; i++)
642 for (
int j = 0; j < node.number_of_fabs; j++)
644 if (tmp_name_array[i] == node.name_array[i][j])
647 Util::Message(
INFO,
"Initializing ", node.name_array[i][j],
"; nghost=", node.nghost_array[j],
" with ", tmp_name_array[i]);
648 amrex::MultiFab::Copy(*((*node.fab_array[j])[lev]).get(), tmpdata[lev], i, 0, 1, total_nghost);
650 for (
int k = 0; k < node.ncomp_array[j]; k++)
652 if (tmp_name_array[i] == node.name_array[j][k])
655 Util::Message(
INFO,
"Initializing ", node.name_array[j][k],
"; ncomp=", node.ncomp_array[j],
"; nghost=", node.nghost_array[j],
" with ", tmp_name_array[i]);
656 amrex::MultiFab::Copy(*((*node.fab_array[j])[lev]).get(), tmpdata[lev], i, k, 1, total_nghost);
664 for (
int j = 0; j < cell.number_of_fabs; j++)
665 for (
int k = 0; k < cell.ncomp_array[j]; k++)
667 if (tmp_name_array[i] == cell.name_array[j][k])
670 Util::Message(
INFO,
"Initializing ", cell.name_array[j][k],
"; ncomp=", cell.ncomp_array[j],
"; nghost=", cell.nghost_array[j],
" with ", tmp_name_array[i]);
671 amrex::MultiFab::Copy(*((*cell.fab_array[j])[lev]).get(), tmpdata[lev], i, k, 1, cell.nghost_array[j]);
675 if (!match)
Util::Warning(
INFO,
"Fab ", tmp_name_array[i],
" is in the restart file, but there is no fab with that name here.");
678 for (
unsigned int n = 0; n < m_basefields_cell.size(); n++)
680 m_basefields_cell[n]->MakeNewLevelFromScratch(lev, t_new[lev], grids[lev], dmap[lev]);
682 for (
unsigned int n = 0; n < m_basefields.size(); n++)
684 m_basefields[n]->MakeNewLevelFromScratch(lev, t_new[lev], grids[lev], dmap[lev]);
688 SetFinestLevel(max_level);
775 BL_PROFILE(
"Integrator::WritePlotFile");
776 int nlevels = finest_level + 1;
777 if (max_plot_level >= 0) nlevels = std::min(nlevels, max_plot_level);
779 int ccomponents = 0, ncomponents = 0, bfcomponents_cell = 0, bfcomponents = 0;
780 amrex::Vector<std::string> cnames, nnames, bfnames_cell, bfnames;
781 for (
int i = 0; i < cell.number_of_fabs; i++)
783 if (!cell.writeout_array[i])
continue;
784 ccomponents += cell.ncomp_array[i];
785 if (cell.ncomp_array[i] > 1)
786 for (
int j = 0; j < cell.ncomp_array[i]; j++)
787 cnames.push_back(cell.name_array[i][j]);
789 cnames.push_back(cell.name_array[i][0]);
791 for (
int i = 0; i < node.number_of_fabs; i++)
793 if (!node.writeout_array[i])
continue;
794 ncomponents += node.ncomp_array[i];
795 if (node.ncomp_array[i] > 1)
796 for (
int j = 0; j < node.ncomp_array[i]; j++)
797 nnames.push_back(node.name_array[i][j]);
799 nnames.push_back(node.name_array[i][0]);
801 for (
unsigned int i = 0; i < m_basefields_cell.size(); i++)
803 if (m_basefields_cell[i]->writeout)
805 bfcomponents_cell += m_basefields_cell[i]->NComp();
806 for (
int j = 0; j < m_basefields_cell[i]->NComp(); j++)
807 bfnames_cell.push_back(m_basefields_cell[i]->Name(j));
810 for (
unsigned int i = 0; i < m_basefields.size(); i++)
812 if (m_basefields[i]->writeout)
814 bfcomponents += m_basefields[i]->NComp();
815 for (
int j = 0; j < m_basefields[i]->NComp(); j++)
816 bfnames.push_back(m_basefields[i]->Name(j));
820 amrex::Vector<amrex::MultiFab> cplotmf(nlevels), nplotmf(nlevels);
822 bool do_cell_plotfile = (ccomponents + bfcomponents_cell > 0 || (ncomponents + bfcomponents > 0 && cell.all)) && cell.any;
823 bool do_node_plotfile = (ncomponents + bfcomponents > 0 || (ccomponents + bfcomponents_cell > 0 && node.all)) && node.any;
825 for (
int ilev = 0; ilev < nlevels; ++ilev)
827 if (do_cell_plotfile)
829 int ncomp = ccomponents + bfcomponents_cell;
830 if (cell.all) ncomp += ncomponents + bfcomponents;
831 cplotmf[ilev].define(grids[ilev], dmap[ilev], ncomp, 0);
835 for (
int i = 0; i < cell.number_of_fabs; i++)
837 if (!cell.writeout_array[i])
continue;
838 if ((*cell.fab_array[i])[ilev]->contains_nan())
840 if (abort_on_nan)
Util::Abort(
INFO, cnames[cnames_cnt],
" contains nan (i=", i,
")");
843 if ((*cell.fab_array[i])[ilev]->contains_inf())
845 if (abort_on_nan)
Util::Abort(
INFO, cnames[cnames_cnt],
" contains inf (i=", i,
")");
849 amrex::MultiFab::Copy(cplotmf[ilev], *(*cell.fab_array[i])[ilev], 0, n, cell.ncomp_array[i], 0);
850 n += cell.ncomp_array[i];
852 for (
unsigned int i = 0; i < m_basefields_cell.size(); i++)
854 if (m_basefields_cell[i]->writeout)
856 m_basefields_cell[i]->Copy(ilev, cplotmf[ilev], n, 0);
857 n += m_basefields_cell[i]->NComp();
864 for (
int i = 0; i < node.number_of_fabs; i++)
866 if (!node.writeout_array[i])
continue;
867 if ((*node.fab_array[i])[ilev]->contains_nan())
869 if (abort_on_nan)
Util::Abort(
INFO, nnames[nnames_cnt],
" contains nan (i=", i,
")");
872 if ((*node.fab_array[i])[ilev]->contains_inf())
874 if (abort_on_nan)
Util::Abort(
INFO, nnames[nnames_cnt],
" contains inf (i=", i,
")");
878 amrex::average_node_to_cellcenter(cplotmf[ilev], n, *(*node.fab_array[i])[ilev], 0, node.ncomp_array[i], 0);
879 n += node.ncomp_array[i];
881 if (bfcomponents > 0)
883 amrex::BoxArray ngrids = grids[ilev];
884 ngrids.convert(amrex::IntVect::TheNodeVector());
885 amrex::MultiFab bfplotmf(ngrids, dmap[ilev], bfcomponents, 0);
887 for (
unsigned int i = 0; i < m_basefields.size(); i++)
889 if (m_basefields[i]->writeout)
891 m_basefields[i]->Copy(ilev, bfplotmf, ctr, 0);
892 ctr += m_basefields[i]->NComp();
895 amrex::average_node_to_cellcenter(cplotmf[ilev], n, bfplotmf, 0, bfcomponents);
901 if (do_node_plotfile)
903 amrex::BoxArray ngrids = grids[ilev];
904 ngrids.convert(amrex::IntVect::TheNodeVector());
905 int ncomp = ncomponents + bfcomponents;
906 if (node.all) ncomp += ccomponents + bfcomponents_cell;
907 nplotmf[ilev].define(ngrids, dmap[ilev], ncomp, 0);
910 for (
int i = 0; i < node.number_of_fabs; i++)
912 if (!node.writeout_array[i])
continue;
913 if ((*node.fab_array[i])[ilev]->contains_nan())
Util::Warning(
INFO, nnames[i],
" contains nan (i=", i,
"). Resetting to zero.");
914 if ((*node.fab_array[i])[ilev]->contains_inf())
Util::Abort(
INFO, nnames[i],
" contains inf (i=", i,
")");
915 amrex::MultiFab::Copy(nplotmf[ilev], *(*node.fab_array[i])[ilev], 0, n, node.ncomp_array[i], 0);
916 n += node.ncomp_array[i];
918 for (
unsigned int i = 0; i < m_basefields.size(); i++)
920 if (m_basefields[i]->writeout)
922 m_basefields[i]->Copy(ilev, nplotmf[ilev], n, 0);
923 n += m_basefields[i]->NComp();
929 for (
int i = 0; i < cell.number_of_fabs; i++)
931 if (!cell.writeout_array[i])
continue;
932 if ((*cell.fab_array[i])[ilev]->contains_nan())
Util::Warning(
INFO, cnames[i],
" contains nan (i=", i,
"). Resetting to zero.");
933 if ((*cell.fab_array[i])[ilev]->contains_inf())
Util::Abort(
INFO, cnames[i],
" contains inf (i=", i,
")");
934 if ((*cell.fab_array[i])[ilev]->nGrow() == 0)
936 if (initial)
Util::Warning(
INFO, cnames[i],
" has no ghost cells and will not be included in nodal output");
940 n += cell.ncomp_array[i];
943 if (bfcomponents_cell > 0)
945 amrex::BoxArray cgrids = grids[ilev];
946 amrex::MultiFab bfplotmf(cgrids, dmap[ilev], bfcomponents_cell, 0);
948 for (
unsigned int i = 0; i < m_basefields_cell.size(); i++)
950 if (m_basefields_cell[i]->writeout)
952 m_basefields_cell[i]->Copy(ilev, bfplotmf, ctr, 0);
953 ctr += m_basefields_cell[i]->NComp();
957 n += bfcomponents_cell;
963 std::vector<std::string> plotfilename = PlotFileName(istep[0], prefix);
964 if (initial) plotfilename[1] = plotfilename[1] +
"init";
966 if (do_cell_plotfile)
968 amrex::Vector<std::string> allnames = cnames;
969 allnames.insert(allnames.end(), bfnames_cell.begin(), bfnames_cell.end());
971 allnames.insert(allnames.end(), nnames.begin(), nnames.end());
972 allnames.insert(allnames.end(), bfnames.begin(), bfnames.end());
974 WriteMultiLevelPlotfile(plotfilename[0] + plotfilename[1] +
"cell", nlevels, amrex::GetVecOfConstPtrs(cplotmf), allnames,
975 Geom(), time, iter, refRatio());
977 std::ofstream chkptfile;
978 chkptfile.open(plotfilename[0] + plotfilename[1] +
"cell/Checkpoint");
979 for (
int i = 0; i <= max_level; i++) boxArray(i).writeOn(chkptfile);
983 if (do_node_plotfile)
985 amrex::Vector<std::string> allnames = nnames;
986 allnames.insert(allnames.end(), bfnames.begin(), bfnames.end());
987 if (node.all) allnames.insert(allnames.end(), cnames.begin(), cnames.end());
988 WriteMultiLevelPlotfile(plotfilename[0] + plotfilename[1] +
"node", nlevels, amrex::GetVecOfConstPtrs(nplotmf), allnames,
989 Geom(), time, iter, refRatio());
991 std::ofstream chkptfile;
992 chkptfile.open(plotfilename[0] + plotfilename[1] +
"node/Checkpoint");
993 for (
int i = 0; i <= max_level; i++) boxArray(i).writeOn(chkptfile);
997 if (amrex::ParallelDescriptor::IOProcessor())
999 std::ofstream coutfile, noutfile;
1002 if (do_cell_plotfile) coutfile.open(plot_file +
"/celloutput.visit", std::ios_base::out);
1003 if (do_node_plotfile) noutfile.open(plot_file +
"/nodeoutput.visit", std::ios_base::out);
1007 if (do_cell_plotfile) coutfile.open(plot_file +
"/celloutput.visit", std::ios_base::app);
1008 if (do_node_plotfile) noutfile.open(plot_file +
"/nodeoutput.visit", std::ios_base::app);
1010 if (do_cell_plotfile) coutfile << plotfilename[1] +
"cell" +
"/Header" << std::endl;
1011 if (do_node_plotfile) noutfile << plotfilename[1] +
"node" +
"/Header" << std::endl;
1069 BL_PROFILE(
"Integrator::IntegrateVariables");
1070 if (!thermo.number)
return;
1072 if ((thermo.interval > 0 && (step) % thermo.interval == 0) ||
1073 ((thermo.dt > 0.0) && (std::fabs(std::remainder(time, plot_dt)) < 0.5 * dt[0])))
1076 for (
int i = 0; i < thermo.number; i++)
1078 if (thermo.extensives[i]) *thermo.vars[i] = 0;
1082 for (
int ilev = 0; ilev < max_level; ilev++)
1084 const amrex::BoxArray& cfba = amrex::coarsen(grids[ilev + 1], refRatio(ilev));
1089 for (amrex::MFIter mfi(grids[ilev], dmap[ilev],
true); mfi.isValid(); ++mfi)
1091 const amrex::Box& box = mfi.tilebox();
1092 const amrex::BoxArray& comp = amrex::complementIn(box, cfba);
1094 for (
int i = 0; i < comp.size(); i++)
1096 Integrate(ilev, time, step,
1106 for (amrex::MFIter mfi(grids[max_level], dmap[max_level],
true); mfi.isValid(); ++mfi)
1108 const amrex::Box& box = mfi.tilebox();
1109 Integrate(max_level, time, step, mfi, box);
1114 for (
int i = 0; i < thermo.number; i++)
1116 if (thermo.extensives[i])
1117 amrex::ParallelDescriptor::ReduceRealSum(*thermo.vars[i]);
1120 if (amrex::ParallelDescriptor::IOProcessor() &&
1122 (thermo.plot_int > 0 && step % thermo.plot_int == 0) ||
1123 (thermo.plot_dt > 0.0 && std::fabs(std::remainder(time, thermo.plot_dt)) < 0.5 * dt[0])
1126 std::ofstream outfile;
1129 outfile.open(plot_file +
"/thermo.dat", std::ios_base::out);
1131 for (
int i = 0; i < thermo.number; i++)
1132 outfile <<
"\t" << thermo.names[i];
1133 outfile << std::endl;
1135 else outfile.open(plot_file +
"/thermo.dat", std::ios_base::app);
1137 for (
int i = 0; i < thermo.number; i++)
1138 outfile <<
"\t" << *thermo.vars[i];
1139 outfile << std::endl;
1149 BL_PROFILE(
"Integrator::TimeStep");
1150 if (base_regrid_int <= 0 || istep[0] % base_regrid_int == 0)
1152 if (regrid_int > 0 || base_regrid_int > 0)
1154 static amrex::Vector<int> last_regrid_step(max_level + 1, 0);
1157 if (lev < max_level && istep[lev] > last_regrid_step[lev])
1159 if (istep[lev] % regrid_int == 0)
1161 regrid(lev, time,
false);
1166 SetFinestLevel(finest_level);
1168 if (Verbose() && amrex::ParallelDescriptor::IOProcessor()) {
1169 std::cout <<
"[Level " << lev
1170 <<
" step " << istep[lev] + 1 <<
"] ";
1171 std::cout <<
"ADVANCE with dt = "
1176 for (
int n = 0; n < cell.number_of_fabs; n++)
1177 if (cell.evolving_array[n]) FillPatch(lev, time, *cell.fab_array[n], *(*cell.fab_array[n])[lev], *cell.physbc_array[n], 0);
1178 for (
int n = 0; n < node.number_of_fabs; n++)
1179 if (node.evolving_array[n]) FillPatch(lev, time, *node.fab_array[n], *(*node.fab_array[n])[lev], *node.physbc_array[n], 0);
1180 for (
unsigned int n = 0; n < m_basefields_cell.size(); n++)
1181 if (m_basefields_cell[n]->evolving) m_basefields_cell[n]->FillPatch(lev, time);
1182 for (
unsigned int n = 0; n < m_basefields.size(); n++)
1183 if (m_basefields[n]->evolving) m_basefields[n]->FillPatch(lev, time);
1185 Advance(lev, time, dt[lev]);
1188 if (Verbose() && amrex::ParallelDescriptor::IOProcessor())
1190 std::cout <<
"[Level " << lev
1191 <<
" step " << istep[lev] <<
"] ";
1192 std::cout <<
"Advanced "
1198 if (lev < finest_level)
1200 for (
int i = 1; i <= nsubsteps[lev + 1]; ++i)
1201 TimeStep(lev + 1, time + (i - 1) * dt[lev + 1], i);
1203 for (
int n = 0; n < cell.number_of_fabs; n++)
1205 amrex::average_down(*(*cell.fab_array[n])[lev + 1], *(*cell.fab_array[n])[lev],
1206 geom[lev + 1], geom[lev],
1207 0, (*cell.fab_array[n])[lev]->nComp(), refRatio(lev));
1209 for (
int n = 0; n < node.number_of_fabs; n++)
1211 amrex::average_down(*(*node.fab_array[n])[lev + 1], *(*node.fab_array[n])[lev],
1212 0, (*node.fab_array[n])[lev]->nComp(), refRatio(lev));
1214 for (
unsigned int n = 0; n < m_basefields_cell.size(); n++)
1216 if (m_basefields_cell[n]->evolving)
1217 m_basefields_cell[n]->AverageDown(lev, refRatio(lev));
1219 for (
unsigned int n = 0; n < m_basefields.size(); n++)
1221 if (m_basefields[n]->evolving)
1222 m_basefields[n]->AverageDown(lev, refRatio(lev));