@@ -100,13 +100,22 @@ AmrPicture::AmrPicture(GraphicsAttributes *gaptr,
100100 dataSize[ilev] = dataSizeH[ilev] * dataSizeV[ilev]; // for a picture (slice).
101101 }
102102
103- if (AVGlobals::GivenInitialPlanes ()) {
103+ if (AVGlobals::GivenInitialPlanes () || AVGlobals::GivenInitialPlanesReal () ) {
104104 BL_ASSERT (BL_SPACEDIM == 3 );
105+ IntVect initialplanes;
106+ if (AVGlobals::GivenInitialPlanes ()) {
107+ initialplanes = AVGlobals::GetInitialPlanes ();
108+ } else if (AVGlobals::GivenInitialPlanesReal ()) {
109+ auto const location = AVGlobals::GetInitialPlanesReal ();
110+ IntVect ivLoc;
111+ int ivLevel;
112+ amrData.IntVectFromLocation (pltAppStatePtr->FinestLevel (), location, ivLoc, ivLevel, initialplanes);
113+ }
105114 int coarsenCRR = amrex::CRRBetweenLevels (maxAllowableLevel,
106115 pltAppStatePtr->FinestLevel (),
107116 amrData.RefRatio ());
108- int tempSliceV = AVGlobals::GetInitialPlanes () [Amrvis::XDIR]; // at finest lev
109- int tempSliceH = AVGlobals::GetInitialPlanes () [Amrvis::YDIR]; // at finest lev
117+ int tempSliceV = initialplanes [Amrvis::XDIR]; // at finest lev
118+ int tempSliceH = initialplanes [Amrvis::YDIR]; // at finest lev
110119 tempSliceV /= coarsenCRR;
111120 tempSliceH /= coarsenCRR;
112121 tempSliceH = subDomain[maxAllowableLevel].bigEnd (Amrvis::YDIR) - tempSliceH;
@@ -121,7 +130,7 @@ AmrPicture::AmrPicture(GraphicsAttributes *gaptr,
121130 subcutY = hLine;
122131 subcut2ndY = hLine;
123132
124- int tempSlice = AVGlobals::GetInitialPlanes () [Amrvis::YZ - myView]; // at finest lev
133+ int tempSlice = initialplanes [Amrvis::YZ - myView]; // at finest lev
125134 tempSlice /= coarsenCRR;
126135 slice = amrex::max (std::min (tempSlice,
127136 subDomain[maxAllowableLevel].bigEnd (Amrvis::YZ-myView)),
@@ -245,8 +254,17 @@ AmrPicture::AmrPicture(int view, GraphicsAttributes *gaptr,
245254 subDomain[maxAllowableLevel].bigEnd (Amrvis::YZ-myView)),
246255 subDomain[maxAllowableLevel].smallEnd (Amrvis::YZ-myView));
247256 } else {
248- if (AVGlobals::GivenInitialPlanes ()) {
249- int tempSlice = AVGlobals::GetInitialPlanes ()[Amrvis::YZ - myView]; // finest lev
257+ if (AVGlobals::GivenInitialPlanes () || AVGlobals::GivenInitialPlanesReal ()) {
258+ IntVect initialplanes;
259+ if (AVGlobals::GivenInitialPlanes ()) {
260+ initialplanes = AVGlobals::GetInitialPlanes ();
261+ } else if (AVGlobals::GivenInitialPlanesReal ()) {
262+ auto const location = AVGlobals::GetInitialPlanesReal ();
263+ IntVect ivLoc;
264+ int ivLevel;
265+ amrData.IntVectFromLocation (pltAppStatePtr->FinestLevel (), location, ivLoc, ivLevel, initialplanes);
266+ }
267+ int tempSlice = initialplanes[Amrvis::YZ - myView]; // finest lev
250268 int coarsenCRR = amrex::CRRBetweenLevels (maxAllowableLevel,
251269 pltAppStatePtr->FinestLevel (),
252270 amrData.RefRatio ());
@@ -257,8 +275,8 @@ AmrPicture::AmrPicture(int view, GraphicsAttributes *gaptr,
257275
258276 int tempSliceV, tempSliceH;
259277 if (myView==Amrvis::XY) {
260- tempSliceV = AVGlobals::GetInitialPlanes () [Amrvis::XDIR]; // at finest lev
261- tempSliceH = AVGlobals::GetInitialPlanes () [Amrvis::YDIR]; // at finest lev
278+ tempSliceV = initialplanes [Amrvis::XDIR]; // at finest lev
279+ tempSliceH = initialplanes [Amrvis::YDIR]; // at finest lev
262280 tempSliceV /= coarsenCRR;
263281 tempSliceH /= coarsenCRR;
264282 tempSliceH = subDomain[maxAllowableLevel].bigEnd (Amrvis::YDIR) - tempSliceH;
@@ -269,8 +287,8 @@ AmrPicture::AmrPicture(int view, GraphicsAttributes *gaptr,
269287 subDomain[maxAllowableLevel].bigEnd (Amrvis::YDIR)),
270288 subDomain[maxAllowableLevel].smallEnd (Amrvis::YDIR));
271289 } else if (myView==Amrvis::XZ) {
272- tempSliceV = AVGlobals::GetInitialPlanes () [Amrvis::XDIR]; // at finest lev
273- tempSliceH = AVGlobals::GetInitialPlanes () [Amrvis::ZDIR]; // at finest lev
290+ tempSliceV = initialplanes [Amrvis::XDIR]; // at finest lev
291+ tempSliceH = initialplanes [Amrvis::ZDIR]; // at finest lev
274292 tempSliceV /= coarsenCRR;
275293 tempSliceH /= coarsenCRR;
276294 tempSliceH = subDomain[maxAllowableLevel].bigEnd (Amrvis::ZDIR) - tempSliceH;
@@ -281,8 +299,8 @@ AmrPicture::AmrPicture(int view, GraphicsAttributes *gaptr,
281299 subDomain[maxAllowableLevel].bigEnd (Amrvis::ZDIR)),
282300 subDomain[maxAllowableLevel].smallEnd (Amrvis::ZDIR));
283301 } else {
284- tempSliceV = AVGlobals::GetInitialPlanes () [Amrvis::YDIR]; // at finest lev
285- tempSliceH = AVGlobals::GetInitialPlanes () [Amrvis::ZDIR]; // at finest lev
302+ tempSliceV = initialplanes [Amrvis::YDIR]; // at finest lev
303+ tempSliceH = initialplanes [Amrvis::ZDIR]; // at finest lev
286304 tempSliceV /= coarsenCRR;
287305 tempSliceH /= coarsenCRR;
288306 tempSliceH = subDomain[maxAllowableLevel].bigEnd (Amrvis::ZDIR) - tempSliceH;
0 commit comments