Chombo + EB + MF  3.2
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  inline virtual const EBISBox& ebisBox(const DataIndex& a_dit) const
43  {return m_ebisl[a_dit];}
44  ///
45  /**
46  create the factory with an ispace. calls full define function
47  */
48  EBCellFactory(const EBISLayout& a_ebisl);
49 
50  ///
51  virtual ~EBCellFactory();
52 
53 private:
55 
56  //disallowed constructors and all that
57  EBCellFactory(const EBCellFactory& a_inputs)
58  {
59  MayDay::Error("disallowed constructor");
60  }
62  {
63  MayDay::Error("disallowed constructor");
64  }
65  void operator=(const EBCellFactory& a_inputs)
66  {
67  MayDay::Error("disallowed constructor");
68  }
69 
70 };
71 
72 #include "NamespaceFooter.H"
73 #endif
virtual const EBISBox & ebisBox(const DataIndex &a_dit) const
Definition: EBCellFactory.H:42
virtual ~EBCellFactory()
Definition: EBISBox.H:46
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:65
Definition: EBCellFAB.H:29
EBISLayout m_ebisl
Definition: EBCellFactory.H:54
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:469
Definition: DataIndex.H:114
EBCellFactory(const EBCellFactory &a_inputs)
Definition: EBCellFactory.H:57
Factory object to data members of a BoxLayoutData container.
Definition: BoxLayoutData.H:30
Definition: EBISLayout.H:39
EBCellFactory()
Definition: EBCellFactory.H:61