Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
sampledSet Class Reference

Holds list of sampling points which is filled at construction time. Various implementations of this base class to e.g. get sampling points at uniform distance along a line (uniformSet) or directly specified (cloudSet) More...

Inheritance diagram for sampledSet:
Inheritance graph
[legend]
Collaboration diagram for sampledSet:
Collaboration graph
[legend]

Classes

class  iNew
 

Public Member Functions

 TypeName ("sampledSet")
 
 declareRunTimeSelectionTable (autoPtr, sampledSet, word,(const word &name, const polyMesh &mesh, const meshSearch &searchEngine, const dictionary &dict),(name, mesh, searchEngine, dict))
 
 sampledSet (const word &name, const polyMesh &mesh, const meshSearch &searchEngine, const coordSet::coordFormat axisType)
 
 sampledSet (const word &name, const polyMesh &mesh, const meshSearch &searchEngine, const word &axis)
 
 sampledSet (const word &name, const polyMesh &mesh, const meshSearch &searchEngine, const dictionary &dict)
 
autoPtr< sampledSetclone () const
 
virtual ~sampledSet ()=default
 
const polyMeshmesh () const
 
const meshSearchsearchEngine () const
 
const labelListsegments () const
 
const labelListcells () const
 
const labelListfaces () const
 
Ostreamwrite (Ostream &) const
 
autoPtr< coordSetgather (labelList &indexSet, labelList &allSegments) const
 
- Public Member Functions inherited from coordSet
 coordSet (const word &name, const coordFormat axisType)
 
 coordSet (const word &name, const word &axis)
 
 coordSet (const word &name, const word &axis, const List< point > &points, const scalarList &curveDist)
 
 coordSet (const word &name, const word &axis, List< point > &&points, scalarList &&curveDist)
 
const wordname () const
 
word axis () const
 
void setPoints (const List< point > &newPoints)
 
void setPoints (List< point > &&newPoints)
 
const scalarListcurveDist () const
 
void setCurveDist (const scalarList &curveDist)
 
void setCurveDist (scalarList &&curveDist)
 
bool hasVectorAxis () const
 
scalar scalarCoord (const label index) const
 
vector vectorCoord (const label index) const
 
Ostreamwrite (Ostream &os) const
 
- Public Member Functions inherited from Field
constexpr Field () noexcept
 
 Field (const label len)
 
 Field (const label len, const Type &val)
 
 Field (const label len, const Foam::zero)
 
 Field (const Foam::one, const Type &val)
 
 Field (const Foam::one, Type &&val)
 
 Field (const Foam::one, const Foam::zero)
 
 Field (const Field< Type > &fld)
 
 Field (const UList< Type > &list)
 
template<class Addr >
 Field (const IndirectListBase< Type, Addr > &list)
 
 Field (Field< Type > &&fld)
 
 Field (List< Type > &&list)
 
template<int SizeMin>
 Field (DynamicList< Type, SizeMin > &&list)
 
 Field (const UList< Type > &mapF, const labelUList &mapAddressing)
 
 Field (const tmp< Field< Type >> &tmapF, const labelUList &mapAddressing)
 
 Field (const UList< Type > &mapF, const labelListList &mapAddressing, const scalarListList &weights)
 
 Field (const tmp< Field< Type >> &tmapF, const labelListList &mapAddressing, const scalarListList &weights)
 
 Field (const UList< Type > &mapF, const FieldMapper &map, const bool applyFlip=true)
 
 Field (const UList< Type > &mapF, const FieldMapper &map, const Type &defaultValue, const bool applyFlip=true)
 
 Field (const UList< Type > &mapF, const FieldMapper &map, const UList< Type > &defaultValues, const bool applyFlip=true)
 
 Field (const tmp< Field< Type >> &tmapF, const FieldMapper &map, const bool applyFlip=true)
 
 Field (const tmp< Field< Type >> &tmapF, const FieldMapper &map, const Type &defaultValue, const bool applyFlip=true)
 
 Field (const tmp< Field< Type >> &tmapF, const FieldMapper &map, const UList< Type > &defaultValues, const bool applyFlip=true)
 
 Field (Field< Type > &fld, bool reuse)
 
 Field (const tmp< Field< Type >> &tfld)
 
 Field (Istream &is)
 
 Field (const word &keyword, const dictionary &dict, const label len)
 
tmp< Field< Type > > clone () const
 
void map (const UList< Type > &mapF, const labelUList &mapAddressing)
 
void map (const tmp< Field< Type >> &tmapF, const labelUList &mapAddressing)
 
void map (const UList< Type > &mapF, const labelListList &mapAddressing, const scalarListList &weights)
 
void map (const tmp< Field< Type >> &tmapF, const labelListList &mapAddressing, const scalarListList &weights)
 
void map (const UList< Type > &mapF, const FieldMapper &map, const bool applyFlip=true)
 
void map (const tmp< Field< Type >> &tmapF, const FieldMapper &map, const bool applyFlip=true)
 
void autoMap (const FieldMapper &map, const bool applyFlip=true)
 
void rmap (const UList< Type > &mapF, const labelUList &mapAddressing)
 
void rmap (const tmp< Field< Type >> &tmapF, const labelUList &mapAddressing)
 
void rmap (const UList< Type > &mapF, const labelUList &mapAddressing, const UList< scalar > &weights)
 
void rmap (const tmp< Field< Type >> &tmapF, const labelUList &mapAddressing, const UList< scalar > &weights)
 
void negate ()
 
tmp< Field< cmptType > > component (const direction) const
 
void replace (const direction, const UList< cmptType > &)
 
void replace (const direction, const tmp< Field< cmptType >> &)
 
void replace (const direction, const cmptType &)
 
template<class VSForm >
VSForm block (const label start) const
 
tmp< Field< Type > > T () const
 
void writeEntry (const word &keyword, Ostream &os) const
 
SubField< Type > slice (const label pos, label len=-1)
 
const SubField< Type > slice (const label pos, label len=-1) const
 
SubField< Type > slice (const labelRange &range)
 
const SubField< Type > slice (const labelRange &range) const
 
void operator= (const Field< Type > &)
 
void operator= (const tmp< Field< Type >> &)
 
void operator= (const UList< Type > &rhs)
 
void operator= (const SubField< Type > &rhs)
 
template<class Addr >
void operator= (const IndirectListBase< Type, Addr > &rhs)
 
void operator= (Field< Type > &&rhs)
 
void operator= (List< Type > &&rhs)
 
template<int SizeMin>
void operator= (DynamicList< Type, SizeMin > &&rhs)
 
void operator= (const Type &val)
 
void operator= (const Foam::zero)
 
template<class Form , class Cmpt , direction nCmpt>
void operator= (const VectorSpace< Form, Cmpt, nCmpt > &)
 
void operator+= (const UList< Type > &)
 
void operator+= (const tmp< Field< Type >> &)
 
void operator-= (const UList< Type > &)
 
void operator-= (const tmp< Field< Type >> &)
 
void operator*= (const UList< scalar > &)
 
void operator*= (const tmp< Field< scalar >> &)
 
void operator/= (const UList< scalar > &)
 
void operator/= (const tmp< Field< scalar >> &)
 
void operator+= (const Type &)
 
void operator-= (const Type &)
 
void operator*= (const scalar &)
 
void operator/= (const scalar &)
 
template<class Type >
 Field (const UList< Type > &mapF, const labelUList &mapAddressing)
 
template<class Type >
 Field (const tmp< Field< Type >> &tmapF, const labelUList &mapAddressing)
 
template<class Type >
 Field (const UList< Type > &mapF, const labelListList &mapAddressing, const scalarListList &mapWeights)
 
template<class Type >
 Field (const tmp< Field< Type >> &tmapF, const labelListList &mapAddressing, const scalarListList &mapWeights)
 
template<class Type >
 Field (const UList< Type > &mapF, const FieldMapper &mapper, const bool applyFlip)
 
template<class Type >
 Field (const UList< Type > &mapF, const FieldMapper &mapper, const Type &defaultValue, const bool applyFlip)
 
template<class Type >
 Field (const UList< Type > &mapF, const FieldMapper &mapper, const UList< Type > &defaultValues, const bool applyFlip)
 
template<class Type >
 Field (const tmp< Field< Type >> &tmapF, const FieldMapper &mapper, const bool applyFlip)
 
template<class Type >
 Field (const tmp< Field< Type >> &tmapF, const FieldMapper &mapper, const Type &defaultValue, const bool applyFlip)
 
template<class Type >
 Field (const tmp< Field< Type >> &tmapF, const FieldMapper &mapper, const UList< Type > &defaultValues, const bool applyFlip)
 
template<class Type >
 Field (const word &keyword, const dictionary &dict, const label len)
 
template<class Type >
void operator= (const Field< Type > &rhs)
 
template<class Type >
void operator= (const tmp< Field > &rhs)
 
template<class Type >
constexpr Field () noexcept
 
template<class Type >
 Field (const label len)
 
template<class Type >
 Field (const label len, const Type &val)
 
template<class Type >
 Field (const label len, const Foam::zero)
 
template<class Type >
 Field (const Foam::one, const Type &val)
 
template<class Type >
 Field (const Foam::one, Type &&val)
 
template<class Type >
 Field (const Foam::one, const Foam::zero)
 
template<class Type >
 Field (const Field< Type > &fld)
 
template<class Type >
 Field (const UList< Type > &list)
 
template<class Type >
 Field (Field< Type > &&fld)
 
template<class Type >
 Field (List< Type > &&list)
 
template<class Type >
 Field (Field< Type > &fld, bool reuse)
 
template<class Type >
 Field (const tmp< Field< Type >> &tfld)
 
template<class Type >
 Field (Istream &is)
 
template<class Type >
void operator= (const UList< Type > &rhs)
 
template<class Type >
void operator= (const SubField< Type > &rhs)
 
template<class Type >
void operator= (Field< Type > &&rhs)
 
template<class Type >
void operator= (List< Type > &&rhs)
 
template<class Type >
void operator= (const Type &val)
 
template<class Type >
void operator= (const Foam::zero)
 

Static Public Member Functions

static autoPtr< sampledSetNew (const word &name, const polyMesh &mesh, const meshSearch &searchEngine, const dictionary &dict)
 
- Static Public Member Functions inherited from Field
static const Field< Type > & null ()
 
static autoPtr< Field< Type > > New (Istream &is)
 
template<class Type2 >
static tmp< Field< Type > > NewCalculatedType (const Field< Type2 > &f)
 

Protected Member Functions

void checkDimensions () const
 
label getBoundaryCell (const label) const
 
label getNeighbourCell (const label) const
 
label pointInCell (const point &p, const label samplei) const
 
scalar calcSign (const label facei, const point &sample) const
 
label findNearFace (const label celli, const point &sample, const scalar smallDist) const
 
point pushIn (const point &sample, const label facei) const
 
bool getTrackingPoint (const point &samplePt, const point &bPoint, const label bFacei, const scalar smallDist, point &trackPt, label &trackCelli, label &trackFacei) const
 
void setSamples (const List< point > &samplingPts, const labelList &samplingCells, const labelList &samplingFaces, const labelList &samplingSegments, const scalarList &samplingCurveDist)
 
void setSamples (List< point > &&samplingPts, labelList &&samplingCells, labelList &&samplingFaces, labelList &&samplingSegments, scalarList &&samplingCurveDist)
 

Protected Attributes

labelList segments_
 
labelList cells_
 
labelList faces_
 
- Protected Attributes inherited from coordSet
const word name_
 
const coordFormat axis_
 
scalarList curveDist_
 

Additional Inherited Members

- Public Types inherited from coordSet
enum  coordFormat {
  XYZ, X, Y, Z,
  DISTANCE
}
 
- Public Types inherited from Field
typedef pTraits< Type >::cmptType cmptType
 
typedef SubField< Type > subField
 
- Static Public Attributes inherited from coordSet
static const Enum< coordFormatcoordFormatNames
 

Detailed Description

Holds list of sampling points which is filled at construction time. Various implementations of this base class to e.g. get sampling points at uniform distance along a line (uniformSet) or directly specified (cloudSet)

Each 'sampledSet' has a name and a specifier of how the axis should be write (x/y/z component or all 3 components)

For a dictionary specification:

Property Description Required Default
axis x, y, z, xyz, distance yes
Source files

Definition at line 79 of file sampledSet.H.

Constructor & Destructor Documentation

◆ sampledSet() [1/3]

sampledSet ( const word name,
const polyMesh mesh,
const meshSearch searchEngine,
const coordSet::coordFormat  axisType 
)

Definition at line 459 of file sampledSet.C.

◆ sampledSet() [2/3]

sampledSet ( const word name,
const polyMesh mesh,
const meshSearch searchEngine,
const word axis 
)

Definition at line 476 of file sampledSet.C.

◆ sampledSet() [3/3]

sampledSet ( const word name,
const polyMesh mesh,
const meshSearch searchEngine,
const dictionary dict 
)

Definition at line 493 of file sampledSet.C.

◆ ~sampledSet()

virtual ~sampledSet ( )
virtualdefault

Member Function Documentation

◆ checkDimensions()

void checkDimensions ( ) const
protected

Definition at line 41 of file sampledSet.C.

References Foam::abort(), sampledSet::cells_, coordSet::curveDist_, sampledSet::faces_, Foam::FatalError, FatalErrorInFunction, and sampledSet::segments_.

Here is the call graph for this function:

◆ getBoundaryCell()

Foam::label getBoundaryCell ( const label  facei) const
protected

Definition at line 63 of file sampledSet.C.

References polyMesh::faceOwner(), and mesh.

Here is the call graph for this function:

◆ getNeighbourCell()

Foam::label getNeighbourCell ( const label  facei) const
protected

Definition at line 69 of file sampledSet.C.

References polyMesh::faceNeighbour(), polyMesh::faceOwner(), and mesh.

Here is the call graph for this function:

◆ pointInCell()

Foam::label pointInCell ( const point p,
const label  samplei 
) const
protected

Definition at line 83 of file sampledSet.C.

References cells, Foam::expressions::patchExpr::debug, Foam::endl(), polyMesh::faceOwner(), mesh, Foam::nl, p, polyMesh::pointInCell(), and WarningInFunction.

Here is the call graph for this function:

◆ calcSign()

Foam::scalar calcSign ( const label  facei,
const point sample 
) const
protected

Definition at line 155 of file sampledSet.C.

References primitiveMesh::faceCentres(), Foam::mag(), mesh, n, and Foam::normalised().

Here is the call graph for this function:

◆ findNearFace()

Foam::label findNearFace ( const label  celli,
const point sample,
const scalar  smallDist 
) const
protected

◆ pushIn()

Foam::point pushIn ( const point sample,
const label  facei 
) const
protected

◆ getTrackingPoint()

bool getTrackingPoint ( const point samplePt,
const point bPoint,
const label  bFacei,
const scalar  smallDist,
point trackPt,
label &  trackCelli,
label &  trackFacei 
) const
protected

Definition at line 279 of file sampledSet.C.

References DebugInFunction, Foam::endl(), polyMesh::findCell(), Foam::mag(), mesh, Foam::nl, and Foam::sign().

Here is the call graph for this function:

◆ setSamples() [1/2]

void setSamples ( const List< point > &  samplingPts,
const labelList samplingCells,
const labelList samplingFaces,
const labelList samplingSegments,
const scalarList samplingCurveDist 
)
protected

Definition at line 375 of file sampledSet.C.

◆ setSamples() [2/2]

void setSamples ( List< point > &&  samplingPts,
labelList &&  samplingCells,
labelList &&  samplingFaces,
labelList &&  samplingSegments,
scalarList &&  samplingCurveDist 
)
protected

Definition at line 395 of file sampledSet.C.

◆ TypeName()

TypeName ( "sampledSet"  )

◆ declareRunTimeSelectionTable()

declareRunTimeSelectionTable ( autoPtr  ,
sampledSet  ,
word  ,
(const word &name, const polyMesh &mesh, const meshSearch &searchEngine, const dictionary &dict ,
(name, mesh, searchEngine, dict  
)

◆ clone()

autoPtr<sampledSet> clone ( ) const
inline

Definition at line 252 of file sampledSet.H.

References NotImplemented.

◆ New()

Foam::autoPtr< Foam::sampledSet > New ( const word name,
const polyMesh mesh,
const meshSearch searchEngine,
const dictionary dict 
)
static

Definition at line 512 of file sampledSet.C.

References dict, Foam::exit(), Foam::FatalIOError, FatalIOErrorInLookup, dictionary::get(), mesh, Foam::name(), and dictionary::optionalSubDict().

Referenced by sampledSet::iNew::operator()(), and streamLineBase::sampledSetPoints().

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

◆ mesh()

const polyMesh& mesh ( ) const
inline

Definition at line 277 of file sampledSet.H.

◆ searchEngine()

const meshSearch& searchEngine ( ) const
inline

Definition at line 282 of file sampledSet.H.

◆ segments()

const labelList& segments ( ) const
inline

Definition at line 287 of file sampledSet.H.

References sampledSet::segments_.

Referenced by meshRefinement::findRegions().

Here is the caller graph for this function:

◆ cells()

const labelList& cells ( ) const
inline

Definition at line 292 of file sampledSet.H.

References sampledSet::cells_.

Referenced by streamLine::track(), and wallBoundedStreamLine::track().

Here is the caller graph for this function:

◆ faces()

const labelList& faces ( ) const
inline

Definition at line 297 of file sampledSet.H.

References sampledSet::faces_.

◆ write()

Foam::Ostream & write ( Ostream os) const

Definition at line 547 of file sampledSet.C.

References forAll, Foam::nl, os(), and coordSet::write().

Here is the call graph for this function:

◆ gather()

Foam::autoPtr< Foam::coordSet > gather ( labelList indexSet,
labelList allSegments 
) const

Definition at line 415 of file sampledSet.C.

References Foam::endl(), globalIndex::gatherOp(), UPstream::master(), Foam::name(), autoPtr::New(), Foam::sortedOrder(), and WarningInFunction.

Here is the call graph for this function:

Member Data Documentation

◆ segments_

labelList segments_
protected

Definition at line 95 of file sampledSet.H.

Referenced by sampledSet::checkDimensions(), and sampledSet::segments().

◆ cells_

labelList cells_
protected

Definition at line 98 of file sampledSet.H.

Referenced by sampledSet::cells(), and sampledSet::checkDimensions().

◆ faces_

labelList faces_
protected

Definition at line 101 of file sampledSet.H.

Referenced by sampledSet::checkDimensions(), and sampledSet::faces().


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