Loading...
Searching...
No Matches
pyramid< Point, PointRef, PolygonRef > Class Template Reference

A geometric pyramid primitive with a base of 'n' sides: i.e. a parametric pyramid. A pyramid is constructed from a base polygon and an apex point. More...

#include <pyramid.H>

Inheritance diagram for pyramid< Point, PointRef, PolygonRef >:

Public Types

typedef Point point_type
 The point type.

Public Member Functions

 pyramid (PolygonRef base, const Point &apex)
 Construct from base polygon and apex point.
 pyramid (Istream &is)
 Construct from Istream.
const Pointapex () const
 The apex point.
PolygonRef base () const
 The base polygon.
Point centre (const UList< point > &points) const
 Return centre (centroid).
vector height (const UList< point > &points) const
 Return height vector.
scalar mag (const UList< point > &points) const
 Return scalar magnitude - returns volume of pyramid.

Friends

Istreamoperator>> (Istream &is, pyramid &p)
Ostreamoperator (Ostream &os, const pyramid &p)

Detailed Description

template<class Point, class PointRef, class PolygonRef>
class Foam::pyramid< Point, PointRef, PolygonRef >

A geometric pyramid primitive with a base of 'n' sides: i.e. a parametric pyramid. A pyramid is constructed from a base polygon and an apex point.

Source files

Definition at line 78 of file pyramid.H.

Member Typedef Documentation

◆ point_type

template<class Point, class PointRef, class PolygonRef>
typedef Point point_type

The point type.

Definition at line 94 of file pyramid.H.

Constructor & Destructor Documentation

◆ pyramid() [1/2]

template<class Point, class PointRef, class PolygonRef>
pyramid ( PolygonRef base,
const Point & apex )
inline

Construct from base polygon and apex point.

Definition at line 26 of file pyramidI.H.

References apex(), and base().

Here is the call graph for this function:

◆ pyramid() [2/2]

template<class Point, class PointRef, class PolygonRef>
pyramid ( Istream & is)
inlineexplicit

Construct from Istream.

Definition at line 38 of file pyramidI.H.

Member Function Documentation

◆ apex()

template<class Point, class PointRef, class PolygonRef>
const Point & apex ( ) const
inline

The apex point.

Definition at line 117 of file pyramid.H.

Referenced by pyramid().

Here is the caller graph for this function:

◆ base()

template<class Point, class PointRef, class PolygonRef>
PolygonRef base ( ) const
inline

The base polygon.

Definition at line 122 of file pyramid.H.

Referenced by pyramid().

Here is the caller graph for this function:

◆ centre()

template<class Point, class PointRef, class PolygonRef>
Point centre ( const UList< point > & points) const
inline

Return centre (centroid).

Definition at line 47 of file pyramidI.H.

References points.

Referenced by cell::centre(), and cellModel::centre().

Here is the caller graph for this function:

◆ height()

template<class Point, class PointRef, class PolygonRef>
Foam::vector height ( const UList< point > & points) const
inline

Return height vector.

Definition at line 57 of file pyramidI.H.

References points.

Referenced by mag().

Here is the caller graph for this function:

◆ mag()

template<class Point, class PointRef, class PolygonRef>
Foam::scalar mag ( const UList< point > & points) const
inline

Return scalar magnitude - returns volume of pyramid.

Definition at line 68 of file pyramidI.H.

References height(), and points.

Referenced by cell::centre(), cellModel::centre(), polyMeshGeometry::checkFacePyramids(), primitiveMeshGeometry::checkFacePyramids(), primitiveMeshTools::facePyramidVolume(), and cellModel::mag().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator>>

template<class Point, class PointRef, class PolygonRef>
Istream & operator>> ( Istream & is,
pyramid< Point, PointRef, PolygonRef > & p )
friend

◆ operator

template<class Point, class PointRef, class PolygonRef>
Ostream & operator ( Ostream & os,
const pyramid< Point, PointRef, PolygonRef > & p )
friend

The documentation for this class was generated from the following files:
  • src/OpenFOAM/meshes/primitiveShapes/pyramid/pyramid.H
  • src/OpenFOAM/meshes/primitiveShapes/pyramid/pyramidI.H