chombo-discharge
Loading...
Searching...
No Matches
CD_RealBox.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_REALBOX_H
14#define CD_REALBOX_H
15
16// Chombo includes
17#include <RealVect.H>
18#include <Box.H>
19
20// Our includes
21#include <CD_NamespaceHeader.H>
22
27{
28public:
32 RealBox();
33
39 RealBox(const RealVect& a_lo, const RealVect& a_hi);
40
48 RealBox(const Box& a_box, const RealVect& a_origin, const Real a_dx);
49
53 ~RealBox() = default;
54
60 getLo() const;
61
67 getHi() const;
68
74 getCorners() const;
75
81 bool
82 intersect(const RealBox& a_box) const;
83
89 bool
90 isPointInside(const RealVect& a_point) const;
91
98 bool
99 isBoxInside(const RealBox& a_box) const;
100
101protected:
106
111};
112
113#include <CD_NamespaceFooter.H>
114
115#endif
Rectangular box in real space.
Definition CD_RealBox.H:27
bool isBoxInside(const RealBox &a_box) const
Check if a_box is completely inside this box. For this to be true, all the corners of a_box must be c...
Definition CD_RealBox.cpp:125
bool isPointInside(const RealVect &a_point) const
Check if a_point is inside this box.
Definition CD_RealBox.cpp:108
RealVect m_lo
Low corner.
Definition CD_RealBox.H:105
Vector< RealVect > getCorners() const
Get all the corners of this box (4 in 2D, 8 in 3D);.
Definition CD_RealBox.cpp:49
RealVect getHi() const
Get high corner.
Definition CD_RealBox.cpp:43
RealBox()
Default constructor. Must subsequently set the corners.
Definition CD_RealBox.cpp:20
RealVect m_hi
High corner.
Definition CD_RealBox.H:110
~RealBox()=default
Destructor (does nothing)
RealVect getLo() const
Get low corner.
Definition CD_RealBox.cpp:37
bool intersect(const RealBox &a_box) const
Check if a_box intersects this box. This is done by checking if.
Definition CD_RealBox.cpp:76
Base class for a tracer particle solver. This solver can advance particles in a pre-defined velocity ...
Definition CD_TracerParticleSolver.H:38