chombo-discharge
Loading...
Searching...
No Matches
CD_CellInfo.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_CELLINFO_H
14#define CD_CELLINFO_H
15
16// Chombo includes
17#include <RealVect.H>
18
19// Our includes
20#include <CD_NamespaceHeader.H>
21
26{
27public:
31 CellInfo() = delete;
32
38 CellInfo(const IntVect a_gridIndex, const Real a_dx) noexcept;
39
49 CellInfo(const IntVect a_gridIndex,
50 const Real a_dx,
51 const Real a_volFrac,
52 const RealVect& a_bndryCentroid,
53 const RealVect& a_bndryNormal) noexcept;
54
58 virtual ~CellInfo() noexcept;
59
64 IntVect&
65 getGridIndex() noexcept;
66
71 const IntVect&
72 getGridIndex() const noexcept;
73
78 Real&
79 getDx() noexcept;
80
85 const Real&
86 getDx() const noexcept;
87
92 Real&
93 getVolFrac() noexcept;
94
99 const Real&
100 getVolFrac() const noexcept;
101
106 RealVect&
107 getBndryCentroid() noexcept;
108
113 const RealVect&
114 getBndryCentroid() const noexcept;
115
120 RealVect&
121 getBndryNormal() noexcept;
122
127 const RealVect&
128 getBndryNormal() const noexcept;
129
134 RealVect&
135 getValidLo() noexcept;
136
141 const RealVect&
142 getValidLo() const noexcept;
143
148 RealVect&
149 getValidHi() noexcept;
150
155 const RealVect&
156 getValidHi() const noexcept;
157
158protected:
162 IntVect m_gridIndex;
163
167 Real m_dx;
168
173
178
183
187 RealVect m_validLo;
188
192 RealVect m_validHi;
193};
194
195#include <CD_NamespaceFooter.H>
196
197#endif
Class for the cell-information that is often queried when merging particles inside a cell.
Definition CD_CellInfo.H:26
RealVect & getBndryCentroid() noexcept
Get the boundary centroid.
Definition CD_CellInfo.cpp:85
IntVect m_gridIndex
Grid index.
Definition CD_CellInfo.H:162
RealVect & getValidLo() noexcept
Get the lower valid region.
Definition CD_CellInfo.cpp:109
Real & getDx() noexcept
Get the grid spacing.
Definition CD_CellInfo.cpp:61
Real m_volFrac
Volume fraction.
Definition CD_CellInfo.H:172
RealVect m_validLo
Valid region in each direction (lower limit)
Definition CD_CellInfo.H:187
RealVect m_bndryNormal
EB boundary normal.
Definition CD_CellInfo.H:182
RealVect & getValidHi() noexcept
Get the upper valid region.
Definition CD_CellInfo.cpp:121
virtual ~CellInfo() noexcept
Destructor.
RealVect & getBndryNormal() noexcept
Get the boundary normal.
Definition CD_CellInfo.cpp:97
IntVect & getGridIndex() noexcept
Get the grid index.
Definition CD_CellInfo.cpp:49
RealVect m_validHi
Valid region in each direction (upper limit)
Definition CD_CellInfo.H:192
RealVect m_bndryCentroid
Boundary centroid.
Definition CD_CellInfo.H:177
Real m_dx
Grid spacing.
Definition CD_CellInfo.H:167
Real & getVolFrac() noexcept
Get the volume fraction.
Definition CD_CellInfo.cpp:73
CellInfo()=delete
Default constructor - creates a regular cell.