78 int main(
int argc,
char *argv[])
92 "add non-conformal boundary conditions to the fields"
119 cyclicNames.
append(nonConformalCyclicPolyPatch::typeName);
124 static const word dictName(
"createNonConformalCouplesDict");
135 if (!iter().isDict())
continue;
139 const bool havePatches = subDict.
found(
"patches");
140 const bool haveOwnerNeighbour =
141 subDict.
found(
"owner") || subDict.
found(
"neighbour");
143 if (havePatches == haveOwnerNeighbour)
146 <<
"Patches should be specified with either a single "
147 <<
"\"patches\" entry with a pair of patch names, or with "
148 <<
"two sub-dictionaries named \"owner\" and "
158 if (haveOwnerNeighbour)
168 neighbourDict[
"patch"]
195 const word oldInstance = mesh.pointsInstance();
218 if (isA<processorPolyPatch>(pp) && firstProcPatchi ==
patches.
size())
221 firstProcFacei = pp.
start();
224 if (!isA<processorPolyPatch>(pp) && firstProcPatchi !=
patches.
size())
227 <<
"Processor patches do not follow boundary patches"
248 auto nccPatchNames = [&](
const label i)
262 << nonConformalCyclicPolyPatch::typeName
266 << indent << Pair<word>(nccPatchNames(i)) <<
decrIndent <<
nl
280 nonConformalCyclicPolyPatch::typeName,
288 patchFieldDicts[i][0]
299 nonConformalCyclicPolyPatch::typeName,
307 patchFieldDicts[i][1]
313 auto appendErrorPatches = [&](
const bool owner)
326 nonConformalErrorPolyPatch::typeName +
"_on_" + iter.key(),
331 nonConformalErrorPolyPatch::typeName,
341 appendErrorPatches(
true);
342 appendErrorPatches(
false);
389 auto appendProcPatches = [&](
const bool owner,
const bool first)
392 owner ? procHasPatch1 : procHasPatch2;
394 owner ? procHasPatch2 : procHasPatch1;
398 forAll(procHasPatchB, proci)
406 && procHasPatchB[proci]
419 nccPatchNames(i)[!owner],
425 patchFieldDicts[i][!owner]
432 appendProcPatches(
true,
true);
433 appendProcPatches(
false,
true);
434 appendProcPatches(
false,
false);
435 appendProcPatches(
true,
false);
442 forAll(newPatches, newPatchi)
447 *newPatches[newPatchi],
459 forAll(newPatches, newPatchi)
461 if (!newPatchFieldDicts[newPatchi].empty())
463 fvMeshTools::setPatchFields
467 newPatchFieldDicts[newPatchi]
472 mesh.setInstance(runTime.name());
483 mesh.setInstance(oldInstance);
487 Info<<
"Writing mesh to " << runTime.name() <<
nl <<
endl;
Field reading functions for post-processing utilities.
#define forAll(list, i)
Loop across all elements in list.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
A HashTable with keys but without contents.
bool insert(const Key &key)
Insert a new entry.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
List of IOobjects with searching and retrieving facilities.
static unsigned int defaultPrecision()
Return the default precision.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
void append(const T &)
Append an element at the end of the list.
void size(const label)
Override size to be inconsistent with allocated storage.
virtual Ostream & write(const char)=0
Write character.
static void scatterList(const List< commsStruct > &comms, List< T > &Values, const int tag, const label comm)
Scatter data. Reverse of gatherList.
static void gatherList(const List< commsStruct > &comms, List< T > &Values, const int tag, const label comm)
Gather data but keep individual values separate.
static label nProcs(const label communicator=0)
Number of processes in parallel run.
static bool & parRun()
Is this a parallel run?
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
label size() const
Return the number of elements in the UPtrList.
static bool hasArgs(int argc, char *argv[])
Return true if there are arguments.
static void addBoolOption(const word &opt, const string &usage="")
Add to a bool option to validOptions with usage information.
bool optionFound(const word &opt) const
Return true if the named option is found.
bool optionReadIfPresent(const word &opt, T &) const
Read a value from the named option if present.
static SLList< string > validArgs
A list of valid (mandatory) arguments.
This boundary condition is not designed to be evaluated; it is assumed that the value is assigned via...
const word dictName() const
Return the local dictionary name (final part of scoped name)
A list of keyword definitions, which are a keyword followed by any number of values (e....
dictionary subOrEmptyDict(const word &, const bool mustRead=false) const
Find and return a sub-dictionary as a copy, or.
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
const dictionary & optionalSubDict(const word &) const
Find and return a sub-dictionary if found.
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
virtual bool connect(const bool changing, const bool geometric, const bool load)
Connect the mesh by adding faces into the nonConformalCyclics.
Mesh stitcher for stationary meshes.
static word defaultRegion
Return the default region name.
A patch is a list of labels that address the faces in the global face list.
label start() const
Return start label of this patch in the polyMesh face list.
virtual autoPtr< polyPatch > clone(const polyBoundaryMesh &bm) const
Construct and return a clone, resetting the boundary mesh.
A class for handling words, derived from string.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
int main(int argc, char *argv[])
const fvPatchList & patches
Info<< "Calculating turbulent flame speed field St\n"<< endl;volScalarField St(IOobject("St", runTime.name(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), flameWrinkling->Xi() *Su);multivariateSurfaceInterpolationScheme< scalar >::fieldTable fields
errorManipArg< error, int > exit(error &err, const int errNo=1)
Ostream & decrIndent(Ostream &os)
Decrement the indent level.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
IOdictionary systemDict(const word &dictName, const argList &args, const objectRegistry &ob, const word ®ionName=polyMesh::defaultRegion)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Ostream & incrIndent(Ostream &os)
Increment the indent level.
labelList first(const UList< labelPair > &p)
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
Ostream & indent(Ostream &os)
Indent stream.
wordList patchNames(nPatches)
Foam::argList args(argc, argv)