52Foam::vector Foam::cyclicAMIPolyPatch::findFaceNormalMaxRadius
54 const pointField& faceCentres
63 label facei =
findMax(magRadSqr);
66 <<
"Patch: " <<
name() <<
nl
67 <<
" rotFace = " << facei <<
nl
69 <<
" distance = " <<
Foam::sqrt(magRadSqr[facei])
89 <<
" has transform type " << transformTypeNames[
transform()]
90 <<
", neighbour patch " << neighbPatchName()
91 <<
" has transform type "
92 << neighbPatch().transformTypeNames[neighbPatch().transform()]
105 if (rotationAngleDefined_)
107 const tensor T(rotationAxis_*rotationAxis_);
111 0, -rotationAxis_.z(), rotationAxis_.y(),
112 rotationAxis_.z(), 0, -rotationAxis_.x(),
113 -rotationAxis_.y(), rotationAxis_.x(), 0
120 +
sin(rotationAngle_)*S
127 +
sin(-rotationAngle_)*S
132 const vector transformedAreaPos =
gSum(half1Areas & revTPos);
133 const vector transformedAreaNeg =
gSum(half1Areas & revTNeg);
135 const scalar magArea0 =
mag(area0) + ROOTVSMALL;
139 const scalar errorPos =
mag(transformedAreaPos + area0);
140 const scalar errorNeg =
mag(transformedAreaNeg + area0);
142 const scalar normErrorPos = errorPos/magArea0;
143 const scalar normErrorNeg = errorNeg/magArea0;
145 if (errorPos > errorNeg && normErrorNeg < matchTolerance())
148 rotationAngle_ *= -1;
155 const scalar areaError =
min(normErrorPos, normErrorNeg);
157 if (areaError > matchTolerance())
160 <<
"Patch areas are not consistent within "
161 << 100*matchTolerance()
162 <<
" % indicating a possible error in the specified "
163 <<
"angle of rotation" <<
nl
164 <<
" owner patch : " <<
name() <<
nl
165 <<
" neighbour patch : " << neighbPatch().name()
169 <<
" area error : " << 100*areaError <<
" %"
170 <<
" match tolerance : " << matchTolerance()
176 scalar theta =
radToDeg(rotationAngle_);
178 Pout<<
"cyclicAMIPolyPatch::calcTransforms: patch:"
180 <<
" Specified rotation:"
181 <<
" swept angle: " << theta <<
" [deg]"
182 <<
" reverse transform: " << revT
190 if (half0Ctrs.size())
192 n0 = findFaceNormalMaxRadius(half0Ctrs);
194 if (half1Ctrs.size())
196 n1 = -findFaceNormalMaxRadius(half1Ctrs);
210 (n0 ^ rotationAxis_),
216 (-n1 ^ rotationAxis_),
225 Pout<<
"cyclicAMIPolyPatch::calcTransforms: patch:"
227 <<
" Specified rotation:"
228 <<
" n0:" << n0 <<
" n1:" << n1
229 <<
" swept angle: " << theta <<
" [deg]"
230 <<
" reverse transform: " << revT
246 Pout<<
"cyclicAMIPolyPatch::calcTransforms : patch:" <<
name()
247 <<
" Specified translation : " << separationVector_
267 <<
" Assuming cyclic AMI pairs are colocated" <<
endl;
282 <<
" forwardT = " << forwardT() <<
nl
283 <<
" reverseT = " << reverseT() <<
nl
293 const label periodicID = periodicPatchID();
294 if (periodicID != -1)
297 const coupledPolyPatch& perPp =
300 if (!perPp.parallel())
310 axis = cpp->rotationAxis();
311 axisPoint = cpp->rotationCentre();
318 axis = cpp->rotationAxis();
319 axisPoint = cpp->rotationCentre();
324 <<
" have unsupported periodicPatch " << perPp.name()
340 const word surfType(surfDict_.getOrDefault<
word>(
"type",
"none"));
342 if (!surfPtr_ && owner() && surfType !=
"none")
344 word surfName(surfDict_.getOrDefault(
"name",
name()));
355 mesh.time().constant(),
385 bool restoredFromCache =
false;
386 if (AMIPtr_->cacheActive())
388 const auto&
mesh = boundaryMesh().mesh();
389 const label comm =
mesh.comm();
403 Info<<
"AMI: Patch " <<
name() <<
" has no faces "
404 <<
"- deactivating cache" <<
endl;
405 AMIPtr_->cache().setSize(-1);
411 const label meshPointi = meshPoints()[0];
412 refPt =
points[meshPointi];
420 <<
"Attempted to use AMI caching on a static patch "
422 <<
". Potential patch ordering issue - "
423 <<
"flip owner and neighbour patches?"
434 refPt =
points[meshPoints()[0]];
439 Info<<
"AMI: Patch " <<
name() <<
" has no faces "
440 <<
"- deactivating cache" <<
endl;
441 AMIPtr_->cache().setSize(-1);
446 restoredFromCache = AMIPtr_->restoreCache(refPt);
451 Info<<
"AMI: Cached weights and addresses restored" <<
endl;
455 Info<<
"AMI: Cached weights and addresses unavailable" <<
endl;
462 Info<<
"AMI: Creating AMI for source:" <<
name()
463 <<
" and target:" << nbr.name() <<
endl;
472 label patchSize0 = size();
473 label nbrPatchSize0 = nbr.size();
478 if (srcFaceIDs_.size())
480 patchSize0 = srcFaceIDs_.size();
482 if (tgtFaceIDs_.size())
484 nbrPatchSize0 = tgtFaceIDs_.size();
489 transformPosition(nbrPoints);
504 OFstream osN(t.path()/
name() +
"_neighbourPatch-trans.obj");
512 AMIPtr_->upToDate(
false);
517 AMIPtr_->calculate(patch0, nbrPatch0, surfPtr());
524 AMIPtr_->addToCache(refPt);
532 const cyclicAMIPolyPatch& half0 = *
this;
536 half0Areas[facei] = half0[facei].areaNormal(half0.points());
543 half1Areas[facei] = half1[facei].areaNormal(half1.points());
556 <<
"calcTransforms() : patch: " <<
name() <<
nl
569 AMIPtr_->upToDate(
false);
609 restoreScaledGeometry();
615 AMIPtr_->upToDate(
false);
625 PstreamBuffers& pBufs,
675 AMIPtr_->upToDate(
false);
691 const word& patchType,
693 const word& defaultAMIMethod
701 rotationCentre_(
Zero),
702 rotationAngleDefined_(false),
704 separationVector_(
Zero),
705 periodicPatchName_(),
706 periodicPatchID_(-1),
710 createAMIFaces_(false),
711 moveFaceCentres_(false),
729 const word& patchType,
730 const word& defaultAMIMethod
734 nbrPatchName_(
dict.getOrDefault<
word>(
"neighbourPatch",
word::null)),
737 fraction_(
dict.getOrDefault<scalar>(
"fraction",
Zero)),
739 rotationCentre_(
Zero),
740 rotationAngleDefined_(false),
742 separationVector_(
Zero),
743 periodicPatchName_(
dict.getOrDefault<
word>(
"periodicPatch",
word::null)),
744 periodicPatchID_(-1),
749 dict.getOrDefault<
word>(
"AMIMethod", defaultAMIMethod),
751 dict.getOrDefault(
"flipNormals", false)
754 surfDict_(
dict.subOrEmptyDict(
"surface")),
756 createAMIFaces_(
dict.getOrDefault(
"createAMIFaces", false)),
757 moveFaceCentres_(false),
766 FatalIOErrorInFunction(dict)
767 <<
"No \"neighbourPatch\" or \"coupleGroup\" provided."
768 << exit(FatalIOError);
775 <<
" cannot be the same as this patch " <<
name
802 <<
"Please supply a non-zero vector."
830 <<
"createAMIFaces and AMI caching cannot be used together."
843 const cyclicAMIPolyPatch&
pp,
844 const polyBoundaryMesh& bm
847 coupledPolyPatch(
pp, bm),
848 nbrPatchName_(
pp.nbrPatchName_),
849 coupleGroup_(
pp.coupleGroup_),
851 fraction_(
pp.fraction_),
852 rotationAxis_(
pp.rotationAxis_),
853 rotationCentre_(
pp.rotationCentre_),
854 rotationAngleDefined_(
pp.rotationAngleDefined_),
855 rotationAngle_(
pp.rotationAngle_),
856 separationVector_(
pp.separationVector_),
857 periodicPatchName_(
pp.periodicPatchName_),
858 periodicPatchID_(-1),
859 AMIPtr_(
pp.AMIPtr_->clone()),
860 surfDict_(
pp.surfDict_),
862 createAMIFaces_(
pp.createAMIFaces_),
863 moveFaceCentres_(
pp.moveFaceCentres_),
881 const label newStart,
882 const word& nbrPatchName
886 nbrPatchName_(nbrPatchName),
887 coupleGroup_(
pp.coupleGroup_),
889 fraction_(
pp.fraction_),
890 rotationAxis_(
pp.rotationAxis_),
891 rotationCentre_(
pp.rotationCentre_),
892 rotationAngleDefined_(
pp.rotationAngleDefined_),
893 rotationAngle_(
pp.rotationAngle_),
894 separationVector_(
pp.separationVector_),
895 periodicPatchName_(
pp.periodicPatchName_),
896 periodicPatchID_(-1),
897 AMIPtr_(
pp.AMIPtr_->clone()),
898 surfDict_(
pp.surfDict_),
900 createAMIFaces_(
pp.createAMIFaces_),
901 moveFaceCentres_(
pp.moveFaceCentres_),
912 <<
" cannot be the same as this patch " <<
name()
923 const cyclicAMIPolyPatch&
pp,
924 const polyBoundaryMesh& bm,
930 coupledPolyPatch(
pp, bm, index, mapAddressing, newStart),
931 nbrPatchName_(
pp.nbrPatchName_),
932 coupleGroup_(
pp.coupleGroup_),
934 fraction_(
pp.fraction_),
935 rotationAxis_(
pp.rotationAxis_),
936 rotationCentre_(
pp.rotationCentre_),
937 rotationAngleDefined_(
pp.rotationAngleDefined_),
938 rotationAngle_(
pp.rotationAngle_),
939 separationVector_(
pp.separationVector_),
940 periodicPatchName_(
pp.periodicPatchName_),
941 periodicPatchID_(-1),
942 AMIPtr_(
pp.AMIPtr_->clone()),
943 surfDict_(
pp.surfDict_),
945 createAMIFaces_(
pp.createAMIFaces_),
946 moveFaceCentres_(
pp.moveFaceCentres_),
965 forAll (addSourceFaces, faceI)
967 const labelList& nbrFaceIs = addSourceFaces[faceI];
971 label nbrFaceI = nbrFaceIs[j];
973 if (nbrFaceI < neighbPatch().size())
990 if (nbrPatchID_ == -1)
992 nbrPatchID_ = this->
boundaryMesh().findPatchID(neighbPatchName());
994 if (nbrPatchID_ == -1)
997 <<
"Illegal neighbourPatch name " << neighbPatchName()
998 <<
nl <<
"Valid patch names are "
1010 if (nbrPatch.neighbPatchName() !=
name())
1013 <<
"Patch " <<
name()
1014 <<
" specifies neighbour patch " << neighbPatchName()
1015 <<
nl <<
" but that in return specifies "
1016 << nbrPatch.neighbPatchName() <<
endl;
1026 if (periodicPatchName_.empty())
1032 if (periodicPatchID_ == -1)
1034 periodicPatchID_ =
boundaryMesh().findPatchID(periodicPatchName_);
1036 if (periodicPatchID_ == -1)
1039 <<
"Illegal neighbourPatch name " << periodicPatchName_
1040 <<
nl <<
"Valid patch names are "
1045 return periodicPatchID_;
1068 <<
"AMI interpolator only available to owner patch"
1072 if (!AMIPtr_->upToDate())
1085 return AMI().applyLowWeightCorrection();
1089 return neighbPatch().AMI().applyLowWeightCorrection();
1108 else if (separated())
1139 forwardT().size() == 1
1153 else if (separated())
1157 separation().size() == 1
1159 : separation()[facei]
1177 reverseT().size() == 1
1191 else if (separated())
1195 separation().size() == 1
1197 : separation()[facei]
1215 reverseT().size() == 1
1272 reverseTransformPosition(prt, facei);
1275 reverseTransformDirection(nrt, facei);
1277 label nbrFacei = -1;
1281 nbrFacei = AMI().tgtPointFace
1292 nbrFacei = neighbPatch().AMI().srcPointFace
1314 if (!nbrPatchName_.empty())
1316 os.writeEntry(
"neighbourPatch", nbrPatchName_);
1318 coupleGroup_.write(
os);
1327 if (rotationAngleDefined_)
1349 if (!periodicPatchName_.empty())
1356 if (!surfDict_.empty())
1358 surfDict_.writeEntry(surfDict_.dictName(),
os);
1361 if (createAMIFaces_)
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
Interpolation class dealing with transfer of data between two primitive patches with an arbitrary mes...
@ MUST_READ
Reading required.
@ NO_WRITE
Ignore writing from objectRegistry::writeObject().
Defines the attributes of an object for which implicit objectRegistry management is supported,...
void setSize(label n)
Alias for resize().
Output to file stream as an OSstream, normally using std::ofstream for the actual output.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
Ostream & writeEntryIfDifferent(const word &key, const T &value1, const T &value2)
Write a keyword/value entry only when the two values differ.
const labelList & meshPoints() const
const Field< point_type > & points() const noexcept
virtual void movePoints(const Field< point_type > &)
const List< face_type > & localFaces() const
Buffers for inter-processor communications streams (UOPstream, UIPstream).
A non-owning sub-view of a List (allocated or unallocated storage).
static const SubList< face > & null() noexcept
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
fileName path() const
The path for the case = rootPath/caseName.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
static int myProcNo(const label communicator=worldComm)
Rank of this process in the communicator (starting from masterNo()). Negative if the process is not a...
static bool parRun(const bool on) noexcept
Set as parallel run on/off.
static int & msgType() noexcept
Message tag of standard messages.
static bool & parRun() noexcept
Test if this a parallel run.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
static autoPtr< T > New(Args &&... args)
Construct autoPtr with forwarding arguments.
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface....
const bMesh & mesh() const
bool good() const noexcept
The patchGroup has a non-empty name.
The coupledPolyPatch is an abstract base class for patches that couple regions of the computational d...
virtual transformType transform() const
Type of transform.
virtual const tensorField & reverseT() const
Return neighbour-cell transformation tensor.
virtual bool separated() const
Are the planes separated.
virtual bool parallel() const
Are the cyclic planes parallel.
virtual void write(Ostream &os) const
Write the polyPatch data as a dictionary.
virtual const boolList & collocated() const
Are faces collocated. Either size 0,1 or length of patch.
virtual const vectorField & separation() const
If the planes are separated the separation vector.
coupledPolyPatch(const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm, const word &patchType, const transformType transform)
Construct from components.
virtual const tensorField & forwardT() const
Return face transformation tensor.
Cyclic patch for Arbitrary Mesh Interface (AMI).
scalar rotationAngle_
Rotation angle.
virtual autoPtr< polyPatch > clone(const polyBoundaryMesh &bm) const
Construct and return a clone, resetting the boundary mesh.
virtual void updateMesh(PstreamBuffers &)
Update of the patch topology.
vector separationVector_
Translation vector.
word nbrPatchName_
Name of other half.
autoPtr< coordSystem::cylindrical > cylindricalCS() const
Create a coordinate system from the periodic patch (or nullptr).
virtual void resetAMI() const
Reset the AMI interpolator, use current patch points.
bool createAMIFaces_
Flag to indicate that new AMI faces will created.
virtual void initMovePoints(PstreamBuffers &pBufs, const pointField &)
Initialise the patches for moving points.
label pointFace(const label facei, const vector &n, point &p) const
Return face index on neighbour patch which shares point p following trajectory vector n.
const word & neighbPatchName() const
Neighbour patch name.
virtual bool owner() const
Does this side own the patch?
autoPtr< searchableSurface > surfPtr_
Projection surface.
const scalar fraction_
Particle displacement fraction across AMI.
virtual void write(Ostream &) const
Write the polyPatch data as a dictionary.
vectorField faceCentres0_
Temporary storage for AMI face centres.
virtual void restoreScaledGeometry()
Helper to re-apply the geometric scaling lost during mesh updates.
label periodicPatchID_
Periodic patch.
virtual void clearGeom()
Clear geometry.
virtual void calcGeometry(PstreamBuffers &)
Calculate the patch geometry.
const dictionary surfDict_
Dictionary used during projection surface construction.
virtual void movePoints(PstreamBuffers &pBufs, const pointField &)
Correct patches after moving points.
virtual void newInternalProcFaces(label &, label &) const
Return number of new internal of this polyPatch faces.
virtual void initGeometry(PstreamBuffers &)
Initialise the calculation of the patch geometry.
vectorField faceAreas0_
Temporary storage for AMI face areas.
virtual void initOrder(PstreamBuffers &, const primitivePatch &) const
Initialize ordering for primitivePatch. Does not refer to *this (except for name() and type() etc....
virtual void reverseTransformDirection(vector &d, const label facei) const
Transform a patch-based direction from this side to nbr side.
const AMIPatchToPatchInterpolation & AMI() const
Return a reference to the AMI interpolator.
point rotationCentre_
Point on axis of rotation for rotational cyclics.
virtual const cyclicAMIPolyPatch & neighbPatch() const
Return a reference to the neighbour patch.
virtual void setAMIFaces()
Set properties of newly inserted faces after topological changes.
labelListList tgtFaceIDs_
word periodicPatchName_
Periodic patch name.
virtual void transformPosition(pointField &) const
Transform patch-based positions from nbr side to this side.
label nbrPatchID_
Index of other half.
labelListList srcFaceIDs_
static const scalar tolerance_
Tolerance used e.g. for area calculations/limits.
const autoPtr< searchableSurface > & surfPtr() const
Create and return pointer to the projection surface.
bool rotationAngleDefined_
Flag to show whether the rotation angle is defined.
virtual bool order(PstreamBuffers &, const primitivePatch &, labelList &faceMap, labelList &rotation) const
Return new ordering for primitivePatch.
virtual void initUpdateMesh(PstreamBuffers &)
Initialise the update of the patch topology.
bool applyLowWeightCorrection() const
Return true if applying the low weight correction.
cyclicAMIPolyPatch(const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm, const word &patchType, const transformType transform=UNKNOWN, const word &defaultAMIMethod=faceAreaWeightAMI::typeName)
Construct from (base coupled patch) components.
virtual void resetAMI(const UList< point > &points) const
Reset the AMI interpolator, supply patch points.
const coupleGroupIdentifier coupleGroup_
Optional patchGroup to find neighbPatch.
vector rotationAxis_
Axis of rotation for rotational cyclics.
virtual void reverseTransformPosition(point &l, const label facei) const
Transform a patch-based position from this side to nbr side.
autoPtr< AMIPatchToPatchInterpolation > AMIPtr_
AMI interpolation class.
bool moveFaceCentres_
Move face centres (default = no).
label periodicPatchID() const
Periodic patch ID (or -1).
virtual void calcTransforms()
Recalculate the transformation tensors.
virtual label neighbPatchID() const
Neighbour patch ID.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A class for handling file names.
label index() const noexcept
The index of this patch in the boundaryMesh.
const word & name() const noexcept
The patch name.
A polyBoundaryMesh is a polyPatch list with registered IO, a reference to the associated polyMesh,...
Mesh consisting of general polyhedral cells.
virtual const pointField & oldPoints() const
Return old points (mesh motion).
A patch is a list of labels that address the faces in the global face list.
virtual void updateMesh(PstreamBuffers &)
Update of the patch topology.
virtual void initGeometry(PstreamBuffers &)
Initialise the calculation of the patch geometry.
virtual void clearGeom()
Clear geometry.
const vectorField::subField faceCentres() const
Return face centres.
virtual void initUpdateMesh(PstreamBuffers &)
Initialise the update of the patch topology.
label start() const noexcept
Return start label of this patch in the polyMesh face list.
static autoPtr< searchableSurface > New(const word &surfaceType, const IOobject &io, const dictionary &dict)
Return a reference to the selected searchableSurface.
Tensor of scalars, i.e. Tensor<scalar>.
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.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
OBJstream os(runTime.globalPath()/outputName)
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
#define WarningInFunction
Report a warning using Foam::Warning.
#define DebugInFunction
Report an information message using Foam::Info.
#define DebugPout
Report an information message using Foam::Pout.
Namespace for handling debugging switches.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
Type & refCast(U &obj)
A dynamic_cast (for references) to Type reference.
bool returnReduceOr(const bool value, const int communicator=UPstream::worldComm)
Perform logical (or) MPI Allreduce on a copy. Uses UPstream::reduceOr.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh > > &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
Type gSum(const FieldField< Field, Type > &f)
List< labelList > labelListList
List of labelList.
List< label > labelList
A List of labels.
dimensionedScalar sin(const dimensionedScalar &ds)
refinementData transform(const tensor &, const refinementData val)
No-op rotational transform for base types.
messageStream Info
Information stream (stdout output on master, null elsewhere).
PrimitivePatch< SubList< face >, const pointField & > primitivePatch
A PrimitivePatch with a SubList addressing for the faces, const reference for the point field.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Ostream & endl(Ostream &os)
Add newline and flush stream.
constexpr scalar degToRad() noexcept
Multiplication factor for degrees to radians conversion.
dimensionedScalar sqrt(const dimensionedScalar &ds)
const Type * isA(const U &obj)
Attempt dynamic_cast to Type.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
constexpr scalar radToDeg() noexcept
Multiplication factor for radians to degrees conversion.
void reduce(T &value, BinaryOp bop, const int tag=UPstream::msgType(), const int communicator=UPstream::worldComm)
Reduce inplace (cf. MPI Allreduce).
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
AMIInterpolation AMIPatchToPatchInterpolation
Patch-to-patch interpolation == Foam::AMIInterpolation.
errorManip< error > abort(error &err)
Field< vector > vectorField
Specialisation of Field<T> for vector.
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...
vector point
Point is a vector.
List< bool > boolList
A List of bools.
static constexpr const zero Zero
Global zero (0).
Field< tensor > tensorField
Specialisation of Field<T> for tensor.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
vectorField pointField
pointField is a vectorField.
label findMax(const ListType &input, label start=0)
Linear search for the index of the max element, similar to std::max_element but for lists and returns...
errorManipArg< error, int > exit(error &err, const int errNo=1)
UList< label > labelUList
A UList of labels.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
dimensionedScalar cos(const dimensionedScalar &ds)
dimensionedScalar acos(const dimensionedScalar &ds)
constexpr char nl
The newline '\n' character (0x0a).
#define forAll(list, i)
Loop across all elements in list.
Unit conversion functions.