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