24#ifndef INDICATOR_F_3D_H
25#define INDICATOR_F_3D_H
55template<
typename S>
class IndicatorIdentity3D;
56template<
typename S>
class IndicatorCylinder3D;
61 std::array<S,3> _translate;
67 bool operator() (
bool output[],
const S input[])
override;
87 bool operator() (
bool output[],
const S input[])
override;
122 bool operator() (
bool output[],
const S input[])
override;
134 bool operator() (
bool output[],
const S input[])
override;
157 bool operator() (
bool output[],
const S input[])
override;
190 bool operator() (
bool output[],
const S input[])
override;
228 bool operator() (
bool output[],
const S input[])
override;
258 bool operator() (
bool output[],
const S input[])
override;
279 void transformInput(
const S input[3], S newInput[3]);
284 bool operator() (
bool output[],
const S input[]);
297 bool operator()(
bool output[],
const T input[])
override;
Smart pointer for managing the various ways of passing functors around.
indicator function for a 3D circle
Vector< S, 3 > const & getCenter() const
IndicatorCircle3D(Vector< S, 3 > center, Vector< S, 3 > normal, S radius)
Vector< S, 3 > const & getNormal() const
bool operator()(bool output[], const S input[]) override
has to be implemented for 'every' derived class
indicator function for a 3d frustum
Vector< S, 3 > const & getCenter1() const
IndicatorCone3D(Vector< S, 3 > center1, Vector< S, 3 > center2, S radius1, S radius2=0)
S signedDistance(const Vector< S, 3 > &input) override
Returns signed distance to the nearest point on the indicator surface.
Vector< S, 3 > const & getCenter2() const
bool operator()(bool output[], const S input[]) override
has to be implemented for 'every' derived class
indicator function for a 3d-cuboid, parallel to the planes x=0, y=0, z=0.
Vector< S, 3 > const & getCenter() const
S const getxLength() const
IndicatorCuboid3D(Vector< S, 3 > extend, Vector< S, 3 > origin)
constructs an cuboid with x axis from origin[0] to origin[0]+extend[0], ...
S const getyLength() const
S const getzLength() const
Vector< S, 3 > getSample(const std::function< S()> &randomness) const override
S signedDistance(const Vector< S, 3 > &input) override
Returns signed distance to the nearest point on the indicator surface.
bool operator()(bool output[], const S input[]) override
returns true if input is inside, otherwise false
indicator function for a 3d-cuboid, turned by an angle theta around an axis of rotation
S signedDistance(const Vector< S, 3 > &input) override
Returns signed distance to the nearest point on the indicator surface.
bool operator()(bool output[], const S input[])
returns true if input is inside, otherwise false
IndicatorCuboidRotate3D(Vector< S, 3 > extend, Vector< S, 3 > origin, S theta, int plane, Vector< S, 3 > centerRotation)
indicator function for a 3d-cylinder
IndicatorCylinder3D(Vector< S, 3 > center1, Vector< S, 3 > center2, S radius)
Indicator function for a cylinder.
Vector< S, 3 > const & getCenter1() const
bool operator()(bool output[], const S input[]) override
has to be implemented for 'every' derived class
Vector< S, 3 > getSample(const std::function< S()> &randomness) const override
S signedDistance(const Vector< S, 3 > &input) override
Returns signed distance to the nearest point on the indicator surface.
Vector< S, 3 > const & getCenter2() const
indicator function for an ellipsoid
Vector< S, 3 > const & getCenter() const
Vector< S, 3 > const & getRadius() const
S signedDistance(const Vector< S, 3 > &input) override
Returns signed distance to the nearest point on the indicator surface.
IndicatorEllipsoid3D(Vector< S, 3 > center, Vector< S, 3 > radius)
IndicatorF3D is an application from .
virtual bool normal(Vector< S, 3 > &normal, const Vector< S, 3 > &origin, const Vector< S, 3 > &direction, int iC=-1)
returns true and the normal if there was one found for an given origin and direction
indicator function for the internal part of an input indicator
IndicatorInternal3D(IndicatorF3D< S > &indicatorF, S layerSize)
bool operator()(bool output[], const S input[]) override
has to be implemented for 'every' derived class
indicator function for a layer
S signedDistance(const Vector< S, 3 > &input) override
Returns signed distance to the nearest point on the indicator surface.
bool operator()(bool output[], const S input[]) override
has to be implemented for 'every' derived class
IndicatorLayer3D(FunctorPtr< IndicatorF3D< S > > &&indicatorF, S layerSize)
bool operator()(bool output[], const T input[]) override
IndicatorSDF3D(std::function< T(Vector< T, 3 >)> f)
indicator function for a 3D-sphere
Vector< S, 3 > const & getCenter() const
IndicatorSphere3D(Vector< S, 3 > center, S radius)
S signedDistance(const Vector< S, 3 > &input) override
Returns signed distance to the nearest point on the indicator surface.
S const getRadius() const
bool distance(S &distance, const Vector< S, 3 > &origin, const Vector< S, 3 > &direction, int iC=-1) override
indicator function for a super ellipsoid
Vector< S, 3 > const & getCenter() const
IndicatorSuperEllipsoid3D(Vector< S, 3 > center, S xHalfAxis, S yHalfAxis, S zHalfAxis, S exponent1, S exponent2)
bool operator()(bool output[], const S input[]) override
has to be implemented for 'every' derived class
Vector< S, 3 > & getMin() override
bool operator()(bool output[], const S input[]) override
has to be implemented for 'every' derived class
S signedDistance(const Vector< S, 3 > &input) override
Returns signed distance to the nearest point on the indicator surface.
IndicatorTranslate3D(std::array< S, 3 > translate, IndicatorF3D< S > &indicator)
Vector< S, 3 > & getMax() override
Top level namespace for all of OpenLB.
std::shared_ptr< IndicatorF3D< S > > createIndicatorF3D(XMLreader const ¶ms, bool verbose=false)
std::shared_ptr< IndicatorF3D< S > > createIndicatorIntersection3D(XMLreader const ¶ms, bool verbose=false)
std::shared_ptr< IndicatorF3D< S > > createIndicatorCylinder3D(XMLreader const ¶ms, bool verbose=false)
std::shared_ptr< IndicatorF3D< S > > createIndicatorUnion3D(XMLreader const ¶ms, bool verbose=false)
std::shared_ptr< IndicatorF3D< S > > createIndicatorSphere3D(XMLreader const ¶ms, bool verbose=false)
std::shared_ptr< IndicatorF3D< S > > createIndicatorCone3D(XMLreader const ¶ms, bool verbose=false)
std::shared_ptr< IndicatorF3D< S > > createIndicatorCircle3D(XMLreader const ¶ms, bool verbose=false)
std::shared_ptr< IndicatorF3D< S > > createIndicatorCuboid3D(XMLreader const ¶ms, bool verbose=false)
std::shared_ptr< IndicatorF3D< S > > createIndicatorWithout3D(XMLreader const ¶ms, bool verbose=false)
Input/Output in XML format – header file.