chombo-discharge
CD_CdrPlasmaGodunovStorage.H
Go to the documentation of this file.
1 /* chombo-discharge
2  * Copyright © 2021 SINTEF Energy Research.
3  * Please refer to Copyright.txt and LICENSE in the chombo-discharge root directory.
4  */
5 
12 #ifndef CD_CdrPlasmaGodunovStorage_H
13 #define CD_CdrPlasmaGodunovStorage_H
14 
15 // Our includes
17 #include <CD_AmrMesh.H>
18 #include <CD_NamespaceHeader.H>
19 
20 namespace Physics {
21  namespace CdrPlasma {
22 
28  {
29  public:
33  CdrStorage() = delete;
34 
41  CdrStorage(const RefCountedPtr<AmrMesh>& a_amr, const std::string a_realm, const phase::which_phase a_phase);
42 
46  virtual ~CdrStorage();
47 
51  virtual void
53 
57  virtual void
59 
64  getScratch() const
65  {
66  return m_scratch;
67  }
68 
73  getScratch2() const
74  {
75  return m_scratch2;
76  }
77 
82  getExtrap() const
83  {
84  return m_cellExtr;
85  }
86 
91  getGradient() const
92  {
93  return m_gradient;
94  }
95 
100  getEbState() const
101  {
102  return m_scratchIV1;
103  }
104 
108  EBAMRIVData&
109  getEbVelo() const
110  {
111  return m_scratchIV2;
112  }
113 
117  EBAMRIVData&
118  getEbFlux() const
119  {
120  return m_scratchIV3;
121  }
122 
126  EBAMRIVData&
127  getEbGrad() const
128  {
129  return m_scratchIV4;
130  }
131 
135  EBAMRIFData&
137  {
138  return m_scratchIF1;
139  }
140 
144  EBAMRIFData&
146  {
147  return m_scratchIF2;
148  }
149 
153  EBAMRIFData&
155  {
156  return m_scratchIF3;
157  }
158 
162  EBAMRIFData&
164  {
165  return m_scratchIF4;
166  }
167 
168  protected:
172  RefCountedPtr<AmrMesh> m_amr;
173 
177  std::string m_realm;
178 
182  phase::which_phase m_phase;
183 
188 
193 
198 
203 
208 
213 
218 
223 
232 
237 
242  };
243 
249  {
250  public:
254  FieldStorage() = delete;
255 
262  FieldStorage(const RefCountedPtr<AmrMesh>& a_amr, const std::string a_realm, const phase::which_phase a_phase);
263 
267  virtual ~FieldStorage();
268 
272  virtual void
273  allocateStorage();
274 
278  virtual void
280 
286  {
287  return m_electricFieldCell;
288  }
289 
293  EBAMRIVData&
295  {
296  return m_electricFieldEB;
297  }
298 
302  EBAMRIFData&
304  {
305  return m_electricFieldDomain;
306  }
307 
308  protected:
312  RefCountedPtr<AmrMesh> m_amr;
313 
317  std::string m_realm;
318 
322  phase::which_phase m_phase;
323 
328 
333 
338  };
339 
345  {
346  public:
350  RtStorage() = delete;
351 
358  RtStorage(const RefCountedPtr<AmrMesh>& a_amr, const std::string a_realm, const phase::which_phase a_phase);
359 
363  virtual ~RtStorage();
364 
368  virtual void
369  allocateStorage();
370 
374  virtual void
376 
380  EBAMRIVData&
381  getEbFlux() const
382  {
383  return m_scratchIV;
384  }
385 
389  EBAMRIFData&
391  {
392  return m_scratchIF;
393  }
394 
395  protected:
399  RefCountedPtr<AmrMesh> m_amr;
400 
404  std::string m_realm;
405 
409  phase::which_phase m_phase;
410 
415 
420  };
421 
427  {
428  public:
432  SigmaStorage() = delete;
433 
440  SigmaStorage(const RefCountedPtr<AmrMesh>& a_amr, const std::string a_realm, const phase::which_phase a_phase);
441 
445  virtual ~SigmaStorage();
446 
450  virtual void
451  allocateStorage();
452 
456  virtual void
458 
462  EBAMRIVData&
463  getScratch() const
464  {
465  return m_scratch;
466  }
467 
468  protected:
472  RefCountedPtr<AmrMesh> m_amr;
473 
477  std::string m_realm;
478 
482  phase::which_phase m_phase;
483 
488  };
489  } // namespace CdrPlasma
490 } // namespace Physics
491 
492 #include <CD_NamespaceFooter.H>
493 
494 #endif
Declaration of core class for handling AMR-related operations (with embedded boundaries)
Declaration of the Godunov time stepper method.
Utility class for memory handling in CdrPlasmaStepper.
Definition: CD_CdrPlasmaGodunovStorage.H:28
EBAMRCellData & getGradient() const
Get storage for holding gradient.
Definition: CD_CdrPlasmaGodunovStorage.H:91
phase::which_phase m_phase
Phase where data lives.
Definition: CD_CdrPlasmaGodunovStorage.H:182
virtual void allocateStorage()
Allocation function. This will allocate all transient storage in this class.
Definition: CD_CdrPlasmaGodunovStorage.cpp:35
EBAMRIVData & getEbVelo() const
Get the scratch storage holding the normal component of the velocity on the EB.
Definition: CD_CdrPlasmaGodunovStorage.H:109
EBAMRIFData & getDomainState() const
Get the scratch storage holding the extrapolated density on domain faces.
Definition: CD_CdrPlasmaGodunovStorage.H:136
EBAMRIFData m_scratchIF2
Domain-centered scratch data.
Definition: CD_CdrPlasmaGodunovStorage.H:231
EBAMRCellData m_gradient
Cell-centered scratch data for holding the gradient.
Definition: CD_CdrPlasmaGodunovStorage.H:202
virtual void deallocateStorage()
Allocation function. This will delete all transient storage in this class.
Definition: CD_CdrPlasmaGodunovStorage.cpp:61
EBAMRIFData m_scratchIF4
Domain-centered scratch data.
Definition: CD_CdrPlasmaGodunovStorage.H:241
EBAMRIFData & getDomainFlux() const
Get the scratch storage holding the extrapolated flux on domain faces.
Definition: CD_CdrPlasmaGodunovStorage.H:154
EBAMRIVData & getEbGrad() const
Get the scratch storage holding the extrapolated gradient on the EB.
Definition: CD_CdrPlasmaGodunovStorage.H:127
EBAMRIFData & getDomainVelo() const
Get the scratch storage holding the extrapolated velocity (normal component only) on domain faces.
Definition: CD_CdrPlasmaGodunovStorage.H:145
EBAMRIVData m_scratchIV2
EB-centered scratch data.
Definition: CD_CdrPlasmaGodunovStorage.H:212
EBAMRIVData m_scratchIV4
EB-centered scratch data.
Definition: CD_CdrPlasmaGodunovStorage.H:222
std::string m_realm
Realm where data lives.
Definition: CD_CdrPlasmaGodunovStorage.H:177
EBAMRIVData & getEbState() const
Get scratch storage that holds the density on the EB.
Definition: CD_CdrPlasmaGodunovStorage.H:100
virtual ~CdrStorage()
Destructor.
Definition: CD_CdrPlasmaGodunovStorage.cpp:29
EBAMRCellData m_scratch2
Cell-centered scratch data.
Definition: CD_CdrPlasmaGodunovStorage.H:192
CdrStorage()=delete
Disallowed constructor. Only strong construction allowed.
EBAMRCellData m_scratch
Cell-centered scratch data.
Definition: CD_CdrPlasmaGodunovStorage.H:187
EBAMRIVData m_scratchIV3
EB-centered scratch data.
Definition: CD_CdrPlasmaGodunovStorage.H:217
EBAMRCellData & getScratch2() const
Get the other scratch storage.
Definition: CD_CdrPlasmaGodunovStorage.H:73
RefCountedPtr< AmrMesh > m_amr
Reference to AmrMesh.
Definition: CD_CdrPlasmaGodunovStorage.H:172
EBAMRIVData & getEbFlux() const
Get the scratch storage holding the extrapolated flux on the EB.
Definition: CD_CdrPlasmaGodunovStorage.H:118
EBAMRIFData m_scratchIF3
Domain-centered scratch data.
Definition: CD_CdrPlasmaGodunovStorage.H:236
EBAMRCellData m_cellExtr
Cell-centered scratch data. Used for holding phi + 0.5*dt*S.
Definition: CD_CdrPlasmaGodunovStorage.H:197
EBAMRIVData m_scratchIV1
EB-centered scratch data.
Definition: CD_CdrPlasmaGodunovStorage.H:207
EBAMRIFData m_scratchIF1
Domain-centered scratch data.
Definition: CD_CdrPlasmaGodunovStorage.H:227
EBAMRCellData & getScratch() const
Get scratch storage.
Definition: CD_CdrPlasmaGodunovStorage.H:64
EBAMRCellData & getExtrap() const
Get the extrapolation storage. This is usually used for holding phi + 0.5*dt*S.
Definition: CD_CdrPlasmaGodunovStorage.H:82
EBAMRIFData & getDomainGrad() const
Get the scratch storage holding the extrapolated gradient (normal component only) on domain faces.
Definition: CD_CdrPlasmaGodunovStorage.H:163
Utility class for memory handling in CdrPlasmaStepper.
Definition: CD_CdrPlasmaGodunovStorage.H:249
EBAMRIVData m_electricFieldEB
Scratch storage for holding electric field at the EB.
Definition: CD_CdrPlasmaGodunovStorage.H:332
virtual void allocateStorage()
Allocation function – allocates all the necessary memory.
Definition: CD_CdrPlasmaGodunovStorage.cpp:98
EBAMRCellData & getElectricFieldCell() const
Get scratch storage that holds the electric field at the cell center.
Definition: CD_CdrPlasmaGodunovStorage.H:285
EBAMRIFData & getElectricFieldDomain() const
Get scratch storage that holds the electric field at the domainf aces.
Definition: CD_CdrPlasmaGodunovStorage.H:303
RefCountedPtr< AmrMesh > m_amr
Reference to AmrMesh.
Definition: CD_CdrPlasmaGodunovStorage.H:312
FieldStorage()=delete
Disallowed weak constructor.
std::string m_realm
Realm where data lives.
Definition: CD_CdrPlasmaGodunovStorage.H:317
EBAMRIFData m_electricFieldDomain
Scratch storage for holding electric field at domain faces.
Definition: CD_CdrPlasmaGodunovStorage.H:337
EBAMRIVData & getElectricFieldEB() const
Get scratch storage that holds the electric field at the EB.
Definition: CD_CdrPlasmaGodunovStorage.H:294
virtual void deallocateStorage()
Deallocation function – deallocates all the necessary memory.
Definition: CD_CdrPlasmaGodunovStorage.cpp:108
virtual ~FieldStorage()
Destructor.
Definition: CD_CdrPlasmaGodunovStorage.cpp:92
EBAMRCellData m_electricFieldCell
Scratch storage for holding electric field at cell center.
Definition: CD_CdrPlasmaGodunovStorage.H:327
phase::which_phase m_phase
Phase where data lives.
Definition: CD_CdrPlasmaGodunovStorage.H:322
Utility class for memory handling in CdrPlasmaStepper.
Definition: CD_CdrPlasmaGodunovStorage.H:345
EBAMRIVData m_scratchIV
Scratch storage on EB.
Definition: CD_CdrPlasmaGodunovStorage.H:414
phase::which_phase m_phase
Phase where data lives.
Definition: CD_CdrPlasmaGodunovStorage.H:409
RefCountedPtr< AmrMesh > m_amr
Reference to AmrMesh.
Definition: CD_CdrPlasmaGodunovStorage.H:399
RtStorage()=delete
Disallowed weak constructor.
EBAMRIFData m_scratchIF
Scratch storage on domain faces.
Definition: CD_CdrPlasmaGodunovStorage.H:419
virtual void allocateStorage()
Allocate function – allocates the flux data holders.
Definition: CD_CdrPlasmaGodunovStorage.cpp:130
EBAMRIFData & getDomainFlux() const
Get scratch storage that holds the domain.
Definition: CD_CdrPlasmaGodunovStorage.H:390
std::string m_realm
Realm where data lives.
Definition: CD_CdrPlasmaGodunovStorage.H:404
virtual ~RtStorage()
Destructor.
Definition: CD_CdrPlasmaGodunovStorage.cpp:126
virtual void deallocateStorage()
Allocate function – deallocates the flux data holders.
Definition: CD_CdrPlasmaGodunovStorage.cpp:141
EBAMRIVData & getEbFlux() const
Get scratch storage that holds the EB flux.
Definition: CD_CdrPlasmaGodunovStorage.H:381
Utility class for memory handling in CdrPlasmaStepper.
Definition: CD_CdrPlasmaGodunovStorage.H:427
EBAMRIVData & getScratch() const
Get scratch data.
Definition: CD_CdrPlasmaGodunovStorage.H:463
virtual void deallocateStorage()
Allocation function – deallocates the storage.
Definition: CD_CdrPlasmaGodunovStorage.cpp:170
virtual ~SigmaStorage()
Destructor.
Definition: CD_CdrPlasmaGodunovStorage.cpp:158
SigmaStorage()=delete
Disallowed weak constructor. Use full construction.
EBAMRIVData m_scratch
Scratch data.
Definition: CD_CdrPlasmaGodunovStorage.H:487
std::string m_realm
Realm where data lives.
Definition: CD_CdrPlasmaGodunovStorage.H:477
virtual void allocateStorage()
Allocation function – allocates the storage.
Definition: CD_CdrPlasmaGodunovStorage.cpp:162
phase::which_phase m_phase
Phase where data lives.
Definition: CD_CdrPlasmaGodunovStorage.H:482
RefCountedPtr< AmrMesh > m_amr
Reference to AmrMesh.
Definition: CD_CdrPlasmaGodunovStorage.H:472
Name containing various physics models for running chombo-discharge code.
Definition: CD_AdvectionDiffusion.H:15