62 searchableSurfaceToCell::typeName,
63 "\n Usage: searchableSurfaceToCell surface\n\n"
64 " Select cells with centre enclosed by the surface"
87 dict.readIfPresent(
"surfaceName", surfaceName);
89 if (surfaceName.empty()) surfaceName =
"surface";
99void Foam::searchableSurfaceToCell::combine(topoSet& set,
const bool add)
const
106 const tmp<pointField> tctrs(this->
transform(
mesh_.cellCentres()));
109 const searchableSurface&
s = *surf_;
114 List<volumeType> volTypes;
115 s.getVolumeType(ctrs, volTypes);
117 const label len = volTypes.size();
118 for (label elemi=0; elemi < len; ++elemi)
132 const word& surfaceType,
157 if (surf_ && !surf_->hasVolumeType())
160 << nl <<
"The surface " << surf_->name() <<
" (type: "
161 << surf_->type() <<
") appears to be unclosed ... ignoring"
177 dict.getCompat<
word>(
"surfaceType", {{
"surface", 0}}),
192 if (!surf_ || !surf_->hasVolumeType())
201 Info<<
" Adding cells enclosed by surface '"
202 << surf_->name() <<
"' (type: " << surf_->type() <<
") ..."
212 Info<<
" Removing cells enclosed by surface '"
213 << surf_->name() <<
"' (type: " << surf_->type() <<
") ..."
Macros for easy insertion into run-time selection tables.
#define addNamedToRunTimeSelectionTable(baseType, thisType, argNames, lookupName)
Add to construction table with 'lookupName' as the key.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Registry of regIOobjects.
Mesh consisting of general polyhedral cells.
A topoSetCellSource to select cells whose cell centre enclosed by a given searchableSurface.
searchableSurfaceToCell(const word &surfaceType, const polyMesh &mesh, const dictionary &dict)
Construct surface-type from dictionary.
virtual void applyToSet(const topoSetSource::setAction action, topoSet &set) const
Apply specified action to the topoSet.
Base class of (analytical or triangulated) surface. Encapsulates all the search routines....
The topoSetCellSource is a intermediate class for handling topoSet sources for selecting cells.
topoSetCellSource(const polyMesh &mesh)
Construct from mesh.
static autoPtr< topoSetCellSource > New(const word &sourceType, const polyMesh &mesh, const dictionary &dict)
Return a reference to the selected source type.
Class with constructor to add usage string to table.
Base class of a source for a topoSet.
void addOrDelete(topoSet &set, const label id, const bool add) const
Add or delete id from set. Add when 'add' is true.
setAction
Enumeration defining various actions.
@ SUBTRACT
Subtract elements from current set.
@ ADD
Add elements to current set.
@ NEW
Create a new set and ADD elements to it.
bool verbose_
Output verbosity (default: true).
const polyMesh & mesh() const noexcept
Reference to the mesh.
const polyMesh & mesh_
Reference to the mesh.
General set of labels of mesh quantity (points, cells, faces).
@ INSIDE
A location inside the volume.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
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))
Different types of constants.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh > > &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
refinementData transform(const tensor &, const refinementData val)
No-op rotational transform for base types.
messageStream Info
Information stream (stdout output on master, null elsewhere).
Ostream & endl(Ostream &os)
Add newline and flush stream.
void add(DimensionedField< scalar, GeoMesh > &result, const dimensioned< scalar > &dt1, const DimensionedField< scalar, GeoMesh > &f2)
static word getSurfaceName(const dictionary &dict, word surfaceName)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
vectorField pointField
pointField is a vectorField.
dict add("bounds", meshBb)