Go to the documentation of this file.
41 searchableSurfaceToCell,
47 searchableSurfaceToCell,
53 searchableSurfaceToCell,
62 searchableSurfaceToCell::typeName,
63 "\n Usage: searchableSurfaceToCell surface\n\n"
64 " Select cells with centre enclosed by the surface"
74 const word& defaultName
84 return dict.getOrDefault<
word>(
"surfaceName", defaultName);
90 void Foam::searchableSurfaceToCell::combine(
topoSet&
set,
const bool add)
const
97 const searchableSurface&
s = *surf_;
101 List<volumeType> volTypes;
102 s.getVolumeType(ctrs, volTypes);
104 const label len = volTypes.size();
105 for (label elemi=0; elemi < len; ++elemi)
119 const word& surfaceType,
135 mesh.objectRegistry::db(),
144 if (surf_ && !surf_->hasVolumeType())
147 <<
nl <<
"The surface " << surf_->name() <<
" (type: "
148 << surf_->type() <<
") appears to be unclosed ... ignoring"
179 if (!surf_ || !surf_->hasVolumeType())
188 Info<<
" Adding cells enclosed by surface '"
189 << surf_->name() <<
"' (type: " << surf_->type() <<
") ..."
199 Info<<
" Removing cells enclosed by surface '"
200 << surf_->name() <<
"' (type: " << surf_->type() <<
") ..."
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
vectorField pointField
pointField is a vectorField.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Add elements to current set.
void set(List< bool > &bools, const labelRange &range)
Set the specified range 'on' in a boolList.
searchableSurfaceToCell(const word &surfaceType, const polyMesh &mesh, const dictionary &dict)
Construct surface-type from dictionary.
A class for handling words, derived from Foam::string.
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
Class with constructor to add usage string to table.
Ostream & endl(Ostream &os)
Add newline and flush stream.
setAction
Enumeration defining the valid actions.
T getCompat(const word &keyword, std::initializer_list< std::pair< const char *, int >> compat, enum keyType::option=keyType::REGEX) const
Create a new set and ADD elements to it.
Mesh consisting of general polyhedral cells.
static word getSurfaceName(const dictionary &dict, const word &defaultName)
Retrieve surface name from dictionary entry.
messageStream Info
Information stream (stdout output on master, null elsewhere)
AccessType combine(const UList< T > &lists, AccessOp aop=accessOp< T >())
Combines sub-lists into a single list.
addNamedToRunTimeSelectionTable(topoSetCellSource, badQualityToCell, word, badQuality)
General set of labels of mesh quantity (points, cells, faces).
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
Macros for easy insertion into run-time selection tables.
Subtract elements from current set.
static autoPtr< searchableSurface > New(const word &surfaceType, const IOobject &io, const dictionary &dict)
Return a reference to the selected searchableSurface.
const vectorField & cellCentres() const
virtual void applyToSet(const topoSetSource::setAction action, topoSet &set) const
Apply specified action to the topoSet.
The topoSetCellSource is a intermediate class for handling topoSet sources for selecting cells.
A topoSetCellSource to select cells whose cell centre enclosed by a given searchableSurface.
A location inside the volume.
void addOrDelete(topoSet &set, const label id, const bool add) const
Add or delete id from set. Add when 'add' is true.
const Time & time() const
Return the top-level database.
const polyMesh & mesh_
Reference to the mesh.
const word & constant() const
Return constant name.
defineTypeNameAndDebug(combustionModel, 0)
#define WarningInFunction
Report a warning using Foam::Warning.
const word & name() const
Return reference to name.