37 #include <AMReX_BCUtil.H>
38 #include <AMReX_MultiFabUtil.H>
39 #include <AMReX_ParmParse.H>
52 , amrex::AmrMesh(&domain, maxLevel, nGridPts, 0 )
54 , layout_mp(static_cast<
AmrLayout_t*>(&bunch_p->getLayout()))
57 , efield_m(maxLevel + 1)
58 , meshScaling_m(
Vector_t(1.0, 1.0, 1.0))
59 , isFirstTagging_m(maxLevel + 1, true)
60 , isPoissonSolved_m(false)
82 AmrDomain_t domain = layout_p->Geom(0).ProbDomain();
97 return std::unique_ptr<AmrBoxLib>(
new AmrBoxLib(domain,
109 *gmsg <<
"* Start regriding:" <<
endl
110 <<
"* Old finest level: "
111 << finest_level <<
endl;
119 int old_finest = finest_level;
121 int lev_top =
std::min(finest_level, max_level - 1);
122 for (
int i = 0; i <= lev_top; ++i) {
124 lev_top =
std::min(finest_level, max_level - 1);
129 *gmsg <<
"* New finest level: "
130 << finest_level << endl
131 <<
"* Finished regriding" <<
endl;
138 std::vector<int>& gridsPerLevel)
const {
140 typedef std::vector<int> container_t;
142 gridPtsPerCore.clear();
143 gridsPerLevel.clear();
145 gridsPerLevel.resize(max_level + 1);
147 for (
int lev = 0; lev <= finest_level; ++lev) {
151 const container_t& pmap = this->dmap[lev].ProcessorMap();
154 gridsPerLevel[lev] = pmap.size();
157 for (
unsigned int i = 0; i < ba.size(); ++i) {
158 gridPtsPerCore[pmap[i]] += ba[i].numPts();
166 *gmsg <<
"* Initialization of all levels" <<
endl;
176 if ( !isForbidTransform ) {
181 if ( max_level > 0 ) {
185 if ( !isForbidTransform ) {
191 *gmsg <<
"* Initialization done." <<
endl;
203 for (
unsigned int lev = 0; lev <
efield_m.size(); ++lev) {
210 maxE[i] = (maxE[i] <
max) ? max : maxE[i];
213 minE[i] = (minE[i] >
min) ? min : minE[i];
223 throw OpalException(
"AmrBoxLib::getRho(x, y, z)",
"Not yet Implemented.");
230 throw OpalException(
"AmrBoxLib::computeSelfFields",
"Not yet Implemented.");
236 throw OpalException(
"AmrBoxLib::computeSelfFields(int bin)",
"Not yet Implemented.");
264 double invGamma = 1.0 / gamma;
265 int nLevel = finest_level + 1;
273 this->
phi_m[i]->mult(scalefactor * l0norm, 0, 1);
274 for (
int j = 0; j < AMREX_SPACEDIM; ++j) {
275 this->
efield_m[i][j]->mult(scalefactor * scalefactor * l0norm, 0, 1);
279 for (
int i = 0; i <= finest_level; ++i) {
280 for (
int j = 0; j < AMREX_SPACEDIM; ++j) {
281 if ( this->
efield_m[i][j]->contains_nan(
false) )
282 throw OpalException(
"AmrBoxLib::computeSelfFields_cycl(double gamma) ",
283 "Ef: NANs at level " + std::to_string(i) +
".");
315 for (
int i = 0; i < finest_level; ++i)
316 rr[i] = this->MaxRefRatio(i);
321 for (
int i = 0; i <= finest_level; ++i)
326 nLevel, time, scalefactor);
328 ytWriter.writeBunch(
bunch_mp, time, gamma);
375 for (
int i = 0; i <= finest_level; ++i) {
378 if ( this->
rho_m[i]->contains_nan(
false) )
379 throw OpalException(
"AmrBoxLib::computeSelfFields_cycl(int bin) ",
380 "NANs at level " + std::to_string(i) +
".");
385 for (
int i = 0; i <= finest_level; ++i)
388 for (
int i = 0; i <= finest_level; ++i) {
389 this->
rho_m[i]->mult(1.0 / l0norm, 0, 1);
399 for (
int i = 0; i <= finest_level; ++i) {
401 for (
int j = 0; j < AMREX_SPACEDIM; ++j) {
412 for (
int i = 0; i <= finest_level; ++i) {
413 phi_m[i]->FillBoundary(geom[i].periodicity());
414 for (
int j = 0; j < AMREX_SPACEDIM; ++j) {
415 efield_m[i][j]->FillBoundary(geom[i].periodicity());
426 this->
phi_m[i]->mult(scalefactor * l0norm, 0, 1);
427 for (
int j = 0; j < AMREX_SPACEDIM; ++j) {
428 this->
efield_m[i][j]->mult(scalefactor * scalefactor * l0norm, 0, 1);
432 for (
int i = 0; i <= finest_level; ++i) {
433 for (
int j = 0; j < AMREX_SPACEDIM; ++j) {
434 if ( this->
efield_m[i][j]->contains_nan(
false) )
435 throw OpalException(
"AmrBoxLib::computeSelfFields_cycl(double gamma) ",
436 "Ef: NANs at level " + std::to_string(i) +
".");
463 int nLevel = finest_level + 1;
466 for (
int i = 0; i < finest_level; ++i)
467 rr[i] = this->MaxRefRatio(i);
472 for (
int i = 0; i <= finest_level; ++i)
477 nLevel, time, scalefactor);
479 ytWriter.writeBunch(
bunch_mp, time, gamma);
488 const AmrReal_t* tmp = this->geom[0].CellSize();
491 for (
int i = 0; i < 3; ++i)
504 const Box_t& bx = this->geom[0].Domain();
510 high[1] - low[1] + 1,
511 high[2] - low[2] + 1);
516 return this->max_level;
521 return this->finest_level;
595 SetBoxArray(lev, new_grids);
596 SetDistributionMap(lev, new_dmap);
601 for (
int j = 0; j < AMREX_SPACEDIM; ++j) {
606 rho_m[lev]->setVal(0.0, 0);
607 phi_m[lev]->setVal(0.0, 1);
609 for (
int j = 0; j < AMREX_SPACEDIM; ++j) {
617 layout_mp->SetParticleBoxArray(lev, new_grids);
618 layout_mp->SetParticleDistributionMap(lev, new_dmap);
627 SetBoxArray(lev, new_grids);
628 SetDistributionMap(lev, new_dmap);
634 for (
int j = 0; j < AMREX_SPACEDIM; ++j) {
639 rho_m[lev]->setVal(0.0, 0);
640 phi_m[lev]->setVal(0.0, 1);
641 for (
int j = 0; j < AMREX_SPACEDIM; ++j) {
649 layout_mp->SetParticleBoxArray(lev, new_grids);
650 layout_mp->SetParticleDistributionMap(lev, new_dmap);
657 rho_m[lev].reset(
nullptr);
658 phi_m[lev].reset(
nullptr);
659 for (
int j = 0; j < AMREX_SPACEDIM; ++j) {
663 ClearDistributionMap(lev);
672 *gmsg <<
level2 <<
"* Start tagging of level " << lev <<
endl;
698 *gmsg <<
level2 <<
"* Finished tagging of level " << lev <<
endl;
706 throw OpalException(
"AmrBoxLib::MakeNewLevelFromScratch()",
"Shouldn't be called.");
714 throw OpalException(
"AmrBoxLib::MakeNewLevelFromCoarse()",
"Shouldn't be called.");
722 MakeNewGrids(lbase, time, new_finest, new_grids);
724 PAssert(new_finest <= finest_level+1);
726 for (
int lev = lbase+1; lev <= new_finest; ++lev)
728 if (lev <= finest_level)
730 if (new_grids[lev] != grids[lev])
746 for (
int lev = new_finest+1; lev <= finest_level; ++lev) {
750 finest_level = new_finest;
782 amrpbase_p->
update(0, finest_level,
true);
787 for (
int lev = finest_level+1; lev <= old_finest; ++lev) {
788 if ( LocalNumPerLevel.getLocalNumAtLevel(lev) != 0 ) {
790 "Still particles on level " + std::to_string(lev) +
"!");
793 layout_mp->ClearParticleDistributionMap(lev);
799 std::string levelnum = std::to_string(LocalNumPerLevel.getLocalNumUpToLevel(finest_level));
801 "Number of particles do not agree: " + localnum +
" != " + levelnum);
822 for (
int i = 0; i <= finest_level; ++i) {
823 if ( this->
rho_m[i]->contains_nan(
false) )
825 "NANs at level " + std::to_string(i) +
".");
831 for (
int i = 0; i <= finest_level; ++i)
834 for (
int i = 0; i <= finest_level; ++i) {
835 this->
rho_m[i]->mult(1.0 / l0norm, 0, 1);
845 for (
int i = 0; i <= finest_level; ++i) {
846 phi_m[i]->FillBoundary(geom[i].periodicity());
847 for (
int j = 0; j < AMREX_SPACEDIM; ++j) {
848 efield_m[i][j]->FillBoundary(geom[i].periodicity());
863 amrpbase_p->
update(0, lev,
true);
865 for (
int i = lev; i <= finest_level; ++i)
874 for (
int i = lev; i <= finest_level; ++i)
875 rho_m[i]->mult(scalefactor, 0, 1);
877 const int clearval = TagBox_t::CLEAR;
884 for (
MFIter_t mfi(*
rho_m[lev],
true); mfi.isValid(); ++mfi) {
885 const Box_t& tilebx = mfi.tilebox();
890 const int* tlo = tilebx.loVect();
891 const int* thi = tilebx.hiVect();
893 for (
int i = tlo[0]; i <= thi[0]; ++i) {
894 for (
int j = tlo[1]; j <= thi[1]; ++j) {
895 for (
int k = tlo[2]; k <= thi[2]; ++k) {
897 amrex::IntVect iv(D_DECL(i,j,k));
902 tagfab(iv) = clearval;
919 *gmsg <<
level2 <<
"* Level " << lev <<
": We need to perform "
920 <<
"charge tagging if a new level is created." <<
endl;
927 const int clearval = TagBox_t::CLEAR;
938 for (
MFIter_t mfi(*
phi_m[lev],
true); mfi.isValid(); ++mfi) {
940 const Box_t& tilebx = mfi.tilebox();
944 const int* tlo = tilebx.loVect();
945 const int* thi = tilebx.hiVect();
947 for (
int i = tlo[0]; i <= thi[0]; ++i) {
948 for (
int j = tlo[1]; j <= thi[1]; ++j) {
949 for (
int k = tlo[2]; k <= thi[2]; ++k) {
951 amrex::IntVect iv(D_DECL(i,j,k));
953 if (
std::abs( fab(iv) ) >= threshold )
956 tagfab(iv) = clearval;
973 *gmsg <<
level2 <<
"* Level " << lev <<
": We need to perform "
974 <<
"charge tagging if a new level is created." <<
endl;
981 const int clearval = TagBox_t::CLEAR;
985 amrex::Vector<AmrReal_t> threshold(AMREX_SPACEDIM);
987 for (
int i = 0; i < 3; ++i) {
988 threshold[i] =
efield_m[lev][i]->norm0(0,
999 for (
MFIter_t mfi(this->grids[lev], this->dmap[lev],
true); mfi.isValid(); ++mfi) {
1001 const Box_t& tilebx = mfi.tilebox();
1007 const int* tlo = tilebx.loVect();
1008 const int* thi = tilebx.hiVect();
1010 for (
int i = tlo[0]; i <= thi[0]; ++i) {
1011 for (
int j = tlo[1]; j <= thi[1]; ++j) {
1012 for (
int k = tlo[2]; k <= thi[2]; ++k) {
1014 if (
std::abs(xfab(iv)) >= threshold[0])
1015 tagfab(iv) = tagval;
1016 else if (
std::abs(yfab(iv)) >= threshold[1])
1017 tagfab(iv) = tagval;
1018 else if (
std::abs(zfab(iv)) >= threshold[2])
1019 tagfab(iv) = tagval;
1021 tagfab(iv) = clearval;
1035 amrpbase_p->
update(0, lev,
true);
1038 size_t lBegin = LocalNumPerLevel.
begin(lev);
1039 size_t lEnd = LocalNumPerLevel.end(lev);
1042 for (
size_t i = lBegin; i < lEnd; ++i) {
1044 pmax = (
dot(tmp, tmp) >
dot(pmax, pmax) ) ? tmp : pmax;
1049 std::map<AmrIntVect_t, bool> cells;
1050 for (
size_t i = lBegin; i < lEnd; ++i) {
1057 const int clearval = TagBox_t::CLEAR;
1062 #pragma omp parallel
1065 for (
MFIter_t mfi(*
rho_m[lev],
true); mfi.isValid(); ++mfi) {
1067 const Box_t& tilebx = mfi.tilebox();
1070 const int* tlo = tilebx.loVect();
1071 const int* thi = tilebx.hiVect();
1073 for (
int i = tlo[0]; i <= thi[0]; ++i) {
1074 for (
int j = tlo[1]; j <= thi[1]; ++j) {
1075 for (
int k = tlo[2]; k <= thi[2]; ++k) {
1077 if ( cells.find(iv) != cells.end() )
1078 tagfab(iv) = tagval;
1080 tagfab(iv) = clearval;
1094 amrpbase_p->
update(0, lev,
true);
1097 size_t lBegin = LocalNumPerLevel.
begin(lev);
1098 size_t lEnd = LocalNumPerLevel.end(lev);
1101 std::map<AmrIntVect_t, size_t> cells;
1102 for (
size_t i = lBegin; i < lEnd; ++i) {
1107 const int clearval = TagBox_t::CLEAR;
1112 #pragma omp parallel
1115 for (
MFIter_t mfi(*
rho_m[lev],
true); mfi.isValid(); ++mfi) {
1117 const Box_t& tilebx = mfi.tilebox();
1120 const int* tlo = tilebx.loVect();
1121 const int* thi = tilebx.hiVect();
1123 for (
int i = tlo[0]; i <= thi[0]; ++i) {
1124 for (
int j = tlo[1]; j <= thi[1]; ++j) {
1125 for (
int k = tlo[2]; k <= thi[2]; ++k) {
1127 if ( cells.find(iv) != cells.end() && cells[iv] <=
maxNumPart_m )
1128 tagfab(iv) = tagval;
1130 tagfab(iv) = clearval;
1144 amrpbase_p->
update(0, lev,
true);
1147 size_t lBegin = LocalNumPerLevel.
begin(lev);
1148 size_t lEnd = LocalNumPerLevel.end(lev);
1151 std::map<AmrIntVect_t, size_t> cells;
1152 for (
size_t i = lBegin; i < lEnd; ++i) {
1157 const int clearval = TagBox_t::CLEAR;
1162 #pragma omp parallel
1165 for (
MFIter_t mfi(*
rho_m[lev],
true); mfi.isValid(); ++mfi) {
1167 const Box_t& tilebx = mfi.tilebox();
1170 const int* tlo = tilebx.loVect();
1171 const int* thi = tilebx.hiVect();
1173 for (
int i = tlo[0]; i <= thi[0]; ++i) {
1174 for (
int j = tlo[1]; j <= thi[1]; ++j) {
1175 for (
int k = tlo[2]; k <= thi[2]; ++k) {
1177 if ( cells.find(iv) != cells.end() &&
1179 tagfab(iv) = tagval;
1181 tagfab(iv) = clearval;
1200 const Box_t bx(low, high);
1202 ba.maxSize( this->maxGridSize(0) );
1205 ba = this->MakeBaseGrids();
1208 dmap.define(ba, amrex::ParallelDescriptor::NProcs());
1222 amrex::ParmParse pAmr(
"amr");
1223 pAmr.add(
"max_grid_size_x", info.
maxgrid[0]);
1224 pAmr.add(
"max_grid_size_y", info.
maxgrid[1]);
1225 pAmr.add(
"max_grid_size_z", info.
maxgrid[2]);
1227 pAmr.add(
"blocking_factor_x", info.
bf[0]);
1228 pAmr.add(
"blocking_factor_y", info.
bf[1]);
1229 pAmr.add(
"blocking_factor_z", info.
bf[2]);
1231 const int nratios_vect = info.
maxlevel * AMREX_SPACEDIM;
1235 for (
int i = 0; i < info.
maxlevel; ++i) {
1236 refratio[i * AMREX_SPACEDIM] = info.
refratio[0];
1237 refratio[i * AMREX_SPACEDIM + 1] = info.
refratio[1];
1238 refratio[i * AMREX_SPACEDIM + 2] = info.
refratio[2];
1241 pAmr.addarr(
"ref_ratio_vect", refratio);
1243 amrex::ParmParse pGeom(
"geometry");
1245 layout_p->Geom(0).isPeriodic(0),
1246 layout_p->Geom(0).isPeriodic(1),
1247 layout_p->Geom(0).isPeriodic(2)
1249 pGeom.addarr(
"is_periodic", isPeriodic);
1461 pAmr.add(
"n_proper", 1);
1464 pAmr.add(
"grid_eff", 0.95);
1471 pAmr.addarr(
"n_error_buf", error_buf);
1474 pAmr.add(
"refine_grid_layout",
true);
1486 amrex::ParmParse pDmap(
"DistributionMapping");
1492 pDmap.add(
"efficiency", 0.9);
1495 pDmap.add(
"sfc_threshold", 0);
1505 pDmap.add(
"node_size", 0);
1514 pDmap.add(
"strategy",
"SFC");
1529 if (AmrGeometry_t::isAllPeriodic()) {
1534 amrex::Vector<amrex::BCRec> bc(mf.nComp());
1535 for (
int n = 0;
n < mf.nComp(); ++
n) {
1536 for (
int idim = 0; idim < AMREX_SPACEDIM; ++idim) {
1537 if (AmrGeometry_t::isPeriodic(idim)) {
1538 bc[
n].setLo(idim, amrex::BCType::int_dir);
1539 bc[
n].setHi(idim, amrex::BCType::int_dir);
1541 bc[
n].setLo(idim, amrex::BCType::foextrap);
1542 bc[
n].setHi(idim, amrex::BCType::foextrap);
1547 amrex::FillDomainBoundary(mf, this->geom[lev], bc);
const double & getScalingFactor() const
amr::AmrGridContainer_t AmrGridContainer_t
const double & domainMapping(bool inverse=false)
Tps< T > sqrt(const Tps< T > &x)
Square root.
constexpr double c
The velocity of light in m/s.
IpplTimings::TimerRef amrRegridTimer_m
AmrVectorFieldContainer_t efield_m
vector field on the grid for all levels
void clearLevelMask(int lev)
void getGridStatistics(std::map< int, long > &gridPtsPerCore, std::vector< int > &gridsPerLevel) const
static void initParmParse_m(const AmrInfo &info, AmrLayout_t *layout_p)
int grid[3]
Number of grid points in x-, y- and z-direction.
void buildLevelMask(int lev, const int ncells=1)
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two distribute and or modify the software for each author s protection and we want to make certain that everyone understands that there is no warranty for this free software If the software is modified by someone else and passed we want its recipients to know that what they have is not the so that any problems introduced by others will not reflect on the original authors reputations any free program is threatened constantly by software patents We wish to avoid the danger that redistributors of a free program will individually obtain patent in effect making the program proprietary To prevent this
std::pair< Vector_t, Vector_t > VectorPair_t
AmrIntVect_t Index(AmrParticleBase< BoxLibLayout< T, Dim > > &p, const unsigned int ip, int level) const
PETE_TUTree< FnAbs, typename T::PETE_Expr_t > abs(const PETE_Expr< T > &l)
void MakeNewLevel(int lev, AmrReal_t time, const AmrGrid_t &new_grids, const AmrProcMap_t &new_dmap)
bool isForbidTransform() const
ParticleAttrib< Vector_t > P
constexpr double epsilon_0
The permittivity of vacuum in As/Vm.
AmrBoxLib(const AmrDomain_t &domain, const AmrIntArray_t &nGridPts, int maxLevel, AmrPartBunch *bunch_p)
const int & finestLevel() const
Vektor< double, 3 > Vector_t
void setFinestLevel(int finestLevel)
int maxlevel
Maximum level for AMR (0: single-level)
ParticleAttrib< Vector_t > Ef
double scaling_m
Scaling factor for tagging [0, 1].
IpplTimings::TimerRef amrSolveTimer_m
timer for selfField calculation (used in concrete AmrObject classes)
void fillPhysbc_m(AmrField_t &mf, int lev=0)
void computeSelfFields_cycl(double gamma)
long long getLocalTrackStep() const
pbase_t * getAmrParticleBase()
int bf[3]
Grid blocking factor in x-, y- and z-direction.
int maxgrid[3]
Maximum grid size in x-, y- and z-direction.
Vektor< int, 3 > getBaseLevelGridPoints() const
int amrRegridFreq
After how many steps the AMR grid hierarchy is updated.
ParticleLayout< T, Dim > & getLayout()
void tagForChargeDensity_m(int lev, TagBoxArray_t &tags, AmrReal_t time, int ngrow)
Inform & endl(Inform &inf)
amrex::FArrayBox FArrayBox_t
T::PETE_Expr_t::PETE_Return_t min(const PETE_Expr< T > &expr, NDIndex< D > &loc)
SET(PYCORE_SRCS ${OPAL_SOURCE_DIR}/src/PyOpal/PyCore/Globals.cpp ${OPAL_SOURCE_DIR}/src/PyOpal/PyCore/ExceptionTranslation.cpp ${OPAL_SOURCE_DIR}/src/PyOpal/PyCore/PyOpalObject.cpp parent_scope) SET(PYCORE_SRCS_NO_GLOBALS $
T::PETE_Expr_t::PETE_Return_t max(const PETE_Expr< T > &expr, NDIndex< D > &loc)
void tagForMaxNumParticles_m(int lev, TagBoxArray_t &tags, AmrReal_t time, int ngrow)
PoissonSolver * getFieldSolver()
ParticleAttrib< Vector_t > Bf
void MakeNewLevelFromScratch(int lev, AmrReal_t time, const AmrGrid_t &ba, const AmrProcMap_t &dm)
static void startTimer(TimerRef t)
size_t minNumPart_m
Tagging value for MIN_NUM_PARTICLES.
void redistributeGrids(int how)
virtual void solve(AmrScalarFieldContainer_t &, AmrScalarFieldContainer_t &, AmrVectorFieldContainer_t &, unsigned short, unsigned short, bool=true)
void tagForEfield_m(int lev, TagBoxArray_t &tags, AmrReal_t time, int ngrow)
void gather(ParticleAttrib< FT > &attrib, AmrVectorFieldContainer_t &f, ParticleAttrib< Vektor< PT, Dim > > &pp, int lbase, int lfine)
The base class for all OPAL exceptions.
TaggingCriteria tagging_m
Tagging strategy.
ParticleAttrib< Vector_t > Eftmp
size_t getLocalNum() const
void RemakeLevel(int lev, AmrReal_t time, const AmrGrid_t &new_grids, const AmrProcMap_t &new_dmap)
amr::AmrProcMap_t AmrProcMap_t
const ParticleLevelCounter_t & getLocalNumPerLevel() const
static std::unique_ptr< AmrBoxLib > create(const AmrInfo &info, AmrPartBunch *bunch_p)
ParticleAttrib< double > Q
std::vector< bool > isFirstTagging_m
double chargedensity_m
Tagging value for CHARGE_DENSITY.
double getBinGamma(int bin)
Get gamma of one bin.
int refratio[3]
Mesh refinement ratio in x-, y- and z-direction.
void updateLorentzFactor(int bin=0)
static const unsigned Dimension
void postRegrid_m(int old_finest)
AmrScalarFieldContainer_t phi_m
scalar potential on the grid for all levels
void scatter(ParticleAttrib< FT > &attrib, AmrScalarFieldContainer_t &f, ParticleAttrib< Vektor< PT, Dim > > &pp, int lbase, int lfine, const ParticleAttrib< int > &pbin, int bin=-1)
virtual void hasToRegrid()
amr::AmrIntArray_t AmrIntArray_t
void initBaseLevel_m(const AmrIntArray_t &nGridPts)
virtual void ErrorEst(int lev, TagBoxArray_t &tags, AmrReal_t time, int ngrow) override
amr::AmrIntVect_t AmrIntVect_t
void tagForMomenta_m(int lev, TagBoxArray_t &tags, AmrReal_t time, int ngrow)
AmrPartBunch * bunch_mp
bunch used for tagging strategies
const Vector_t & getMeshScaling() const
size_t maxNumPart_m
Tagging value for MAX_NUM_PARTICLES.
AmrScalarFieldContainer_t rho_m
charge density on the grid for all levels
amr::AmrField_t AmrField_t
Inform & level2(Inform &inf)
void MakeNewLevelFromCoarse(int lev, AmrReal_t time, const AmrGrid_t &ba, const AmrProcMap_t &dm)
void define(const AmrGeomContainer_t &geom)
ParticleAttrib< int > Bin
short getNumBunch() const
void tagForPotentialStrength_m(int lev, TagBoxArray_t &tags, AmrReal_t time, int ngrow)
double getRho(int x, int y, int z)
bool refined_m
Only set to true in AmrObject::initFineLevels()
void doRegrid_m(int lbase, double time)
const int & maxLevel() const
static void stopTimer(TimerRef t)
void setForbidTransform(bool forbidTransform)
amrex::TagBoxArray TagBoxArray_t
VectorPair_t getEExtrema()
void tagForMinNumParticles_m(int lev, TagBoxArray_t &tags, AmrReal_t time, int ngrow)
int amrYtDumpFreq
The frequency to dump AMR grid data and particles into file.
void resize(int maxLevel)
double dot(const Vector3D &lhs, const Vector3D &rhs)
Vector dot product.
Vector_t meshScaling_m
in particle rest frame, the longitudinal length enlarged
amr::AmrDomain_t AmrDomain_t
void setBaseLevelMeshSpacing(const Vector_t &hr)