// ----------------------------------------------------------------------------- // Semi-implicitly handles the gravity forcing and projection. // The old* inputs should be the values at t^n. // The new* inputs should be the updated values from the TGA solver. // ----------------------------------------------------------------------------- void AMRNavierStokes::doCCIGProjection (LevelData<FArrayBox>& a_newVel, LevelData<FArrayBox>& a_newB, const LevelData<FArrayBox>& a_oldVel, const LevelData<FArrayBox>& a_oldB, const LevelData<FluxBox>& a_advVel, const Real a_oldTime, const Real a_dt, const bool a_doProj) { CH_TIME("AMRNavierStokes::doCCIGProjection"); const Real halfTime = a_oldTime + 0.5 * a_dt; const Real newTime = a_oldTime + 1.0 * a_dt; const Real dummyTime = -1.0e300; const GeoSourceInterface& geoSource = *(m_levGeoPtr->getGeoSourcePtr()); const RealVect& dx = m_levGeoPtr->getDx(); const DisjointBoxLayout& grids = a_newVel.getBoxes(); DataIterator dit = grids.dataIterator(); // 1. Compute the background buoyancy, N, Dinv, etc... // Fill the FC background buoyancy field. LevelData<FluxBox> bbar(grids, 1, 2*IntVect::Unit); for (dit.reset(); dit.ok(); ++dit) { FluxBox& bbarFB = bbar[dit]; D_TERM(m_physBCPtr->setBackgroundScalar(bbarFB[0], 0, *m_levGeoPtr, dit(), dummyTime);, m_physBCPtr->setBackgroundScalar(bbarFB[1], 0, *m_levGeoPtr, dit(), dummyTime);,
void bar(int a) { printf("---->bar\n"); bbar(a); printf("<----bar\n"); }