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,
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],
357 bool zoneFlip =
false;
411 bitSet& isRepatchedBoundary,
421 <<
" is not an external face of the mesh." <<
endl 422 <<
"This application can only repatch" 430 static label nWarnings = 0;
433 const label newPatchi = meshMod.
region()[facei];
438 <<
" marked for patch " <<
patchID 440 <<
" is already marked for patch " << newPatchi
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 " 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()
548 template<
class CombineOp>
553 const CombineOp& cop,
554 const point& nullValue
561 <<
" is not equal to the number of points in the mesh " 568 bool hasTransformation =
false;
575 for (
const label patchi : procPatches)
578 const auto& procPatch = refCast<const processorPolyPatch>(
pp);
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)
612 const auto& procPatch = refCast<const processorPolyPatch>(
pp);
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" 736 int 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" 756 "Read, map and write fields after repatching" 765 const bool overwrite =
args.
found(
"overwrite");
772 const bool writeObj =
args.
found(
"writeObj");
800 const auto&
dict = dicts[meshi];
803 matchPatchIDs[meshi].
setSize(patchSources.size());
804 matchMethods[meshi].setSize(patchSources.size());
805 patchInfoDicts[meshi].setSize(patchSources.size());
808 forAll(patchSources, sourcei)
810 const auto& pDict = patchSources[sourcei];
818 patchInfoDicts[meshi].set
823 dictionary& patchDict = patchInfoDicts[meshi][sourcei];
824 if (patchDict.
found(
"AMIMethod"))
826 matchMethods[meshi][sourcei] = patchDict.
get<
word>(
"AMIMethod");
829 patchDict.
add(
"requireMatch",
false);
835 matchPatchIDs[meshi][sourcei] =
839 if (pDict.get<
word>(
"constructFrom") ==
"autoPatch")
841 interRegionSources[meshi].push_back(sourcei);
922 for (
const auto& d : patchInfoDicts[meshi])
924 if (d.found(
"patchFields"))
970 dumpCyclicMatch(
"initial_",
mesh);
980 forAll(patchSources, sourcei)
994 dictionary patchDict(patchInfoDicts[meshi][sourcei]);
995 patchDict.
set(
"nFaces", 0);
996 patchDict.
set(
"startFace", 0);
999 if (sourceType ==
"autoPatch")
1004 forAll(interfaceMesh0, inti)
1006 const labelList& allMeshes0 = interfaceMesh0[inti];
1007 const wordList& allNames0 = interfaceNames0[inti];
1008 const labelList& allMeshes1 = interfaceMesh1[inti];
1009 const wordList& allNames1 = interfaceNames1[inti];
1013 interfaceSource0[inti] == sourcei
1014 && allMeshes0[sourcei] == meshi
1018 const label sourcej = interfaceSource1[inti];
1019 const word& patchName = allNames0[sourcei];
1023 const auto& mesh1 =
meshes[allMeshes1[sourcej]];
1024 allDict.
set(
"sampleRegion", mesh1.
name());
1025 const auto& destPatch = allNames1[sourcej];
1026 allDict.
set(
"samplePatch", destPatch);
1027 allDict.set(
"neighbourPatch", destPatch);
1029 Info<<
"Adding new patch " << patchName
1030 <<
" from " << allDict <<
endl;
1050 allAddedPatches[meshi].append(ppPtr->name());
1055 forAll(interfaceMesh1, inti)
1057 const labelList& allMeshes0 = interfaceMesh0[inti];
1058 const wordList& allNames0 = interfaceNames0[inti];
1059 const labelList& allMeshes1 = interfaceMesh1[inti];
1060 const wordList& allNames1 = interfaceNames1[inti];
1064 interfaceSource1[inti] == sourcei
1065 && allMeshes1[sourcei] == meshi
1070 const label sourcej = interfaceSource0[inti];
1071 const word& patchName = allNames1[sourcei];
1075 const auto& destPatch = allNames0[sourcej];
1076 const auto& mesh0 =
meshes[allMeshes0[sourcej]];
1077 allDict.
set(
"sampleRegion", mesh0.
name());
1078 allDict.
set(
"samplePatch", destPatch);
1079 allDict.set(
"neighbourPatch", destPatch);
1081 Info<<
"Adding new patch " << patchName
1082 <<
" from " << allDict <<
endl;
1102 allAddedPatches[meshi].append(ppPtr->name());
1111 Info<<
"Adding new patch " << patchName
1112 <<
" from " << patchDict <<
endl;
1132 allAddedPatches[meshi].append(ppPtr->name());
1155 const bool pointSync(
dict.
get<
bool>(
"pointSync"));
1167 forAll(patchSources, sourcei)
1170 const word patchName
1181 if (sourceType ==
"autoPatch")
1183 forAll(interfaceMesh0, inti)
1185 const labelList& allMeshes0 = interfaceMesh0[inti];
1186 const wordList& allNames0 = interfaceNames0[inti];
1187 const auto& allFaces0 = interfaceFaces0[inti];
1189 const labelList& allMeshes1 = interfaceMesh1[inti];
1190 const wordList& allNames1 = interfaceNames1[inti];
1191 const auto& allFaces1 = interfaceFaces1[inti];
1195 interfaceSource0[inti] == sourcei
1196 && allMeshes0[sourcei] == meshi
1201 const label destPatchi =
1215 isRepatchedBoundary,
1221 interfaceSource1[inti] == sourcei
1222 && allMeshes1[sourcei] == meshi
1227 const label destPatchi =
1241 isRepatchedBoundary,
1247 else if (sourceType ==
"patches")
1256 for (
const label patchi : patchSources)
1260 Info<<
"Moving faces from patch " <<
pp.name()
1261 <<
" to patch " << destPatchi <<
endl;
1268 isRepatchedBoundary,
1273 else if (sourceType ==
"set")
1281 <<
" faces from faceSet " <<
set.name() <<
endl;
1291 isRepatchedBoundary,
1298 <<
"Invalid source type " << sourceType <<
endl 1299 <<
"Valid source types are 'patches' 'set'" 1307 Info<<
"Doing topology modification to order faces." <<
nl <<
endl;
1310 if (map().hasMotionPoints())
1326 const auto& oldToNew = map().reverseFaceMap();
1327 forAll(interfaceMesh0, inti)
1329 const labelList& allMeshes0 = interfaceMesh0[inti];
1330 forAll(allMeshes0, sourcei)
1332 if (allMeshes0[sourcei] == meshi)
1338 forAll(interfaceMesh1, inti)
1340 const labelList& allMeshes1 = interfaceMesh1[inti];
1341 forAll(allMeshes1, sourcei)
1343 if (allMeshes1[sourcei] == meshi)
1353 dumpCyclicMatch(
"coupled_",
mesh);
1359 Info<<
"Not synchronising points." <<
nl <<
endl;
1363 Info<<
"Synchronising points." <<
nl <<
endl;
1376 if (
pp.size() && isA<coupledPolyPatch>(
pp))
1379 refCast<const coupledPolyPatch>(
pp);
1383 Info<<
"On coupled patch " <<
pp.name()
1384 <<
" separation[0] was " 1387 if (isA<cyclicPolyPatch>(
pp) &&
pp.size())
1390 refCast<const cyclicPolyPatch>(
pp);
1399 Info<<
"On cyclic translation patch " 1401 <<
" forcing uniform separation of " 1402 << cycpp.separationVector() <<
endl;
1408 const auto& nbr = cycpp.neighbPatch();
1418 Info<<
"On coupled patch " <<
pp.name()
1419 <<
" forcing uniform separation of " 1424 Info<<
"On coupled patch " <<
pp.name()
1425 <<
" forcing uniform rotation of " 1437 Info<<
"On coupled patch " <<
pp.name()
1438 <<
" forcing uniform rotation of " 1444 Info<<
"Synchronising points." <<
endl;
1453 point(GREAT, GREAT, GREAT)
1467 Info<<
"Removing patches with no faces in them." <<
nl <<
endl;
1471 forAll(oldPatchNames, patchi)
1473 const word& pName = oldPatchNames[patchi];
1476 Info<<
"Removed zero-sized patch " << pName
1477 <<
" type " << oldPatchTypes[patchi]
1478 <<
" at position " << patchi <<
endl;
1485 dumpCyclicMatch(
"final_",
mesh);
1510 forAll(patchInfoDicts[meshi], sourcei)
1512 const dictionary& patchDict = patchInfoDicts[meshi][sourcei];
1525 auto setInstance = [&fieldInst](
auto& flds)
1527 for (
auto&
fld : flds) {
fld.instance() = fieldInst; }
1530 setInstance(vsFlds[meshi]);
1531 setInstance(vvFlds[meshi]);
1532 setInstance(vstFlds[meshi]);
1533 setInstance(vsymtFlds[meshi]);
1534 setInstance(vtFlds[meshi]);
1537 setInstance(ssFlds[meshi]);
1538 setInstance(svFlds[meshi]);
1539 setInstance(sstFlds[meshi]);
1540 setInstance(ssymtFlds[meshi]);
1541 setInstance(stFlds[meshi]);
label findPatchID(const word &patchName, const bool allowNotFound=true) const
Find patch index given a name, return -1 if not found.
const labelList & sharedPointLabels() const
Return indices of local points that are globally shared.
ITstream & lookup(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return an entry data stream. FatalIOError if not found, or not a stream. ...
label nPoints() const
Number of points supporting patch faces.
scalar diff(const triad &A, const triad &B)
Return a quantity of the difference between two triads.
static void noFunctionObjects(bool addWithOption=false)
Remove '-noFunctionObjects' option and ignore any occurrences.
static void addNote(const string ¬e)
Add extra notes for the usage information.
void size(const label n)
Older name for setAddressableSize.
void set(const bitSet &bitset)
Set specified bits from another bitset.
A class for handling file names.
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.
virtual bool separated() const
Are the planes separated.
List of IOobjects with searching and retrieving facilities. Implemented as a HashTable, so the various sorted methods should be used if traversing in parallel.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Class describing modification of a face.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
label nPoints() const noexcept
Number of mesh points.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
label findPatchID(const word &patchName) const
Find patch index given a name.
const word & name() const noexcept
Return the object name.
labelHashSet patchSet(const UList< wordRe > &select, const bool warnNotFound=true, const bool useGroups=true) const
Return the set of patch IDs corresponding to the given names.
Various mesh related information for a parallel run. Upon construction, constructs all info using par...
Output to file stream as an OSstream, normally using std::ofstream for the actual output...
const labelList & processorPatches() const noexcept
Return list of processor patch labels.
constexpr char nl
The newline '\n' character (0x0a)
const word dictName("faMeshDefinition")
const DynamicList< label > & region() const
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual void movePoints(const pointField &)
Move points, returns volumes swept by faces in motion.
static bool & parRun() noexcept
Test if this a parallel run.
void clearOut(const bool isMeshUpdate=false)
Clear all geometry and addressing.
static void addBoolOption(const word &optName, const string &usage="", bool advanced=false)
Add a bool option to validOptions with usage information.
The coupledPolyPatch is an abstract base class for patches that couple regions of the computational d...
void setCapacity(const label len)
Alter the size of the underlying storage.
entry * add(entry *entryPtr, bool mergeEntry=false)
Add a new entry.
Field reading functions for post-processing utilities.
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.
wordList types() const
Return a list of patch types.
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.
virtual const fileName & name() const override
Get the name of the output serial stream. (eg, the name of the Fstream file name) ...
labelList faceLabels(nFaceLabels)
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &f1, const label comm)
const dictionary & subDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary.
virtual const vectorField & separation() const
If the planes are separated the separation vector.
A face addition data class. A face can be inflated either from a point or from another face and can e...
bool isInternalFace(const label faceIndex) const noexcept
Return true if given face label is internal to the mesh.
virtual const tensorField & forwardT() const
Return face transformation tensor.
bool found(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find an entry (const access) with the given keyword.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
virtual const pointField & points() const
Return raw points.
#define forAll(list, i)
Loop across all elements in list.
points setSize(newPointi)
virtual bool parallel() const
Are the cyclic planes parallel.
static void removeFiles(const polyMesh &mesh)
Helper: remove all procAddressing files from mesh instance.
virtual bool owner() const
Does this side own the patch ?
static void removeFiles(const polyMesh &)
Helper: remove all sets files from mesh instance.
label nGlobalPoints() const
Return number of globally shared points.
vectorField pointField
pointField is a vectorField.
const dimensionedScalar e
Elementary charge.
const fileName & pointsInstance() const
Return the current instance directory for points.
virtual void updateMesh(const mapPolyMesh &mpm)
Update mesh corresponding to the given map.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
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.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects...
An edge is a list of two vertex labels. This can correspond to a directed graph edge or an edge on a ...
const polyBoundaryMesh & boundaryMesh() const noexcept
Return boundary mesh.
A class for handling words, derived from Foam::string.
T & emplace_back(Args &&... args)
Construct an element at the end of the list, return reference to the new list element.
wordList names() const
Return a list of patch names.
label size() const noexcept
The number of entries in the list.
wordList patchNames(nPatches)
Foam::PtrList< Foam::fvMesh > meshes(regionNames.size())
virtual const labelList & faceOwner() const
Return face owner.
static const word null
An empty word.
A List of wordRe with additional matching capabilities.
static void addOption(const word &optName, const string ¶m="", const string &usage="", bool advanced=false)
Add an option to validOptions with usage information.
T returnReduce(const T &value, BinaryOp bop, const int tag=UPstream::msgType(), const int communicator=UPstream::worldComm)
Perform reduction on a copy, using specified binary operation.
const globalMeshData & globalData() const
Return parallel info (demand-driven)
label nInternalFaces() const noexcept
Number of internal faces.
virtual const faceList & faces() const
Return raw faces.
static unsigned int minPrecision(unsigned int prec) noexcept
Set the minimum default precision.
errorManip< error > abort(error &err)
const T * set(const label i) const
Return const pointer to element (can be nullptr), or nullptr for out-of-range access (ie...
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
virtual bool write(const bool writeOnProc=true) const
Write mesh using IO settings from time.
void writeFields(const fvMesh &mesh, const wordHashSet &selectedFields, const bool writeFaceFields)
A polyBoundaryMesh is a polyPatch list with registered IO, a reference to the associated polyMesh...
bool checkParallelSync(const bool report=false) const
Check whether all procs have all patches and in same order.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
static word timeName(const scalar t, const int precision=precision_)
Return a time name for the given scalar time value formatted with the given precision.
static std::string name(const std::string &str)
Return basename (part beyond last /), including its extension.
Type gAverage(const FieldField< Field, Type > &f, const label comm)
The global arithmetic average of a FieldField.
Type gMax(const FieldField< Field, Type > &f)
const faceZoneMesh & faceZones() const noexcept
Return face zone mesh.
defineTemplateTypeNameAndDebug(faScalarMatrix, 0)
void clear() noexcept
Clear the addressed list, i.e. set the size to zero.
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. ...
Output inter-processor communications stream.
void push_back(const T &val)
Copy append an element to the end of this list.
const fileName & instance() const noexcept
Read access to instance path component.
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;for(const word &name :lagrangianScalarNames){ IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
label whichZone(const label objectIndex) const
Given a global object index, return the zone it is in.
const vectorField & faceCentres() const
virtual const tensorField & reverseT() const
Return neighbour-cell transformation tensor.
A PtrList of objects of type <T> with automated input and output.
void transformList(const tensor &rotTensor, UList< T > &field)
Inplace transform a list of elements.
void inplaceRenumber(const labelUList &oldToNew, IntListType &input)
Inplace renumber the values within a list.
vector point
Point is a vector.
void setInstance(const fileName &instance, const IOobjectOption::writeOption wOpt=IOobject::AUTO_WRITE)
Set the instance for mesh files.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
bool set(const label i, bool val=true)
A bitSet::set() method for a list of bool.
#define WarningInFunction
Report a warning using Foam::Warning.
const word & name() const
Return reference to name.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers...
Mesh data needed to do the Finite Volume discretisation.
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.
List< Key > sortedToc() const
The table of contents (the keys) in sorted order.
Direct mesh changes based on v1.3 polyTopoChange syntax.
const polyBoundaryMesh & patches
DynamicList< T, SizeMin > & shrink()
Calls shrink_to_fit() and returns a reference to the DynamicList.
static const word & calculatedType() noexcept
The type name for calculated patch fields.
const boolList & flipMap() const noexcept
Return face flip map.
List< label > sortedToc(const UList< bool > &bools)
Return the (sorted) values corresponding to 'true' entries.
messageStream Info
Information stream (stdout output on master, null elsewhere)
const fvBoundaryMesh & boundary() const noexcept
Return reference to boundary mesh.
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.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Mesh consisting of general polyhedral cells.
entry * set(entry *entryPtr)
Assign a new entry, overwriting any existing entry.
static autoPtr< AMIInterpolation > New(const word &modelName, const dictionary &dict, const bool reverseTarget=false)
Selector for dictionary.
A subset of mesh faces organised as a primitive patch.
T getOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a T, or return the given default value. FatalIOError if it is found and the number of...
"buffered" : (MPI_Bsend, MPI_Recv)
const cyclicPolyPatch & neighbPatch() const
A patch is a list of labels that address the faces in the global face list.
label nBoundaryFaces() const noexcept
Number of boundary faces (== nFaces - nInternalFaces)
Foam::argList args(argc, argv)
const labelList & sharedPointAddr() const
Return addressing into the complete globally shared points list.
void setSize(label n)
Alias for resize()
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
bool found(const word &optName) const
Return true if the named option is found.
bool set(const Key &key, const T &obj)
Copy assign a new entry, overwriting existing entries.
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
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...
label setAction(const topoAction &action)
For compatibility with polyTopoChange: set topological action.
label whichFace(const label meshFaceID) const
The local index of the given mesh face, -1 if not in the zone.
static constexpr const zero Zero
Global zero (0)