chombo-discharge
Loading...
Searching...
No Matches
CD_SphereArray.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_SPHEREARRAY_H
14#define CD_SPHEREARRAY_H
15
16// Chombo includes
17#include <BaseIF.H>
18
19// Our includes
20#include <EBGeometry.hpp>
21#include <CD_NamespaceHeader.H>
22
24using AABB = EBGeometry::BoundingVolumes::AABBT<Real>;
25using Vec3 = EBGeometry::Vec3T<Real>;
26using SDF = EBGeometry::SignedDistanceFunction<Real>;
27using Sphere = EBGeometry::SphereSDF<Real>;
29
33class SphereArray : public BaseIF
34{
35public:
39 SphereArray() = delete;
40
52 const RealVect& a_loCenter,
53 const RealVect& a_sphereGap,
55 bool a_useFast,
56 bool a_flipInside,
57 Real a_zCoord = 0.0);
58
64
68 ~SphereArray() override;
69
71 operator=(const SphereArray&) = delete;
72 SphereArray(SphereArray&&) = delete;
74 operator=(SphereArray&&) = delete;
75
81 Real
82 value(const RealVect& a_point) const override;
83
88 BaseIF*
89 newImplicitFunction() const override;
90
91protected:
95 static constexpr size_t K = 4;
96
101
106
111
116};
117
118#include <CD_NamespaceFooter.H>
119
120#endif
A Cartesian array of spheres.
Definition CD_SphereArray.H:34
bool m_flipInside
Make inside to outside.
Definition CD_SphereArray.H:105
Real value(const RealVect &a_point) const override
Value function.
Definition CD_SphereArray.cpp:89
std::shared_ptr< EBGeometry::ImplicitFunction< Real > > m_fastUnion
Union that uses bounding volume hierarchy acceleration.
Definition CD_SphereArray.H:115
SphereArray()=delete
Disallowed (for now)
~SphereArray() override
Destructor (does nothing)
Definition CD_SphereArray.cpp:83
std::shared_ptr< EBGeometry::ImplicitFunction< Real > > m_slowUnion
Standard union ala Chombo.
Definition CD_SphereArray.H:110
bool m_useFast
Switch for using fast or slow union.
Definition CD_SphereArray.H:100
BaseIF * newImplicitFunction() const override
Factory method – calls the copy constructor.
Definition CD_SphereArray.cpp:116
static constexpr size_t K
Tree degree for BVH accelerator.
Definition CD_SphereArray.H:95
Base class for a tracer particle solver. This solver can advance particles in a pre-defined velocity ...
Definition CD_TracerParticleSolver.H:38
TracerParticleSolver()
Default constructor.
Definition CD_TracerParticleSolverImplem.H:26