chombo-discharge
Loading...
Searching...
No Matches
CD_PerlinSphereSdf.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_PERLINSPHERESDF_H
14#define CD_PERLINSPHERESDF_H
15
16// Chombo includes
17#include <BaseIF.H>
18#include <SphereIF.H>
19
20// Our includes
21#include <CD_PerlinSdf.H>
22#include <CD_NamespaceHeader.H>
23
27class PerlinSphereSdf : public BaseIF
28{
29public:
35
49 PerlinSphereSdf(const Real& a_rad,
50 const RealVect& a_center,
51 const bool& a_inside,
52 const Real& a_noiseAmp,
53 const RealVect& a_noiseFreq,
54 const Real& a_persistence,
55 const int& a_octaves,
56 const bool& a_reseed = false);
57
62 PerlinSphereSdf(const PerlinSphereSdf& a_inputIF);
63
68
74 virtual Real
75 value(const RealVect& a_pos) const;
76
81 virtual BaseIF*
82 newImplicitFunction() const;
83
84protected:
88 Real m_rad;
89
93 RealVect m_center;
94
99
103 RefCountedPtr<BaseIF> m_perlinIF;
104};
105
106#include <CD_NamespaceFooter.H>
107
108#endif
Declaration of signed distance Perlin noise.
Noisy sphere geometry (with Perlin noise).
Definition CD_PerlinSphereSdf.H:28
RefCountedPtr< BaseIF > m_perlinIF
Noise function.
Definition CD_PerlinSphereSdf.H:103
Real m_rad
Radius.
Definition CD_PerlinSphereSdf.H:88
virtual Real value(const RealVect &a_pos) const
Value function. Returns distance to object.
Definition CD_PerlinSphereSdf.cpp:40
virtual BaseIF * newImplicitFunction() const
Factory function.
Definition CD_PerlinSphereSdf.cpp:87
PerlinSphereSdf()
No weak construction.
Definition CD_PerlinSphereSdf.H:33
RealVect m_center
Center.
Definition CD_PerlinSphereSdf.H:93
virtual ~PerlinSphereSdf()
Destructor (does nothing)
bool m_inside
Inside/outside.
Definition CD_PerlinSphereSdf.H:98