Chombo + EB  3.2
IrregFABFactory.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 _IRREGFABFACTORY_H_
14 #define _IRREGFABFACTORY_H_
15 
16 #include <cmath>
17 #include <cstdlib>
18 #include "Vector.H"
19 #include "EBISLayout.H"
20 #include "IrregFAB.H"
21 #include "DataIndex.H"
22 #include "NamespaceHeader.H"
23 
24 /// Factory class to produce IrregFABs.
25 /**
26  Factory class to produce IrregFABs.
27  This is needed for LevelData construction.
28 */
30  : public DataFactory<IrregFAB>
31 {
32 public:
33  /// factory function.
34  /**
35  Creates a new baseIrregFAB object
36  and returns a pointer to it. Responsiblitly
37  for calling operator 'delete' on this pointer is passed to the user.
38  */
39  virtual IrregFAB* create(const Box& a_box, int a_ncomps,
40  const DataIndex& a_dit) const;
41 
42  ///
43  /**
44  create the factory with an ispace. calls full define function
45  */
46  IrregFABFactory(const EBISLayout& a_ebisl);
47 
48  ///
49  virtual ~IrregFABFactory();
50 
51 private:
53 
54  //disallowed constructors and all that
56  {
57  MayDay::Error("disallowed constructor");
58  }
60  {
61  MayDay::Error("disallowed constructor");
62  }
63  void operator=(const IrregFABFactory& a_inputs)
64  {
65  MayDay::Error("disallowed constructor");
66  }
67 
68 };
69 
70 #include "NamespaceFooter.H"
71 #endif
void operator=(const IrregFABFactory &a_inputs)
Definition: IrregFABFactory.H:63
Definition: IrregFAB.H:33
virtual ~IrregFABFactory()
virtual IrregFAB * create(const Box &a_box, int a_ncomps, const DataIndex &a_dit) const
factory function.
EBISLayout m_ebisl
Definition: IrregFABFactory.H:52
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
Factory object to data members of a BoxLayoutData container.
Definition: BoxLayoutData.H:30
IrregFABFactory(const IrregFABFactory &a_inputs)
Definition: IrregFABFactory.H:55
Definition: EBISLayout.H:39
IrregFABFactory()
Definition: IrregFABFactory.H:59
Factory class to produce IrregFABs.
Definition: IrregFABFactory.H:29