Go to the documentation of this file.
35 namespace functionObjects
51 Foam::functionObjects::surfaceDistance::surfaceDistance
69 mesh_.time().timeName(),
79 mesh_.objectRegistry::store(procFieldPtr);
98 doCells_ =
dict.lookupOrDefault(
"calculateCells",
true);
108 mesh_.time().constant(),
114 dict.subDict(
"geometry"),
130 volScalarField::Boundary& bfld =
distance.boundaryFieldRef();
135 const pointField& fc = mesh_.C().boundaryField()[patchi];
139 geomPtr_().findNearest
150 dist[i] =
mag(nearestInfo[i].hitPoint()-fc[i]);
152 bfld[patchi] == dist;
162 geomPtr_().findNearest
170 forAll(nearestInfo, celli)
172 distance[celli] =
mag(nearestInfo[celli].hitPoint()-cc[celli]);
175 distance.correctBoundaryConditions();
183 Log <<
" functionObjects::" <<
type() <<
" " <<
name()
184 <<
" writing distance-to-surface field" <<
endl;
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
virtual bool write()
Write the interpolated fields.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A class for handling words, derived from Foam::string.
const dimensionSet dimLength(0, 1, 0, 0, 0, 0, 0)
static constexpr const zero Zero
Global zero.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
addToRunTimeSelectionTable(functionObject, add, dictionary)
#define forAll(list, i)
Loop across all elements in list.
word name(const complex &c)
Return string representation of complex.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
virtual bool execute()
Calculate the interpolated fields.
virtual ~surfaceDistance()
Destructor.
static bool constraintType(const word &pt)
Return true if the given type is a constraint type.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
virtual bool read(const dictionary &dict)
Read optional controls.
Macros for easy insertion into run-time selection tables.
scalar distance(const vector &p1, const vector &p2)
defineTypeNameAndDebug(fvMeshFunctionObject, 0)
const std::string patch
OpenFOAM patch number as a std::string.
Container for searchableSurfaces. The collection is specified as a dictionary. For example,...
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
virtual bool read(const dictionary &)
Read the controls.
#define Log
Report write to Foam::Info if the local log switch is true.