Chombo + EB  3.0
EBCellFactory.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 _EBCELLFACTORY_H_
14 #define _EBCELLFACTORY_H_
15 
16 #include <cmath>
17 #include <cstdlib>
18 #include "Vector.H"
19 #include "EBISLayout.H"
20 #include "EBCellFAB.H"
21 #include "DataIndex.H"
22 #include "NamespaceHeader.H"
23 
24 /// Factory class to produce EBCellFABs.
25 /**
26  Factory class to produce EBCellFABs.
27  This is needed for LevelData construction.
28  */
30  : public DataFactory<EBCellFAB>
31 {
32 public:
33  /// factory function.
34  /**
35  Creates a new baseebcellfab 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 EBCellFAB* 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  EBCellFactory(const EBISLayout& a_ebisl);
47 
48  ///
49  virtual ~EBCellFactory();
50 
51 private:
53 
54  //disallowed constructors and all that
55  EBCellFactory(const EBCellFactory& a_inputs)
56  {
57  MayDay::Error("disallowed constructor");
58  }
60  {
61  MayDay::Error("disallowed constructor");
62  }
63  void operator=(const EBCellFactory& a_inputs)
64  {
65  MayDay::Error("disallowed constructor");
66  }
67 
68 };
69 
70 #include "NamespaceFooter.H"
71 #endif
virtual ~EBCellFactory()
Factory class to produce EBCellFABs.
Definition: EBCellFactory.H:29
virtual EBCellFAB * create(const Box &a_box, int a_ncomps, const DataIndex &a_dit) const
factory function.
void operator=(const EBCellFactory &a_inputs)
Definition: EBCellFactory.H:63
Definition: EBCellFAB.H:29
EBISLayout m_ebisl
Definition: EBCellFactory.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
EBCellFactory(const EBCellFactory &a_inputs)
Definition: EBCellFactory.H:55
Factory object to data members of a BoxLayoutData container.
Definition: BoxLayoutData.H:30
Definition: EBISLayout.H:39
EBCellFactory()
Definition: EBCellFactory.H:59