Chombo + EB  3.2
BaseEBFaceFactory.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 _BASEEBFACEFACTORY_H_
14 #define _BASEEBFACEFACTORY_H_
15 
16 #include <cmath>
17 #include <cstdlib>
18 #include "Vector.H"
19 #include "EBISLayout.H"
20 #include "BaseEBFaceFAB.H"
21 #include "DataIndex.H"
22 #include "NamespaceHeader.H"
23 
24 
25 /// Factory class to produce BaseEBFaceFABs.
26 /**
27  Factory class to produce BaseEBFaceFABs.
28  This is needed for LevelData construction.
29  */
30 template <class T>
32  : public DataFactory<BaseEBFaceFAB<T> >
33 {
34 public:
35  /// factory function.
36  /**
37  Creates a new baseebFacefab 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 BaseEBFaceFAB<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  BaseEBFaceFactory(const EBISLayout& a_ebisl, int a_idir);
49 
50  ///
51  virtual ~BaseEBFaceFactory();
52 
53 private:
55  int m_idir;
56  //disallowed constructors and all that
58  {
59  MayDay::Error("disallowed constructor");
60  }
62  {
63  MayDay::Error("disallowed constructor");
64  }
65  void operator=(const BaseEBFaceFactory& a_inputs)
66  {
67  MayDay::Error("disallowed constructor");
68  }
69 
70 };
71 
72 #include "NamespaceFooter.H"
73 #include "BaseEBFaceFactoryI.H"
74 
75 #endif
int m_idir
Definition: BaseEBFaceFactory.H:55
Array defined at the Faces of an Box in an EBISBox.
Definition: BaseEBFaceFAB.H:43
virtual ~BaseEBFaceFactory()
Definition: BaseEBFaceFactoryI.H:20
BaseEBFaceFactory(const BaseEBFaceFactory &a_inputs)
Definition: BaseEBFaceFactory.H:57
Factory class to produce BaseEBFaceFABs.
Definition: BaseEBFaceFactory.H:31
virtual BaseEBFaceFAB< T > * create(const Box &a_box, int a_ncomps, const DataIndex &a_dit) const
factory function.
Definition: BaseEBFaceFactoryI.H:35
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.
BaseEBFaceFactory()
Definition: BaseEBFaceFactory.H:61
A Rectangular Domain on an Integer Lattice.
Definition: Box.H:465
void operator=(const BaseEBFaceFactory &a_inputs)
Definition: BaseEBFaceFactory.H:65
Definition: DataIndex.H:112
Factory object to data members of a BoxLayoutData container.
Definition: BoxLayoutData.H:30
Definition: EBISLayout.H:39
EBISLayout m_ebisl
Definition: BaseEBFaceFactory.H:54