Chombo + EB  3.2
BaseIFFABI.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 _BASEIFFABI_H_
12 #define _BASEIFFABI_H_
13 #include "MayDay.H"
14 #include "FaceIterator.H"
15 #include "DebugOut.H"
16 #include <typeinfo>
17 #include "NamespaceHeader.H"
18 
19 template <class T>
21 
22 //appalling hack to turn off surrounding node semantic
23 template <class T>
24 void
26 {
27  s_doSurroundingNodeSemantic = a_useSurr;
28 }
29 
30 //this if statement is to keep the above box growage from
31 //forcing more copying than the semantic demands.
32 template <class T>
33 bool
35  const FaceIndex& a_face) const
36 {
37  bool retval= ((a_toBox.contains(a_face.gridIndex(Side::Lo))) ||
38  (a_toBox.contains(a_face.gridIndex(Side::Hi))));
39  if(s_verbose)
40  {
41  pout() << "usethisface: face = " << a_face << ", a_region = " << a_toBox << endl;
42  }
43  return retval;
44 }
45 
46 //this box growing obfuscation is because
47 //copy and linearization have a cell-centered semantic.
48 //and we want the surrounding nodes
49 //of the cells to be copied
50 //Let's see how many more times I have to rewrite this function.
51 //--dtg 4/2009
52 template <class T>
53 void
55  IntVectSet& a_ivsIntersect,
56  const Box& a_toBox) const
57 {
58  Box grownBox = a_toBox;
59  if (s_doSurroundingNodeSemantic)
60  {
61  grownBox.grow(m_direction, 1);
62  }
63  a_intBox = grownBox;
64  a_ivsIntersect = m_ivs;
65  a_ivsIntersect &= a_intBox;
66 }
67 
68 template <class T>
69 bool BaseIFFAB<T>::s_verbose = false;
70 /******************/
71 template <class T> inline void
72 BaseIFFAB<T>::setVerbose(bool a_verbose)
73 {
74  s_verbose = a_verbose;
75 }
76 /******************/
77 template <class T> inline
78 const EBGraph&
80 {
81  return m_ebgraph;
82 }
83 /******************/
84 template <class T> inline
86 {
87  setDefaultValues();
88 }
89 /******************/
90 template <class T> inline
92 {
93  clear();
94 }
95 /******************/
96 template <class T> inline
98  const EBGraph& a_ebgraph,
99  const int& a_direction,
100  const int& a_nvarin)
101 {
102  setDefaultValues();
103  define(a_ivsin, a_ebgraph, a_direction, a_nvarin);
104 }
105 
106 template <class T> Arena* BaseIFFAB<T>::s_Arena = NULL;
107 
108 /******************/
109 #pragma intel optimization_level 0
110 template <class T> inline
111 void
113  const EBGraph& a_ebgraph,
114  const int& a_direction,
115  const int& a_nvarin)
116 {
117  clear();
118  m_isDefined = true;
119  CH_assert(a_nvarin > 0);
120  CH_assert((a_direction >= 0) && (a_direction < SpaceDim));
121  const ProblemDomain& domain = a_ebgraph.getDomain();
122  m_direction = a_direction;
123  m_ivs = a_ivsin;
124  m_ebgraph = a_ebgraph;
125  m_nComp = a_nvarin;
126  Box minbox = a_ivsin.minBox();
127  BaseFab<int> faceLocFab;
128  BaseFab<bool> doneThat;
129  if (!a_ivsin.isEmpty())
130  {
131  m_fab.resize( surroundingNodes(minbox,a_direction), 1);
132  faceLocFab.resize(surroundingNodes(minbox,a_direction), 1);
133  doneThat.resize( surroundingNodes(minbox,a_direction), 1);
134  faceLocFab.setVal(-1);
135  m_fab.setVal(NULL);
136  doneThat.setVal(false);
137  }
138  //get the data size and save offsets
139  //need to do this to avoid double-counting faces
140  m_nFaces = 0;
141  int nVoFs = 0;
142  for (IVSIterator ivsit(m_ivs); ivsit.ok(); ++ivsit)
143  {
144  const IntVect& iv = ivsit();
145  IntVect ivLo = iv-BASISV(m_direction);
146  IntVect ivHi = iv+BASISV(m_direction);
147  //check to see if on domain boundary
148  int numVoFsHere = m_ebgraph.numVoFs(iv);
149 
150  nVoFs += numVoFsHere;
151  //we hold the mapping in the high vof of the faces
152  if (!doneThat(iv, 0))
153  {
154  doneThat(iv, 0) = true;
155 
156  bool onLoBoundary = false;
157  if (!domain.isPeriodic(m_direction))
158  {
159  onLoBoundary = iv[m_direction] == domain.domainBox().smallEnd(m_direction);
160  }
161  int numFacesLoSide = numVoFsHere;
162  if (!onLoBoundary)
163  {
164  int numVoFsLo = m_ebgraph.numVoFs(ivLo);
165  numFacesLoSide = numVoFsHere*numVoFsLo;
166  }
167 
168  faceLocFab(iv, 0) = m_nFaces;
169  m_nFaces += numFacesLoSide;
170  }
171  if (!doneThat(ivHi, 0))
172  {
173  doneThat(ivHi, 0) = true;
174 
175  bool onHiBoundary = false;
176  if (!domain.isPeriodic(m_direction))
177  {
178  onHiBoundary = iv[m_direction] == domain.domainBox().bigEnd(m_direction);
179  }
180  int numFacesHiSide = numVoFsHere;
181  if (!onHiBoundary)
182  {
183  int numVoFsHi = m_ebgraph.numVoFs(ivHi);
184  numFacesHiSide = numVoFsHere*numVoFsHi;
185  }
186 
187  faceLocFab(ivHi, 0) = m_nFaces;
188  m_nFaces += numFacesHiSide;
189  }
190  }
191  // allocate the memory
192  if (m_nFaces > 0)
193  {
194  // const IntVectSet& multi = m_ebgraph.getMultiCells( minbox);
195  // pout()<< minbox << "nVoFs:"<<nVoFs<<" nFaces:"<<m_nFaces<<"\n";
196 #ifdef CH_USE_MEMORY_TRACKING
197  // if (s_Arena == NULL)
198  // {
199  // s_Arena = new BArena( (typeid(T)).name());
200  // }
201 #else
202  // if (s_Arena == NULL)
203  // {
204  // s_Arena = new BArena("");
205  // }
206 #endif
207 
208  // if (s_Arena == NULL)
209  // {
210  // MayDay::Error("malloc in basefab failed");
211  // }
212 
213  m_truesize = m_nFaces*m_nComp;
214 
215  // Note: clear() was called above so this isn't a memory leak
216  //m_data = new T[m_truesize];
217  m_data.resize(m_truesize);
218  // m_data = static_cast<T*>(s_Arena->alloc(m_truesize * sizeof(T)));
219 
220 #ifdef CH_USE_MEMORY_TRACKING
221  // s_Arena->bytes += m_truesize * sizeof(T) + sizeof(BaseIFFAB<T>);
222  // if (s_Arena->bytes > s_Arena->peak)
223  // {
224  // s_Arena->peak = s_Arena->bytes;
225  // }
226 #endif
227  doneThat.setVal(false);
228  }
229  if (m_nFaces==0) return;
230  //cache pointers to the first component of the first face into m_fab for fast indexing
231  T* startLoc = &m_data[0];
232  for (IVSIterator ivsit(m_ivs); ivsit.ok(); ++ivsit)
233  {
234  const IntVect& iv = ivsit();
235  if (!doneThat(iv, 0))
236  {
237  doneThat(iv, 0) = true;
238  int iface = faceLocFab(iv, 0);
239  if (iface >= 0)
240  {
241  m_fab(iv, 0) = startLoc + iface;
242  }
243  }
244  IntVect ivHi = iv+BASISV(m_direction);
245  if (!doneThat(ivHi, 0))
246  {
247  doneThat(ivHi, 0) = true;
248  int iface = faceLocFab(ivHi, 0);
249  if (iface >= 0)
250  {
251  m_fab(ivHi, 0) = startLoc + iface;
252  }
253  }
254  }
255 }
256 /******************/
257 template <class T> inline
258 const IntVectSet&
260 {
261  return m_ivs;
262 }
263 /******************/
264 template <class T> inline
265 int
267 {
268  return m_direction;
269 }
270 /******************/
271 template <class T> inline
272 void
273 BaseIFFAB<T>::setVal(const T& a_value)
274 {
275  CH_assert(isDefined());
276  for (int ivec = 0; ivec < m_nFaces*m_nComp; ivec++)
277  {
278  m_data[ivec] = a_value;
279  }
280 }
281 /******************/
282 template <class T> inline
283 void
284 BaseIFFAB<T>::setVal(int ivar, const T& a_value)
285 {
286  CH_assert(isDefined());
287  CH_assert(ivar >= 0);
288  CH_assert(ivar < m_nComp);
289 
290  for (int ivec = ivar; ivec < m_nFaces*m_nComp; ivec += m_nComp)
291  {
292  m_data[ivec] = a_value;
293  }
294 }
295 /******************/
296 template <class T> inline
297 void
298 BaseIFFAB<T>::copy(const Box& a_fromBox,
299  const Interval& a_dstInterval,
300  const Box& a_toBox,
301  const BaseIFFAB<T>& a_src,
302  const Interval& a_srcInterval)
303 {
304  CH_assert(isDefined());
305  CH_assert(a_src.isDefined());
306  CH_assert(a_srcInterval.size() == a_dstInterval.size());
307  CH_assert(a_dstInterval.begin() >= 0);
308  CH_assert(a_srcInterval.begin() >= 0);
309  CH_assert(a_dstInterval.end() < m_nComp);
310  CH_assert(a_srcInterval.end() < a_src.m_nComp);
311 
312  if ((!m_ivs.isEmpty()) && (!a_src.m_ivs.isEmpty()))
313  {
314  CH_assert( (a_fromBox == a_toBox) || m_ebgraph.getDomain().isPeriodic() );
315 
316  Box intBox;
317  IntVectSet ivsIntersect;
318  //this does a grow and intersect because
319  //copy has a cell centered semantic
320  getBoxAndIVS(intBox, ivsIntersect, a_toBox);
321 
322  ivsIntersect &= a_src.m_ivs;
323  int compSize = a_srcInterval.size();
324 
326  FaceIterator faceit(ivsIntersect, m_ebgraph, m_direction, stopCrit);
327  for (faceit.reset(); faceit.ok(); ++faceit)
328  {
329  const FaceIndex& face = faceit();
330  //this if statement is to keep the above box growage from
331  //forcing more copying than the semantic demands.
332  if (useThisFace(a_toBox, face))
333  {
334  for (int icomp = 0; icomp < compSize; icomp++)
335  {
336  int isrccomp = a_srcInterval.begin() + icomp;
337  int idstcomp = a_dstInterval.begin() + icomp;
338  (*this)(face, idstcomp) = a_src(face, isrccomp);
339  }
340  }
341  }
342  }
343 }
344 /*********/
345 template <class T> inline
346 T*
347 BaseIFFAB<T>::getIndex(const FaceIndex& a_face, const int& a_comp) const
348 {
349  //which face is this in the local vector (lexi on vof cell indices)
350 
351  T* dataPtr = (T*)(m_fab(a_face.gridIndex(Side::Hi), 0));
352  int faceLoc = getLocalVecIndex(a_face);
353  dataPtr += faceLoc;
354  dataPtr += m_nFaces*a_comp;
355  return dataPtr;
356 }
357 /*********/
358 template <class T> inline
359 int
361 {
362  int retval;
363  if (!a_face.isBoundary())
364  {
365  //this checks that both vofs are defined
366  CH_assert(a_face.cellIndex(Side::Lo) >= 0);
367  CH_assert(a_face.cellIndex(Side::Hi) >= 0);
368  int xlen = m_ebgraph.numVoFs(a_face.gridIndex(Side::Lo));
369  int loCell = a_face.cellIndex(Side::Lo);
370  int hiCell = a_face.cellIndex(Side::Hi);
371  retval = loCell + xlen*hiCell;
372  }
373  else
374  {
375  int loCell = a_face.cellIndex(Side::Lo);
376  int hiCell = a_face.cellIndex(Side::Hi);
377  //one should be -1, the other should be larger
378  CH_assert(((loCell == -1)&&(hiCell > -1))||
379  ((hiCell == -1)&&(loCell > -1)));
380  //return the one that is not -1
381  retval = Max(loCell, hiCell);
382  }
383  return retval;
384 }
385 /********************/
386 template <class T> inline
387 void
389 {
390  m_nComp = 0;
391  m_nFaces = 0;
392  m_direction = -1;
393  m_ivs.makeEmpty();
394  m_fab.clear();
395 // if (m_data != NULL)
396 // {
397 // delete[] m_data;
398 // #undef free
399 // // s_Arena->free(m_data);
400 // #ifdef CH_USE_MEMORY_TRACKING
401 // // s_Arena->bytes -= m_truesize * sizeof(T) + sizeof(BaseIFFAB<T>);
402 // #endif
403 // m_data = NULL;
404 // }
405  m_isDefined = false;
406 }
407 /*************************/
408 template <class T> inline
409 bool
411 {
412  return (m_isDefined);
413 }
414 /*************************/
415 template <class T> inline
416 int
418 {
419  return m_nFaces;
420 }
421 /*************************/
422 template <class T> inline
423 int
425 {
426  return m_nComp;
427 }
428 /*************************/
429 template <class T> inline
430 T&
432  const int& a_comp)
433 {
434  CH_assert(isDefined());
435  CH_assert(a_comp >= 0);
436  CH_assert(a_comp < m_nComp);
437  CH_assert((m_ivs.contains(a_ndin.gridIndex(Side::Lo)) ||
438  m_ivs.contains(a_ndin.gridIndex(Side::Hi))));
439  CH_assert(a_ndin.direction() == m_direction);
440 
441  T* dataPtr = getIndex(a_ndin, a_comp);
442  return(*dataPtr);
443 }
444 /**************************/
445 template <class T> inline
446 const T&
448  const int& a_comp) const
449 {
450  CH_assert(isDefined());
451  CH_assert(a_comp >= 0);
452  CH_assert(a_comp < m_nComp);
453  CH_assert((m_ivs.contains(a_ndin.gridIndex(Side::Lo)) ||
454  m_ivs.contains(a_ndin.gridIndex(Side::Hi))));
455  CH_assert(a_ndin.direction() == m_direction);
456 
457  T* dataPtr = getIndex(a_ndin, a_comp);
458  return(*dataPtr);
459 }
460 /******************/
461 template <class T> inline
462 T*
463 BaseIFFAB<T>::dataPtr(const int& a_comp)
464 {
465  CH_assert(a_comp >= 0);
466  CH_assert(a_comp <= m_nComp);
467  static T* dummy = NULL;
468  if (m_nFaces==0) return dummy;
469  //return m_data + a_comp*m_nFaces;
470  return &(m_data[0]) + a_comp*m_nFaces;
471 
472 }
473 /******************/
474 template <class T> inline
475 const T*
476 BaseIFFAB<T>::dataPtr(const int& a_comp) const
477 {
478  CH_assert(a_comp >= 0);
479  CH_assert(a_comp <= m_nComp);
480  static T* dummy = NULL;
481  if (m_nFaces==0) return dummy;
482  //return m_data + a_comp*m_nFaces;
483  return &(m_data[0]) + a_comp*m_nFaces;
484 }
485 /******************/
486 template <class T> inline
487 void
489 {
490  m_isDefined = false;
491  //m_data = NULL;
492  m_data.resize(0);
493  m_nFaces = 0;
494  m_nComp = 0;
495  m_direction = -1;
496 }
497 /******************/
498 template <class T> inline
499 int BaseIFFAB<T>::size(const Box& a_region,
500  const Interval& a_comps) const
501 {
502  CH_assert(isDefined());
503 
504  Box intBox;
505  IntVectSet subIVS;
506  //this does a grow and intersect because
507  //linearization has a cell centered semantic
508  getBoxAndIVS(intBox, subIVS, a_region);
509 
511  FaceIterator faceit(subIVS, m_ebgraph, m_direction, stopCrit);
512  Vector<FaceIndex> faces = faceit.getVector();
513 
514  //account for list of faces
515  int facesize = linearListSize(faces);
516  if(s_verbose)
517  pout() << "baseiffab facesize = " << facesize << endl;
518  //add for each data pt
519  int datasize = 0;
520  int iused = 0;
521  for (int iface = 0; iface < faces.size(); iface++)
522  {
523  //this makes sure that the grow done in getBoxAndIVS does
524  //not add faces outside the surrounding nodes of the region
525  if (useThisFace(a_region, faces[iface]))
526  {
527  iused++;
528  for (int icomp = a_comps.begin(); icomp <= a_comps.end(); icomp++)
529  {
530  const T& dataPt = (*this)(faces[iface], icomp);
531  int pointsize = CH_XD::linearSize(dataPt);
532  datasize += pointsize;
533  }
534  }
535  }
536 
537  if(s_verbose)
538  pout() << "baseiffab datasize = " << datasize << endl;
539  if(s_verbose)
540  pout() << "baseiffab iused = " << iused << endl;
541 
542  int retval = facesize + datasize;
543 
544  if (s_verbose)
545  {
546  pout() << "###############" << std::endl;
547  pout() << "BaseIFFAB size() for region " << m_ebgraph.getRegion() << std::endl;
548  pout() << " a_comps = (" << a_comps.begin() << "," << a_comps.end() << "),"
549  << " a_region = " << a_region << " subIVS = ";
550  //::dumpIVS(&subIVS);
551  pout() << "m_ivs = ";
552  //::dumpIVS(&m_ivs);
553  pout() << "size = " << retval << std::endl;
554  pout() << "###############" << std::endl;
555  }
556 
557  return retval;
558  }
559 /********************/
560 template <class T> inline
561 void BaseIFFAB<T>::linearOut(void* a_buf,
562  const Box& a_region,
563  const Interval& a_comps) const
564 {
565  CH_assert(isDefined());
566  Box intBox;
567  IntVectSet subIVS;
568  //this does a grow and intersect because
569  //linearization has a cell centered semantic
570  getBoxAndIVS(intBox, subIVS, a_region);
571 
573  FaceIterator faceit(subIVS, m_ebgraph, m_direction, stopCrit);
574  Vector<FaceIndex> faces = faceit.getVector();
575 
576  //output the faces.
577  unsigned char* charbuffer = (unsigned char *) a_buf;
578  linearListOut(charbuffer, faces);
579  charbuffer += linearListSize(faces);
580 
581  //output the data
582  const BaseIFFAB<T>& thisFAB = *this;
583  for (int iface = 0; iface < faces.size(); iface++)
584  {
585  //this makes sure that the grow done in getBoxAndIVS does
586  //not add faces outside the surrounding nodes of the region
587  if (useThisFace(a_region, faces[iface]))
588  {
589  const FaceIndex& face = faces[iface];
590  for (int icomp = a_comps.begin(); icomp <= a_comps.end(); icomp++)
591  {
592  //output the data into the buffer
593  const T& dataPt = thisFAB(face, icomp);
594  CH_XD::linearOut(charbuffer, dataPt);
595  //increment the buffer offset
596  charbuffer += CH_XD::linearSize(dataPt);
597  }
598  }
599  }
600 }
601 /********************/
602 template <class T> inline
603 void BaseIFFAB<T>::linearIn(void* a_buf, const Box& a_region, const Interval& a_comps)
604 {
605  CH_assert(isDefined());
606  //input the faces
607  //input the vofs
608  Box intBox;
609  IntVectSet subIVS;
610  //this does a grow and intersect because
611  //linearization has a cell centered semantic
612  getBoxAndIVS(intBox, subIVS, a_region);
613 
615  FaceIterator faceit(subIVS, m_ebgraph, m_direction, stopCrit);
616  Vector<FaceIndex> faces = faceit.getVector();
617 
618  unsigned char* charbuffer = (unsigned char *) a_buf;
619  linearListIn(faces, charbuffer);
620  charbuffer += linearListSize(faces);
621 
622  for (int iface = 0; iface < faces.size(); iface++)
623  {
624  //this makes sure that the grow done in getBoxAndIVS does
625  //not add faces outside the surrounding nodes of the region
626  if (useThisFace(a_region, faces[iface]))
627  {
628  const FaceIndex& face = faces[iface];
629  for (int icomp = a_comps.begin(); icomp <= a_comps.end(); icomp++)
630  {
631  //input the data
632  T& dataPt = (*this)(face, icomp);
633  CH_XD::linearIn(dataPt, charbuffer) ;
634  //increment the buffer offset
635  charbuffer += CH_XD::linearSize(dataPt);
636  }
637  }
638  }
639 }
640 /********************/
641 /******************/
642 
643 #include "NamespaceFooter.H"
644 #endif
std::ostream & pout()
Use this in place of std::cout for program output.
void linearIn(void *buf, const Box &R, const Interval &comps)
Definition: BaseIFFABI.H:603
int nComp() const
Definition: BaseIFFABI.H:424
T * dataPtr(const int &a_comp)
Definition: BaseIFFABI.H:463
static void setVerbose(bool a_verbose)
Definition: BaseIFFABI.H:72
int m_nComp
Definition: BaseIFFAB.H:223
An irregular domain on an integer lattice.
Definition: IntVectSet.H:44
#define CH_assert(cond)
Definition: CHArray.H:37
A class to facilitate interaction with physical boundary conditions.
Definition: ProblemDomain.H:141
int size(const Box &R, const Interval &comps) const
Definition: BaseIFFABI.H:499
void setVal(T a_x, const Box &a_bx, int a_nstart, int a_numcomp)
{ data modification functions}
Definition: BaseFabImplem.H:399
Definition: FaceIndex.H:28
void linearListOut(void *const a_outBuf, const Vector< T > &a_inputT)
Definition: SPMDI.H:258
int size() const
Definition: Interval.H:75
int begin() const
Definition: Interval.H:97
bool ok() const
Iterator over faces within an IntVectSet and an Ebgraph.
Definition: FaceIterator.H:67
void clear()
Definition: BaseIFFABI.H:388
Definition: FaceIterator.H:48
void setVal(const T &value)
Definition: BaseIFFABI.H:273
const ProblemDomain & getDomain() const
Definition: EBGraph.H:939
bool contains(const IntVect &p) const
Definition: Box.H:1871
const IntVect & gridIndex(const Side::LoHiSide &a_sd) const
IntVect BASISV(int dir)
Definition: IntVect.H:1266
~BaseIFFAB()
Definition: BaseIFFABI.H:91
int getLocalVecIndex(const FaceIndex &a_face) const
Definition: BaseIFFABI.H:360
const int & direction() const
bool ok() const
returns true if this iterator is still in its IntVectSet
Definition: IntVectSet.H:711
Definition: LoHiSide.H:31
Geometric description within a box.
Definition: EBGraph.H:427
const int SpaceDim
Definition: SPACE.H:38
const bool & isBoundary() const
const IntVect & bigEnd() const
Definition: Box.H:1768
IntVectSet m_ivs
Definition: BaseIFFAB.H:229
Structure for passing component ranges in code.
Definition: Interval.H:23
const Vector< FaceIndex > & getVector() const
bool isDefined() const
Definition: BaseIFFABI.H:410
const IntVect & smallEnd() const
{ Accessors}
Definition: Box.H:1754
void linearOut(void *const a_outBuf, const T &inputT)
Definition: SPMDI.H:33
static void setSurroundingNodeSemantic(bool a_useSurr)
Definition: BaseIFFABI.H:25
A Virtual Base Class for Dynamic Memory Managemen.
Definition: Arena.H:40
Box surroundingNodes(const Box &b, int dir)
Definition: Box.H:2145
int linearSize(const T &inputT)
Definition: SPMDI.H:21
int direction() const
Definition: BaseIFFABI.H:266
bool isPeriodic(int a_dir) const
Returns true if BC is periodic in direction a_dir.
Definition: ProblemDomain.H:894
size_t size() const
Definition: Vector.H:192
bool useThisFace(const Box &a_toBox, const FaceIndex &a_face) const
Definition: BaseIFFABI.H:34
void setDefaultValues()
Definition: BaseIFFABI.H:488
A Rectangular Domain on an Integer Lattice.
Definition: Box.H:465
Definition: BaseIFFAB.H:34
void linearListIn(Vector< T > &a_outputT, const void *const a_inBuf)
Definition: SPMDI.H:229
BaseIFFAB()
Definition: BaseIFFABI.H:85
An integer Vector in SpaceDim-dimensional space.
Definition: CHArray.H:42
Definition: LoHiSide.H:30
int linearListSize(const Vector< T > &a_input)
Definition: SPMDI.H:290
void linearOut(void *buf, const Box &R, const Interval &comps) const
Definition: BaseIFFABI.H:561
void copy(const Box &a_intBox, const Interval &a_destInterval, const Box &a_toBox, const BaseIFFAB< T > &a_src, const Interval &a_srcInterval)
Definition: BaseIFFABI.H:298
T Max(const T &a_a, const T &a_b)
Definition: Misc.H:39
Box & grow(int i)
grow functions
Definition: Box.H:2247
void resize(const Box &a_b, int a_n=1, T *a_alias=NULL)
Definition: BaseFabImplem.H:173
T & operator()(const FaceIndex &a_face, const int &varlocin)
Definition: BaseIFFABI.H:431
int end() const
Definition: Interval.H:102
void define(const IntVectSet &a_region, const EBGraph &a_ebgraph, const int &a_direction, const int &a_nvarin)
Definition: BaseIFFABI.H:112
const Box & domainBox() const
Returns the logical computational domain.
Definition: ProblemDomain.H:887
void getBoxAndIVS(Box &a_intBox, IntVectSet &a_ivsIntersect, const Box &a_toBox) const
Definition: BaseIFFABI.H:54
Iterator for an IntVectSet.
Definition: IntVectSet.H:640
void linearIn(T &a_outputT, const void *const inBuf)
Definition: SPMDI.H:27
T * getIndex(const FaceIndex &a_face, const int &a_comp) const
Definition: BaseIFFABI.H:347
const Box & minBox() const
Returns the minimum enclosing box of this IntVectSet.
int numFaces() const
Definition: BaseIFFABI.H:417
const int & cellIndex(const Side::LoHiSide &a_sd) const
bool isEmpty() const
Returns true if no IntVects are in this IntVectSet.
WhichFaces
Definition: FaceIterator.H:45
const EBGraph & getEBGraph() const
Definition: BaseIFFABI.H:79
const IntVectSet & getIVS() const
Definition: BaseIFFABI.H:259