Foam::PtrListOps Namespace Reference

Various utility functions to operate on Pointer Lists. More...

Functions

template<class ReturnType , class T , class AccessOp >
List< ReturnType > get (const UPtrList< T > &list, const AccessOp &aop)
 List of values generated by applying the access operation to each list item. More...
 
template<class T , class UnaryMatchPredicate >
List< wordnames (const UPtrList< T > &list, const UnaryMatchPredicate &matcher)
 List of names generated by calling name() for each list item and filtered for matches. More...
 
template<class T >
List< wordnames (const UPtrList< T > &list)
 List of names generated by calling name() for each list item no filtering (ie, predicates::always) More...
 
template<class T , class UnaryMatchPredicate >
label firstMatching (const UPtrList< T > &list, const UnaryMatchPredicate &matcher)
 Find first list item with 'name()' that matches, -1 on failure. More...
 
template<class T , class UnaryMatchPredicate >
labelList findMatching (const UPtrList< T > &list, const UnaryMatchPredicate &matcher)
 Extract list indices for all items with 'name()' that matches. More...
 

Detailed Description

Various utility functions to operate on Pointer Lists.

Source files

Function Documentation

◆ get()

List<ReturnType> Foam::PtrListOps::get ( const UPtrList< T > &  list,
const AccessOp &  aop 
)

List of values generated by applying the access operation to each list item.

For example,

PtrListOps::get(mesh.boundaryMesh(), nameOp<polyPatch>());

Referenced by IFstream::IFstream(), OFstream::OFstream(), and PtrList< transferModel >::try_emplace().

Here is the caller graph for this function:

◆ names() [1/2]

List<word> Foam::PtrListOps::names ( const UPtrList< T > &  list,
const UnaryMatchPredicate &  matcher 
)

List of names generated by calling name() for each list item and filtered for matches.

For example,

wordRes matches(...);
PtrListOps::names(mesh.boundaryMesh(), matches);
PtrListOps::names(mesh.boundaryMesh(), predicates::always());

Referenced by fieldSelection::addRegistered(), adjointSimple::addTopOFvOptions(), MeshedSurface< Foam::face >::addZones(), adjointSolverManager::adjointSolversNames(), Switch::c_str(), searchableSurfaces::checkClosed(), searchableSurfaces::checkIntersection(), searchableSurfaces::checkNormalOrientation(), ZoneMesh< cellZone, polyMesh >::checkParallelSync(), searchableSurfaces::checkQuality(), searchableSurfaces::checkSizes(), cellTable::combine(), profileModelList::connectBlades(), pointFieldDecomposer::fieldsCache::privateCache::decompose(), fvFieldDecomposer::fieldsCache::privateCache::decompose(), faFieldDecomposer::fieldsCache::privateCache::decompose(), Foam::filteredName(), polyTopoChanger::findModifierID(), faBoundaryMesh::findPatchID(), polyBoundaryMesh::findPatchID(), ZoneMesh< cellZone, polyMesh >::findZoneID(), Foam::FOAM_DEPRECATED_FOR(), MRFZoneList::getFromName(), fluxSummary::initialiseCellZoneAndDirection(), fluxSummary::initialiseFaceZone(), fluxSummary::initialiseFaceZoneAndDirection(), fluxSummary::initialiseSurface(), fluxSummary::initialiseSurfaceAndDirection(), coordinateSystems::lookup(), Switch::name(), coordinateSystems::names(), ZoneMesh< cellZone, polyMesh >::names(), objectRegistry::names(), IOobjectList::names(), combustionModel::New(), chemistryTabulationMethod< ReactionThermo, ThermoType >::New(), chemistryReductionMethod< ReactionThermo, ThermoType >::New(), ZoneMesh< cellZone, polyMesh >::operator[](), polyBoundaryMesh::operator[](), boundaryMesh::patchNames(), cloudInfo::performAction(), polyMeshAdder::procPatchPairs(), projectCurveEdge::projectCurveEdge(), projectEdge::projectEdge(), projectVertex::projectVertex(), AC3DsurfaceFormat< Face >::read(), NASsurfaceFormat< Face >::read(), STLsurfaceFormat< Face >::read(), cloudInfo::read(), triSurfaceLoader::readDir(), fieldSelection::resetFieldFilters(), logFiles::resetNames(), fieldSelection::selectionNames(), UnsortedMeshedSurface< Face >::setZones(), ZoneMesh< cellZone, polyMesh >::sortedNames(), Switch::str(), mappedPatchBase::subRegistry(), pointToPointPlanarInterpolation::timeNames(), fileOperation::uniformFile(), sampledFaceZone::update(), uniformInterpolatedDisplacementPointPatchVectorField::updateCoeffs(), ZoneMesh< cellZone, polyMesh >::updateMetaData(), polyBoundaryMesh::whichPatchFace(), ParticlePostProcessing< CloudType >::write(), ParticleHistogram< CloudType >::write(), and searchableSurfaces::writeStats().

◆ names() [2/2]

List<word> Foam::PtrListOps::names ( const UPtrList< T > &  list)

List of names generated by calling name() for each list item no filtering (ie, predicates::always)

◆ firstMatching()

◆ findMatching()

labelList Foam::PtrListOps::findMatching ( const UPtrList< T > &  list,
const UnaryMatchPredicate &  matcher 
)

Extract list indices for all items with 'name()' that matches.

Referenced by surfaceFormatsCore::getSelectedPatches(), coordinateSystems::indices(), ZoneMesh< cellZone, polyMesh >::indices(), faBoundaryMesh::indices(), and polyBoundaryMesh::indices().

Here is the caller graph for this function: