49bool Foam::pointHistory::writeData()
60 reduce(position, sumOp<vector>());
68 << position.x() <<
tab
69 << position.y() <<
tab
70 << position.z() <<
endl;
88 regionName_(
polyMesh::defaultRegion),
90 refHistoryPoint_(
dict.
lookup(
"refHistoryPoint")),
92 fileName_(
dict.get<
word>(
"fileName")),
93 historyFilePtr_(nullptr)
95 Info<<
"Creating " << this->
name() <<
" function object." <<
endl;
106 if (historyPointID_ == -1)
110 scalar dist =
mag(refHistoryPoint_ -
points[pointI]);
115 historyPointID_ = pointI;
127 if (minDist[procI] <
min)
129 min = minDist[procI];
136 Pout<<
"History point ID: " << historyPointID_ <<
nl
137 <<
"History point coordinates: "
139 <<
"Reference point coordinates: " << refHistoryPoint_
144 if (!historyFilePtr_)
158 historyDir = time_.
path()/
".."/
"history"/startTimeName;
162 historyDir = time_.
path()/
"history"/startTimeName;
174 historyFilePtr_.reset
183 <<
"# Time" <<
tab <<
"X" <<
tab <<
"Y" <<
tab <<
"Z"
Istream and Ostream manipulators taking arguments.
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Output to file stream, using an OSstream.
label nProcs() const noexcept
Number of ranks associated with PstreamBuffers.
static void allGatherList(const List< commsStruct > &comms, List< T > &values, const int tag, const label comm)
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.
virtual dimensionedScalar startTime() const
Return start time.
fileName path() const
Return path.
static word timeName(const scalar t, const int precision=precision_)
static bool & parRun() noexcept
Test if this a parallel run.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
bool readIfPresent(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX) const
const Type & value() const
Return const reference to value.
A class for handling file names.
Abstract base-class for Time/database function objects.
const word & name() const noexcept
Return the name of this functionObject.
Mesh data needed to do the Finite Volume discretisation.
const Time & time() const
Return the top-level database.
const Time & time() const noexcept
Return time registry.
const Type & lookupObject(const word &name, const bool recursive=false) const
virtual bool execute()
execute is called at each ++ or += of the time-loop
Mesh consisting of general polyhedral cells.
static word defaultRegion
Return the default region name.
virtual const pointField & points() const
Return raw points.
int myProcNo() const noexcept
Return processor number.
Lookup type of boundary radiation properties.
splitCell * master() const
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
bool mkDir(const fileName &pathName, mode_t mode=0777)
Make a directory and return an error if it could not be created.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Omanip< int > setprecision(const int i)
Ostream & endl(Ostream &os)
Add newline and flush stream.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
void reduce(const List< UPstream::commsStruct > &comms, T &value, const BinaryOp &bop, const int tag, const label comm)
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
static constexpr const zero Zero
Global zero (0)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
static void writeData(Ostream &os, const Type &val)
constexpr char nl
The newline '\n' character (0x0a)
constexpr char tab
The tab '\t' character(0x09)
#define forAll(list, i)
Loop across all elements in list.