Chombo + EB + MF  3.2
AMRLevelMappedConsFactory.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 #ifndef _AMRLEVELMAPPEDCONSFACTORY_H_
12 #define _AMRLEVELMAPPEDCONSFACTORY_H_
13 
14 #include "AMRLevelConsFactory.H"
15 #include "AMRLevelMappedCons.H"
16 
17 #include "NamespaceHeader.H"
18 
19 /// AMR Cons Equation factory
20 /**
21  */
23 {
24 public:
25  /// Null constructor
26  /**
27  */
29 
30  /// Constructor for a single-block coordinate system.
31  /**
32  */
34  NewCoordSysFactory *const a_coordSysFact,
35  AMRLevelMappedStabilityStrategy* a_stableTimeSteppingStrategy,
36  AMRLevelMappedTaggingStrategy* a_taggingStategy);
37 
38  /// Constructor for a multi-block coordinate system.
39  /**
40  */
42  MultiBlockCoordSysFactory *const a_coordSysFact,
43  AMRLevelMappedStabilityStrategy* a_stableTimeSteppingStrategy,
44  AMRLevelMappedTaggingStrategy* a_taggingStategy);
45 
46  /// Virtual constructor
47  /**
48  */
49  virtual AMRLevel* new_amrlevel() const;
50 
51  /// Destructor
52  /**
53  */
55 
56  /// Set the factory for the coordinate system
57  /**
58  */
60 
61  /// Set whether to use source term.
62  /**
63  */
64  virtual void useSourceTerm(bool a_useSourceTerm);
65 
66  /// Source term class, if necessary
67  /**
68  */
69  virtual void sourceTerm(const LevelSourceTerm* const a_sourceTerm);
70 
71  /// Set whether to modify fluxes by adding artificial dissipation based on 5th derivative.
72  /**
73  */
74  virtual void useArtificialDissipation(bool a_useArtificialDissipation);
75 
76  /// Set coefficient of artificial dissipation.
77  /**
78  */
79  virtual void artificialDissipation(Real a_artificialDissipation);
80 
81  /**
82  */
83  void plotPrefix(const std::string& a_plotfile_prefix);
84 
85  /// Check that everything is defined
86  /**
87  */
88  bool isDefined() const;
89 
90  virtual void writeJ(bool a_writeJ);
91 
92  virtual void writeExact(bool a_writeExact);
93 
94  virtual void writeError(bool a_writeError);
95 
96  virtual void writeMap(bool a_writeMap);
97 
98 protected:
99 
100  // Some default values
101  virtual void setDefaultValues();
102 
103  virtual void transferSettings(AMRLevelCons* a_newPtr) const;
104 
105  // Single block? Default false. If true, then m_coordSysFact will be newed and deleted.
107 
108  // Use source term?
110 
111  // Pointer to the object that supplies source term.
113 
114  // Use artificial dissipation?
116 
117  // Coefficient of artificial dissipation
119 
120  // Factory for coordinate system
122 
123  // Prefix for plot files
124  std::string m_plotPrefix;
125 
126  // Whether to write out J.
127  bool m_writeJ;
128 
129  // Whether to write out exact solution.
131 
132  // Whether to write out error (difference between calculated and exact solutions).
134 
135  /// Whether to write out mapping file
137 
138  // Strategy for computing a stable time step.
140 
141  // Strategy for determining which cells to tag for refinement.
143 
144 private:
145 
146  // Copy and assignment not allowed
147  void operator=(const AMRLevelMappedConsFactory& a_input);
149 };
150 
151 #include "NamespaceFooter.H"
152 
153 #endif
AMRLevelMappedTaggingStrategy * m_taggingStrategy
Definition: AMRLevelMappedConsFactory.H:142
virtual void writeExact(bool a_writeExact)
virtual void sourceTerm(const LevelSourceTerm *const a_sourceTerm)
Source term class, if necessary.
virtual void transferSettings(AMRLevelCons *a_newPtr) const
bool m_singleBlock
Definition: AMRLevelMappedConsFactory.H:106
virtual void writeMap(bool a_writeMap)
AMRLevelMappedConsFactory()
Null constructor.
AMRLevelMappedStabilityStrategy * m_stabilityStrategy
Definition: AMRLevelMappedConsFactory.H:139
Abstract base class for time-dependent data at a level of refinement.
Definition: AMRLevel.H:47
virtual void writeJ(bool a_writeJ)
void coordinateSystemFactory(MultiBlockCoordSysFactory *a_coordSysFact)
Set the factory for the coordinate system.
virtual void useArtificialDissipation(bool a_useArtificialDissipation)
Set whether to modify fluxes by adding artificial dissipation based on 5th derivative.
const LevelSourceTerm * m_sourceTerm
Definition: AMRLevelMappedConsFactory.H:112
AMR Level for fourth-order solution to conservation law.
Definition: AMRLevelCons.H:32
bool m_writeJ
Definition: AMRLevelMappedConsFactory.H:127
AMR Cons Equation factory.
Definition: AMRLevelMappedConsFactory.H:22
void operator=(const AMRLevelMappedConsFactory &a_input)
Definition: AMRLevelMappedStabilityStrategy.H:23
bool m_writeExact
Definition: AMRLevelMappedConsFactory.H:130
bool m_useSourceTerm
Definition: AMRLevelMappedConsFactory.H:109
MultiBlockCoordSysFactory * m_coordSysFact
Definition: AMRLevelMappedConsFactory.H:121
AMR Cons Equation factory.
Definition: AMRLevelConsFactory.H:22
pure-virtual base class defining factory interface for CoordSys
Definition: NewCoordSys.H:236
bool m_writeMap
Whether to write out mapping file.
Definition: AMRLevelMappedConsFactory.H:136
double Real
Definition: REAL.H:33
void plotPrefix(const std::string &a_plotfile_prefix)
virtual ~AMRLevelMappedConsFactory()
Destructor.
virtual void artificialDissipation(Real a_artificialDissipation)
Set coefficient of artificial dissipation.
virtual AMRLevel * new_amrlevel() const
Virtual constructor.
virtual void setDefaultValues()
bool isDefined() const
Check that everything is defined.
std::string m_plotPrefix
Definition: AMRLevelMappedConsFactory.H:124
virtual void useSourceTerm(bool a_useSourceTerm)
Set whether to use source term.
bool m_useArtificialDissipation
Definition: AMRLevelMappedConsFactory.H:115
pure-virtual base class defining factory interface for MultiBlockCoordSys
Definition: MultiBlockCoordSys.H:409
Definition: LevelSourceTerm.H:21
Real m_artificialDissipation
Definition: AMRLevelMappedConsFactory.H:118
bool m_writeError
Definition: AMRLevelMappedConsFactory.H:133
Definition: AMRLevelMappedTaggingStrategy.H:24
virtual void writeError(bool a_writeError)