35namespace functionObjects
73 mesh_.objectRegistry::store(procFieldPtr);
86 doCells_ =
dict.getOrDefault(
"calculateCells",
true);
88 geomPtr_.reset(
nullptr);
96 mesh_.time().constant(),
102 dict.subDict(
"geometry"),
123 const pointField& fc = mesh_.C().boundaryField()[patchi];
127 geomPtr_().findNearest
138 dist[i] =
mag(nearestInfo[i].hitPoint()-fc[i]);
140 bfld[patchi] == dist;
150 geomPtr_().findNearest
158 forAll(nearestInfo, celli)
160 distance[celli] =
mag(nearestInfo[celli].hitPoint()-cc[celli]);
163 distance.correctBoundaryConditions();
171 Log <<
" functionObjects::" <<
type() <<
" " <<
name()
172 <<
" writing distance-to-surface field" <<
endl;
Macros for easy insertion into run-time selection tables.
#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,...
virtual bool read()
Re-read model coefficients if they have changed.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
static word timeName(const scalar t, const int precision=precision_)
void size(const label n)
Older name for setAddressableSize.
virtual const word & constraintType() const
Return the constraint type this pointPatch implements.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Abstract base-class for Time/database function objects.
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
const fvMesh & mesh_
Reference to the fvMesh.
Computes the magnitude of an input field.
Computes the distance to the nearest surface from a given geometry.
virtual bool execute()
Calculate the interpolated fields.
virtual bool write()
Write the interpolated fields.
virtual bool read(const dictionary &)
Read the controls.
const Time & time() const
Return the top-level database.
Container for searchableSurfaces. The collection is specified as a dictionary. For example,...
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
scalar distance(const vector &p1, const vector &p2)
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Ostream & endl(Ostream &os)
Add newline and flush stream.
static constexpr const zero Zero
Global zero (0)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
#define forAll(list, i)
Loop across all elements in list.