chombo-discharge
Loading...
Searching...
No Matches
CD_MFInterfaceFABImplem.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_MFInterfaceFABImplem_H
13#define CD_MFInterfaceFABImplem_H
14
15// Our includes
16#include <CD_MFInterfaceFAB.H>
17#include <CD_NamespaceHeader.H>
18
19template <class T>
22
23template <class T>
28
29template <class T>
31{
32 for (int i = 0; i < m_phase.size(); i++) {
33 delete m_phase[i];
34 }
35}
36
37template <class T>
38void
40{
41
42 const DisjointBoxLayout& dbl = a_mflg.getGrids();
43 const ProblemDomain& domain = a_mflg.getDomain();
45 const int numPhases = MultiFluidIndexSpace->numPhases();
46
47 m_ivs = a_mflg.interfaceRegion(dbl.get(a_dit), a_dit);
48 m_phase.resize(numPhases, NULL);
49
50 for (int i = 0; i < numPhases; i++) {
51 const EBLevelGrid& eblg = a_mflg.getEBLevelGrid(i);
52 const EBISLayout& ebisl = eblg.getEBISL();
53 m_phase[i] = new BaseIVFAB<T>(m_ivs, ebisl[a_dit].getEBGraph(), 1);
54 }
55}
56
57template <class T>
58const IntVectSet&
60{
61 return m_ivs;
62}
63
64template <class T>
67{
68 return *m_phase[a_phase];
69}
70
71template <class T>
72const BaseIVFAB<T>&
74{
75 return *m_phase[a_phase];
76}
77
78template <class T>
84
85template <class T>
86int
88{
89 return m_phase.size();
90}
91
92template <class T>
93void
95{
96 for (int i = 0; i < m_phase.size(); i++) {
97 m_phase[i]->setVal(a_value);
98 }
99}
100
101#include <CD_NamespaceFooter.H>
102
103#endif
Declaration of a class that allocates irregular data holders over the interface between two phases.
MFInterfaceFAB()
Constructor. Must subsequently call define.
Definition CD_MFInterfaceFABImplem.H:20
virtual int numPhases() const
Get number of phases.
Definition CD_MFInterfaceFABImplem.H:87
virtual BaseIVFAB< T > & getIVFAB(const int a_phase)
Get BaseIVFAB for specified phase.
Definition CD_MFInterfaceFABImplem.H:66
virtual void define(const MFLevelGrid &a_mflg, const DataIndex &a_dit)
Define function.
Definition CD_MFInterfaceFABImplem.H:39
virtual ~MFInterfaceFAB()
Destructor.
Definition CD_MFInterfaceFABImplem.H:30
virtual const IntVectSet & getIVS() const
Get defining region.
Definition CD_MFInterfaceFABImplem.H:59
virtual void setVal(const T &a_value)
Set value on both fabs.
Definition CD_MFInterfaceFABImplem.H:94
virtual BaseIVFAB< T > * getPhasePtr(int a_phase)
Get BaseIVFAB for specified phase.
Definition CD_MFInterfaceFABImplem.H:80
Wrapper class for holding multifluid EBLevelGrids.
Definition CD_MFLevelGrid.H:29
Two-fluid index space.
Definition CD_MultiFluidIndexSpace.H:42
int numPhases() const
Get number of phases.
Definition CD_MultiFluidIndexSpace.cpp:89
Base class for a tracer particle solver. This solver can advance particles in a pre-defined velocity ...
Definition CD_TracerParticleSolver.H:37
phase::which_phase m_phase
Phase where this solver lives.
Definition CD_TracerParticleSolver.H:360
TracerParticleSolver()
Default constructor.
Definition CD_TracerParticleSolverImplem.H:25