52 int main(
int argc,
char *argv[])
56 "Write field and boundary condition info for each patch" 57 " at each requested time instance" 60 timeSelector::addOptions();
63 argList::addBoolOption
66 "Do not combine patches" 77 const polyBoundaryMesh& bm =
mesh.boundaryMesh();
82 runTime.setTime(timeDirs[timeI], timeI);
87 if (
mesh.readUpdate() == polyMesh::TOPO_PATCH_CHANGE)
89 Info<<
"Detected changed patches. Recreating patch group table." 93 const IOobjectList objects(
mesh,
runTime.timeName());
99 #define createFields(FieldType, Variable) \ 100 PtrList<FieldType> Variable \ 102 readFields<FieldType>(objects, mesh) \ 115 #define createFields(FieldType, Variable) \ 116 PtrList<FieldType> Variable \ 118 readFields<FieldType>(objects, pMesh) \ 138 Info<< bm[patchi].type() <<
"\t: " << bm[patchi].name() <<
nl;
160 DynamicList<HashTable<word>> fieldToTypes(bm.size());
162 DynamicList<DynamicList<label>> groupToPatches(bm.size());
166 HashTable<word> fieldToType;
179 label groupI = fieldToTypes.find(fieldToType);
182 DynamicList<label>
group(1);
183 group.append(patchi);
184 groupToPatches.append(
group);
185 fieldToTypes.append(fieldToType);
189 groupToPatches[groupI].append(patchi);
194 forAll(groupToPatches, groupI)
196 const DynamicList<label>&
patchIDs = groupToPatches[groupI];
203 bm.matchGroups(
patchIDs, groups, nonGroupPatches);
205 for (
const label patchi : nonGroupPatches.sortedToc())
207 Info<< bm[patchi].type()
208 <<
"\t: " << bm[patchi].name() <<
nl;
210 for (
const word& groupName : groups)
212 Info<<
"group\t: " << groupName <<
nl;
235 Info<< bm[patchi].type()
236 <<
"\t: " << bm[patchi].name() <<
nl;
const labelList patchIDs(pbm.indices(polyPatchNames, true))
GeometricField< symmTensor, fvPatchField, volMesh > volSymmTensorField
GeometricField< tensor, fvPatchField, volMesh > volTensorField
constexpr char nl
The newline '\n' character (0x0a)
Ostream & endl(Ostream &os)
Add newline and flush stream.
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.
GeometricField< vector, pointPatchField, pointMesh > pointVectorField
GeometricField< vector, fvPatchField, volMesh > volVectorField
void outputFieldList(const UPtrList< GeoField > &fieldList, const label patchi)
GeometricField< sphericalTensor, fvPatchField, volMesh > volSphericalTensorField
GeometricField< tensor, pointPatchField, pointMesh > pointTensorField
#define forAll(list, i)
Loop across all elements in list.
constexpr const char *const group
Group name for atomic constants.
GeometricField< scalar, fvPatchField, volMesh > volScalarField
HashSet< label, Hash< label > > labelHashSet
A HashSet of labels, uses label hasher.
GeometricField< scalar, pointPatchField, pointMesh > pointScalarField
GeometricField< sphericalTensor, pointPatchField, pointMesh > pointSphericalTensorField
List< word > wordList
List of word.
messageStream Info
Information stream (stdout output on master, null elsewhere)
List< instant > instantList
List of instants.
Foam::argList args(argc, argv)
GeometricField< symmTensor, pointPatchField, pointMesh > pointSymmTensorField
bool found(const word &optName) const
Return true if the named option is found.
void collectFieldList(const UPtrList< GeoField > &fieldList, const label patchi, HashTable< word > &fieldToType)
string expand(const std::string &s, const HashTable< string > &mapping, const char sigil='$')
Expand occurrences of variables according to the mapping and return the expanded string.