35 namespace functionObjects
87 doCells_ =
dict.getOrDefault(
"calculateCells",
true);
89 geomPtr_.reset(
nullptr);
97 mesh_.time().constant(),
103 dict.subDict(
"geometry"),
124 const pointField& fc = mesh_.C().boundaryField()[patchi];
128 geomPtr_().findNearest
139 dist[i] = nearestInfo[i].hitPoint().dist(fc[i]);
141 bfld[patchi] == dist;
147 const pointField& cc = mesh_.C().internalField();
151 geomPtr_().findNearest
159 forAll(nearestInfo, celli)
161 distance[celli] = nearestInfo[celli].hitPoint().dist(cc[celli]);
164 distance.correctBoundaryConditions();
172 Log <<
" functionObjects::" <<
type() <<
" " <<
name()
173 <<
" writing distance-to-surface field" <<
endl;
void size(const label n)
Older name for setAddressableSize.
virtual bool read(const dictionary &)
Read the controls.
defineTypeNameAndDebug(ObukhovLength, 0)
virtual bool write()
Write the interpolated fields.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Ostream & endl(Ostream &os)
Add newline and flush stream.
bool store()
Register object with its registry and transfer ownership to the registry.
scalar distance(const vector &p1, const vector &p2)
Ignore writing from objectRegistry::writeObject()
const Time & time() const
Return the top-level database.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Macros for easy insertion into run-time selection tables.
virtual const objectRegistry & thisDb() const
Return the object registry - resolve conflict polyMesh/lduMesh.
#define forAll(list, i)
Loop across all elements in list.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
surfaceDistance(const word &name, const Time &runTime, const dictionary &dict)
Construct for given objectRegistry and dictionary.
A class for handling words, derived from Foam::string.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Container for searchableSurfaces. The collection is specified as a dictionary. For example...
virtual bool execute()
Calculate the interpolated fields.
static word timeName(const scalar t, const int precision=precision_)
Return a time name for the given scalar time value formatted with the given precision.
addToRunTimeSelectionTable(functionObject, ObukhovLength, dictionary)
static bool constraintType(const word &patchType)
Return true if the given type is a constraint type.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
const std::string patch
OpenFOAM patch number as a std::string.
virtual bool read(const dictionary &dict)
Read optional controls.
Defines the attributes of an object for which implicit objectRegistry management is supported...
Request registration (bool: true)
const fvMesh & mesh_
Reference to the fvMesh.
static constexpr const zero Zero
Global zero (0)