41 void Foam::sphereToCell::combine(topoSet&
set,
const bool add)
const 45 const scalar radSquared = radius_*radius_;
49 scalar offset =
magSqr(centre_ - ctrs[celli]);
50 if (offset <= radSquared)
52 addOrDelete(
set, celli, add);
80 centre_(dict.
lookup(
"centre")),
81 radius_(dict.
lookup<scalar>(
"radius"))
101 Info<<
" Adding cells with centre within sphere, with centre = " 102 << centre_ <<
" and radius = " << radius_ <<
endl;
108 Info<<
" Removing cells with centre within sphere, with centre = " 109 << centre_ <<
" and radius = " << radius_ <<
endl;
#define forAll(list, i)
Loop across all elements in list.
A list of keyword definitions, which are a keyword followed by any number of values (e...
virtual ~sphereToCell()
Destructor.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Macros for easy insertion into run-time selection tables.
Base class of a source for a topoSet.
sphereToCell(const polyMesh &mesh, const vector ¢re, const scalar radius)
Construct from components.
vectorField pointField
pointField is a vectorField.
virtual void applyToSet(const topoSetSource::setAction action, topoSet &) const
setAction
Enumeration defining the valid actions.
dimensioned< scalar > magSqr(const dimensioned< Type > &)
addToRunTimeSelectionTable(ensightPart, ensightPartCells, istream)
defineTypeNameAndDebug(combustionModel, 0)
General set of labels of mesh quantity (points, cells, faces).
Mesh consisting of general polyhedral cells.
treeBoundBox combine(const treeBoundBox &a, const treeBoundBox &b)
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.