Chombo + EB + MF  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 #if defined(__ICC) || defined(__INTEL_COMPILER)
110 #pragma intel optimization_level 0
111 #endif
112 template <class T> inline
113 void
115  const EBGraph& a_ebgraph,
116  const int& a_direction,
117  const int& a_nvarin)
118 {
119  clear();
120  m_isDefined = true;
121  CH_assert(a_nvarin > 0);
122  CH_assert((a_direction >= 0) && (a_direction < SpaceDim));
123  const ProblemDomain& domain = a_ebgraph.getDomain();
124  m_direction = a_direction;
125  m_ivs = a_ivsin;
126  m_ebgraph = a_ebgraph;
127  m_nComp = a_nvarin;
128  Box minbox = a_ivsin.minBox();
129  BaseFab<int> faceLocFab;
130  BaseFab<bool> doneThat;
131  if (!a_ivsin.isEmpty())
132  {
133  m_fab.resize( surroundingNodes(minbox,a_direction), 1);
134  faceLocFab.resize(surroundingNodes(minbox,a_direction), 1);
135  doneThat.resize( surroundingNodes(minbox,a_direction), 1);
136  faceLocFab.setVal(-1);
137  m_fab.setVal(NULL);
138  doneThat.setVal(false);
139  }
140  //get the data size and save offsets
141  //need to do this to avoid double-counting faces
142  m_nFaces = 0;
143  int nVoFs = 0;
144  for (IVSIterator ivsit(m_ivs); ivsit.ok(); ++ivsit)
145  {
146  const IntVect& iv = ivsit();
147  IntVect ivLo = iv-BASISV(m_direction);
148  IntVect ivHi = iv+BASISV(m_direction);
149  //check to see if on domain boundary
150  int numVoFsHere = m_ebgraph.numVoFs(iv);
151 
152  nVoFs += numVoFsHere;
153  //we hold the mapping in the high vof of the faces
154  if (!doneThat(iv, 0))
155  {
156  doneThat(iv, 0) = true;
157 
158  bool onLoBoundary = false;
159  if (!domain.isPeriodic(m_direction))
160  {
161  onLoBoundary = iv[m_direction] == domain.domainBox().smallEnd(m_direction);
162  }
163  int numFacesLoSide = numVoFsHere;
164  if (!onLoBoundary)
165  {
166  int numVoFsLo = m_ebgraph.numVoFs(ivLo);
167  numFacesLoSide = numVoFsHere*numVoFsLo;
168  }
169 
170  faceLocFab(iv, 0) = m_nFaces;
171  m_nFaces += numFacesLoSide;
172  }
173  if (!doneThat(ivHi, 0))
174  {
175  doneThat(ivHi, 0) = true;
176 
177  bool onHiBoundary = false;
178  if (!domain.isPeriodic(m_direction))
179  {
180  onHiBoundary = iv[m_direction] == domain.domainBox().bigEnd(m_direction);
181  }
182  int numFacesHiSide = numVoFsHere;
183  if (!onHiBoundary)
184  {
185  int numVoFsHi = m_ebgraph.numVoFs(ivHi);
186  numFacesHiSide = numVoFsHere*numVoFsHi;
187  }
188 
189  faceLocFab(ivHi, 0) = m_nFaces;
190  m_nFaces += numFacesHiSide;
191  }
192  }
193  // allocate the memory
194  if (m_nFaces > 0)
195  {
196  // const IntVectSet& multi = m_ebgraph.getMultiCells( minbox);
197  // pout()<< minbox << "nVoFs:"<<nVoFs<<" nFaces:"<<m_nFaces<<"\n";
198 #ifdef CH_USE_MEMORY_TRACKING
199  // if (s_Arena == NULL)
200  // {
201  // s_Arena = new BArena( (typeid(T)).name());
202  // }
203 #else
204  // if (s_Arena == NULL)
205  // {
206  // s_Arena = new BArena("");
207  // }
208 #endif
209 
210  // if (s_Arena == NULL)
211  // {
212  // MayDay::Error("malloc in basefab failed");
213  // }
214 
215  m_truesize = m_nFaces*m_nComp;
216 
217  // Note: clear() was called above so this isn't a memory leak
218  //m_data = new T[m_truesize];
219  m_data.resize(m_truesize);
220  // m_data = static_cast<T*>(s_Arena->alloc(m_truesize * sizeof(T)));
221 
222 #ifdef CH_USE_MEMORY_TRACKING
223  // s_Arena->bytes += m_truesize * sizeof(T) + sizeof(BaseIFFAB<T>);
224  // if (s_Arena->bytes > s_Arena->peak)
225  // {
226  // s_Arena->peak = s_Arena->bytes;
227  // }
228 #endif
229  doneThat.setVal(false);
230  }
231  if (m_nFaces==0) return;
232  //cache pointers to the first component of the first face into m_fab for fast indexing
233  T* startLoc = &m_data[0];
234  for (IVSIterator ivsit(m_ivs); ivsit.ok(); ++ivsit)
235  {
236  const IntVect& iv = ivsit();
237  if (!doneThat(iv, 0))
238  {
239  doneThat(iv, 0) = true;
240  int iface = faceLocFab(iv, 0);
241  if (iface >= 0)
242  {
243  m_fab(iv, 0) = startLoc + iface;
244  }
245  }
246  IntVect ivHi = iv+BASISV(m_direction);
247  if (!doneThat(ivHi, 0))
248  {
249  doneThat(ivHi, 0) = true;
250  int iface = faceLocFab(ivHi, 0);
251  if (iface >= 0)
252  {
253  m_fab(ivHi, 0) = startLoc + iface;
254  }
255  }
256  }
257 }
258 /******************/
259 template <class T> inline
260 const IntVectSet&
262 {
263  return m_ivs;
264 }
265 /******************/
266 template <class T> inline
267 int
269 {
270  return m_direction;
271 }
272 /******************/
273 template <class T> inline
274 void
275 BaseIFFAB<T>::setVal(const T& a_value)
276 {
277  CH_assert(isDefined());
278  for (int ivec = 0; ivec < m_nFaces*m_nComp; ivec++)
279  {
280  m_data[ivec] = a_value;
281  }
282 }
283 /******************/
284 template <class T> inline
285 void
286 BaseIFFAB<T>::setVal(int ivar, const T& a_value)
287 {
288  CH_assert(isDefined());
289  CH_assert(ivar >= 0);
290  CH_assert(ivar < m_nComp);
291 
292  for (int ivec = ivar; ivec < m_nFaces*m_nComp; ivec += m_nComp)
293  {
294  m_data[ivec] = a_value;
295  }
296 }
297 /******************/
298 template <class T> inline
299 void
300 BaseIFFAB<T>::copy(const Box& a_fromBox,
301  const Interval& a_dstInterval,
302  const Box& a_toBox,
303  const BaseIFFAB<T>& a_src,
304  const Interval& a_srcInterval)
305 {
306  CH_assert(isDefined());
307  CH_assert(a_src.isDefined());
308  CH_assert(a_srcInterval.size() == a_dstInterval.size());
309  CH_assert(a_dstInterval.begin() >= 0);
310  CH_assert(a_srcInterval.begin() >= 0);
311  CH_assert(a_dstInterval.end() < m_nComp);
312  CH_assert(a_srcInterval.end() < a_src.m_nComp);
313 
314  if ((!m_ivs.isEmpty()) && (!a_src.m_ivs.isEmpty()))
315  {
316  CH_assert( (a_fromBox == a_toBox) || m_ebgraph.getDomain().isPeriodic() );
317 
318  Box intBox;
319  IntVectSet ivsIntersect;
320  //this does a grow and intersect because
321  //copy has a cell centered semantic
322  getBoxAndIVS(intBox, ivsIntersect, a_toBox);
323 
324  ivsIntersect &= a_src.m_ivs;
325  int compSize = a_srcInterval.size();
326 
328  FaceIterator faceit(ivsIntersect, m_ebgraph, m_direction, stopCrit);
329  for (faceit.reset(); faceit.ok(); ++faceit)
330  {
331  const FaceIndex& face = faceit();
332  //this if statement is to keep the above box growage from
333  //forcing more copying than the semantic demands.
334  if (useThisFace(a_toBox, face))
335  {
336  for (int icomp = 0; icomp < compSize; icomp++)
337  {
338  int isrccomp = a_srcInterval.begin() + icomp;
339  int idstcomp = a_dstInterval.begin() + icomp;
340  (*this)(face, idstcomp) = a_src(face, isrccomp);
341  }
342  }
343  }
344  }
345 }
346 /*********/
347 template <class T> inline
348 T*
349 BaseIFFAB<T>::getIndex(const FaceIndex& a_face, const int& a_comp) const
350 {
351  //which face is this in the local vector (lexi on vof cell indices)
352 
353  T* dataPtr = (T*)(m_fab(a_face.gridIndex(Side::Hi), 0));
354  int faceLoc = getLocalVecIndex(a_face);
355  dataPtr += faceLoc;
356  dataPtr += m_nFaces*a_comp;
357  return dataPtr;
358 }
359 /*********/
360 template <class T> inline
361 int
363 {
364  int retval;
365  if (!a_face.isBoundary())
366  {
367  //this checks that both vofs are defined
368  CH_assert(a_face.cellIndex(Side::Lo) >= 0);
369  CH_assert(a_face.cellIndex(Side::Hi) >= 0);
370  int xlen = m_ebgraph.numVoFs(a_face.gridIndex(Side::Lo));
371  int loCell = a_face.cellIndex(Side::Lo);
372  int hiCell = a_face.cellIndex(Side::Hi);
373  retval = loCell + xlen*hiCell;
374  }
375  else
376  {
377  int loCell = a_face.cellIndex(Side::Lo);
378  int hiCell = a_face.cellIndex(Side::Hi);
379  //one should be -1, the other should be larger
380  CH_assert(((loCell == -1)&&(hiCell > -1))||
381  ((hiCell == -1)&&(loCell > -1)));
382  //return the one that is not -1
383  retval = Max(loCell, hiCell);
384  }
385  return retval;
386 }
387 /********************/
388 template <class T> inline
389 void
391 {
392  m_nComp = 0;
393  m_nFaces = 0;
394  m_direction = -1;
395  m_ivs.makeEmpty();
396  m_fab.clear();
397 // if (m_data != NULL)
398 // {
399 // delete[] m_data;
400 // #undef free
401 // // s_Arena->free(m_data);
402 // #ifdef CH_USE_MEMORY_TRACKING
403 // // s_Arena->bytes -= m_truesize * sizeof(T) + sizeof(BaseIFFAB<T>);
404 // #endif
405 // m_data = NULL;
406 // }
407  m_isDefined = false;
408 }
409 /*************************/
410 template <class T> inline
411 bool
413 {
414  return (m_isDefined);
415 }
416 /*************************/
417 template <class T> inline
418 int
420 {
421  return m_nFaces;
422 }
423 /*************************/
424 template <class T> inline
425 int
427 {
428  return m_nComp;
429 }
430 /*************************/
431 template <class T> inline
432 T&
434  const int& a_comp)
435 {
436  CH_assert(isDefined());
437  CH_assert(a_comp >= 0);
438  CH_assert(a_comp < m_nComp);
439  CH_assert((m_ivs.contains(a_ndin.gridIndex(Side::Lo)) ||
440  m_ivs.contains(a_ndin.gridIndex(Side::Hi))));
441  CH_assert(a_ndin.direction() == m_direction);
442 
443  T* dataPtr = getIndex(a_ndin, a_comp);
444  return(*dataPtr);
445 }
446 /**************************/
447 template <class T> inline
448 const T&
450  const int& a_comp) const
451 {
452  CH_assert(isDefined());
453  CH_assert(a_comp >= 0);
454  CH_assert(a_comp < m_nComp);
455  CH_assert((m_ivs.contains(a_ndin.gridIndex(Side::Lo)) ||
456  m_ivs.contains(a_ndin.gridIndex(Side::Hi))));
457  CH_assert(a_ndin.direction() == m_direction);
458 
459  T* dataPtr = getIndex(a_ndin, a_comp);
460  return(*dataPtr);
461 }
462 /******************/
463 template <class T> inline
464 T*
465 BaseIFFAB<T>::dataPtr(const int& a_comp)
466 {
467  CH_assert(a_comp >= 0);
468  CH_assert(a_comp <= m_nComp);
469  static T* dummy = NULL;
470  if (m_nFaces==0) return dummy;
471  //return m_data + a_comp*m_nFaces;
472  return &(m_data[0]) + a_comp*m_nFaces;
473 
474 }
475 /******************/
476 template <class T> inline
477 const T*
478 BaseIFFAB<T>::dataPtr(const int& a_comp) const
479 {
480  CH_assert(a_comp >= 0);
481  CH_assert(a_comp <= m_nComp);
482  static T* dummy = NULL;
483  if (m_nFaces==0) return dummy;
484  //return m_data + a_comp*m_nFaces;
485  return &(m_data[0]) + a_comp*m_nFaces;
486 }
487 /******************/
488 template <class T> inline
489 void
491 {
492  m_isDefined = false;
493  //m_data = NULL;
494  m_data.resize(0);
495  m_nFaces = 0;
496  m_nComp = 0;
497  m_direction = -1;
498 }
499 /******************/
500 template <class T> inline
501 int BaseIFFAB<T>::size(const Box& a_region,
502  const Interval& a_comps) const
503 {
504  CH_assert(isDefined());
505 
506  Box intBox;
507  IntVectSet subIVS;
508  //this does a grow and intersect because
509  //linearization has a cell centered semantic
510  getBoxAndIVS(intBox, subIVS, a_region);
511 
513  FaceIterator faceit(subIVS, m_ebgraph, m_direction, stopCrit);
514  Vector<FaceIndex> faces = faceit.getVector();
515 
516  //account for list of faces
517  int facesize = linearListSize(faces);
518  if(s_verbose)
519  pout() << "baseiffab facesize = " << facesize << endl;
520  //add for each data pt
521  int datasize = 0;
522  int iused = 0;
523  for (int iface = 0; iface < faces.size(); iface++)
524  {
525  //this makes sure that the grow done in getBoxAndIVS does
526  //not add faces outside the surrounding nodes of the region
527  if (useThisFace(a_region, faces[iface]))
528  {
529  iused++;
530  for (int icomp = a_comps.begin(); icomp <= a_comps.end(); icomp++)
531  {
532  const T& dataPt = (*this)(faces[iface], icomp);
533  int pointsize = CH_XD::linearSize(dataPt);
534  datasize += pointsize;
535  }
536  }
537  }
538 
539  if(s_verbose)
540  pout() << "baseiffab datasize = " << datasize << endl;
541  if(s_verbose)
542  pout() << "baseiffab iused = " << iused << endl;
543 
544  int retval = facesize + datasize;
545 
546  if (s_verbose)
547  {
548  pout() << "###############" << std::endl;
549  pout() << "BaseIFFAB size() for region " << m_ebgraph.getRegion() << std::endl;
550  pout() << " a_comps = (" << a_comps.begin() << "," << a_comps.end() << "),"
551  << " a_region = " << a_region << " subIVS = ";
552  //::dumpIVS(&subIVS);
553  pout() << "m_ivs = ";
554  //::dumpIVS(&m_ivs);
555  pout() << "size = " << retval << std::endl;
556  pout() << "###############" << std::endl;
557  }
558 
559  return retval;
560  }
561 /********************/
562 template <class T> inline
563 void BaseIFFAB<T>::linearOut(void* a_buf,
564  const Box& a_region,
565  const Interval& a_comps) const
566 {
567  CH_assert(isDefined());
568  Box intBox;
569  IntVectSet subIVS;
570  //this does a grow and intersect because
571  //linearization has a cell centered semantic
572  getBoxAndIVS(intBox, subIVS, a_region);
573 
575  FaceIterator faceit(subIVS, m_ebgraph, m_direction, stopCrit);
576  Vector<FaceIndex> faces = faceit.getVector();
577 
578  //output the faces.
579  unsigned char* charbuffer = (unsigned char *) a_buf;
580  linearListOut(charbuffer, faces);
581  charbuffer += linearListSize(faces);
582 
583  //output the data
584  const BaseIFFAB<T>& thisFAB = *this;
585  for (int iface = 0; iface < faces.size(); iface++)
586  {
587  //this makes sure that the grow done in getBoxAndIVS does
588  //not add faces outside the surrounding nodes of the region
589  if (useThisFace(a_region, faces[iface]))
590  {
591  const FaceIndex& face = faces[iface];
592  for (int icomp = a_comps.begin(); icomp <= a_comps.end(); icomp++)
593  {
594  //output the data into the buffer
595  const T& dataPt = thisFAB(face, icomp);
596  CH_XD::linearOut(charbuffer, dataPt);
597  //increment the buffer offset
598  charbuffer += CH_XD::linearSize(dataPt);
599  }
600  }
601  }
602 }
603 /********************/
604 template <class T> inline
605 void BaseIFFAB<T>::linearIn(void* a_buf, const Box& a_region, const Interval& a_comps)
606 {
607  CH_assert(isDefined());
608  //input the faces
609  //input the vofs
610  Box intBox;
611  IntVectSet subIVS;
612  //this does a grow and intersect because
613  //linearization has a cell centered semantic
614  getBoxAndIVS(intBox, subIVS, a_region);
615 
617  FaceIterator faceit(subIVS, m_ebgraph, m_direction, stopCrit);
618  Vector<FaceIndex> faces = faceit.getVector();
619 
620  unsigned char* charbuffer = (unsigned char *) a_buf;
621  linearListIn(faces, charbuffer);
622  charbuffer += linearListSize(faces);
623 
624  for (int iface = 0; iface < faces.size(); iface++)
625  {
626  //this makes sure that the grow done in getBoxAndIVS does
627  //not add faces outside the surrounding nodes of the region
628  if (useThisFace(a_region, faces[iface]))
629  {
630  const FaceIndex& face = faces[iface];
631  for (int icomp = a_comps.begin(); icomp <= a_comps.end(); icomp++)
632  {
633  //input the data
634  T& dataPt = (*this)(face, icomp);
635  CH_XD::linearIn(dataPt, charbuffer) ;
636  //increment the buffer offset
637  charbuffer += CH_XD::linearSize(dataPt);
638  }
639  }
640  }
641 }
642 /********************/
643 /******************/
644 
645 #include "NamespaceFooter.H"
646 #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:605
int nComp() const
Definition: BaseIFFABI.H:426
T * dataPtr(const int &a_comp)
Definition: BaseIFFABI.H:465
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:501
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:99
bool ok() const
Iterator over faces within an IntVectSet and an Ebgraph.
Definition: FaceIterator.H:67
void clear()
Definition: BaseIFFABI.H:390
Definition: FaceIterator.H:48
void setVal(const T &value)
Definition: BaseIFFABI.H:275
const ProblemDomain & getDomain() const
Definition: EBGraph.H:939
bool contains(const IntVect &p) const
Definition: Box.H:1887
const IntVect & gridIndex(const Side::LoHiSide &a_sd) const
IntVect BASISV(int dir)
Definition: IntVect.H:1285
~BaseIFFAB()
Definition: BaseIFFABI.H:91
int getLocalVecIndex(const FaceIndex &a_face) const
Definition: BaseIFFABI.H:362
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:1784
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:412
const IntVect & smallEnd() const
{ Accessors}
Definition: Box.H:1770
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:2161
int linearSize(const T &inputT)
Definition: SPMDI.H:21
int direction() const
Definition: BaseIFFABI.H:268
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:490
A Rectangular Domain on an Integer Lattice.
Definition: Box.H:469
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:563
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:300
T Max(const T &a_a, const T &a_b)
Definition: Misc.H:39
Box & grow(int i)
grow functions
Definition: Box.H:2263
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:433
int end() const
Definition: Interval.H:104
void define(const IntVectSet &a_region, const EBGraph &a_ebgraph, const int &a_direction, const int &a_nvarin)
Definition: BaseIFFABI.H:114
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:349
const Box & minBox() const
Returns the minimum enclosing box of this IntVectSet.
int numFaces() const
Definition: BaseIFFABI.H:419
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:261