OpenLB 1.7
Loading...
Searching...
No Matches
Public Member Functions | List of all members
olb::IndicatorCuboidRotate3D< S > Class Template Reference

indicator function for a 3d-cuboid, turned by an angle theta around an axis of rotation More...

#include <indicatorF3D.h>

+ Inheritance diagram for olb::IndicatorCuboidRotate3D< S >:
+ Collaboration diagram for olb::IndicatorCuboidRotate3D< S >:

Public Member Functions

 IndicatorCuboidRotate3D (Vector< S, 3 > extend, Vector< S, 3 > origin, S theta, int plane, Vector< S, 3 > centerRotation)
 
 IndicatorCuboidRotate3D (S xlength, S ylength, S zlength, Vector< S, 3 > origin, S theta, int plane, Vector< S, 3 > centerRotation)
 
bool operator() (bool output[], const S input[])
 returns true if input is inside, otherwise false
 
signedDistance (const Vector< S, 3 > &input) override
 Returns signed distance to the nearest point on the indicator surface.
 
- Public Member Functions inherited from olb::IndicatorCuboid3D< S >
 IndicatorCuboid3D (Vector< S, 3 > extend, Vector< S, 3 > origin)
 constructs an cuboid with x axis from origin[0] to origin[0]+extend[0], ...
 
 IndicatorCuboid3D (S xlength, S ylength, S zlength, Vector< S, 3 > center)
 constructs an cuboid with x axis dimension center[0]-xlength/2 to center[0]+xlength/2
 
Vector< S, 3 > const & getCenter () const
 
S const getxLength () const
 
S const getyLength () const
 
S const getzLength () const
 
Vector< S, 3 > getSample (const std::function< S()> &randomness) const override
 
- Public Member Functions inherited from olb::IndicatorF3D< S >
virtual Vector< S, 3 > & getMin ()
 
virtual Vector< S, 3 > & getMax ()
 
virtual bool distance (S &distance, const Vector< S, 3 > &origin, S precision, const Vector< S, 3 > &direction)
 
virtual bool distance (S &distance, const Vector< S, 3 > &origin, const Vector< S, 3 > &direction, S precision, S pitch)
 
virtual bool distance (S &distance, const Vector< S, 3 > &origin, const Vector< S, 3 > &direction, int iC=-1)
 
virtual bool distance (S &distance, const Vector< S, 3 > &origin)
 
virtual bool distance (S &distance, const S input[])
 
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
 
virtual bool rotOnAxis (Vector< S, 3 > &vec_rot, const Vector< S, 3 > &vec, const Vector< S, 3 > &axis, S &theta)
 Rotate vector around axis by angle theta.
 
virtual bool operator() (bool output[1], const S input[3])
 Returns true if input is inside the indicator.
 
virtual Vector< S, 3 > surfaceNormal (const Vector< S, 3 > &pos, const S meshSize)
 Return surface normal.
 
Vector< S, 3 > surfaceNormal (const Vector< S, 3 > &pos, const S meshSize, std::function< Vector< S, 3 >(const Vector< S, 3 > &)> transformPos)
 Return surface normal after possible translation and rotation.
 
bool isInsideBox (Vector< S, 3 > point)
 Returns true if point is inside a cube with corners _myMin and _myMax
 
- Public Member Functions inherited from olb::GenericF< bool, S >
virtual ~GenericF ()=default
 
int getSourceDim () const
 read only access to member variable _m
 
int getTargetDim () const
 read only access to member variable _n
 
std::string & getName ()
 read and write access to name
 
std::string const & getName () const
 read only access to name
 
bool operator() (bool output[])
 wrapper that call the pure virtual operator() (T output[], const S input[]) from above
 
bool operator() (bool output[], S input0)
 
bool operator() (bool output[], S input0, S input1)
 
bool operator() (bool output[], S input0, S input1, S input2)
 
bool operator() (bool output[], S input0, S input1, S input2, S input3)
 

Additional Inherited Members

- Public Types inherited from olb::GenericF< bool, S >
using targetType
 
using sourceType
 
- Public Attributes inherited from olb::GenericF< bool, S >
std::shared_ptr< GenericF< bool, S > > _ptrCalcC
 memory management, frees resouces (calcClass)
 
- Protected Member Functions inherited from olb::IndicatorF3D< S >
 IndicatorF3D ()
 
- Protected Member Functions inherited from olb::GenericF< bool, S >
 GenericF (int targetDim, int sourceDim)
 
- Protected Attributes inherited from olb::IndicatorF3D< S >
Vector< S, 3 > _myMin
 
Vector< S, 3 > _myMax
 

Detailed Description

template<typename S>
class olb::IndicatorCuboidRotate3D< S >

indicator function for a 3d-cuboid, turned by an angle theta around an axis of rotation

The cuboid is turned along the axis going through the point "centerRotation" and being orthogonal to either x=0 or y=0 or z=0 respectively

Parameters
thetaangle (rad) by which the cuboid is turned
planethe axis of rotation is orthogonal to the plane i=0, where 0 corresponds to the plane x=0, 1 to the plane y=0, and 2 to z=0
centerRotationvector of coordinates which defines, with "plane", the axis of rotation; centerRotation is a point on th axis of rotation

Definition at line 274 of file indicatorF3D.h.

Constructor & Destructor Documentation

◆ IndicatorCuboidRotate3D() [1/2]

template<typename S >
olb::IndicatorCuboidRotate3D< S >::IndicatorCuboidRotate3D ( Vector< S, 3 > extend,
Vector< S, 3 > origin,
S theta,
int plane,
Vector< S, 3 > centerRotation )

Definition at line 733 of file indicatorF3D.hh.

734 : IndicatorCuboid3D<S>(extend, origin), _theta(theta), _plane(plane), _centerRotation(centerRotation)
735{
736 assert(plane==0 || plane==1 || plane==2);
737}

◆ IndicatorCuboidRotate3D() [2/2]

template<typename S >
olb::IndicatorCuboidRotate3D< S >::IndicatorCuboidRotate3D ( S xlength,
S ylength,
S zlength,
Vector< S, 3 > origin,
S theta,
int plane,
Vector< S, 3 > centerRotation )

Definition at line 740 of file indicatorF3D.hh.

741 : IndicatorCuboid3D<S>(xLength, yLength, zLength, origin), _theta(theta), _plane(plane), _centerRotation(centerRotation)
742{
743 assert(plane==0 || plane==1 || plane==2);
744}

Member Function Documentation

◆ operator()()

template<typename S >
bool olb::IndicatorCuboidRotate3D< S >::operator() ( bool output[],
const S input[] )
virtual

returns true if input is inside, otherwise false

Reimplemented from olb::IndicatorCuboid3D< S >.

Definition at line 776 of file indicatorF3D.hh.

777{
778 S newInput[3];
779 transformInput(input, newInput);
780 IndicatorCuboid3D<S>::operator()(output, newInput);
781 return output[0];
782}
bool operator()(bool output[], const S input[]) override
returns true if input is inside, otherwise false

References olb::IndicatorCuboid3D< S >::operator()().

+ Here is the call graph for this function:

◆ signedDistance()

template<typename S >
S olb::IndicatorCuboidRotate3D< S >::signedDistance ( const Vector< S, 3 > & input)
overridevirtual

Returns signed distance to the nearest point on the indicator surface.

Reimplemented from olb::IndicatorCuboid3D< S >.

Definition at line 785 of file indicatorF3D.hh.

786{
787 S newInput[3], tmp[3] = {input[0], input[1], input[2]};
788 transformInput(tmp, newInput);
789 return IndicatorCuboid3D<S>::signedDistance(Vector<S,3>(newInput));
790}
S signedDistance(const Vector< S, 3 > &input) override
Returns signed distance to the nearest point on the indicator surface.

References olb::IndicatorCuboid3D< S >::signedDistance().

+ Here is the call graph for this function:

The documentation for this class was generated from the following files: