37 namespace functionObjects
47 void Foam::functionObjects::sectionalForceGraph::clear()
51 distancesPtr_.clear();
72 if (!distancesPtr_.valid())
79 patchPointDistances(),
91 return distancesPtr_();
106 distancesPtr_(nullptr),
128 origin_ =
dict.lookupBackwardsCompatible<
vector>({
"origin",
"CofR"});
130 nPoints_ =
dict.lookup<
label>(
"nPoints");
143 nOptimiseIter_ =
dict.lookupOrDefault<
label>(
"nOptimiseIter", 2);
158 #define DeclareTypeFieldValues(Type, nullArg) \
159 PtrList<Field<Type>> Type##FieldValues(2);
161 #undef DeclareTypeFieldValues
185 origin() + distances*normal_,
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
Macros for easy insertion into run-time selection tables.
void size(const label)
Override size to be inconsistent with allocated storage.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
static bool master(const label communicator=0)
Am I the master process.
Holds list of sampling positions.
static const NamedEnum< axisType, 6 > axisTypeNames_
String representation of axis enums.
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Abstract base-class for Time/database functionObjects.
This function calculates the fluid forces and moments at a series of section-planes through a given s...
sectionalForceGraph(const word &name, const Time &runTime, const dictionary &dict)
Construct from Time and dictionary.
virtual ~sectionalForceGraph()
Destructor.
virtual tmp< scalarField > distances() const
Return the distances from the origin to the section planes.
virtual point origin() const
Return the origin of the plot.
virtual vector normal() const
Return the normal to the section planes.
virtual bool write()
Write the sectionalForceGraph.
virtual bool read(const dictionary &)
Read the sectionalForceGraph data.
Base class for sectional forces function objects.
void addFluid(vectorField &force, vectorField &moment) const
Calculate the forces and moments at the cuts.
virtual void clear()
Clear the cached weights.
virtual bool read(const dictionary &)
Read the sectionalForcesBase data.
static autoPtr< setWriter > New(const word &writeType, const IOstream::streamFormat writeFormat=IOstream::ASCII, const IOstream::compressionType writeCompression=IOstream::UNCOMPRESSED)
Select given write options.
A class for managing temporary objects.
Template function which returns the un-mangled name of a given type. Useful for types which do not ha...
A class for handling words, derived from string.
static const word null
An empty word.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
static List< word > fieldNames
defineTypeNameAndDebug(fvMeshFunctionObject, 0)
addToRunTimeSelectionTable(functionObject, fvModel, dictionary)
tmp< scalarField > calcCutXs(const faceList &faces, const Field< vector > &faceAreas, const Field< vector > &faceNormals, const pointField &points, const scalarField &pointXs, const bool interpolate, const label nCuts, const label nIter, const bool debug=false, const word &functionName=word::null, const polyMesh &functionMesh=NullObjectRef< polyMesh >(), const setWriter &functionFormatter=NullObjectRef< setWriter >())
Compute and return evenly-spaced cut coordinates.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
bool mkDir(const fileName &, mode_t=0777)
Make a directory and return an error if it could not be created.
FOR_ALL_FIELD_TYPES(makeDimensionedPointFieldFunctions)
dimensionSet normalised(const dimensionSet &)
Field< vector > vectorField
Specialisation of Field<T> for vector.
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
labelList identityMap(const label len)
Create identity map (map[i] == i) of given length.
#define TypeFieldValuesParameter(Type, nullArg)
#define DeclareTypeFieldValues(Type, nullArg)