66 { sampleMode::NEARESTCELL,
"nearestCell" },
67 { sampleMode::NEARESTPATCHFACE,
"nearestPatchFace" },
68 { sampleMode::NEARESTPATCHFACEAMI,
"nearestPatchFaceAMI" },
69 { sampleMode::NEARESTPATCHPOINT,
"nearestPatchPoint" },
70 { sampleMode::NEARESTFACE,
"nearestFace" },
71 { sampleMode::NEARESTONLYCELL,
"nearestOnlyCell" },
81 { offsetMode::UNIFORM,
"uniform" },
83 { offsetMode::NORMAL,
"normal" },
100 if (
dict.found(
"sampleDatabase"))
102 if (
dict.get<
bool>(
"sampleDatabase"))
108 "sampleDatabasePath",
114 else if (
dict.
found(
"sampleDatabasePath"))
159 (void)
mesh.tetBasePtIs();
163 auto& facePoints = tfacePoints.ref();
181 const label mySampleWorld,
192 const label myComm = getCommunicator();
201 <<
"[rank=" << myRank <<
" procs=" << nProcs
202 <<
" comm=" << myComm <<
"] collect samples" <<
endl;
208 globalFc[myRank] = facePoints;
222 globalSamples[myRank] = samplePoints(facePoints);
235 globalFaces[myRank] =
identity(patch_.size());
256 patchFaceWorlds.resize(patchFaces.size());
257 patchFaceProcs.resize(patchFaces.size());
262 for (label i = 0; i < nPerProc[proci]; i++)
264 patchFaceWorlds[sampleI] = procToWorldIndex[proci];
265 patchFaceProcs[sampleI] = proci;
278 const sampleMode
mode,
280 const label mySampleWorld,
281 const word& sampleRegion,
282 const word& samplePatch,
285 List<nearInfoWorld>& nearest
290 const label myComm = getCommunicator();
296 const polyMesh&
mesh = lookupMesh(sampleRegion);
299 nearest.setSize(
samples.size());
302 miss.first().second() = Tuple2<scalar, label>(
Foam::sqr(GREAT), -1);
311 if (samplePatch.size() && samplePatch !=
"none")
314 <<
"No need to supply a patch name when in "
324 nearInfoWorld& near = nearest[sampleI];
326 label celli =
tree.findInside(sample);
330 near.first().second().first() =
Foam::sqr(GREAT);
331 near.first().second().second() = myRank;
332 near.second() = mySampleWorld;
344 near.first().second().first() = sample.distSqr(cc);
345 near.first().second().second() = myRank;
346 near.second() = mySampleWorld;
352 case NEARESTONLYCELL:
354 if (samplePatch.size() && samplePatch !=
"none")
357 <<
"No need to supply a patch name when in "
367 nearInfoWorld& near = nearest[sampleI];
369 near.
first().first() =
tree.findNearest(sample,
sqr(GREAT));
371 near.first().second().first() =
372 near.first().first().hitPoint().distSqr(sample);
374 near.first().second().second() = myRank;
375 near.second() = mySampleWorld;
380 case NEARESTPATCHFACE:
384 const polyPatch&
pp = lookupPatch(sampleRegion, samplePatch);
390 nearInfoWorld& near = nearest[sampleI];
391 near.first().second().first() =
Foam::sqr(GREAT);
392 near.first().second().second() = myRank;
393 near.second() = mySampleWorld;
417 const auto& treeData = boundaryTree.shapes();
423 nearInfoWorld& near = nearest[sampleI];
425 nearInfo = boundaryTree.findNearest
433 near.first().second().first() =
Foam::sqr(GREAT);
434 near.first().second().second() = myRank;
435 near.second() = mySampleWorld;
439 const point& fc = treeData.centre(nearInfo.index());
441 nearInfo.setPoint(fc);
442 near.first().second().first() = sample.distSqr(fc);
443 near.first().second().second() = myRank;
444 near.second() = mySampleWorld;
451 case NEARESTPATCHPOINT:
455 const polyPatch&
pp = lookupPatch(sampleRegion, samplePatch);
461 nearInfoWorld& near = nearest[sampleI];
462 near.first().second().first() =
Foam::sqr(GREAT);
463 near.first().second().second() = myRank;
464 near.second() = mySampleWorld;
495 nearInfoWorld& near = nearest[sampleI];
497 nearInfo = boundaryTree.findNearest
505 near.first().second().first() =
Foam::sqr(GREAT);
506 near.first().second().second() = myRank;
507 near.second() = mySampleWorld;
511 const point& pt = nearInfo.point();
513 near.first().second().first() = sample.distSqr(pt);
514 near.first().second().second() = myRank;
515 near.second() = mySampleWorld;
524 if (samplePatch.size() && samplePatch !=
"none")
527 <<
"No need to supply a patch name when in "
538 nearInfoWorld& near = nearest[sampleI];
540 label facei = meshSearchEngine.findNearestFace(sample);
544 near.first().second().first() =
Foam::sqr(GREAT);
545 near.first().second().second() = myRank;
546 near.second() = mySampleWorld;
553 near.first().second().first() = sample.distSqr(fc);
554 near.first().second().second() = myRank;
555 near.second() = mySampleWorld;
561 case NEARESTPATCHFACEAMI:
621 nearest[samplei].second() = wantedWorlds[samplei];
628 forAll(wantedWorlds, samplei)
630 if (wantedWorlds[samplei] == myWorld)
639 labelList localOrigProcs(origProcs, localMap);
642 const word localOrigPatch(samplePatches[localOrigProcs[0]]);
643 const word localOrigRegion(sampleRegions[localOrigProcs[0]]);
648 Pout<<
"Searching locally for " << localSamples.
size()
649 <<
" samples on region:" << localOrigRegion
650 <<
" on patch:" << localOrigPatch <<
endl;
705 sampleProcs[sampleI] = -1;
706 sampleIndices[sampleI] = -1;
711 sampleProcs[sampleI] = ni.
second().second();
713 sampleLocations[sampleI] = ni.
first().
point();
726 static bool hasWarned =
false;
739 (void)
patch_.boundaryMesh().mesh().tetBasePtIs();
789 bool coincident = (
gAverage(
mag(d)) <= ROOTVSMALL);
791 if (sampleMyself && coincident)
794 <<
"Invalid offset " << d <<
endl
795 <<
"Offset is the vector added to the patch face centres to"
796 <<
" find the patch face supplying the data." <<
endl
797 <<
"Setting it to " << d
798 <<
" on the same patch, on the same region"
799 <<
" will find the faces themselves which does not make sense"
800 <<
" for anything but testing." <<
endl
865 forAll(sampleProcs, sampleI)
867 if (sampleProcs[sampleI] == -1)
879 <<
"Did not find " << nNotFound
880 <<
" out of " << sampleProcs.
size() <<
" total samples."
881 <<
" Sampling these on owner cell centre instead." <<
endl
882 <<
"On patch " <<
patch_.name()
886 <<
". Suppressing further warnings from " <<
type() <<
endl;
893 forAll(sampleProcs, sampleI)
895 if (sampleProcs[sampleI] == -1)
936 if (sampleProcs[i] == -1)
939 << patchFc[i] <<
" on patch " <<
patch_.name()
941 <<
patch_.boundaryMesh().mesh().name()
942 <<
" on processor " << patchFaceProcs[i]
967 patch_.boundaryMesh().mesh().time().path()
971 Pout<<
"Dumping mapping as lines from patch faceCentres to"
972 <<
" sampled cell/faceCentres/points to file " << str.
name()
983 str <<
"l " << vertI-1 <<
' ' << vertI <<
nl;
999 constructMap[proci] =
labelUIndList(patchFaces, constructMap[proci]);
1003 Pout<<
"To proc:" << proci <<
" sending values of cells/faces:"
1004 << subMap[proci] <<
endl;
1005 Pout<<
"From proc:" << proci
1006 <<
" receiving values of patch faces:"
1007 << constructMap[proci] <<
endl;
1019 forAll(constructMap, proci)
1025 label facei =
map[i];
1027 if (used.
test(facei))
1030 <<
"On patch " <<
patch_.name()
1031 <<
" patchface " << facei
1032 <<
" is assigned to more than once."
1043 if (!used.
test(facei))
1046 <<
"On patch " <<
patch_.name()
1047 <<
" patchface " << facei
1048 <<
" is never assigned to."
1067 if (!
surfPtr_ && surfType !=
"none")
1080 mesh.time().constant(),
1099 <<
"AMI already up-to-date"
1147 label oldWarnComm(-1);
1148 label oldWorldComm(-1);
1209 if (index ==
names.size()-1)
1275 const vector& uniformOffset
1297 const scalar normalDistance
1414 else if (
dict.found(
"offsets"))
1422 <<
"Please supply the offsetMode as one of "
1483 <<
"Construct from sampleMode and dictionary only applicable for "
1484 <<
" collocated patches in modes "
1694 bool sampleUpToDate =
1703 auto checkPointMovement = []
1711 const auto& oldPoints =
mesh.oldPoints();
1714 for (
const label pointi : patch.meshPoints())
1716 const point& oldPt = oldPoints[pointi];
1719 if (
mag(oldPt - currentPt) > SMALL)
1730 state.setUpToDate();
1737 if (!thisUpToDate && thisMesh.
moving())
1756 sampleUpToDate = checkPointMovement
1764 return (thisUpToDate && sampleUpToDate);
1774 auto&
fld = tfld.ref();
1816 const point& fc =
mesh.faceCentres()[facei];
1845 const label celli =
mesh.faceOwner()[facei];
1846 const point& cc =
mesh.cellCentres()[celli];
1849 const label fp0 =
mesh.tetBasePtIs()[facei];
1850 const point& basePoint =
p[
f[fp0]];
1852 label fp =
f.fcIndex(fp0);
1853 for (label i = 2; i <
f.size(); i++)
1855 const point& thisPoint =
p[
f[fp]];
1856 label nextFp =
f.fcIndex(fp);
1857 const point& nextPoint =
p[
f[nextFp]];
1859 const triPointRef tri(basePoint, thisPoint, nextPoint);
1900 cleanedPath.
clean();
1921 return root/
"send"/processorName;
1938 return root/
"receive"/processorName;
2042 "sampleDatabasePath",
Macros for easy insertion into run-time selection tables.
Info<< nl;Info<< "Write faMesh in vtk format:"<< nl;{ vtk::uindirectPatchWriter writer(aMesh.patch(), fileName(aMesh.time().globalPath()/vtkBaseFileName));writer.writeGeometry();globalIndex procAddr(aMesh.nFaces());labelList cellIDs;if(UPstream::master()) { cellIDs.resize(procAddr.totalSize());for(const labelRange &range :procAddr.ranges()) { auto slice=cellIDs.slice(range);slice=identity(range);} } writer.beginCellData(4);writer.writeProcIDs();writer.write("cellID", cellIDs);writer.write("area", aMesh.S().field());writer.write("normal", aMesh.faceAreaNormals());writer.beginPointData(1);writer.write("normal", aMesh.pointAreaNormals());Info<< " "<< writer.output().name()<< nl;}{ vtk::lineWriter writer(aMesh.points(), aMesh.edges(), fileName(aMesh.time().globalPath()/(vtkBaseFileName+"-edges")));writer.writeGeometry();writer.beginCellData(4);writer.writeProcIDs();{ Field< scalar > fld(faMeshTools::flattenEdgeField(aMesh.magLe(), true))
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
Interpolation class dealing with transfer of data between two primitive patches with an arbitrary mes...
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
void append(const T &val)
Copy append an element to the end of this list.
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
Minimal example by using system/controlDict.functions:
bool test(const Key &key) const
Same as contains() - return true if key exists in the set.
bool set(const Key &key)
Same as insert (no value to overwrite).
@ MUST_READ
Reading required.
@ NO_WRITE
Ignore writing from objectRegistry::writeObject().
Defines the attributes of an object for which implicit objectRegistry management is supported,...
const word & name() const noexcept
Return the object name.
An input stream of tokens.
bool empty() const noexcept
True if the list is empty (ie, size() is zero).
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void setSize(label n)
Alias for resize().
void resize(const label len)
Adjust allocated size of list.
static FOAM_NO_DANGLING_REFERENCE const meshSearchMeshObject & New(const polyMesh &mesh, Args &&... args)
Output to file stream as an OSstream, normally using std::ofstream for the actual output.
virtual const fileName & name() const override
Read/write access to the name of the stream.
virtual const fileName & name() const override
Get the name of the output serial stream. (eg, the name of the Fstream file name).
A simple output token stream that can be used to build token lists. Always UNCOMPRESSED.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
scalar distance() const noexcept
Return distance to hit.
bool hit() const noexcept
Is there a hit.
const point_type & point() const noexcept
Return the point, no checks.
label index() const noexcept
Return the hit index.
bool hit() const noexcept
Is there a hit?
const point_type & point() const noexcept
Return point, no checks.
const labelList & meshPoints() const
Return labelList of mesh points in patch.
const Field< point_type > & localPoints() const
Return pointField of points in patch.
const Field< point_type > & points() const noexcept
Return reference to global points.
const List< face_type > & localFaces() const
Return patch faces addressing into local point list.
Buffers for inter-processor communications streams (UOPstream, UIPstream).
static void allGatherList(UList< T > &values, const int tag=UPstream::msgType(), const int communicator=UPstream::worldComm)
Gather data, but keep individual values separate. Uses MPI_Allgather or manual communication.
static void listCombineReduce(UList< T > &values, CombineOp cop, const int tag=UPstream::msgType(), const int communicator=UPstream::worldComm)
Forwards to Pstream::listReduce with an in-place cop.
A non-owning sub-view of a List (allocated or unallocated storage).
static const char * name(bool b) noexcept
A string representation of bool as "false" / "true".
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A 2-tuple for storing two objects of dissimilar types. The container is similar in purpose to std::pa...
const T1 & first() const noexcept
Access the first element.
const T2 & second() const noexcept
Access the second element.
A List with indirect addressing. Like IndirectList but does not store addressing.
T & first()
Access first element of the list, position [0].
void size(const label n)
Older name for setAddressableSize.
label find(const T &val) const
Find index of the first occurrence of the value.
static label commWorld() noexcept
Communicator for all ranks (respecting any local worlds).
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 int & msgType() noexcept
Message tag of standard messages.
static void reduceAnd(bool &value, const int communicator=worldComm)
Logical (and) reduction (MPI_AllReduce).
static bool master(const label communicator=worldComm)
True if process corresponds to the master rank in the communicator.
static label nProcs(const label communicator=worldComm)
Number of ranks in parallel run (for given communicator). It is 1 for serial run.
static label myWorldID()
My worldID.
static label commWarn(const label communicator) noexcept
Alter communicator debugging setting. Warns for use of any communicator differing from specified....
static const wordList & allWorlds() noexcept
All worlds.
static List< T > allGatherValues(const T &localValue, const int communicator=UPstream::worldComm)
Allgather individual values into list locations.
static const word & myWorld()
My world.
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.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
scalar magSqr() const
The magnitude/length squared of bounding box diagonal.
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface....
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
bool found(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find an entry (const access) with the given keyword.
A keyword and a list of tokens is an 'entry'.
Face area weighted Arbitrary Mesh Interface (AMI) method.
A face is a list of labels corresponding to mesh vertices.
A class for handling file names.
wordList components(const char delim='/') const
Return path components as wordList.
static bool clean(std::string &str)
Cleanup filename string, possibly applies other transformations such as changing the path separator e...
static const fileName null
An empty fileName.
Non-pointer based hierarchical recursive searching.
const Type & shapes() const noexcept
Reference to shape.
Class containing processor-to-processor mapping information.
Determines a mapping between patch face centres and mesh cell or face centres and processors they're ...
const fileName & sampleDatabasePath() const
label communicator_
Communicator.
virtual void updateMesh(PstreamBuffers &)
Update of the patch topology.
tmp< pointField > facePoints(const polyPatch &) const
Get the points from face-centre-decomposition face centres and project them onto the face-diagonal-de...
label getWorldCommunicator() const
Get the communicator for the world-world connection.
tmp< pointField > samplePoints(const pointField &) const
Get the sample points given the face points.
const mapDistribute & map() const
Return reference to the parallel distribution map.
scalar distance_
Offset distance (normal).
uniformDimensionedScalarField & updateSampleMeshTime() const
Local mesh update time.
static FOAM_NO_DANGLING_REFERENCE const objectRegistry & subRegistry(const objectRegistry &obr, const wordList &names, const label index)
Lookup (sub)objectRegistry by following names of sub registries. Creates non-existing intermediate on...
const polyPatch & patch_
Patch to sample.
autoPtr< searchableSurface > surfPtr_
Pointer to projection surface employed by AMI interpolator.
vectorField offsets_
Offset vector (nonuniform).
const vectorField & offsets() const noexcept
Offset vectors (from patch faces to destination mesh objects).
void findSamples(const sampleMode mode, const label myWorldIndex, const pointField &, const labelList &wantedWorlds, const labelList &origProcs, labelList &sampleProcs, labelList &sampleIndices, pointField &sampleLocations) const
Find (global) cells/faces containing samples.
Tuple2< pointIndexHit, Tuple2< scalar, label > > nearInfo
Helper class for finding nearest.
uniformDimensionedScalarField & updateMeshTime() const
Sample mesh upate time.
static void readDict(const dictionary &d, objectRegistry &obr)
(recursively) construct and register IOFields from dictionary
sampleMode
Mesh items to sample.
@ NEARESTPATCHPOINT
nearest point on selected patch
@ NEARESTONLYCELL
nearest cell (even if not containing cell)
@ NEARESTCELL
nearest cell containing sample
@ NEARESTPATCHFACE
nearest face on selected patch
@ NEARESTPATCHFACEAMI
nearest patch face + AMI interpolation
@ NEARESTFACE
nearest face
void findLocalSamples(const sampleMode mode, const label sampleWorld, const word &sampleRegion, const word &samplePatch, const pointField &samplePoints, List< nearInfoWorld > &nearest) const
Find (local) cells/faces containing samples.
const bool AMIReverse_
Flag to indicate that slave patch should be reversed for AMI.
void calcAMI() const
Calculate AMI interpolator.
static fileName sendPath(const fileName &root, const label proci)
Helper: return path to store data to be sent to processor i.
static autoPtr< fileName > readDatabase(const dictionary &dict)
Read optional database name from dictionary.
static const Enum< sampleMode > sampleModeNames_
const polyPatch & lookupPatch(const word &sampleRegion, const word &samplePatch) const
Lookup patch.
const sampleMode mode_
What to sample.
const polyMesh & sampleMesh() const
Get the region mesh.
virtual void write(Ostream &os) const
Write as a dictionary.
bool sameRegion_
Same region.
word sampleRegion_
Region to sample.
static bool writeIOField(const regIOobject &obj, dictionary &dict)
Attempt to detect an IOField<Type> and write to dictionary.
tmp< pointField > samplePoints() const
Get the sample points.
bool addWorldConnection()
Add a world-world connection.
word samplePatch_
Patch (if in sampleMode NEARESTPATCH*).
autoPtr< mapDistribute > mapPtr_
Communication schedule:
const polyPatch & samplePolyPatch() const
Get the patch on the region.
mappedPatchBase(const polyPatch &)
Construct from patch.
void collectSamples(const label mySampleWorld, const pointField &facePoints, pointField &samples, labelList &patchFaceWorlds, labelList &patchFaceProcs, labelList &patchFaces, pointField &patchFc) const
Collect single list of samples and originating processor+face + wanted world.
const autoPtr< Foam::searchableSurface > & surfPtr() const
Return a pointer to the AMI projection surface.
bool masterWorld() const
Is my world ordered before the sampleWorld?
static fileName receivePath(const fileName &root, const label proci)
Helper: return path to store data to be received from processor i.
label getCommunicator() const
Get the communicator (worldComm or world-to-world).
offsetMode
How to project face centres.
@ NORMAL
use face normal + distance
@ UNIFORM
single offset vector
@ NONUNIFORM
per-face offset vector
const word & sampleWorld() const noexcept
World to sample.
dictionary surfDict_
Dictionary storing projection surface description.
static bool constructIOField(const word &name, token &tok, Istream &is, objectRegistry &obr)
Attempt to read an IOField<Type> and store on objectRegistry.
const word & samplePatch() const
Patch (only if NEARESTPATCHFACE).
static const Enum< offsetMode > offsetModeNames_
virtual ~mappedPatchBase()
Destructor.
void calcMapping() const
Calculate mapping.
static pointIndexHit facePoint(const polyMesh &, const label facei, const polyMesh::cellDecomposition)
Get a point on the face given a face decomposition method:
Tuple2< nearInfo, label > nearInfoWorld
nearest + world
sampleMode mode() const noexcept
What to sample.
const coupleGroupIdentifier coupleGroup_
PatchGroup (if in sampleMode NEARESTPATCH*).
const word & sampleRegion() const
Region to sample.
void setOffset(const scalar normalDist)
Change to normal offset with given distance.
const autoPtr< fileName > sampleDatabasePtr_
Empty or location of database.
const polyMesh & lookupMesh(const word ®ion) const
Lookup mesh.
vector offset_
Offset vector (uniform).
offsetMode offsetMode_
How to obtain samples.
bool sameWorld() const
Is sample world the local world?
static void writeDict(const objectRegistry &obr, dictionary &dict)
Convert objectRegistry contents into dictionary.
autoPtr< AMIPatchToPatchInterpolation > AMIPtr_
Pointer to AMI interpolator.
word sampleWorld_
World to sample.
MeshObject wrapper around meshSearch(mesh).
label findNearestFace(const point &location, const label seedFacei=-1, const bool useTreeSearch=true) const
Centralized handling of multi-world MPI connections.
label getCommByName(const word &otherWorld) const
Get communicator for myWorld to other world connection by NAME.
static const multiWorldConnections & New(const Time &runTime)
Access mesh object.
Registry of regIOobjects.
const Time & time() const noexcept
Return time registry.
const objectRegistry & subRegistry(const word &name, const bool forceCreate=false, const bool recursive=false) const
Lookup and return a const sub-objectRegistry.
const Type & lookupObject(const word &name, const bool recursive=false) const
Lookup and return const reference to the object of the given Type. Fatal if not found or the wrong ty...
label findPatchID(const word &patchName, const bool allowNotFound=true) const
Find patch index given a name, return -1 if not found.
wordList names() const
Return a list of patch names.
Mesh consisting of general polyhedral cells.
const polyBoundaryMesh & boundaryMesh() const noexcept
Return boundary mesh.
cellDecomposition
Enumeration defining the decomposition of the cell for.
bool moving() const noexcept
Is mesh moving.
virtual bool upToDatePoints(const regIOobject &io) const
Return true if io is up-to-date with points.
virtual const pointField & points() const
Return raw points.
const indexedOctree< treeDataCell > & cellTree() const
Return the cell search tree.
A patch is a list of labels that address the faces in the global face list.
A keyword and a list of tokens comprise a primitiveEntry. A primitiveEntry can be read,...
const vectorField & faceCentres() const
const vectorField & cellCentres() const
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
virtual bool writeData(Ostream &) const =0
Pure virtual writeData function.
static autoPtr< searchableSurface > New(const word &surfaceType, const IOobject &io, const dictionary &dict)
Return a reference to the selected searchableSurface.
A class for managing temporary objects.
static tmp< T > New(Args &&... args)
Construct tmp with forwarding arguments.
A token holds an item read from Istream.
Standard boundBox with extra functionality for use in octree.
treeBoundBox extend(Random &rndGen, const scalar s) const
Return slightly wider bounding box.
Encapsulation of data for searching on faces.
Holds (reference to) pointField. Encapsulation of data needed for octree searches....
pointHit intersection(const point &p, const vector &q, const intersection::algorithm alg, const scalar tol=0.0) const
Fast intersection with a ray.
A class for handling words, derived from Foam::string.
static const word null
An empty word.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
fileName path(UMean.rootPath()/UMean.caseName()/"graphs"/UMean.instance())
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
OBJstream os(runTime.globalPath()/outputName)
#define WarningInFunction
Report a warning using Foam::Warning.
#define DebugInFunction
Report an information message using Foam::Info.
AccessType combine(const UList< T > &lists, AccessOp aop=accessOp< T >())
Combines sub-lists into a single list.
Namespace for handling debugging switches.
Type gAverage(const FieldField< Field, Type > &f, const label comm)
The global arithmetic average of a FieldField.
List< word > wordList
List of word.
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.
List< labelList > labelListList
List of labelList.
PointHit< point > pointHit
A PointHit with a 3D point.
List< label > labelList
A List of labels.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
prefixOSstream Perr
OSstream wrapped stderr (std::cerr) with parallel prefix.
UIndirectList< label > labelUIndList
UIndirectList of labels.
label facePoint(const int facei, const block &block, const label i, const label j)
PrimitivePatch< SubList< face >, const pointField & > primitivePatch
A PrimitivePatch with a SubList addressing for the faces, const reference for the point field.
mode_t mode(const fileName &name, const bool followLink=true)
Return the file mode, normally following symbolic links.
List< face > faceList
List of faces.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
const word GlobalIOList< Tuple2< scalar, vector > >::typeName("scalarVectorTable")
Ostream & endl(Ostream &os)
Add newline and flush stream.
const Type * isA(const U &obj)
Attempt dynamic_cast to Type.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
void reduce(T &value, BinaryOp bop, const int tag=UPstream::msgType(), const int communicator=UPstream::worldComm)
Reduce inplace (cf. MPI Allreduce).
labelList identity(const label len, label start=0)
Return an identity map of the given length with (map[i] == i), works like std::iota() but returning a...
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.
static constexpr const zero Zero
Global zero (0).
triangle< point, const point & > triPointRef
A triangle using referred points.
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.
PointIndexHit< point > pointIndexHit
A PointIndexHit with a 3D point.
errorManipArg< error, int > exit(error &err, const int errNo=1)
UList< label > labelUList
A UList of labels.
constexpr char nl
The newline '\n' character (0x0a).
Tree tree(triangles.begin(), triangles.end())
#define forAll(list, i)
Loop across all elements in list.
#define forAllIters(container, iter)
Iterate across all elements in the container object.
Object access operator or list access operator (default is pass-through).
scalarField samples(nIntervals, Zero)