Loading...
Searching...
No Matches
blockEdge Class Referenceabstract

Define a curved edge that is parameterized for 0<lambda<1 between the start/end points. More...

#include <blockEdge.H>

Inheritance diagram for blockEdge:
Collaboration diagram for blockEdge:

Classes

class  iNew
 Class used for the read-construction of. More...

Public Member Functions

 TypeName ("blockEdge")
 Runtime type information.
 declareRunTimeSelectionTable (autoPtr, blockEdge, Istream,(const dictionary &dict, const label index, const searchableSurfaces &geometry, const pointField &points, Istream &is),(dict, index, geometry, points, is))
 blockEdge (const pointField &points, const edge &fromTo)
 Construct from components.
 blockEdge (const dictionary &dict, const label index, const pointField &points, Istream &is)
 Construct from Istream and point field.
virtual autoPtr< blockEdgeclone () const
 Clone function.
virtual ~blockEdge ()=default
 Destructor.
bool good () const noexcept
 True if first/last indices are unique and non-negative.
bool valid () const noexcept
 Same as good().
label start () const noexcept
 Index of start (first) point.
label end () const noexcept
 Index of end (last) point.
const pointfirstPoint () const
 The location of the first point.
const pointlastPoint () const
 The location of the last point.
int compare (const blockEdge &e) const
 Compare the given start/end points with this block edge.
int compare (const edge &e) const
 Compare the given start/end points with this block edge.
int compare (const label start, const label end) const
 Compare the given start/end points with this block edge.
point linearPosition (const scalar lambda) const
 The point position in the straight line.
virtual point position (const scalar lambda) const =0
 The point position corresponding to the curve parameter.
virtual tmp< pointFieldposition (const scalarList &lambdas) const
 The point positions corresponding to the curve parameters.
virtual scalar length () const =0
 The length of the curve.
void write (Ostream &os, const dictionary &dict) const
 Write edge with variable back-substitution.

Static Public Member Functions

static autoPtr< blockEdgeNew (const dictionary &dict, const label index, const searchableSurfaces &geometry, const pointField &points, Istream &is)
 New function which constructs and returns pointer to a blockEdge.

Protected Member Functions

 blockEdge (const pointField &points, const label from, const label to)
 Construct from components.

Static Protected Member Functions

static pointField appendEndPoints (const pointField &p, const label from, const label to, const pointField &intermediate)
 Return a complete point field by appending the start/end points to the given list.

Protected Attributes

const pointFieldpoints_
 The referenced point field.
const label start_
 Index of the first point.
const label end_
 Index of the last point.

Friends

Ostreamoperator<< (Ostream &os, const blockEdge &e)

Detailed Description

Define a curved edge that is parameterized for 0<lambda<1 between the start/end points.

Source files

Definition at line 60 of file blockEdge.H.

Constructor & Destructor Documentation

◆ blockEdge() [1/3]

blockEdge ( const pointField & points,
const label from,
const label to )
inlineprotected

Construct from components.

Deprecated
(2021-11) use constructor with edge
Parameters
pointsReferenced point field
fromStart point in point field
toEnd point in point field

Definition at line 105 of file blockEdge.H.

References blockEdge(), and points.

Referenced by arcEdge::arcEdge(), arcEdge::arcEdge(), arcEdge::arcEdge(), bezier::bezier(), bezier::bezier(), blockEdge(), BSplineEdge::BSplineEdge(), BSplineEdge::BSplineEdge(), compare(), declareRunTimeSelectionTable(), lineEdge::lineEdge(), lineEdge::lineEdge(), lineEdge::lineEdge(), operator<<, polyLineEdge::polyLineEdge(), polyLineEdge::polyLineEdge(), projectCurveEdge::projectCurveEdge(), projectEdge::projectEdge(), splineEdge::splineEdge(), and splineEdge::splineEdge().

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

◆ blockEdge() [2/3]

blockEdge ( const pointField & points,
const edge & fromTo )

Construct from components.

Parameters
pointsReferenced point field
fromToStart/end in point field

Definition at line 37 of file blockEdge.C.

References end_, points, points_, and start_.

◆ blockEdge() [3/3]

blockEdge ( const dictionary & dict,
const label index,
const pointField & points,
Istream & is )

Construct from Istream and point field.

Parameters
pointsReferenced point field

Definition at line 49 of file blockEdge.C.

References dict, end_, points, points_, Foam::read(), and start_.

Here is the call graph for this function:

◆ ~blockEdge()

virtual ~blockEdge ( )
virtualdefault

Destructor.

References Foam::noexcept.

Member Function Documentation

◆ appendEndPoints()

Foam::pointField appendEndPoints ( const pointField & p,
const label from,
const label to,
const pointField & intermediate )
staticprotected

Return a complete point field by appending the start/end points to the given list.

Deprecated
(2020-10) use polyLine::concat
Parameters
pReferenced point field
fromStart point in point field
toEnd point in point field
intermediateIntermediate points (knots)

Definition at line 102 of file blockEdge.C.

References polyLine::concat(), and p.

Here is the call graph for this function:

◆ TypeName()

TypeName ( "blockEdge" )

Runtime type information.

◆ declareRunTimeSelectionTable()

declareRunTimeSelectionTable ( autoPtr ,
blockEdge ,
Istream ,
(const dictionary &dict, const label index, const searchableSurfaces &geometry, const pointField &points, Istream &is) ,
(dict, index, geometry, points, is)  )

References blockEdge(), dict, and points.

Here is the call graph for this function:

◆ clone()

Foam::autoPtr< Foam::blockEdge > clone ( ) const
virtual

Clone function.

Definition at line 63 of file blockEdge.C.

References NotImplemented.

◆ New()

Foam::autoPtr< Foam::blockEdge > New ( const dictionary & dict,
const label index,
const searchableSurfaces & geometry,
const pointField & points,
Istream & is )
static

New function which constructs and returns pointer to a blockEdge.

Definition at line 70 of file blockEdge.C.

References Foam::abort(), DebugInFunction, dict, Foam::endl(), Foam::FatalIOError, FatalIOErrorInLookup, and points.

Referenced by blockEdge::iNew::operator()().

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

◆ good()

bool good ( ) const
inlinenoexcept

True if first/last indices are unique and non-negative.

Definition at line 24 of file blockEdgeI.H.

References end_, Foam::noexcept, and start_.

Referenced by valid().

Here is the caller graph for this function:

◆ valid()

bool valid ( ) const
inlinenoexcept

Same as good().

Definition at line 229 of file blockEdge.H.

References good(), Foam::noexcept, and valid().

Referenced by valid().

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

◆ start()

Foam::label start ( ) const
inlinenoexcept

Index of start (first) point.

Definition at line 30 of file blockEdgeI.H.

References Foam::noexcept, and start_.

Referenced by compare(), projectCurveEdge::position(), projectEdge::position(), and projectEdge::position().

Here is the caller graph for this function:

◆ end()

Foam::label end ( ) const
inlinenoexcept

Index of end (last) point.

Definition at line 36 of file blockEdgeI.H.

References end_, and Foam::noexcept.

Referenced by compare().

Here is the caller graph for this function:

◆ firstPoint()

◆ lastPoint()

◆ compare() [1/3]

int compare ( const blockEdge & e) const
inline

Compare the given start/end points with this block edge.

Return:

  • 0: different
  • +1: identical
  • -1: same edge, but different orientation

Definition at line 69 of file blockEdgeI.H.

References blockEdge(), compare(), and e.

Referenced by compare(), and compare().

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

◆ compare() [2/3]

int compare ( const edge & e) const
inline

Compare the given start/end points with this block edge.

Return:

  • 0: different
  • +1: identical
  • -1: same edge, but different orientation

Definition at line 75 of file blockEdgeI.H.

References compare(), and e.

Here is the call graph for this function:

◆ compare() [3/3]

int compare ( const label start,
const label end ) const
inline

Compare the given start/end points with this block edge.

Return:

  • 0: different
  • +1: identical
  • -1: same edge, but different orientation

Definition at line 54 of file blockEdgeI.H.

References end(), end_, start(), and start_.

Here is the call graph for this function:

◆ linearPosition()

Foam::point linearPosition ( const scalar lambda) const
inline

The point position in the straight line.

0 <= lambda <= 1

Definition at line 81 of file blockEdgeI.H.

References firstPoint(), InfoInFunction, lambda(), lastPoint(), and Foam::nl.

Referenced by lineEdge::position(), projectCurveEdge::position(), projectEdge::position(), and projectEdge::position().

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

◆ position() [1/2]

virtual point position ( const scalar lambda) const
pure virtual

The point position corresponding to the curve parameter.

0 <= lambda <= 1

Implemented in arcEdge, bezier, BSplineEdge, lineEdge, polyLineEdge, projectCurveEdge, projectEdge, and splineEdge.

References lambda(), and position().

Referenced by position(), and position().

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

◆ position() [2/2]

Foam::tmp< Foam::pointField > position ( const scalarList & lambdas) const
virtual

The point positions corresponding to the curve parameters.

0 <= lambda <= 1

Reimplemented in projectCurveEdge, and projectEdge.

Definition at line 117 of file blockEdge.C.

References forAll, tmp< T >::New(), points, position(), and UList< T >::size().

Here is the call graph for this function:

◆ length()

virtual scalar length ( ) const
pure virtual

The length of the curve.

Implemented in arcEdge, bezier, BSplineEdge, lineEdge, polyLineEdge, projectCurveEdge, projectEdge, and splineEdge.

References dict, length(), os(), and write().

Referenced by length().

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

◆ write()

void write ( Ostream & os,
const dictionary & dict ) const

Write edge with variable back-substitution.

Definition at line 130 of file blockEdge.C.

References dict, end_, Foam::endl(), os(), start_, Foam::tab, and blockVertex::write().

Referenced by length().

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

◆ operator<<

Ostream & operator<< ( Ostream & os,
const blockEdge & e )
friend

References blockEdge(), e, and os().

Member Data Documentation

◆ points_

const pointField& points_
protected

The referenced point field.

Definition at line 69 of file blockEdge.H.

Referenced by blockEdge(), blockEdge(), firstPoint(), and lastPoint().

◆ start_

const label start_
protected

Index of the first point.

Definition at line 74 of file blockEdge.H.

Referenced by arcEdge::arcEdge(), blockEdge(), blockEdge(), compare(), firstPoint(), good(), start(), and write().

◆ end_

const label end_
protected

Index of the last point.

Definition at line 79 of file blockEdge.H.

Referenced by arcEdge::arcEdge(), blockEdge(), blockEdge(), compare(), end(), good(), lastPoint(), and write().


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