Chombo + EB  3.2
BaseIFFactoryI.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 // ANAG, LBNL
12 
13 #ifndef _BASEIFFACTORYI_H_
14 #define _BASEIFFACTORYI_H_
15 #include "NamespaceHeader.H"
16 
17 /***************/
18 /***************/
19 template <class T> inline
21 {
22 }
23 /***************/
24 /***************/
25 template <class T> inline
27  const LayoutData<IntVectSet>& a_sets,
28  const int& a_facedir)
29 {
30  m_ebisl = a_ebisl;
31  m_facedir = a_facedir;
32  m_sets.define(a_sets.boxLayout());
33  for (DataIterator dit = m_sets.dataIterator(); dit.ok(); ++dit)
34  {
35  m_sets[dit()] = a_sets[dit()];
36  }
37 }
38 /***************/
39 /***************/
40 template <class T> inline
42 BaseIFFactory<T>::create(const Box& a_box, int a_ncomps,
43  const DataIndex& a_dit) const
44 {
45  //intersects with input box because leveldata will expect
46  //that anyway when it tries to do a copy or a linearization.
47  IntVectSet ivsInter = m_sets[a_dit];
48  ivsInter &= a_box;
49  return new BaseIFFAB<T>(ivsInter, m_ebisl[a_dit].getEBGraph(), m_facedir, a_ncomps);
50 }
51 /***************/
52 /***************/
53 
54 #include "NamespaceFooter.H"
55 #endif
void define(const ProblemDomain &a_domain, const DisjointBoxLayout &a_grids, const int &a_nghost, const LevelData< EBGraph > &a_graph, const LevelData< EBData > &a_data, const Real &a_dx, bool a_hasMoments)
An irregular domain on an integer lattice.
Definition: IntVectSet.H:44
virtual BaseIFFAB< T > * create(const Box &a_box, int a_ncomps, const DataIndex &a_dit) const
factory function.
Definition: BaseIFFactoryI.H:42
const BoxLayout & boxLayout() const
Definition: LayoutData.H:107
virtual bool ok() const
return true if this iterator is still in its Layout
Definition: LayoutIterator.H:117
Definition: DataIterator.H:190
BaseIFFactory()
Definition: BaseIFFactory.H:74
virtual ~BaseIFFactory()
Definition: BaseIFFactoryI.H:20
A Rectangular Domain on an Integer Lattice.
Definition: Box.H:465
Definition: DataIndex.H:112
Definition: BaseIFFAB.H:34
Definition: EBISLayout.H:39