BodyOverlapFunctions.h File Reference

Detailed Description

Body Concept.

Author
Martin Bauer marti.nosp@m.n.ba.nosp@m.uer@f.nosp@m.au.d.nosp@m.e

A Body is a 3D object, that is used to initialize fields. This file defines template functions that can be specialized to define new bodies.

The function that has to be implemented by every body is the contains() function. It is used by overlapFraction() which uses in the general case cell super-sampling to determine the overlap of a cell with an arbitrary body. To speed up this process there are two functions that can be specialized to speed up this super-sampling process: a fast overlap check between a block and a body, and a fast overlap check between a cell and a body. The default implementation always returns DONT_KNOW.

A body where the overlap with a cell can be calculated analytically (for example a box) should specialize the overlapFraction directly, so no super-sampling has to be done.

For an example specializations see Sphere.h, Ellipsoid.h or AABBBody.h

Namespaces

 walberla
 \file TimestepTracker.h \ingroup lbm \author Frederik Hennig frede.nosp@m.rik..nosp@m.henni.nosp@m.g@fa.nosp@m.u.de
 
 walberla::geometry
 

Enumerations

enum  walberla::geometry::FastOverlapResult { walberla::geometry::CONTAINED_INSIDE_BODY, walberla::geometry::COMPLETELY_OUTSIDE, walberla::geometry::PARTIAL_OVERLAP, walberla::geometry::DONT_KNOW }
 

Functions

template<typename Body >
real_t walberla::geometry::overlapFraction (const Body &body, const Vector3< real_t > &cellMidpoint, real_t dx, uint_t maxDepth=4)
 Returns the overlap fraction between a body and a cell. More...
 
template<typename Body >
real_t walberla::geometry::overlapFraction (const Body &body, const Vector3< real_t > &cellMidpoint, real_t dx, int maxDepth)
 
template<typename Body >
real_t walberla::geometry::overlapFraction (const Body &body, const Vector3< real_t > &cellMidpoint, const Vector3< real_t > &dx, uint_t maxDepth=4)
 
template<typename Body >
bool walberla::geometry::contains (const Body &body, const Vector3< real_t > &point)
 Test if a point in space lies inside a body. More...
 
template<typename Body >
FastOverlapResult walberla::geometry::fastOverlapCheck (const Body &body, const AABB &block)
 Determines in a fast way ( for example using a bounding box) if a body and a block overlap when no fast computation is possible return DONT_KNOW. More...
 
template<typename Body >
FastOverlapResult walberla::geometry::fastOverlapCheck (const Body &body, const Vector3< real_t > &cellMidpoint, const Vector3< real_t > &dx)
 Determines in a fast way (bounding box etc) if a body and a block overlap when no fast computation is possible return DONT_KNOW. More...