Go to the documentation of this file.
49 bool Foam::pointHistory::writeData()
58 position =
mesh.points()[historyPointID_];
61 reduce(position, sumOp<vector>());
69 << position.x() <<
tab
70 << position.y() <<
tab
71 << position.z() <<
endl;
79 Foam::pointHistory::pointHistory
91 refHistoryPoint_(
dict.
lookup(
"refHistoryPoint")),
96 Info<<
"Creating " << this->
name() <<
" function object." <<
endl;
108 if (historyPointID_ == -1)
112 scalar dist =
mag(refHistoryPoint_ -
points[pointI]);
117 historyPointID_ = pointI;
130 if (minDist[procI] <
min)
132 min = minDist[procI];
139 Pout<<
"History point ID: " << historyPointID_ <<
nl
140 <<
"History point coordinates: "
142 <<
"Reference point coordinates: " << refHistoryPoint_
147 if (historyFilePtr_.empty())
161 historyDir = time_.
path()/
".."/
"history"/startTimeName;
165 historyDir = time_.
path()/
"history"/startTimeName;
177 historyFilePtr_.reset
183 if (historyFilePtr_.valid())
186 <<
"# Time" <<
tab <<
"X" <<
tab
187 <<
"Y" <<
tab <<
"Z";
189 historyFilePtr_() <<
endl;
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
virtual const pointField & points() const
Return raw points.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A class for handling words, derived from Foam::string.
A class for handling file names.
static word defaultRegion
Return the default region name.
static std::string path(const std::string &str)
Return directory path name (part before last /)
static constexpr const zero Zero
Global zero (0)
static void scatterList(const List< commsStruct > &comms, List< T > &Values, const int tag, const label comm)
Scatter data. Reverse of gatherList.
static label nProcs(const label communicator=0)
Number of processes in parallel run.
const Time & time() const
Return time.
static bool & parRun()
Is this a parallel run?
Ostream & endl(Ostream &os)
Add newline and flush stream.
const Type & value() const
Return const reference to value.
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
prefixOSstream Pout
An Ostream wrapper for parallel output to std::cout.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
Abstract base-class for Time/database function objects.
#define forAll(list, i)
Loop across all elements in list.
virtual bool execute()
execute is called at each ++ or += of the time-loop
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
virtual bool read(const dictionary &dict)
Read and set the function object if its data has changed.
messageStream Info
Information stream (uses stdout - output is on the master only)
word name(const complex &c)
Return string representation of complex.
Istream and Ostream manipulators taking arguments.
const Type & lookupObject(const word &name, const bool recursive=false) const
ITstream & lookup(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
static void writeData(Ostream &os, const Type &val)
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Macros for easy insertion into run-time selection tables.
Mesh data needed to do the Finite Volume discretisation.
Vector< scalar > vector
A scalar version of the templated Vector.
Output to file stream, using an OSstream.
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
static bool master(const label communicator=0)
Am I the master process.
Omanip< int > setprecision(const int i)
static void gatherList(const List< commsStruct > &comms, List< T > &Values, const int tag, const label comm)
Gather data but keep individual values separate.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
const Time & time() const
Return the top-level database.
bool mkDir(const fileName &pathName, mode_t mode=0777)
Make a directory and return an error if it could not be created.
defineTypeNameAndDebug(combustionModel, 0)
virtual dimensionedScalar startTime() const
Return start time.
bool readIfPresent(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX) const