chombo-discharge
Loading...
Searching...
No Matches
CD_SignedDistanceDCEL.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
14#ifndef CD_SIGNEDDISTANCEDCEL_H
15#define CD_SIGNEDDISTANCEDCEL_H
16
17// Std includes
18#include <memory>
19
20// EBGeometry includes
21#include <EBGeometry.hpp>
22
23// Chombo includes
24#include <BaseIF.H>
25
26// Our includes
27#include <CD_NamespaceHeader.H>
28
34template <class T>
35class SignedDistanceDCEL : public BaseIF
36{
37public:
41 using Mesh = EBGeometry::DCEL::MeshT<T>;
42
47
54 SignedDistanceDCEL(const std::shared_ptr<Mesh>& a_mesh, const bool a_flipInside, const Real a_zCoord = 0.0);
55
61
66
72 Real
73 value(const RealVect& a_point) const override;
74
79 BaseIF*
80 newImplicitFunction() const override;
81
82protected:
86 std::shared_ptr<Mesh> m_mesh;
87
92
97};
98
99#include <CD_NamespaceFooter.H>
100
102
103#endif
Implementation of CD_SignedDistanceDCEL.H.
Signed distance function from a DCEL mesh.
Definition CD_SignedDistanceDCEL.H:36
Real m_zCoord
For 2D only. z-coordinate through which we slice the 3D object.
Definition CD_SignedDistanceDCEL.H:96
~SignedDistanceDCEL()
Destructor (does nothing)
Definition CD_SignedDistanceDCELImplem.H:39
Real value(const RealVect &a_point) const override
Value function.
Definition CD_SignedDistanceDCELImplem.H:44
std::shared_ptr< Mesh > m_mesh
DCEL mesh.
Definition CD_SignedDistanceDCEL.H:86
EBGeometry::DCEL::MeshT< T > Mesh
Alias for EBGeometry DCEl mesh with precision T.
Definition CD_SignedDistanceDCEL.H:41
bool m_flipInside
Hook for turning inside to outside.
Definition CD_SignedDistanceDCEL.H:91
SignedDistanceDCEL()=delete
Disallowed, use the full constructor.
BaseIF * newImplicitFunction() const override
Factory method.
Definition CD_SignedDistanceDCELImplem.H:65