Chombo + EB  3.0
BaseIVFactory.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 _BASEIVFACTORY_H_
14 #define _BASEIVFACTORY_H_
15 
16 #include <cmath>
17 #include <cstdlib>
18 #include "Vector.H"
19 #include "EBISLayout.H"
20 #include "BaseIVFAB.H"
21 #include "DataIndex.H"
22 #include "NamespaceHeader.H"
23 
24 
25 /// Factory class to produce BaseIVFABs.
26 /**
27  Factory class to produce BaseIVFABs.
28  This is needed for LevelData construction.
29  */
30 template <class T>
32  : public DataFactory<BaseIVFAB <T> >
33 {
34 public:
35 
36  /// factory function.
37  /**
38  Creates a new baseivfab object
39  and returns a pointer to it. Responsiblitly
40  for calling operator 'delete' on this pointer
41  is passed to the user.
42  Intersects a_sets[a_dit] from construction
43  with input box because leveldata will expect
44  that anyway when it tries to do a copy or a linearization.
45  */
46  virtual BaseIVFAB<T>* create(const Box& a_box, int a_ncomps,
47  const DataIndex& a_dit) const;
48 
49  ///
50  /**
51  fills internal data with inputs
52  */
53  BaseIVFactory(const EBISLayout& a_ebisl,
54  const LayoutData<IntVectSet>& a_sets);
55 
56  ///
57  /**
58  builds BaseIVFAB objects defined at all boundary irregular cells.
59  */
60  BaseIVFactory(const EBISLayout& a_ebisl);
61 
62  ///
63  virtual ~BaseIVFactory();
64 
65 private:
66  ///
68 
69  ///
71 
72  //disallowed constructors and all that
74  {
75  MayDay::Error("disallowed constructor");
76  }
78  {
79  MayDay::Error("disallowed constructor");
80  }
81  void operator=(const BaseIVFactory<T>& a_inputs)
82  {
83  MayDay::Error("disallowed constructor");
84  }
85 
86 };
87 
88 #include "NamespaceFooter.H"
89 
90 //implementation
91 #include "BaseIVFactoryI.H"
92 
93 #endif
BaseIVFactory(const BaseIVFactory< T > &a_inputs)
Definition: BaseIVFactory.H:73
virtual ~BaseIVFactory()
Definition: BaseIVFactoryI.H:20
virtual BaseIVFAB< T > * create(const Box &a_box, int a_ncomps, const DataIndex &a_dit) const
factory function.
Definition: BaseIVFactoryI.H:53
Factory class to produce BaseIVFABs.
Definition: BaseIVFactory.H:31
void operator=(const BaseIVFactory< T > &a_inputs)
Definition: BaseIVFactory.H:81
BaseIVFactory()
Definition: BaseIVFactory.H:77
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.
A Rectangular Domain on an Integer Lattice.
Definition: Box.H:465
Definition: DataIndex.H:112
LayoutData< IntVectSet > m_sets
Definition: BaseIVFactory.H:70
Factory object to data members of a BoxLayoutData container.
Definition: BoxLayoutData.H:30
Definition: EBISLayout.H:39
EBISLayout m_ebisl
Definition: BaseIVFactory.H:67
Definition: BaseIVFAB.H:32