77 pName += mesh0.
name();
79 pName += mesh1.
name();
86 const word& entryName,
87 const word& AMIMethod,
122 const auto& ppi =
meshes[meshi].boundaryMesh()[patchesi[i]];
126 const auto& ppj =
meshes[meshj].boundaryMesh()[patchesj[j]];
131 AMPtr->calculate(ppi, ppj,
nullptr);
134 gAverage(AMPtr->tgtWeightsSum()) > SMALL
135 ||
gAverage(AMPtr->srcWeightsSum()) > SMALL
138 const label inti = interfaceMesh0.
size();
140 Info<<
"Introducing interface " << inti <<
" between"
141 <<
" mesh " <<
meshes[meshi].name()
143 <<
" patch " << ppi.name()
144 <<
" and mesh " <<
meshes[meshj].name()
146 <<
" patch " << ppj.name()
152 auto& intMesh0 = interfaceMesh0.
emplace_back(nSourcei, -1);
153 intMesh0[sourcei] = meshi;
157 auto& intPatch0 = interfacePatch0.
emplace_back(nSourcei, -1);
158 intPatch0[sourcei] = ppi.index();
160 auto& intNames0 = interfaceNames0.
emplace_back(nSourcei);
168 auto& intMesh1 = interfaceMesh1.
emplace_back(nSourcej, -1);
169 intMesh1[sourcej] = meshj;
173 auto& intPatch1 = interfacePatch1.
emplace_back(nSourcej, -1);
174 intPatch1[sourcej] = ppj.index();
176 auto& intNames1 = interfaceNames1.
emplace_back(nSourcej);
180 auto& intFaces0 = interfaceFaces0.
emplace_back(nSourcei);
184 auto& intFaces1 = interfaceFaces1.
emplace_back(nSourcej);
199 const scalarField& weights = AMPtr->srcWeightsSum();
203 const scalar
sum = weights[facei];
211 targetMask = AMPtr->interpolateToTarget(mask);
216 const scalarField& weights = AMPtr->tgtWeightsSum();
220 const scalar
sum = weights[facei];
228 sourceMask = AMPtr->interpolateToSource(mask);
232 const scalarField& weights = AMPtr->srcWeightsSum();
235 if (weights[facei] > 0.5 || sourceMask[facei] > SMALL)
242 const scalarField& weights = AMPtr->tgtWeightsSum();
245 if (weights[facei] > 0.5 || targetMask[facei] > SMALL)
262 const bool includeOwn,
267 const List<wordList>& AMIMethods,
288 const label meshjStart(includeOwn ? meshi : meshi+1);
290 for (label meshj = meshjStart; meshj <
meshes.size(); meshj++)
294 for (
const label sourcei : interRegionSources[meshi])
296 const labelList& patchesi = allPatchesi[sourcei];
298 for (
const label sourcej : interRegionSources[meshj])
300 const labelList& patchesj = allPatchesj[sourcej];
310 AMIMethods[meshi][sourcei].size()
311 ? AMIMethods[meshi][sourcei]
312 : faceAreaWeightAMI2D::typeName
314 patchInfoDicts[meshi][sourcei],
355 const label zoneID =
mesh.faceZones().whichZone(faceID);
357 bool zoneFlip =
false;
372 mesh.faces()[faceID],
374 mesh.faceOwner()[faceID],
390 mesh.faces()[faceID],
391 mesh.faceOwner()[faceID],
411 bitSet& isRepatchedBoundary,
417 if (
mesh.isInternalFace(facei))
421 <<
" is not an external face of the mesh." <<
endl
422 <<
"This application can only repatch"
427 isRepatchedBoundary.
set(facei-
mesh.nInternalFaces());
430 static label nWarnings = 0;
433 const label newPatchi = meshMod.
region()[facei];
437 <<
" at " <<
mesh.faceCentres()[facei]
438 <<
" marked for patch " <<
patchID
440 <<
" is already marked for patch " << newPatchi
441 <<
" name " <<
mesh.boundaryMesh()[newPatchi].name()
442 <<
". Creating duplicate face. Suppressing further warnings"
449 changePatchID(isFirst,
mesh, facei,
patchID, meshMod);
461 if (cpp && cpp->
owner())
463 const auto& cycPatch = *cpp;
468 OFstream str(prefix+cycPatch.name()+
".obj");
469 Pout<<
"Dumping " << cycPatch.name()
470 <<
" faces to " << str.name() <<
endl;
480 OFstream str(prefix+nbrPatch.name()+
".obj");
481 Pout<<
"Dumping " << nbrPatch.name()
482 <<
" faces to " << str.name() <<
endl;
493 OFstream str(prefix+cycPatch.name()+nbrPatch.name()+
"_match.obj");
496 Pout<<
"Dumping cyclic match as lines between face centres to "
497 << str.name() <<
endl;
501 const point& fc0 =
mesh.faceCentres()[cycPatch.start()+facei];
504 const point& fc1 =
mesh.faceCentres()[nbrPatch.start()+facei];
508 str<<
"l " << vertI-1 <<
' ' << vertI <<
nl;
521 if (separation.
size() == 1)
527 field[i] += separation[0];
530 else if (separation.
size() ==
field.size())
534 field[i] += separation[i];
540 <<
"Sizes of field and transformation not equal. field:"
541 <<
field.size() <<
" transformation:" << separation.
size()
548template<
class CombineOp>
553 const CombineOp& cop,
554 const point& nullValue
560 <<
"Number of values " <<
points.size()
561 <<
" is not equal to the number of points in the mesh "
568 bool hasTransformation =
false;
572 const labelList& procPatches =
mesh.globalData().processorPatches();
575 for (
const label patchi : procPatches)
580 if (
pp.nPoints() && procPatch.owner())
583 pointField patchInfo(procPatch.nPoints(), nullValue);
585 const labelList& meshPts = procPatch.meshPoints();
586 const labelList& nbrPts = procPatch.neighbPoints();
590 label nbrPointi = nbrPts[pointi];
591 if (nbrPointi >= 0 && nbrPointi < patchInfo.size())
593 patchInfo[nbrPointi] =
points[meshPts[pointi]];
600 procPatch.neighbProcNo()
609 for (
const label patchi : procPatches)
614 if (
pp.nPoints() && !procPatch.owner())
623 nbrPatchInfo.
setSize(procPatch.nPoints(), nullValue);
625 if (!procPatch.parallel())
627 hasTransformation =
true;
630 else if (procPatch.separated())
632 hasTransformation =
true;
633 separateList(-procPatch.separation(), nbrPatchInfo);
636 const labelList& meshPts = procPatch.meshPoints();
640 label meshPointi = meshPts[pointi];
641 points[meshPointi] = nbrPatchInfo[pointi];
652 if (cpp && cpp->
owner())
656 const auto& cycPatch = *cpp;
659 const edgeList& coupledPoints = cycPatch.coupledPoints();
660 const labelList& meshPts = cycPatch.meshPoints();
661 const labelList& nbrMeshPts = nbrPatch.meshPoints();
667 const edge&
e = coupledPoints[i];
668 label point0 = meshPts[
e[0]];
669 half0Values[i] =
points[point0];
672 if (!cycPatch.parallel())
674 hasTransformation =
true;
677 else if (cycPatch.separated())
679 hasTransformation =
true;
680 separateList(cycPatch.separation(), half0Values);
685 const edge&
e = coupledPoints[i];
686 label point1 = nbrMeshPts[
e[1]];
687 points[point1] = half0Values[i];
701 if (hasTransformation)
704 <<
"There are decomposed cyclics in this mesh with"
705 <<
" transformations." <<
endl
706 <<
"This is not supported. The result will be incorrect"
736int main(
int argc,
char *argv[])
740 "Create patches out of selected boundary faces, which are either"
741 " from existing patches or from a faceSet"
751 "Write obj files showing the cyclic matching process"
760 const bool overwrite =
args.found(
"overwrite");
764 const bool writeObj =
args.found(
"writeObj");
771 List<labelListList> matchPatchIDs(
meshes.size());
772 List<wordList> matchMethods(
meshes.size());
773 List<PtrList<dictionary>> patchInfoDicts(
meshes.size());
775 List<DynamicList<label>> interRegionSources(
meshes.size());
782 patches.checkParallelSync(
true);
784 oldInstances[meshi] =
mesh.pointsInstance();
792 const auto&
dict = dicts[meshi];
794 patchNames[meshi].setSize(patchSources.size());
795 matchPatchIDs[meshi].
setSize(patchSources.size());
796 matchMethods[meshi].setSize(patchSources.size());
797 patchInfoDicts[meshi].setSize(patchSources.size());
800 forAll(patchSources, sourcei)
802 const auto& pDict = patchSources[sourcei];
810 patchInfoDicts[meshi].set
815 dictionary& patchDict = patchInfoDicts[meshi][sourcei];
816 if (patchDict.
found(
"AMIMethod"))
818 matchMethods[meshi][sourcei] = patchDict.
get<
word>(
"AMIMethod");
821 patchDict.
add(
"requireMatch",
false);
827 matchPatchIDs[meshi][sourcei] =
828 patches.patchSet(matchNames).sortedToc();
831 if (pDict.get<
word>(
"constructFrom") ==
"autoPatch")
833 interRegionSources[meshi].push_back(sourcei);
868 const bool includeOwn = (
meshes.size() == 1);
897 List<PtrList<volScalarField>> vsFlds(
meshes.size());
898 List<PtrList<volVectorField>> vvFlds(
meshes.size());
899 List<PtrList<volSphericalTensorField>> vstFlds(
meshes.size());
900 List<PtrList<volSymmTensorField>> vsymtFlds(
meshes.size());
901 List<PtrList<surfaceScalarField>> ssFlds(
meshes.size());
902 List<PtrList<volTensorField>> vtFlds(
meshes.size());
903 List<PtrList<surfaceVectorField>> svFlds(
meshes.size());
904 List<PtrList<surfaceSphericalTensorField>> sstFlds(
meshes.size());
905 List<PtrList<surfaceSymmTensorField>> ssymtFlds(
meshes.size());
906 List<PtrList<surfaceTensorField>> stFlds(
meshes.size());
913 bool noFields =
true;
914 for (
const auto& d : patchInfoDicts[meshi])
916 if (d.found(
"patchFields"))
947 List<DynamicList<word>> allAddedPatches(
meshes.size());
955 Info<<
"\n\nAdding patches to mesh " <<
mesh.name() <<
nl <<
endl;
962 dumpCyclicMatch(
"initial_",
mesh);
972 forAll(patchSources, sourcei)
986 dictionary patchDict(patchInfoDicts[meshi][sourcei]);
987 patchDict.
set(
"nFaces", 0);
988 patchDict.
set(
"startFace", 0);
991 if (sourceType ==
"autoPatch")
996 forAll(interfaceMesh0, inti)
998 const labelList& allMeshes0 = interfaceMesh0[inti];
999 const wordList& allNames0 = interfaceNames0[inti];
1000 const labelList& allMeshes1 = interfaceMesh1[inti];
1001 const wordList& allNames1 = interfaceNames1[inti];
1005 interfaceSource0[inti] == sourcei
1006 && allMeshes0[sourcei] == meshi
1010 const label sourcej = interfaceSource1[inti];
1011 const word& patchName = allNames0[sourcei];
1012 if (
patches.findPatchID(patchName) == -1)
1015 const auto& mesh1 =
meshes[allMeshes1[sourcej]];
1016 allDict.set(
"sampleRegion", mesh1.
name());
1017 const auto& destPatch = allNames1[sourcej];
1018 allDict.
set(
"samplePatch", destPatch);
1019 allDict.set(
"neighbourPatch", destPatch);
1021 Info<<
"Adding new patch " << patchName
1022 <<
" from " << allDict <<
endl;
1042 allAddedPatches[meshi].append(ppPtr->name());
1047 forAll(interfaceMesh1, inti)
1049 const labelList& allMeshes0 = interfaceMesh0[inti];
1050 const wordList& allNames0 = interfaceNames0[inti];
1051 const labelList& allMeshes1 = interfaceMesh1[inti];
1052 const wordList& allNames1 = interfaceNames1[inti];
1056 interfaceSource1[inti] == sourcei
1057 && allMeshes1[sourcei] == meshi
1062 const label sourcej = interfaceSource0[inti];
1063 const word& patchName = allNames1[sourcei];
1064 if (
patches.findPatchID(patchName) == -1)
1067 const auto& destPatch = allNames0[sourcej];
1068 const auto& mesh0 =
meshes[allMeshes0[sourcej]];
1069 allDict.set(
"sampleRegion", mesh0.
name());
1070 allDict.set(
"samplePatch", destPatch);
1071 allDict.set(
"neighbourPatch", destPatch);
1073 Info<<
"Adding new patch " << patchName
1074 <<
" from " << allDict <<
endl;
1094 allAddedPatches[meshi].append(ppPtr->name());
1101 if (
patches.findPatchID(patchName) == -1)
1103 Info<<
"Adding new patch " << patchName
1104 <<
" from " << patchDict <<
endl;
1124 allAddedPatches[meshi].append(ppPtr->name());
1147 const bool pointSync(
dict.get<
bool>(
"pointSync"));
1157 bitSet isRepatchedBoundary(
mesh.nBoundaryFaces());
1159 forAll(patchSources, sourcei)
1162 const word patchName
1171 const word sourceType(
dict.get<
word>(
"constructFrom"));
1173 if (sourceType ==
"autoPatch")
1175 forAll(interfaceMesh0, inti)
1177 const labelList& allMeshes0 = interfaceMesh0[inti];
1178 const wordList& allNames0 = interfaceNames0[inti];
1179 const auto& allFaces0 = interfaceFaces0[inti];
1181 const labelList& allMeshes1 = interfaceMesh1[inti];
1182 const wordList& allNames1 = interfaceNames1[inti];
1183 const auto& allFaces1 = interfaceFaces1[inti];
1187 interfaceSource0[inti] == sourcei
1188 && allMeshes0[sourcei] == meshi
1193 const label destPatchi =
1194 patches.findPatchID(allNames0[sourcei],
false);
1207 isRepatchedBoundary,
1213 interfaceSource1[inti] == sourcei
1214 && allMeshes1[sourcei] == meshi
1219 const label destPatchi =
1220 patches.findPatchID(allNames1[sourcei],
false);
1233 isRepatchedBoundary,
1239 else if (sourceType ==
"patches")
1241 const label destPatchi =
patches.findPatchID(patchName,
false);
1248 for (
const label patchi : patchSources)
1252 Info<<
"Moving faces from patch " <<
pp.name()
1253 <<
" to patch " << destPatchi <<
endl;
1260 isRepatchedBoundary,
1265 else if (sourceType ==
"set")
1267 const label destPatchi =
patches.findPatchID(patchName,
false);
1273 <<
" faces from faceSet " <<
set.name() <<
endl;
1283 isRepatchedBoundary,
1290 <<
"Invalid source type " << sourceType <<
endl
1291 <<
"Valid source types are 'patches' 'set'"
1299 Info<<
"Doing topology modification to order faces." <<
nl <<
endl;
1302 if (map().hasMotionPoints())
1304 mesh.movePoints(map().preMotionPoints());
1314 mesh.updateMesh(map());
1318 const auto& oldToNew = map().reverseFaceMap();
1319 forAll(interfaceMesh0, inti)
1321 const labelList& allMeshes0 = interfaceMesh0[inti];
1322 forAll(allMeshes0, sourcei)
1324 if (allMeshes0[sourcei] == meshi)
1330 forAll(interfaceMesh1, inti)
1332 const labelList& allMeshes1 = interfaceMesh1[inti];
1333 forAll(allMeshes1, sourcei)
1335 if (allMeshes1[sourcei] == meshi)
1345 dumpCyclicMatch(
"coupled_",
mesh);
1351 Info<<
"Not synchronising points." <<
nl <<
endl;
1355 Info<<
"Synchronising points." <<
nl <<
endl;
1375 Info<<
"On coupled patch " <<
pp.name()
1376 <<
" separation[0] was "
1391 Info<<
"On cyclic translation patch "
1393 <<
" forcing uniform separation of "
1394 << cycpp.separationVector() <<
endl;
1400 const auto& nbr = cycpp.neighbPatch();
1405 nbr[0].centre(
mesh.points())
1406 - cycpp[0].centre(
mesh.points())
1410 Info<<
"On coupled patch " <<
pp.name()
1411 <<
" forcing uniform separation of "
1416 Info<<
"On coupled patch " <<
pp.name()
1417 <<
" forcing uniform rotation of "
1429 Info<<
"On coupled patch " <<
pp.name()
1430 <<
" forcing uniform rotation of "
1436 Info<<
"Synchronising points." <<
endl;
1445 point(GREAT, GREAT, GREAT)
1452 mesh.movePoints(newPoints);
1459 Info<<
"Removing patches with no faces in them." <<
nl <<
endl;
1460 const wordList oldPatchNames(
mesh.boundaryMesh().names());
1461 const wordList oldPatchTypes(
mesh.boundaryMesh().types());
1463 forAll(oldPatchNames, patchi)
1465 const word& pName = oldPatchNames[patchi];
1466 if (
mesh.boundaryMesh().findPatchID(pName) == -1)
1468 Info<<
"Removed zero-sized patch " << pName
1469 <<
" type " << oldPatchTypes[patchi]
1470 <<
" at position " << patchi <<
endl;
1477 dumpCyclicMatch(
"final_",
mesh);
1489 mesh.setInstance(overwrite ? oldInstances[meshi] :
runTime.timeName());
1502 forAll(patchInfoDicts[meshi], sourcei)
1504 const dictionary& patchDict = patchInfoDicts[meshi][sourcei];
1506 const label
patchID =
mesh.boundary().findPatchID(patchName);
1514 Info<<
"\n\nWriting repatched mesh " <<
mesh.name()
Field reading functions for post-processing utilities.
labelList faceLabels(nFaceLabels)
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
static autoPtr< AMIInterpolation > New(const word &modelName, const dictionary &dict, const bool reverseTarget=false)
Selector for dictionary.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
void clear() noexcept
Clear the addressed list, i.e. set the size to zero.
T & emplace_back(Args &&... args)
Construct an element at the end of the list, return reference to the new list element.
void push_back(const T &val)
Copy append an element to the end of this list.
DynamicList< T, SizeMin > & shrink()
Calls shrink_to_fit() and returns a reference to the DynamicList.
void setCapacity(const label len)
Alter the size of the underlying storage.
A PtrList of objects of type <T> with automated input and output.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
List of IOobjects with searching and retrieving facilities. Implemented as a HashTable,...
static unsigned int minPrecision(unsigned int prec) noexcept
Set the minimum default precision.
static void recv(Type &value, const int fromProcNo, const int tag=UPstream::msgType(), const int communicator=UPstream::worldComm, IOstreamOption::streamFormat fmt=IOstreamOption::BINARY)
Receive and deserialize a value. Uses operator>> for de-serialization.
bool set(const label i, bool val=true)
A bitSet::set() method for a list of bool.
void setSize(label n)
Alias for resize().
Output to file stream as an OSstream, normally using std::ofstream for the actual output.
Output inter-processor communications stream.
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 list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
void size(const label n)
Older name for setAddressableSize.
@ buffered
"buffered" : (MPI_Bsend, MPI_Recv)
static bool parRun(const bool on) noexcept
Set as parallel run on/off.
static void noFunctionObjects(bool addWithOption=false)
Remove '-noFunctionObjects' option and ignore any occurrences.
static void addBoolOption(const word &optName, const string &usage="", bool advanced=false)
Add a bool option to validOptions with usage information.
static void addOption(const word &optName, const string ¶m="", const string &usage="", bool advanced=false)
Add an option to validOptions with usage information.
static void addNote(const string ¬e)
Add extra notes for the usage information.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
void set(const bitSet &bitset)
Set specified bits from another bitset.
The coupledPolyPatch is an abstract base class for patches that couple regions of the computational d...
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 const vectorField & separation() const
If the planes are separated the separation vector.
virtual const tensorField & forwardT() const
Return face transformation tensor.
virtual bool owner() const
Does this side own the patch ?
const cyclicPolyPatch & neighbPatch() const
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
dictionary subOrEmptyDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX, const bool mandatory=false) const
Find and return a sub-dictionary as a copy, otherwise return an empty dictionary.
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a T. FatalIOError if not found, or if the number of tokens is incorrect.
const dictionary & subDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary.
bool found(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find an entry (const access) with the given keyword.
entry * add(entry *entryPtr, bool mergeEntry=false)
Add a new entry.
entry * set(entry *entryPtr)
Assign a new entry, overwriting any existing entry.
An edge is a list of two vertex labels. This can correspond to a directed graph edge or an edge on a ...
A subset of mesh faces organised as a primitive patch.
label whichFace(const label meshFaceID) const
The local index of the given mesh face, -1 if not in the zone.
const boolList & flipMap() const noexcept
Return face flip map.
A class for handling file names.
Mesh data needed to do the Finite Volume discretisation.
const word & name() const
Return reference to name.
static const word & calculatedType() noexcept
The type name for calculated patch fields.
Various mesh related information for a parallel run. Upon construction, constructs all info using par...
const labelList & sharedPointAddr() const
Return addressing into the complete globally shared points list.
label nGlobalPoints() const
Return number of globally shared points.
const labelList & sharedPointLabels() const
Return indices of local points that are globally shared.
A face addition data class. A face can be inflated either from a point or from another face and can e...
A polyBoundaryMesh is a polyPatch list with registered IO, a reference to the associated polyMesh,...
Mesh consisting of general polyhedral cells.
Class describing modification of a face.
A patch is a list of labels that address the faces in the global face list.
static autoPtr< polyPatch > New(const word &patchType, const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm)
Return pointer to a new patch created on freestore from components.
Direct mesh changes based on v1.3 polyTopoChange syntax.
label setAction(const topoAction &action)
For compatibility with polyTopoChange: set topological action.
const DynamicList< label > & region() const
autoPtr< mapPolyMesh > changeMesh(polyMesh &mesh, const labelUList &patchMap, const bool inflate, const bool syncParallel=true, const bool orderCells=false, const bool orderPoints=false)
Inplace changes mesh without change of patches.
static void removeFiles(const polyMesh &mesh)
Helper: remove all procAddressing files from mesh instance.
static void removeFiles(const polyMesh &)
Helper: remove all sets files from mesh instance.
A List of wordRe with additional matching capabilities.
A class for handling words, derived from Foam::string.
static const word null
An empty word.
#define defineTemplateTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information for templates, useful.
const polyBoundaryMesh & patches
Foam::PtrList< Foam::fvMesh > meshes(regionNames.size())
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const word dictName("faMeshDefinition")
return returnReduce(nRefine-oldNRefine, sumOp< label >())
#define WarningInFunction
Report a warning using Foam::Warning.
void set(List< bool > &bools, const labelUList &locations)
Set the listed locations (assign 'true').
List< edge > edgeList
List of edge.
wordList ReadFields(const typename GeoMesh::Mesh &mesh, const IOobjectList &objects, PtrList< GeometricField< Type, PatchField, GeoMesh > > &fields, const bool syncPar=true, const bool readOldTime=false)
Read Geometric fields of templated type.
Type gAverage(const FieldField< Field, Type > &f, const label comm)
The global arithmetic average of a FieldField.
Type & refCast(U &obj)
A dynamic_cast (for references) to Type reference.
List< word > wordList
List of word.
void inplaceRenumber(const labelUList &oldToNew, IntListType &input)
Inplace renumber the values within a list.
List< labelList > labelListList
List of labelList.
List< label > labelList
A List of labels.
HashSet< label, Hash< label > > labelHashSet
A HashSet of labels, uses label hasher.
List< labelListList > labelListListList
List of labelListList.
messageStream Info
Information stream (stdout output on master, null elsewhere).
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
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)
scalar diff(const triad &A, const triad &B)
Return a quantity of the difference between two triads.
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.
vector point
Point is a vector.
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &f1, const label comm)
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...
void transformList(const tensor &rotTensor, UList< T > &field)
Inplace transform a list of elements.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
vectorField pointField
pointField is a vectorField.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Type gMax(const FieldField< Field, Type > &f)
constexpr char nl
The newline '\n' character (0x0a).
wordList patchNames(nPatches)
Foam::argList args(argc, argv)
#define forAll(list, i)
Loop across all elements in list.