Chombo + EB + MF  3.2
LevelDataI.H
Go to the documentation of this file.
1 #ifdef CH_LANG_CC
2 /*
3  * _______ __
4  * / ___/ / ___ __ _ / / ___
5  * / /__/ _ \/ _ \/ V \/ _ \/ _ \
6  * \___/_//_/\___/_/_/_/_.__/\___/
7  * Please refer to Copyright.txt, in Chombo's root directory.
8  */
9 #endif
10 
11 #ifndef _LEVELDATAI_H_
12 #define _LEVELDATAI_H_
13 
14 #include <cstdlib>
15 #include <algorithm>
16 using std::sort;
17 
18 #include "parstream.H"
19 #include "CH_Timer.H"
20 #include <float.h>
21 #include "NamespaceHeader.H"
22 
23 //
24 // LevelData<FluxBox> specializations
25 
26 template < > void LevelData<FluxBox>::degenerateLocalOnly( LevelData<FluxBox>& a_to, const SliceSpec& a_ss ) const;
27 
28 //-----------------------------------------------------------------------
29 template<class T>
31 {
32 }
33 //-----------------------------------------------------------------------
34 
35 //-----------------------------------------------------------------------
36 template<class T>
38 {
39  CH_TIME("~LevelData");
40 }
41 //-----------------------------------------------------------------------
42 
43 //-----------------------------------------------------------------------
44 template<class T>
45 LevelData<T>::LevelData(const DisjointBoxLayout& dp, int comps, const IntVect& ghost,
46  const DataFactory<T>& a_factory)
47  : m_disjointBoxLayout(dp), m_ghost(ghost)
48 {
49 
50  this->m_boxLayout = dp;
51  this->m_comps = comps;
52  this->m_isdefined = true;
53  //no need for exchange copier if no ghost
54  if(m_ghost != IntVect::Zero)
55  {
57  }
58 
59  if (!dp.isClosed())
60  {
61  MayDay::Error("non-disjoint DisjointBoxLayout: LevelData<T>::LevelData(const DisjointBoxLayout& dp, int comps)");
62  }
63 
64  this->m_threadSafe = a_factory.threadSafe();
65  //this->m_threadSafe = false;
66 
67  Interval interval(0, comps-1);
68  this->allocateGhostVector(a_factory, ghost);
69  this->setVector(*this, interval, interval); // Does nothing.
70 }
71 //-----------------------------------------------------------------------
72 
73 // Since I need to thwart the user from invoking the
74 // 'define' methods that use a general BoxLayout, I cannot
75 // get at said functions myself now. Ha! So, I have to recode
76 // them here.
77 
78 //-----------------------------------------------------------------------
79 template<class T>
80 void LevelData<T>::define(const DisjointBoxLayout& dp, int comps, const IntVect& ghost,
81  const DataFactory<T> & a_factory)
82 {
83  CH_TIME("LevelData<T>::define(dbl,comps,ghost,factory)");
84  // clear exchange copier if it's already been defined
85  if (this->m_isdefined)
86  {
87  m_exchangeCopier.clear();
88  }
89 
90  this->m_isdefined = true;
91  if (!dp.isClosed())
92  {
93  MayDay::Error("non-disjoint DisjointBoxLayout: LevelData<T>::define(const DisjointBoxLayout& dp,....)");
94  }
95  if (comps<=0)
96  {
97  MayDay::Error("LevelData::LevelData(const BoxLayout& dp, int comps) comps<=0");
98  }
99  this->m_comps = comps;
100  this->m_boxLayout = dp;
101 
102  this->m_threadSafe = a_factory.threadSafe();
103  //this->m_threadSafe = false;
104 
105  m_disjointBoxLayout = dp;
106  m_ghost = ghost;
107  //no need for exchange copier if no ghost
108  //do not do this if it is periodic because bad things can happen
109  //with large number of ghost cells.
110  bool periodic = m_disjointBoxLayout.physDomain().isPeriodic();
111  if((m_ghost != IntVect::Zero) && !periodic)
112  {
113  m_exchangeCopier.define(m_disjointBoxLayout, m_disjointBoxLayout, m_ghost, true);
114  }
115 
116  // Interval interval(0, comps-1);
117  this->allocateGhostVector(a_factory, ghost);
118  // this->setVector(*this, interval, interval);
119 }
120 //-----------------------------------------------------------------------
121 
122 //-----------------------------------------------------------------------
123 template<class T>
124 void LevelData<T>::define(const LevelData<T>& da, const DataFactory<T> & a_factory)
125 {
126  CH_TIME("LevelData<T>::define(LevelData<T>,factory)");
127  // clear exchange copier if it's already been defined
128  if (this->m_isdefined)
129  {
130  m_exchangeCopier.clear();
131  }
132  this->m_isdefined = true;
133  if (this == &da) return;
134  m_disjointBoxLayout = da.m_disjointBoxLayout;
135  this->m_boxLayout = da.m_disjointBoxLayout;
136  this->m_comps = da.m_comps;
137  this->m_threadSafe = a_factory.threadSafe();
138  //this->m_threadSafe = false;
139 
140  m_ghost = da.m_ghost;
141 
142  //no need for exchange copier if no ghost
143  if(m_ghost != IntVect::Zero)
144  {
145  m_exchangeCopier.define(m_disjointBoxLayout, m_disjointBoxLayout, m_ghost, true);
146  }
147  this->allocateGhostVector(a_factory, m_ghost);
148  da.copyTo(*this);
149 }
150 //-----------------------------------------------------------------------
151 
152 //-----------------------------------------------------------------------
153 template<class T>
154 void LevelData<T>::define(const LevelData<T>& da, const Interval& comps,
155  const DataFactory<T>& a_factory)
156 {
157 #ifdef USE_PROTO
158  PR_TIME("Chombo::LevelData::define");
159 #else
160  CH_TIME("LevelData<T>::define(LevelData<T>,comps,factory)");
161 #endif
162  // clear exchange copier if it's already been defined
163  if (this->m_isdefined)
164  {
165  m_exchangeCopier.clear();
166  }
167  this->m_isdefined = true;
168  this->m_threadSafe = a_factory.threadSafe();
169  //this->m_threadSafe = false;
170  if (this == &da)
171  {
172  MayDay::Error(" LevelData<T>::define(const LevelData<T>& da, const Interval& comps) called with 'this'");
173  }
174  CH_assert(comps.size()>0);
175  // this line doesn't make any sense!
176  //CH_assert(comps.end()<=this->m_comps);
177  CH_assert(comps.begin()>=0);
178 
179  m_disjointBoxLayout = da.m_disjointBoxLayout;
180  this->m_boxLayout = da.m_disjointBoxLayout;
181 
182  this->m_comps = comps.size();
183 
184  m_ghost = da.m_ghost;
185  //no need for exchange copier if no ghost
186  if(m_ghost != IntVect::Zero)
187  {
188  m_exchangeCopier.define(m_disjointBoxLayout, m_disjointBoxLayout, m_ghost, true);
189  }
190 
191  Interval dest(0, this->m_comps-1);
192 
193  this->allocateGhostVector(a_factory, m_ghost);
194 
195  this->setVector(da, comps, dest);
196 
197 }
198 //-----------------------------------------------------------------------
199 //-----------------------------------------------------------------------
200 
201 template<class T>
202 void LevelData<T>::copyTo(const Interval& srcComps,
203  BoxLayoutData<T>& dest,
204  const Interval& destComps) const
205 {
206 #ifdef USE_PROTO
207  PR_TIME("Chombo::LevelData::copyTo");
208 #else
209  CH_TIME("copyTo");
210 #endif
211  if ((BoxLayoutData<T>*)this == &dest) return;
212 
213  if (this->boxLayout() == dest.boxLayout())
214  {
215 #ifdef USE_PROTO
216  PR_TIME("Chombo::LevelData::copyTo::local");
217 #else
218  CH_TIME("local copy");
219 #endif
220  // parallel direct copy here, no communication issues
221  DataIterator it = this->dataIterator();
222  int nbox = it.size();
223 #pragma omp parallel for if(this->m_threadSafe)
224  for (int ibox = 0; ibox < nbox; ibox++)
225  {
226  dest[it[ibox]].copy(this->box(it[ibox]),
227  destComps,
228  this->box(it[ibox]),
229  this->operator[](it[ibox]),
230  srcComps);
231  }
232  return;
233  }
234 
235  Copier copier(m_disjointBoxLayout, dest.boxLayout());
236  copyTo(srcComps, dest, destComps, copier);
237 }
238 
239 template<class T>
240 void LevelData<T>::localCopyTo(const Interval& srcComps,
241  LevelData<T>& dest,
242  const Interval& destComps) const
243 {
244 #ifdef USE_PROTO
245  PR_TIME("Chombo::LevelData::localCopyTo");
246 #else
247  CH_TIME("LevelData::localCopyTo");
248 #endif
249  if ((BoxLayoutData<T>*)this == &dest) return;
250 
251  if(this->disjointBoxLayout() == dest.disjointBoxLayout())
252  {
253  DataIterator it = this->dataIterator();
254  int nbox = it.size();
255 #pragma omp parallel for if(this->m_threadSafe)
256  for (int ibox = 0; ibox < nbox; ibox++)
257  {
258  Box srcBox = this->box(it[ibox]);
259  Box dstBox = this->box(it[ibox]);
260  srcBox.grow(this->ghostVect());
261  dstBox.grow(dest.ghostVect());
262  Box minBox = srcBox;
263  minBox &= dstBox;
264  dest[it[ibox]].copy(minBox,
265  destComps,
266  minBox,
267  this->operator[](it[ibox]),
268  srcComps);
269  }
270  }
271  else
272  {
273  MayDay::Error("localCopyTo only works with identical DBLs");
274  }
275 
276  return;
277 }
278 
279 template<class T>
281 {
282  CH_assert(this->nComp() == dest.nComp());
283  this->localCopyTo(this->interval(), dest, dest.interval());
284 }
285 
286 //-----------------------------------------------------------------------
287 
288 //-----------------------------------------------------------------------
289 template<class T>
291 {
292  CH_assert(this->nComp() == dest.nComp());
293  this->copyTo(this->interval(), dest, dest.interval());
294 }
295 //-----------------------------------------------------------------------
296 
297 //-----------------------------------------------------------------------
298 template<class T>
299 void LevelData<T>::copyTo(const Interval& srcComps,
300  LevelData<T>& dest,
301  const Interval& destComps) const
302 {
303  if (this == &dest)
304  {
305  MayDay::Error("src == dest in copyTo function. Perhaps you want exchange ?");
306  }
307 
308  if (this->boxLayout() == dest.boxLayout() && dest.ghostVect() == IntVect::Zero)
309  {
310  // parallel direct copy here, no communication issues
311  DataIterator it = this->dataIterator();
312  int nbox = it.size();
313 #pragma omp parallel for if(this->m_threadSafe)
314  for (int ibox = 0; ibox < nbox; ibox++)
315  {
316  dest[it[ibox]].copy(this->box(it[ibox]),
317  destComps,
318  this->box(it[ibox]),
319  this->operator[](it[ibox]),
320  srcComps);
321  }
322  return;
323  }
324 
325  Copier copier(m_disjointBoxLayout, dest.getBoxes(), dest.m_ghost);
326  copyTo(srcComps, dest, destComps, copier);
327 }
328 //-----------------------------------------------------------------------
329 
330 //-----------------------------------------------------------------------
331 template<class T>
333 {
334  CH_assert(this->nComp() == dest.nComp());
335  this->copyTo(this->interval(), dest, dest.interval());
336 }
337 //-----------------------------------------------------------------------
338 
339 //-----------------------------------------------------------------------
340 template<class T>
341 void LevelData<T>::copyTo(const Interval& srcComps,
342  BoxLayoutData<T>& dest,
343  const Interval& destComps,
344  const Copier& copier,
345  const LDOperator<T>& a_op) const
346 {
347 #ifdef USE_PROTO
348  PR_TIME("Chombo::LevelData::copyTo");
349 #else
350  CH_TIME("copyTo");
351 #endif
352 #ifdef CH_MPI
353  {
354 // CH_TIME("MPI_Barrier copyTo");
355 // MPI_Barrier(Chombo_MPI::comm);
356  }
357 #endif
358 
359  this->makeItSo(srcComps, *this, dest, destComps, copier, a_op);
360 }
361 //-----------------------------------------------------------------------
362 
363 //-----------------------------------------------------------------------
364 template<class T>
366  const Copier& copier,
367  const LDOperator<T>& a_op) const
368 {
369  CH_assert(this->nComp() == dest.nComp());
370  this->copyTo(this->interval(), dest, dest.interval(), copier, a_op);
371 }
372 //-----------------------------------------------------------------------
373 
374 //-----------------------------------------------------------------------
375 template<class T>
376 void LevelData<T>::copyTo(const Interval& srcComps,
377  LevelData<T>& dest,
378  const Interval& destComps,
379  const Copier& copier,
380  const LDOperator<T>& a_op) const
381 {
382 #ifdef USE_PROTO
383  PR_TIME("Chombo::LevelData::copyTo");
384 #else
385  CH_TIME("LevelData::copyTo");
386 #endif
387 #ifdef CH_MPI
388  {
389 // CH_TIME("MPI_Barrier copyTo");
390 // MPI_Barrier(Chombo_MPI::comm);
391  }
392 #endif
393  this->makeItSo(srcComps, *this, dest, destComps, copier, a_op);
394 }
395 //-----------------------------------------------------------------------
396 
397 //-----------------------------------------------------------------------
398 template<class T>
400  const Copier& copier,
401  const LDOperator<T>& a_op) const
402 {
403  CH_assert(this->nComp() == dest.nComp());
404  this->copyTo(this->interval(), dest, dest.interval(), copier, a_op);
405 }
406 //-----------------------------------------------------------------------
407 
408 //-----------------------------------------------------------------------
409 template<class T>
411 {
412 #ifdef USE_PROTO
413  PR_TIME("Chombo::LevelData::exchange (exchange + copier)");
414 #else
415  CH_TIME("LevelData::exchange (exchange + copier)");
416 #endif
417  // later on we can code this part as a direct algorithm
418  // by copying and pasting the code from the Copier::define code
419  // for now, just do the easy to debug approach.
420  if(m_ghost != IntVect::Zero)//no need for exchange copier if no ghost
421  {
422  if(!m_exchangeCopier.isDefined())
423  {
424 #ifdef USE_PROTO
425  PR_TIME("Chombo::LevelData::exchange (defining copier)");
426 #else
427  CH_TIME("LevelData::exchange (defining copier)");
428 #endif
429  m_exchangeCopier.define(m_disjointBoxLayout, m_disjointBoxLayout, m_ghost, true);
430  }
431  {
432 #ifdef USE_PROTO
433  PR_TIME("Chombo::LevelData::exchange (actual exchange)");
434 #else
435  CH_TIME("LevelData::exchange (actual exchange)");
436 #endif
437  exchange(comps, m_exchangeCopier);
438  }
439  }
440 
441  // if there aren't any ghost cells, there isn't really anything
442  // to do here (also, if m_ghost == Zero, m_exchangeCopier
443  // wasn't defined!
444  //if (m_ghost != IntVect::Zero)
445  //this->makeItSo(comps, *this, *this, comps, m_exchangeCopier);
446 }
447 //-----------------------------------------------------------------------
448 
449 //-----------------------------------------------------------------------
450 template<class T>
452 {
453  exchange(this->interval());
454 }
455 //-----------------------------------------------------------------------
456 
457 //-----------------------------------------------------------------------
458 template<class T>
460  const Copier& copier,
461  const LDOperator<T>& a_op)
462 {
463 #ifdef USE_PROTO
464  PR_TIME("Chombo::LevelData::exchange");
465 #else
466  CH_TIME("exchange");
467 #endif
468 #ifdef CH_MPI
469  {
470 // CH_TIME("MPI_Barrier exchange");
471 // MPI_Barrier(Chombo_MPI::comm);
472  }
473 #endif
474  this->makeItSo(comps, *this, *this, comps, copier, a_op);
475 }
476 //-----------------------------------------------------------------------
477 
478 //-----------------------------------------------------------------------
479 template<class T>
480 void LevelData<T>::exchange(const Copier& copier)
481 {
482  exchange(this->interval(), copier);
483 }
484 //-----------------------------------------------------------------------
485 
486 //-----------------------------------------------------------------------
487 template<class T>
489 {
490  CH_TIME("exchangeNoOverlap");
491  this->makeItSoBegin(this->interval(), *this, *this, this->interval(), copier);
492  this->makeItSoEnd(this->interval());
493  this->makeItSoLocalCopy(this->interval(), *this, *this, this->interval(), copier);
494 }
495 //-----------------------------------------------------------------------
496 
497 //-----------------------------------------------------------------------
498 template<class T>
500 {
501  CH_TIME("exchangeBegin");
502  this->makeItSoBegin(this->interval(), *this, *this, this->interval(), copier);
503  this->makeItSoLocalCopy(this->interval(), *this, *this, this->interval(), copier);
504 }
505 //-----------------------------------------------------------------------
506 
507 //-----------------------------------------------------------------------
508 template<class T>
510 {
511  CH_TIME("exchangeEnd");
512  this->makeItSoEnd(this->interval());
513 }
514 //-----------------------------------------------------------------------
515 
516 //-----------------------------------------------------------------------
517 template<class T>
518 void LevelData<T>::define(const BoxLayout& dp, int comps, const DataFactory<T>& a_factory)
519 {
520  MayDay::Error("LevelData<T>::define called with BoxLayout input");
521 }
522 //-----------------------------------------------------------------------
523 
524 //-----------------------------------------------------------------------
525 template<class T>
527 {
528  MayDay::Error("LevelData<T>::define called with BoxLayout input");
529 }
530 //-----------------------------------------------------------------------
531 
532 //-----------------------------------------------------------------------
533 template<class T>
534 void LevelData<T>::define(const BoxLayoutData<T>& da, const DataFactory<T>& a_factory )
535 {
536  MayDay::Error("LevelData<T>::define called with BoxLayout input");
537 }
538 //-----------------------------------------------------------------------
539 
540 //-----------------------------------------------------------------------
541 template<class T>
542 void LevelData<T>::define(const BoxLayoutData<T>& da, const Interval& comps,
543  const DataFactory<T>& a_factory)
544 {
545  MayDay::Error("LevelData<T>::define called with BoxLayout input");
546 }
547 //-----------------------------------------------------------------------
548 
549 //-----------------------------------------------------------------------
550 template<class T>
551 void LevelData<T>::apply( void (*a_Function)(const Box& box, int comps, T& t) )
552 {
553  DataIterator it = this->dataIterator();
554  int nbox = it.size();
555 #pragma omp parallel for
556  for (int ibox = 0; ibox < nbox; ibox++)
557  {
558 
559  a_Function(m_disjointBoxLayout.get(it[ibox]), this->m_comps, *(this->m_vector[it[ibox].datInd()]));
560  }
561 }
562 //-----------------------------------------------------------------------
563 
564 //-----------------------------------------------------------------------
565 template<class T>
567 {
568  DataIterator it = this->dataIterator();
569  int nbox = it.size();
570 #pragma omp parallel for
571  for (int ibox = 0; ibox < nbox; ibox++)
572  {
573  // unsigned int index = this->m_boxLayout.lindex(it());
574  f(m_disjointBoxLayout.get(it[ibox]), this->m_comps, *(this->m_vector[it[ibox].datInd()]));
575  }
576 }
577 //-----------------------------------------------------------------------
578 
579 //-----------------------------------------------------------------------
580 template<class T> void
582  const SliceSpec& a_sliceSpec ) const
583 {
584  DisjointBoxLayout toDBL;
585  m_disjointBoxLayout.degenerate( toDBL, a_sliceSpec );
586  IntVect toGhost;
587  for ( int i=0;i<CH_SPACEDIM;++i )
588  {
589  if ( i != a_sliceSpec.direction )
590  {
591  toGhost[i] = m_ghost[i];
592  } else
593  {
594  toGhost[i] = 0;
595  }
596  }
597  a_to.define( toDBL, this->nComp(), toGhost );
598  copyTo( a_to );
599 }
600 //-----------------------------------------------------------------------
601 
602 //-----------------------------------------------------------------------
603 template<class T> void
605  const SliceSpec& a_sliceSpec ) const
606 {
607  DisjointBoxLayout toDBL;
608  m_disjointBoxLayout.degenerate( toDBL, a_sliceSpec, true );
609  IntVect toGhost;
610  for ( int i=0;i<CH_SPACEDIM;++i )
611  {
612  if ( i != a_sliceSpec.direction )
613  {
614  toGhost[i] = m_ghost[i];
615  } else
616  {
617  toGhost[i] = 0;
618  }
619  }
620  a_to.define( toDBL, this->nComp(), toGhost );
621 
622  // manage copyTo ourselves to maintain locality
623  DataIterator fromDit = this->dataIterator();
624  DataIterator toDit = a_to.dataIterator();
625  for (toDit.begin(); toDit.ok(); ++toDit)
626  {
627  fromDit.begin();
628  bool done = false;
629  while (!done)
630  {
631  if (m_disjointBoxLayout[fromDit].contains(toDBL[toDit]))
632  {
633  // boxes intersect, do copy
634  FArrayBox& toFAB = a_to[toDit];
635  const FArrayBox& fromFAB = this->operator[](fromDit);
636  // note that we're including ghost cells here
637  Box intersectBox = toFAB.box();
638  intersectBox &= fromFAB.box();
639  // now do copy
640  toFAB.copy(fromFAB, intersectBox);
641  done = true;
642  } // end if we found an intersection
643  else
644  {
645  ++fromDit;
646  // probably want to check for lexigraphical sorting done-ness
647 
648  // are we done looping through fromBoxes?
649  if (!fromDit.ok()) done = true;
650  } // end if we didn't find a match
651  } // end while loop over fromBoxes
652 
653  } // end loop over toBoxes
654 
655 }
656 //-----------------------------------------------------------------------
657 
658 #include "NamespaceFooter.H"
659 #endif
int m_comps
Definition: BoxLayoutData.H:403
#define CH_SPACEDIM
Definition: SPACE.H:51
#define CH_assert(cond)
Definition: CHArray.H:37
virtual void localCopyTo(const Interval &srcComps, LevelData< T > &dest, const Interval &destComps) const
only works if source and dest have the same disjointboxlayout
Definition: LevelDataI.H:240
LevelData()
Definition: LevelDataI.H:30
void degenerate(LevelData< T > &a_to, const SliceSpec &a_ss) const
Definition: LevelDataI.H:581
DisjointBoxLayout m_disjointBoxLayout
Definition: LevelData.H:297
Definition: LevelData.H:248
A not-necessarily-disjoint collective of boxes.
Definition: BoxLayout.H:145
int nComp() const
Definition: BoxLayoutData.H:306
A strange but true thing to make copying from one boxlayoutdata to another fast.
Definition: Copier.H:152
int size() const
Definition: DataIterator.H:218
Definition: SliceSpec.H:41
IntVect m_ghost
Definition: LevelData.H:299
void begin()
initialize this iterator to the first Box in its Layout
Definition: LayoutIterator.H:122
void setVector(const BoxLayoutData< T > &da, const Interval &srcComps, const Interval &destComps)
Definition: BoxLayoutDataI.H:45
Definition: DataIterator.H:190
Copier m_exchangeCopier
Definition: LevelData.H:305
int size() const
Definition: Interval.H:75
BoxLayout m_boxLayout
Definition: LayoutData.H:118
virtual void exchange(void)
Simplest case – do all components.
Definition: LevelDataI.H:451
Definition: EBInterface.H:45
virtual void exchangeBegin(const Copier &copier)
asynchronous exchange start. load and fire off messages.
Definition: LevelDataI.H:499
Box minBox(const Box &b1, const Box &b2)
virtual void copyTo(const Interval &srcComps, BoxLayoutData< T > &dest, const Interval &destComps) const
Definition: LevelDataI.H:202
virtual void apply(void(*a_Function)(const Box &, int, T &))
#define CH_TIME(name)
Definition: CH_Timer.H:82
Structure for passing component ranges in code.
Definition: Interval.H:23
void allocateGhostVector(const DataFactory< T > &factory, const IntVect &ghost=IntVect::Zero)
Definition: BoxLayoutDataI.H:167
void degenerateLocalOnly(LevelData< T > &a_to, const SliceSpec &a_ss) const
version of degenerate which does strictly local copying
Definition: LevelDataI.H:604
Interval interval() const
Definition: BoxLayoutData.H:312
Data on a BoxLayout.
Definition: BoxLayoutData.H:97
virtual void define(const DisjointBoxLayout &dp, int comps, const IntVect &ghost=IntVect::Zero, const DataFactory< T > &a_factory=DefaultDataFactory< T >())
Definition: LevelDataI.H:80
BaseFab< T > & copy(const BaseFab< T > &a_src, const Box &a_srcbox, int a_srccomp, const Box &a_destbox, int a_destcomp, int a_numcomp)
Definition: BaseFabImplem.H:426
const DisjointBoxLayout & disjointBoxLayout() const
Definition: LevelData.H:209
const DisjointBoxLayout & getBoxes() const
Definition: LevelData.H:203
A BoxLayout that has a concept of disjointedness.
Definition: DisjointBoxLayout.H:30
bool isClosed() const
Definition: BoxLayout.H:730
static void Error(const char *const a_msg=m_nullString, int m_exitCode=CH_DEFAULT_ERROR_CODE)
Print out message to cerr and exit with the specified exit code.
int begin() const
Definition: Interval.H:99
const BoxLayout & boxLayout() const
Definition: LayoutData.H:107
static const IntVect Zero
Definition: IntVect.H:658
A Rectangular Domain on an Integer Lattice.
Definition: Box.H:469
bool m_isdefined
Definition: BoxLayoutData.H:405
virtual ~LevelData()
Definition: LevelDataI.H:37
An integer Vector in SpaceDim-dimensional space.
Definition: CHArray.H:42
Definition: FArrayBox.H:45
DataIterator dataIterator() const
Definition: LayoutDataI.H:78
void degenerate(DisjointBoxLayout &a_to, const SliceSpec &a_ss, bool a_maintainProcAssign=false) const
Factory object to data members of a BoxLayoutData container.
Definition: BoxLayoutData.H:30
Box & grow(int i)
grow functions
Definition: Box.H:2263
virtual bool ok() const
return true if this iterator is still in its Layout
Definition: LayoutIterator.H:117
virtual bool threadSafe() const
Definition: BoxLayoutData.H:49
Definition: BoxLayoutData.H:173
bool m_threadSafe
Definition: BoxLayoutData.H:404
virtual void define(const DisjointBoxLayout &a_level, const BoxLayout &a_dest, bool a_exchange=false, IntVect a_shift=IntVect::Zero)
virtual void exchangeEnd()
finish asynchronous exchange
Definition: LevelDataI.H:509
int direction
Definition: SliceSpec.H:48
virtual void exchangeNoOverlap(const Copier &copier)
Definition: LevelDataI.H:488
const IntVect & ghostVect() const
Definition: LevelData.H:170
const Box & box() const
Definition: BaseFabImplem.H:271