77 uniqueMeshPointLabels,
87 globalFaces().gather(wghtSum, mergedWeights);
91 if (Pstream::master())
97 (directory/prefix +
"_" + inst.name()),
106 writer.write(
"weightsSum", mergedWeights);
115 mesh.time().globalPath()/functionObject::outputPrefix/
"checkAMI"
120 const auto* cpp = isA<cyclicAMIPolyPatch>(pp);
122 if (cpp && cpp->owner())
124 const auto& cycPatch = *cpp;
125 const auto& nbrPatch = cycPatch.neighbPatch();
129 Info<<
"Calculating AMI weights between owner patch: "
130 << cycPatch.name() <<
" and neighbour patch: "
131 << nbrPatch.name() <<
endl;
157int main(
int argc,
char *argv[])
161 "Mesh motion and topological mesh changes utility"
166 argList::addBoolOption
169 "Check AMI weights and write VTK files of the AMI patches"
176 const bool checkAMI =
args.
found(
"checkAMI");
180 Info<<
"Writing VTK files with weights of AMI patches." <<
nl <<
endl;
183 const bool overwrite =
args.
found(
"overwrite");
184 const word oldInstance =
mesh.pointsInstance();
191 pimple.dict().getOrDefault(
"moveMeshOuterCorrectors",
false)
208 mesh.setInstance(oldInstance);
210 runTime.printExecutionTime(Info);
215 mesh.checkMesh(
true);
224 runTime.printExecutionTime(Info);
vtk::internalMeshWriter writer(topoMesh, topoCells, vtk::formatType::INLINE_ASCII, runTime.path()/"blockTopology")
Interpolation class dealing with transfer of data between two primitive patches with an arbitrary mes...
const scalarField & srcWeightsSum() const
const scalarField & tgtWeightsSum() const
A list of faces which address into the list of points.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
bool found(const word &optName) const
Return true if the named option is found.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A class for handling file names.
Calculates points shared by more than two processor patches or cyclic patches.
An instant of time. Contains the time value and name. Uses Foam::Time when formatting the name.
PIMPLE control class to supply convergence information/checks for the PIMPLE loop.
Mesh consisting of general polyhedral cells.
A patch is a list of labels that address the faces in the global face list.
Write faces/points (optionally with fields) as a vtp file or a legacy vtk file.
A class for handling words, derived from Foam::string.
const std::string patch
OpenFOAM patch number as a std::string.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
constexpr char nl
The newline '\n' character (0x0a)
Foam::argList args(argc, argv)