26 BL_PROFILE(
"Integrator::Integrator()");
44 pp.
query_default(
"amr.base_regrid_int", value.base_regrid_int, 0);
57 pp.
query_default(
"amr.abort_on_nan",value.abort_on_nan,
true);
62 pp.
query_default(
"amr.max_plot_level", value.max_plot_level, -1);
64 pp.
query_default(
"amr.print_ghost_nodes", value.print_ghost_nodes, 0);
65 pp.
query_default(
"amr.print_ghost_cells", value.print_ghost_cells, 0);
69 value.nsubsteps.resize(value.maxLevel() + 1, 1);
70 int cnt = pp.countval(
"amr.nsubsteps");
72 if (cnt == value.maxLevel()) {
73 pp.
queryarr(
"amr.nsubsteps", value.nsubsteps);
74 value.nsubsteps.insert(value.nsubsteps.begin(), 1);
75 value.nsubsteps.pop_back();
81 for (
int lev = 1; lev <= value.maxLevel(); ++lev) value.nsubsteps[lev] = nsubsteps_all;
84 Util::Abort(
INFO,
"number of nsubsteps input must equal either 1 or amr.max_level");
86 for (
int lev = 1; lev <= value.maxLevel(); ++lev)
87 value.nsubsteps[lev] = value.MaxRefRatio(lev - 1);
91 pp.
query_default(
"dynamictimestep.on",value.dynamictimestep.on,
false);
92 if (value.dynamictimestep.on)
95 pp.
query_validate(
"dynamictimestep.verbose",value.dynamictimestep.verbose,{0,1});
97 pp.
query_default(
"dynamictimestep.nprevious",value.dynamictimestep.nprevious,5);
99 pp.
query_default(
"dynamictimestep.cfl",value.dynamictimestep.cfl,1.0);
101 pp.
query_default(
"dynamictimestep.min",value.dynamictimestep.min,value.timestep);
103 pp.
query_default(
"dynamictimestep.max",value.dynamictimestep.max,value.timestep);
111 value.thermo.interval = 1;
112 pp.
query_default(
"amr.thermo.int", value.thermo.interval, 1);
113 pp.
query_default(
"amr.thermo.plot_int", value.thermo.plot_int, -1);
121 pp.
query_default(
"explicitmesh.on", value.explicitmesh.on, 0);
122 if (value.explicitmesh.on)
124 for (
int ilev = 0; ilev < value.maxLevel(); ++ilev)
126 std::string strlo =
"explicitmesh.lo" + std::to_string(ilev + 1);
127 std::string strhi =
"explicitmesh.hi" + std::to_string(ilev + 1);
132 amrex::Vector<int> lodata, hidata;
135 amrex::IntVect lo(AMREX_D_DECL(lodata[0], lodata[1], lodata[2]));
136 amrex::IntVect hi(AMREX_D_DECL(hidata[0], hidata[1], hidata[2]));
138 value.explicitmesh.box.push_back(amrex::Box(lo, hi));
156 pp.
query_validate(
"integration.type", str, {
"ForwardEuler",
"RungeKutta"});
157 if (str ==
"RungeKutta")
165 int nlevs_max = value.maxLevel() + 1;
167 value.istep.resize(nlevs_max, 0);
169 value.t_new.resize(nlevs_max, 0.0);
170 value.t_old.resize(nlevs_max, -1.e100);
171 value.SetTimestep(value.timestep);
220 BL_PROFILE(
"Integrator::MakeNewLevelFromCoarse");
222 for (
int n = 0; n < cell.number_of_fabs; n++)
224 const int ncomp = (*cell.fab_array[n])[lev - 1]->nComp();
225 const int nghost = (*cell.fab_array[n])[lev - 1]->nGrow();
227 (*cell.fab_array[n])[lev].reset(
new amrex::MultiFab(cgrids, dm, ncomp, nghost));
229 (*cell.fab_array[n])[lev]->setVal(0.0);
231 FillCoarsePatch(lev, time, *cell.fab_array[n], *cell.physbc_array[n], 0, ncomp);
234 amrex::BoxArray ngrids = cgrids;
235 ngrids.convert(amrex::IntVect::TheNodeVector());
237 for (
int n = 0; n < node.number_of_fabs; n++)
239 const int ncomp = (*node.fab_array[n])[lev - 1]->nComp();
240 const int nghost = (*node.fab_array[n])[lev - 1]->nGrow();
242 (*node.fab_array[n])[lev].reset(
new amrex::MultiFab(ngrids, dm, ncomp, nghost));
243 (*node.fab_array[n])[lev]->setVal(0.0);
245 FillCoarsePatch(lev, time, *node.fab_array[n], *node.physbc_array[n], 0, ncomp);
248 for (
unsigned int n = 0; n < m_basefields.size(); n++)
250 m_basefields[n]->MakeNewLevelFromCoarse(lev, time, cgrids, dm);
252 for (
unsigned int n = 0; n < m_basefields_cell.size(); n++)
254 m_basefields_cell[n]->MakeNewLevelFromCoarse(lev, time, cgrids, dm);
269 const amrex::BoxArray &cgrids,
270 const amrex::DistributionMapping &dm
273 BL_PROFILE(
"Integrator::RemakeLevel");
274 for (
int n = 0; n < cell.number_of_fabs; n++)
276 const int ncomp = (*cell.fab_array[n])[lev]->nComp();
277 const int nghost = (*cell.fab_array[n])[lev]->nGrow();
279 amrex::MultiFab new_state(cgrids, dm, ncomp, nghost);
281 new_state.setVal(0.0);
282 FillPatch(lev, time, *cell.fab_array[n], new_state, *cell.physbc_array[n], 0);
283 std::swap(new_state, *(*cell.fab_array[n])[lev]);
286 amrex::BoxArray ngrids = cgrids;
287 ngrids.convert(amrex::IntVect::TheNodeVector());
289 for (
int n = 0; n < node.number_of_fabs; n++)
291 const int ncomp = (*node.fab_array[n])[lev]->nComp();
292 const int nghost = (*node.fab_array[n])[lev]->nGrow();
294 amrex::MultiFab new_state(ngrids, dm, ncomp, nghost);
296 new_state.setVal(0.0);
297 FillPatch(lev, time, *node.fab_array[n], new_state, *node.physbc_array[n], 0);
298 std::swap(new_state, *(*node.fab_array[n])[lev]);
301 for (
unsigned int n = 0; n < m_basefields_cell.size(); n++)
303 m_basefields_cell[n]->RemakeLevel(lev, time, cgrids, dm);
305 for (
unsigned int n = 0; n < m_basefields.size(); n++)
307 m_basefields[n]->RemakeLevel(lev, time, cgrids, dm);
528 BL_PROFILE(
"Integrator::Restart");
530 if (a_nodal && node.fab_array.size() == 0)
535 if (!a_nodal && cell.fab_array.size() == 0)
541 std::string filename = dirname +
"/Header";
542 std::string chkptfilename = dirname +
"/Checkpoint";
543 amrex::VisMF::IO_Buffer io_buffer(amrex::VisMF::GetIOBufferSize());
544 amrex::Vector<char> fileCharPtr, chkptfileCharPtr;
545 amrex::ParallelDescriptor::ReadAndBcastFile(filename, fileCharPtr);
546 amrex::ParallelDescriptor::ReadAndBcastFile(chkptfilename, chkptfileCharPtr);
547 std::string fileCharPtrString(fileCharPtr.dataPtr());
548 std::string chkptfileCharPtrString(chkptfileCharPtr.dataPtr());
549 std::istringstream is(fileCharPtrString, std::istringstream::in);
550 std::istringstream chkpt_is(chkptfileCharPtrString, std::istringstream::in);
552 std::string line, word;
555 std::getline(is, line);
560 std::getline(is, line); tmp_numfabs = std::stoi(line);
562 std::vector<std::string> tmp_name_array;
564 for (
int i = 0; i < tmp_numfabs; i++)
566 std::getline(is, line);
567 tmp_name_array.push_back(line);
571 std::getline(is, line);
576 std::getline(is, line); tmp_time = std::stof(line);
Util::Message(
INFO,
"Current time: ", tmp_time);
577 for (
int i = 0; i < max_level + 1; i++)
579 t_new[i] = tmp_time; t_old[i] = tmp_time;
584 std::getline(is, line); tmp_max_level = std::stoi(line);
Util::Message(
INFO,
"Max AMR level: ", line);
585 if (tmp_max_level > max_level)
586 Util::Abort(
INFO,
"The max level specified (", max_level,
") is smaller than the finest level in the restart file (", tmp_max_level,
")");
587 finest_level = tmp_max_level;
599 std::getline(is, line);
601 if (tmp_iters.size() != (
unsigned int)(finest_level + 1))
Util::Abort(
INFO,
"Error reading in interation counts: line = ", line);
602 for (
int lev = 0; lev <= finest_level; lev++) { istep[lev] = std::stoi(tmp_iters[lev]);
Util::Message(
INFO,
"Iter on level ", lev,
" = ", istep[lev]); }
604 amrex::Vector<amrex::MultiFab> tmpdata(tmp_max_level + 1);
609 for (
unsigned int i = 0; i < node.fab_array.size(); i++)
610 if (node.writeout_array[i])
611 total_ncomp += node.ncomp_array[i];
615 for (
unsigned int i = 0; i < cell.fab_array.size(); i++)
616 if (cell.writeout_array[i])
617 total_ncomp += cell.ncomp_array[i];
620 int total_nghost = a_nodal ? 0 : cell.nghost_array[0];
622 for (
int lev = 0; lev <= finest_level; lev++)
624 amrex::BoxArray tmp_ba;
625 tmp_ba.readFrom(chkpt_is);
626 SetBoxArray(lev, tmp_ba);
627 amrex::DistributionMapping tmp_dm(tmp_ba, amrex::ParallelDescriptor::NProcs());
628 SetDistributionMap(lev, tmp_dm);
632 amrex::BoxArray ngrids = grids[lev];
633 ngrids.convert(amrex::IntVect::TheNodeVector());
644 Util::Message(
INFO,amrex::MultiFabFileFullPrefix(lev, dirname,
"Level_",
"Cell"));
647 amrex::VisMF::Read(tmpdata[lev],
648 amrex::MultiFabFileFullPrefix(lev, dirname,
"Level_",
"Cell"));
651 for (
int i = 0; i < node.number_of_fabs; i++)
653 amrex::BoxArray ngrids = grids[lev];
654 ngrids.convert(amrex::IntVect::TheNodeVector());
655 (*node.fab_array[i])[lev].reset(
new amrex::MultiFab(ngrids, dmap[lev], node.ncomp_array[i], node.nghost_array[i]));
656 (*node.fab_array[i])[lev]->setVal(0.);
659 for (
int i = 0; i < cell.number_of_fabs; i++)
660 (*cell.fab_array[i])[lev].reset(
new amrex::MultiFab(grids[lev], dmap[lev], cell.ncomp_array[i], cell.nghost_array[i]));
661 for (
int i = 0; i < tmp_numfabs; i++)
666 for (
int j = 0; j < node.number_of_fabs; j++)
668 if (tmp_name_array[i] == node.name_array[i][j])
671 Util::Message(
INFO,
"Initializing ", node.name_array[i][j],
"; nghost=", node.nghost_array[j],
" with ", tmp_name_array[i]);
672 amrex::MultiFab::Copy(*((*node.fab_array[j])[lev]).get(), tmpdata[lev], i, 0, 1, total_nghost);
674 for (
int k = 0; k < node.ncomp_array[j]; k++)
676 if (tmp_name_array[i] == node.name_array[j][k])
679 Util::Message(
INFO,
"Initializing ", node.name_array[j][k],
"; ncomp=", node.ncomp_array[j],
"; nghost=", node.nghost_array[j],
" with ", tmp_name_array[i]);
680 amrex::MultiFab::Copy(*((*node.fab_array[j])[lev]).get(), tmpdata[lev], i, k, 1, total_nghost);
688 for (
int j = 0; j < cell.number_of_fabs; j++)
690 for (
int k = 0; k < cell.ncomp_array[j]; k++)
692 if (tmp_name_array[i] == cell.name_array[j][k])
695 Util::Message(
INFO,
"Initializing ", cell.name_array[j][k],
"; ncomp=", cell.ncomp_array[j],
"; nghost=", cell.nghost_array[j],
" with ", tmp_name_array[i]);
696 amrex::MultiFab::Copy(*((*cell.fab_array[j])[lev]).get(), tmpdata[lev], i, k, 1, 0 );
702 if (!match)
Util::Warning(
INFO,
"Fab ", tmp_name_array[i],
" is in the restart file, but there is no fab with that name here.");
705 for (
unsigned int n = 0; n < m_basefields_cell.size(); n++)
707 m_basefields_cell[n]->MakeNewLevelFromScratch(lev, t_new[lev], grids[lev], dmap[lev]);
709 for (
unsigned int n = 0; n < m_basefields.size(); n++)
711 m_basefields[n]->MakeNewLevelFromScratch(lev, t_new[lev], grids[lev], dmap[lev]);
715 for (
int n = 0; n < cell.number_of_fabs; n++)
717 if (cell.writeout_array[n])
718 FillPatch(lev, t_new[lev], *cell.fab_array[n], *(*cell.fab_array[n])[lev], *cell.physbc_array[n], 0);
723 SetFinestLevel(max_level);
810 BL_PROFILE(
"Integrator::WritePlotFile");
811 int nlevels = finest_level + 1;
812 if (max_plot_level >= 0) nlevels = std::min(nlevels, max_plot_level);
814 int ccomponents = 0, ncomponents = 0, bfcomponents_cell = 0, bfcomponents = 0;
815 amrex::Vector<std::string> cnames, nnames, bfnames_cell, bfnames;
816 for (
int i = 0; i < cell.number_of_fabs; i++)
818 if (!cell.writeout_array[i])
continue;
819 ccomponents += cell.ncomp_array[i];
820 if (cell.ncomp_array[i] > 1)
821 for (
int j = 0; j < cell.ncomp_array[i]; j++)
822 cnames.push_back(cell.name_array[i][j]);
824 cnames.push_back(cell.name_array[i][0]);
826 for (
int i = 0; i < node.number_of_fabs; i++)
828 if (!node.writeout_array[i])
continue;
829 ncomponents += node.ncomp_array[i];
830 if (node.ncomp_array[i] > 1)
831 for (
int j = 0; j < node.ncomp_array[i]; j++)
832 nnames.push_back(node.name_array[i][j]);
834 nnames.push_back(node.name_array[i][0]);
836 for (
unsigned int i = 0; i < m_basefields_cell.size(); i++)
838 if (m_basefields_cell[i]->writeout)
840 bfcomponents_cell += m_basefields_cell[i]->NComp();
841 for (
int j = 0; j < m_basefields_cell[i]->NComp(); j++)
842 bfnames_cell.push_back(m_basefields_cell[i]->Name(j));
845 for (
unsigned int i = 0; i < m_basefields.size(); i++)
847 if (m_basefields[i]->writeout)
849 bfcomponents += m_basefields[i]->NComp();
850 for (
int j = 0; j < m_basefields[i]->NComp(); j++)
851 bfnames.push_back(m_basefields[i]->Name(j));
855 amrex::Vector<amrex::MultiFab> cplotmf(nlevels), nplotmf(nlevels);
857 bool do_cell_plotfile = (ccomponents + bfcomponents_cell > 0 || (ncomponents + bfcomponents > 0 && cell.all)) && cell.any;
858 bool do_node_plotfile = (ncomponents + bfcomponents > 0 || (ccomponents + bfcomponents_cell > 0 && node.all)) && node.any;
860 for (
int ilev = 0; ilev < nlevels; ++ilev)
862 if (do_cell_plotfile)
864 int ncomp = ccomponents + bfcomponents_cell;
865 if (cell.all) ncomp += ncomponents + bfcomponents;
866 amrex::BoxArray cgrids_ghost = grids[ilev];
867 cgrids_ghost.grow(print_ghost_cells);
868 cplotmf[ilev].define(cgrids_ghost, dmap[ilev], ncomp, 0);
872 for (
int i = 0; i < cell.number_of_fabs; i++)
874 if (!cell.writeout_array[i])
continue;
875 if ((*cell.fab_array[i])[ilev]->contains_nan())
877 if (abort_on_nan)
Util::Abort(
INFO, cnames[cnames_cnt],
" contains nan (i=", i,
")");
880 if ((*cell.fab_array[i])[ilev]->contains_inf())
882 if (abort_on_nan)
Util::Abort(
INFO, cnames[cnames_cnt],
" contains inf (i=", i,
")");
886 amrex::MultiFab::Copy(cplotmf[ilev], *(*cell.fab_array[i])[ilev], 0, n, cell.ncomp_array[i], 0);
887 n += cell.ncomp_array[i];
889 for (
unsigned int i = 0; i < m_basefields_cell.size(); i++)
891 if (m_basefields_cell[i]->writeout)
893 m_basefields_cell[i]->Copy(ilev, cplotmf[ilev], n, 0);
894 n += m_basefields_cell[i]->NComp();
901 for (
int i = 0; i < node.number_of_fabs; i++)
903 if (!node.writeout_array[i])
continue;
904 if ((*node.fab_array[i])[ilev]->contains_nan())
906 if (abort_on_nan)
Util::Abort(
INFO, nnames[nnames_cnt],
" contains nan (i=", i,
")");
909 if ((*node.fab_array[i])[ilev]->contains_inf())
911 if (abort_on_nan)
Util::Abort(
INFO, nnames[nnames_cnt],
" contains inf (i=", i,
")");
915 amrex::average_node_to_cellcenter(cplotmf[ilev], n, *(*node.fab_array[i])[ilev], 0, node.ncomp_array[i], 0);
916 n += node.ncomp_array[i];
918 if (bfcomponents > 0)
920 amrex::BoxArray ngrids = grids[ilev];
921 ngrids.convert(amrex::IntVect::TheNodeVector());
922 amrex::MultiFab bfplotmf(ngrids, dmap[ilev], bfcomponents, 0);
924 for (
unsigned int i = 0; i < m_basefields.size(); i++)
926 if (m_basefields[i]->writeout)
928 m_basefields[i]->Copy(ilev, bfplotmf, ctr, 0);
929 ctr += m_basefields[i]->NComp();
932 amrex::average_node_to_cellcenter(cplotmf[ilev], n, bfplotmf, 0, bfcomponents);
938 if (do_node_plotfile)
940 amrex::BoxArray ngrids = grids[ilev];
941 ngrids.convert(amrex::IntVect::TheNodeVector());
942 int ncomp = ncomponents + bfcomponents;
943 if (node.all) ncomp += ccomponents + bfcomponents_cell;
945 amrex::BoxArray ngrids_ghost = ngrids;
946 ngrids_ghost.grow(print_ghost_nodes);
948 nplotmf[ilev].define(ngrids_ghost, dmap[ilev], ncomp, 0);
951 for (
int i = 0; i < node.number_of_fabs; i++)
953 if (!node.writeout_array[i])
continue;
954 if ((*node.fab_array[i])[ilev]->contains_nan())
Util::Warning(
INFO, nnames[i],
" contains nan (i=", i,
"). Resetting to zero.");
955 if ((*node.fab_array[i])[ilev]->contains_inf())
Util::Abort(
INFO, nnames[i],
" contains inf (i=", i,
")");
956 amrex::MultiFab::Copy(nplotmf[ilev], *(*node.fab_array[i])[ilev], 0, n, node.ncomp_array[i], 0);
957 n += node.ncomp_array[i];
959 for (
unsigned int i = 0; i < m_basefields.size(); i++)
961 if (m_basefields[i]->writeout)
963 m_basefields[i]->Copy(ilev, nplotmf[ilev], n, 0);
964 n += m_basefields[i]->NComp();
970 for (
int i = 0; i < cell.number_of_fabs; i++)
972 if (!cell.writeout_array[i])
continue;
973 if ((*cell.fab_array[i])[ilev]->contains_nan())
Util::Warning(
INFO, cnames[i],
" contains nan (i=", i,
"). Resetting to zero.");
974 if ((*cell.fab_array[i])[ilev]->contains_inf())
Util::Abort(
INFO, cnames[i],
" contains inf (i=", i,
")");
975 if ((*cell.fab_array[i])[ilev]->nGrow() < 1)
977 if (initial)
Util::Warning(
INFO, cnames[i],
" has no ghost cells and will not be included in nodal output");
981 n += cell.ncomp_array[i];
984 if (bfcomponents_cell > 0)
986 amrex::BoxArray cgrids = grids[ilev];
987 amrex::MultiFab bfplotmf(cgrids, dmap[ilev], bfcomponents_cell, 0);
989 for (
unsigned int i = 0; i < m_basefields_cell.size(); i++)
991 if (m_basefields_cell[i]->writeout)
993 m_basefields_cell[i]->Copy(ilev, bfplotmf, ctr, 0);
994 ctr += m_basefields_cell[i]->NComp();
998 n += bfcomponents_cell;
1004 std::vector<std::string> plotfilename = PlotFileName(istep[0], prefix);
1005 if (initial) plotfilename[1] = plotfilename[1] +
"init";
1007 if (do_cell_plotfile)
1009 amrex::Vector<std::string> allnames = cnames;
1010 allnames.insert(allnames.end(), bfnames_cell.begin(), bfnames_cell.end());
1012 allnames.insert(allnames.end(), nnames.begin(), nnames.end());
1013 allnames.insert(allnames.end(), bfnames.begin(), bfnames.end());
1015 WriteMultiLevelPlotfile(plotfilename[0] + plotfilename[1] +
"cell", nlevels, amrex::GetVecOfConstPtrs(cplotmf), allnames,
1016 Geom(), time, iter, refRatio());
1018 std::ofstream chkptfile;
1019 chkptfile.open(plotfilename[0] + plotfilename[1] +
"cell/Checkpoint");
1020 for (
int i = 0; i <= max_level; i++) boxArray(i).writeOn(chkptfile);
1024 if (do_node_plotfile)
1026 amrex::Vector<std::string> allnames = nnames;
1027 allnames.insert(allnames.end(), bfnames.begin(), bfnames.end());
1028 if (node.all) allnames.insert(allnames.end(), cnames.begin(), cnames.end());
1029 WriteMultiLevelPlotfile(plotfilename[0] + plotfilename[1] +
"node", nlevels, amrex::GetVecOfConstPtrs(nplotmf), allnames,
1030 Geom(), time, iter, refRatio());
1032 std::ofstream chkptfile;
1033 chkptfile.open(plotfilename[0] + plotfilename[1] +
"node/Checkpoint");
1034 for (
int i = 0; i <= max_level; i++) boxArray(i).writeOn(chkptfile);
1038 if (amrex::ParallelDescriptor::IOProcessor())
1040 std::ofstream coutfile, noutfile;
1043 if (do_cell_plotfile) coutfile.open(plot_file +
"/celloutput.visit", std::ios_base::out);
1044 if (do_node_plotfile) noutfile.open(plot_file +
"/nodeoutput.visit", std::ios_base::out);
1048 if (do_cell_plotfile) coutfile.open(plot_file +
"/celloutput.visit", std::ios_base::app);
1049 if (do_node_plotfile) noutfile.open(plot_file +
"/nodeoutput.visit", std::ios_base::app);
1051 if (do_cell_plotfile) coutfile << plotfilename[1] +
"cell" +
"/Header" << std::endl;
1052 if (do_node_plotfile) noutfile << plotfilename[1] +
"node" +
"/Header" << std::endl;
1190 BL_PROFILE(
"Integrator::TimeStep");
1191 if (base_regrid_int <= 0 || istep[0] % base_regrid_int == 0)
1193 if (regrid_int > 0 || base_regrid_int > 0)
1195 static amrex::Vector<int> last_regrid_step(max_level + 1, 0);
1198 if (lev < max_level && istep[lev] > last_regrid_step[lev])
1200 if (istep[lev] % regrid_int == 0)
1202 regrid(lev, time,
false);
1207 SetFinestLevel(finest_level);
1209 if (Verbose() && amrex::ParallelDescriptor::IOProcessor()) {
1210 std::cout <<
"[Level " << lev
1211 <<
" step " << istep[lev] + 1 <<
"] ";
1212 std::cout <<
"ADVANCE with dt = "
1217 for (
int n = 0; n < cell.number_of_fabs; n++)
1218 if (cell.evolving_array[n]) FillPatch(lev, time, *cell.fab_array[n], *(*cell.fab_array[n])[lev], *cell.physbc_array[n], 0);
1219 for (
int n = 0; n < node.number_of_fabs; n++)
1220 if (node.evolving_array[n]) FillPatch(lev, time, *node.fab_array[n], *(*node.fab_array[n])[lev], *node.physbc_array[n], 0);
1221 for (
unsigned int n = 0; n < m_basefields_cell.size(); n++)
1222 if (m_basefields_cell[n]->evolving) m_basefields_cell[n]->FillPatch(lev, time);
1223 for (
unsigned int n = 0; n < m_basefields.size(); n++)
1224 if (m_basefields[n]->evolving) m_basefields[n]->FillPatch(lev, time);
1226 Advance(lev, time, dt[lev]);
1229 if (Verbose() && amrex::ParallelDescriptor::IOProcessor())
1231 std::cout <<
"[Level " << lev
1232 <<
" step " << istep[lev] <<
"] ";
1233 std::cout <<
"Advanced "
1239 if (lev < finest_level)
1241 for (
int i = 1; i <= nsubsteps[lev + 1]; ++i)
1242 TimeStep(lev + 1, time + (i - 1) * dt[lev + 1], i);
1244 for (
int n = 0; n < cell.number_of_fabs; n++)
1246 amrex::average_down(*(*cell.fab_array[n])[lev + 1], *(*cell.fab_array[n])[lev],
1247 geom[lev + 1], geom[lev],
1248 0, (*cell.fab_array[n])[lev]->nComp(), refRatio(lev));
1250 for (
int n = 0; n < node.number_of_fabs; n++)
1252 amrex::average_down(*(*node.fab_array[n])[lev + 1], *(*node.fab_array[n])[lev],
1253 0, (*node.fab_array[n])[lev]->nComp(), refRatio(lev));
1255 for (
unsigned int n = 0; n < m_basefields_cell.size(); n++)
1257 if (m_basefields_cell[n]->evolving)
1258 m_basefields_cell[n]->AverageDown(lev, refRatio(lev));
1260 for (
unsigned int n = 0; n < m_basefields.size(); n++)
1262 if (m_basefields[n]->evolving)
1263 m_basefields[n]->AverageDown(lev, refRatio(lev));