chombo-discharge
Loading...
Searching...
No Matches
CD_CdrPlasmaGodunovStorage.H
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2021-2026 SINTEF Energy Research
3 *
4 * SPDX-License-Identifier: GPL-3.0-or-later
5 */
6
13#ifndef CD_CDRPLASMAGODUNOVSTORAGE_H
14#define CD_CDRPLASMAGODUNOVSTORAGE_H
15
16// Our includes
18#include <CD_AmrMesh.H>
19#include <CD_NamespaceHeader.H>
20
21namespace Physics {
22 namespace CdrPlasma {
23
29 {
30 public:
34 CdrStorage() = delete;
35
42 CdrStorage(const RefCountedPtr<AmrMesh>& a_amr, const std::string& a_realm, phase::which_phase a_phase);
43
47 virtual ~CdrStorage();
48
49 CdrStorage(const CdrStorage&) = delete;
51 operator=(const CdrStorage&) = delete;
52 CdrStorage(CdrStorage&&) = delete;
54 operator=(CdrStorage&&) = delete;
55
59 virtual void
61
65 virtual void
67
72 EBAMRCellData&
73 getScratch() const
74 {
75 return m_scratch;
76 }
77
82 EBAMRCellData&
84 {
85 return m_scratch2;
86 }
87
92 EBAMRCellData&
93 getExtrap() const
94 {
95 return m_cellExtr;
96 }
97
102 EBAMRCellData&
104 {
105 return m_gradient;
106 }
107
112 EBAMRIVData&
114 {
115 return m_scratchIV1;
116 }
117
122 EBAMRIVData&
123 getEbVelo() const
124 {
125 return m_scratchIV2;
126 }
127
132 EBAMRIVData&
133 getEbFlux() const
134 {
135 return m_scratchIV3;
136 }
137
142 EBAMRIVData&
143 getEbGrad() const
144 {
145 return m_scratchIV4;
146 }
147
152 EBAMRIFData&
154 {
155 return m_scratchIF1;
156 }
157
162 EBAMRIFData&
164 {
165 return m_scratchIF2;
166 }
167
172 EBAMRIFData&
174 {
175 return m_scratchIF3;
176 }
177
182 EBAMRIFData&
184 {
185 return m_scratchIF4;
186 }
187
188 protected:
192 RefCountedPtr<AmrMesh> m_amr;
193
197 std::string m_realm;
198
203
207 mutable EBAMRCellData m_scratch;
208
212 mutable EBAMRCellData m_scratch2;
213
217 mutable EBAMRCellData m_cellExtr;
218
222 mutable EBAMRCellData m_gradient;
223
227 mutable EBAMRIVData m_scratchIV1;
228
232 mutable EBAMRIVData m_scratchIV2;
233
237 mutable EBAMRIVData m_scratchIV3;
238
242 mutable EBAMRIVData m_scratchIV4;
243
247 mutable EBAMRIFData m_scratchIF1;
251 mutable EBAMRIFData m_scratchIF2;
252
256 mutable EBAMRIFData m_scratchIF3;
257
261 mutable EBAMRIFData m_scratchIF4;
262 };
263
269 {
270 public:
274 FieldStorage() = delete;
275
282 FieldStorage(const RefCountedPtr<AmrMesh>& a_amr, const std::string& a_realm, phase::which_phase a_phase);
283
287 virtual ~FieldStorage();
288
289 FieldStorage(const FieldStorage&) = delete;
291 operator=(const FieldStorage&) = delete;
292 FieldStorage(FieldStorage&&) = delete;
294 operator=(FieldStorage&&) = delete;
295
299 virtual void
301
305 virtual void
307
312 EBAMRCellData&
314 {
315 return m_electricFieldCell;
316 }
317
322 EBAMRIVData&
324 {
325 return m_electricFieldEB;
326 }
327
332 EBAMRIFData&
334 {
336 }
337
338 protected:
342 RefCountedPtr<AmrMesh> m_amr;
343
347 std::string m_realm;
348
353
357 mutable EBAMRCellData m_electricFieldCell;
358
362 mutable EBAMRIVData m_electricFieldEB;
363
367 mutable EBAMRIFData m_electricFieldDomain;
368 };
369
375 {
376 public:
380 RtStorage() = delete;
381
388 RtStorage(const RefCountedPtr<AmrMesh>& a_amr, const std::string& a_realm, phase::which_phase a_phase);
389
393 virtual ~RtStorage();
394
395 RtStorage(const RtStorage&) = delete;
396 RtStorage&
397 operator=(const RtStorage&) = delete;
398 RtStorage(RtStorage&&) = delete;
399 RtStorage&
400 operator=(RtStorage&&) = delete;
401
405 virtual void
407
411 virtual void
413
418 EBAMRIVData&
419 getEbFlux() const
420 {
421 return m_scratchIV;
422 }
423
428 EBAMRIFData&
430 {
431 return m_scratchIF;
432 }
433
434 protected:
438 RefCountedPtr<AmrMesh> m_amr;
439
443 std::string m_realm;
444
449
453 mutable EBAMRIVData m_scratchIV;
454
458 mutable EBAMRIFData m_scratchIF;
459 };
460
466 {
467 public:
471 SigmaStorage() = delete;
472
479 SigmaStorage(const RefCountedPtr<AmrMesh>& a_amr, const std::string& a_realm, phase::which_phase a_phase);
480
484 virtual ~SigmaStorage();
485
486 SigmaStorage(const SigmaStorage&) = delete;
488 operator=(const SigmaStorage&) = delete;
489 SigmaStorage(SigmaStorage&&) = delete;
491 operator=(SigmaStorage&&) = delete;
492
496 virtual void
498
502 virtual void
504
509 EBAMRIVData&
511 {
512 return m_scratch;
513 }
514
515 protected:
519 RefCountedPtr<AmrMesh> m_amr;
520
524 std::string m_realm;
525
530
534 mutable EBAMRIVData m_scratch;
535 };
536 } // namespace CdrPlasma
537} // namespace Physics
538
539#include <CD_NamespaceFooter.H>
540
541#endif
Declaration of core class for handling AMR-related operations (with embedded boundaries)
Declaration of Physics::CdrPlasma::CdrPlasmaGodunovStepper, a split-step Godunov CDR plasma stepper.
Utility class for memory handling in CdrPlasmaStepper.
Definition CD_CdrPlasmaGodunovStorage.H:29
EBAMRIFData & getDomainGrad() const
Get the scratch storage holding the extrapolated gradient (normal component only) on domain faces.
Definition CD_CdrPlasmaGodunovStorage.H:183
phase::which_phase m_phase
Phase where data lives.
Definition CD_CdrPlasmaGodunovStorage.H:202
virtual void allocateStorage()
Allocation function. This will allocate all transient storage in this class.
Definition CD_CdrPlasmaGodunovStorage.cpp:32
EBAMRIFData m_scratchIF2
Domain-centered scratch data.
Definition CD_CdrPlasmaGodunovStorage.H:251
EBAMRCellData m_gradient
Cell-centered scratch data for holding the gradient.
Definition CD_CdrPlasmaGodunovStorage.H:222
EBAMRIFData & getDomainVelo() const
Get the scratch storage holding the extrapolated velocity (normal component only) on domain faces.
Definition CD_CdrPlasmaGodunovStorage.H:163
virtual void deallocateStorage()
Allocation function. This will delete all transient storage in this class.
Definition CD_CdrPlasmaGodunovStorage.cpp:58
EBAMRIFData m_scratchIF4
Domain-centered scratch data.
Definition CD_CdrPlasmaGodunovStorage.H:261
EBAMRIVData m_scratchIV2
EB-centered scratch data.
Definition CD_CdrPlasmaGodunovStorage.H:232
EBAMRCellData & getGradient() const
Get storage for holding gradient.
Definition CD_CdrPlasmaGodunovStorage.H:103
EBAMRIVData m_scratchIV4
EB-centered scratch data.
Definition CD_CdrPlasmaGodunovStorage.H:242
std::string m_realm
Realm where data lives.
Definition CD_CdrPlasmaGodunovStorage.H:197
EBAMRIFData & getDomainFlux() const
Get the scratch storage holding the extrapolated flux on domain faces.
Definition CD_CdrPlasmaGodunovStorage.H:173
EBAMRIVData & getEbFlux() const
Get the scratch storage holding the extrapolated flux on the EB.
Definition CD_CdrPlasmaGodunovStorage.H:133
EBAMRCellData & getScratch2() const
Get the other scratch storage.
Definition CD_CdrPlasmaGodunovStorage.H:83
EBAMRIVData & getEbGrad() const
Get the scratch storage holding the extrapolated gradient on the EB.
Definition CD_CdrPlasmaGodunovStorage.H:143
EBAMRIVData & getEbState() const
Get scratch storage that holds the density on the EB.
Definition CD_CdrPlasmaGodunovStorage.H:113
virtual ~CdrStorage()
Destructor.
Definition CD_CdrPlasmaGodunovStorage.cpp:26
EBAMRIFData & getDomainState() const
Get the scratch storage holding the extrapolated density on domain faces.
Definition CD_CdrPlasmaGodunovStorage.H:153
EBAMRCellData m_scratch2
Cell-centered scratch data.
Definition CD_CdrPlasmaGodunovStorage.H:212
EBAMRCellData & getExtrap() const
Get the extrapolation storage. This is usually used for holding phi + 0.5*dt*S.
Definition CD_CdrPlasmaGodunovStorage.H:93
CdrStorage()=delete
Disallowed constructor. Only strong construction allowed.
EBAMRCellData m_scratch
Cell-centered scratch data.
Definition CD_CdrPlasmaGodunovStorage.H:207
EBAMRIVData m_scratchIV3
EB-centered scratch data.
Definition CD_CdrPlasmaGodunovStorage.H:237
RefCountedPtr< AmrMesh > m_amr
Reference to AmrMesh.
Definition CD_CdrPlasmaGodunovStorage.H:192
EBAMRIFData m_scratchIF3
Domain-centered scratch data.
Definition CD_CdrPlasmaGodunovStorage.H:256
EBAMRCellData m_cellExtr
Cell-centered scratch data. Used for holding phi + 0.5*dt*S.
Definition CD_CdrPlasmaGodunovStorage.H:217
EBAMRCellData & getScratch() const
Get scratch storage.
Definition CD_CdrPlasmaGodunovStorage.H:73
EBAMRIVData m_scratchIV1
EB-centered scratch data.
Definition CD_CdrPlasmaGodunovStorage.H:227
EBAMRIVData & getEbVelo() const
Get the scratch storage holding the normal component of the velocity on the EB.
Definition CD_CdrPlasmaGodunovStorage.H:123
EBAMRIFData m_scratchIF1
Domain-centered scratch data.
Definition CD_CdrPlasmaGodunovStorage.H:247
Utility class for memory handling in CdrPlasmaStepper.
Definition CD_CdrPlasmaGodunovStorage.H:269
EBAMRIVData m_electricFieldEB
Scratch storage for holding electric field at the EB.
Definition CD_CdrPlasmaGodunovStorage.H:362
virtual void allocateStorage()
Allocation function – allocates all the necessary memory.
Definition CD_CdrPlasmaGodunovStorage.cpp:92
EBAMRIFData & getElectricFieldDomain() const
Get scratch storage that holds the electric field at the domainf aces.
Definition CD_CdrPlasmaGodunovStorage.H:333
RefCountedPtr< AmrMesh > m_amr
Reference to AmrMesh.
Definition CD_CdrPlasmaGodunovStorage.H:342
FieldStorage()=delete
Disallowed weak constructor.
std::string m_realm
Realm where data lives.
Definition CD_CdrPlasmaGodunovStorage.H:347
EBAMRIVData & getElectricFieldEB() const
Get scratch storage that holds the electric field at the EB.
Definition CD_CdrPlasmaGodunovStorage.H:323
EBAMRIFData m_electricFieldDomain
Scratch storage for holding electric field at domain faces.
Definition CD_CdrPlasmaGodunovStorage.H:367
virtual void deallocateStorage()
Deallocation function – deallocates all the necessary memory.
Definition CD_CdrPlasmaGodunovStorage.cpp:102
virtual ~FieldStorage()
Destructor.
Definition CD_CdrPlasmaGodunovStorage.cpp:86
EBAMRCellData m_electricFieldCell
Scratch storage for holding electric field at cell center.
Definition CD_CdrPlasmaGodunovStorage.H:357
phase::which_phase m_phase
Phase where data lives.
Definition CD_CdrPlasmaGodunovStorage.H:352
EBAMRCellData & getElectricFieldCell() const
Get scratch storage that holds the electric field at the cell center.
Definition CD_CdrPlasmaGodunovStorage.H:313
Utility class for memory handling in CdrPlasmaStepper.
Definition CD_CdrPlasmaGodunovStorage.H:375
EBAMRIVData m_scratchIV
Scratch storage on EB.
Definition CD_CdrPlasmaGodunovStorage.H:453
phase::which_phase m_phase
Phase where data lives.
Definition CD_CdrPlasmaGodunovStorage.H:448
RefCountedPtr< AmrMesh > m_amr
Reference to AmrMesh.
Definition CD_CdrPlasmaGodunovStorage.H:438
EBAMRIVData & getEbFlux() const
Get scratch storage that holds the EB flux.
Definition CD_CdrPlasmaGodunovStorage.H:419
RtStorage()=delete
Disallowed weak constructor.
EBAMRIFData m_scratchIF
Scratch storage on domain faces.
Definition CD_CdrPlasmaGodunovStorage.H:458
virtual void allocateStorage()
Allocate function – allocates the flux data holders.
Definition CD_CdrPlasmaGodunovStorage.cpp:120
std::string m_realm
Realm where data lives.
Definition CD_CdrPlasmaGodunovStorage.H:443
virtual void deallocateStorage()
Allocate function – deallocates the flux data holders.
Definition CD_CdrPlasmaGodunovStorage.cpp:131
EBAMRIFData & getDomainFlux() const
Get scratch storage that holds the domain.
Definition CD_CdrPlasmaGodunovStorage.H:429
Utility class for memory handling in CdrPlasmaStepper.
Definition CD_CdrPlasmaGodunovStorage.H:466
virtual void deallocateStorage()
Allocation function – deallocates the storage.
Definition CD_CdrPlasmaGodunovStorage.cpp:156
SigmaStorage()=delete
Disallowed weak constructor. Use full construction.
EBAMRIVData m_scratch
Scratch data.
Definition CD_CdrPlasmaGodunovStorage.H:534
std::string m_realm
Realm where data lives.
Definition CD_CdrPlasmaGodunovStorage.H:524
virtual void allocateStorage()
Allocation function – allocates the storage.
Definition CD_CdrPlasmaGodunovStorage.cpp:148
phase::which_phase m_phase
Phase where data lives.
Definition CD_CdrPlasmaGodunovStorage.H:529
RefCountedPtr< AmrMesh > m_amr
Reference to AmrMesh.
Definition CD_CdrPlasmaGodunovStorage.H:519
EBAMRIVData & getScratch() const
Get scratch data.
Definition CD_CdrPlasmaGodunovStorage.H:510
Namespace containing physics models for use with chombo-discharge.
Definition CD_AdvectionDiffusion.H:16
which_phase
Enumeration of supported phases.
Definition CD_MultiFluidIndexSpace.H:38