$treeview $search $mathjax
Palabos  Version 1.1
$projectbrief
$projectbrief
$searchbox

plb::BoundaryShape3D< T, SurfaceData > Struct Template Reference

Description of a shape as the boundary of a given volume. More...

#include <boundaryShapes3D.h>

Inheritance diagram for plb::BoundaryShape3D< T, SurfaceData >:

List of all members.

Public Member Functions

virtual ~BoundaryShape3D ()
virtual bool isInside (Dot3D const &location) const =0
 Decide whether a given discrete lattice node is inside the solid shape.
virtual bool pointOnSurface (Array< T, 3 > const &fromPoint, Array< T, 3 > const &direction, Array< T, 3 > &locatedPoint, T &distance, Array< T, 3 > &wallNormal, SurfaceData &surfaceData, OffBoundary::Type &bdType, plint &id) const =0
virtual bool gridPointOnSurface (Dot3D const &fromPoint, Dot3D const &direction, Array< T, 3 > &locatedPoint, T &distance, Array< T, 3 > &wallNormal, SurfaceData &surfaceData, OffBoundary::Type &bdType, plint &id) const
virtual Array< T, 3 > computeContinuousNormal (Array< T, 3 > const &p, plint id, bool isAreaWeighted=false) const =0
virtual bool intersectsSurface (Array< T, 3 > const &p1, Array< T, 3 > const &p2, plint &id) const =0
 Say if a given segment intersects the surface.
virtual bool gridIntersectsSurface (Dot3D const &p1, Dot3D const &p2, plint &id) const
 Say if a given segment with integer-valued endpoints intersects the surface.
virtual bool distanceToSurface (Array< T, 3 > const &point, T &distance, bool &isBehind) const =0
virtual bool gridDistanceToSurface (Dot3D const &point, T &distance, bool &isBehind) const
virtual plint getTag (plint id) const =0
virtual BoundaryShape3D< T,
SurfaceData > * 
clone () const =0
 Plain clone function.
virtual BoundaryShape3D< T,
SurfaceData > * 
clone (std::vector< AtomicBlock3D * > args) const

Detailed Description

template<typename T, class SurfaceData>
struct plb::BoundaryShape3D< T, SurfaceData >

Description of a shape as the boundary of a given volume.


Constructor & Destructor Documentation

template<typename T, class SurfaceData>
virtual plb::BoundaryShape3D< T, SurfaceData >::~BoundaryShape3D (  )  [inline, virtual]

Member Function Documentation

template<typename T, class SurfaceData>
virtual BoundaryShape3D<T,SurfaceData>* plb::BoundaryShape3D< T, SurfaceData >::clone ( std::vector< AtomicBlock3D * >  args  )  const [inline, virtual]

In case the shape class needs additional meshed data, this clone function offers the possibility to provide the data.

Reimplemented in plb::TriangleFlowShape3D< T, SurfaceData >.

template<typename T, class SurfaceData>
virtual Array<T,3> plb::BoundaryShape3D< T, SurfaceData >::computeContinuousNormal ( Array< T, 3 > const &  p,
plint  id,
bool  isAreaWeighted = false 
) const [pure virtual]

Given a point p on the surface of the shape, determine its "continuous normal". If the shape is for example piecewise linear, the normal is adjusted to vary continuously over the surface.

Implemented in plb::TriangleFlowShape3D< T, SurfaceData >.

template<typename T, class SurfaceData>
virtual bool plb::BoundaryShape3D< T, SurfaceData >::distanceToSurface ( Array< T, 3 > const &  point,
T &  distance,
bool &  isBehind 
) const [pure virtual]

Get the shortest distance to the wall. Returns true in case of success. The flag isBehind indicates if the point is "behind" the wall, i.e. in the direction opposite to the wall normal.

Implemented in plb::BoundaryShapeIntersection3D< T, SurfaceData >, and plb::TriangleFlowShape3D< T, SurfaceData >.

Referenced by plb::BoundaryShape3D< T, Array< T, 3 > >::gridDistanceToSurface().

template<typename T, class SurfaceData>
virtual plint plb::BoundaryShape3D< T, SurfaceData >::getTag ( plint  id  )  const [pure virtual]

Return the tag (id of boundary-portion with specific boundary, condition); the id is the one returned by pointOnSurface.

Implemented in plb::BoundaryShapeIntersection3D< T, SurfaceData >, and plb::TriangleFlowShape3D< T, SurfaceData >.

template<typename T, class SurfaceData>
virtual bool plb::BoundaryShape3D< T, SurfaceData >::gridDistanceToSurface ( Dot3D const &  point,
T &  distance,
bool &  isBehind 
) const [inline, virtual]

Get the shortest distance to the wall. Returns true in case of success. The flag isBehind indicates if the point is "behind" the wall, i.e. in the direction opposite to the wall normal.

template<typename T, class SurfaceData>
virtual bool plb::BoundaryShape3D< T, SurfaceData >::gridIntersectsSurface ( Dot3D const &  p1,
Dot3D const &  p2,
plint id 
) const [inline, virtual]

Say if a given segment with integer-valued endpoints intersects the surface.

template<typename T, class SurfaceData>
virtual bool plb::BoundaryShape3D< T, SurfaceData >::gridPointOnSurface ( Dot3D const &  fromPoint,
Dot3D const &  direction,
Array< T, 3 > &  locatedPoint,
T &  distance,
Array< T, 3 > &  wallNormal,
SurfaceData &  surfaceData,
OffBoundary::Type bdType,
plint id 
) const [inline, virtual]

Get the distance to the wall, and the data on the wall, from a given discrete lattice node, and along a given direction. Returns true if there exists an intersection along the indicated direction. ATTENTION: The id is an in-and-out value. If you know the right id of the surface intersection (e.g. the triangle ID in case of a triangular mesh) you can provide it to speed up the calculation. However, if you don't know it, you MUST provide the value -1, because otherwise the result might be wrong.

template<typename T, class SurfaceData>
virtual bool plb::BoundaryShape3D< T, SurfaceData >::intersectsSurface ( Array< T, 3 > const &  p1,
Array< T, 3 > const &  p2,
plint id 
) const [pure virtual]
template<typename T, class SurfaceData>
virtual bool plb::BoundaryShape3D< T, SurfaceData >::isInside ( Dot3D const &  location  )  const [pure virtual]

Decide whether a given discrete lattice node is inside the solid shape.

The reason why there is an isInside function instead of a isOutside one is that while there exists only one voxelFlag::inside flag, there are several flags which count as outside: undetermined, outside, and borderline. This is particularly important for the undetermined flag, because the outer envelopes in a multi-block structure have no special meaning and are default-initialized to undetermined.

Implemented in plb::TriangleFlowShape3D< T, SurfaceData >.

template<typename T, class SurfaceData>
virtual bool plb::BoundaryShape3D< T, SurfaceData >::pointOnSurface ( Array< T, 3 > const &  fromPoint,
Array< T, 3 > const &  direction,
Array< T, 3 > &  locatedPoint,
T &  distance,
Array< T, 3 > &  wallNormal,
SurfaceData &  surfaceData,
OffBoundary::Type bdType,
plint id 
) const [pure virtual]

Get the distance to the wall, and the velocity value on the wall, from a given real-valued position (in lattice units), and along a given direction. Returns true if there exists an intersection along the indicated direction. ATTENTION: The id is an in-and-out value. If you know the right id of the surface intersection (e.g. the triangle ID in case of a triangular mesh) you can provide it to speed up the calculation. However, if you don't know it, you MUST provide the value -1, because otherwise the result might be wrong.

Implemented in plb::BoundaryShapeIntersection3D< T, SurfaceData >, and plb::TriangleFlowShape3D< T, SurfaceData >.

Referenced by plb::BoundaryShape3D< T, Array< T, 3 > >::gridPointOnSurface().


The documentation for this struct was generated from the following file: