Skip to content
Snippets Groups Projects
Commit d71c87ff authored by mattijs's avatar mattijs
Browse files

ENH: foamFileSurfaceWriter.C : output faceCentres for convenient use with e.g. timeVaryingMapped

parent 3bbd7ef1
No related merge requests found
......@@ -73,6 +73,17 @@ void Foam::foamFileSurfaceWriter<Type>::write
// Faces
OFstream(surfaceDir/"faces")() << faces;
// Face centers. Not really necessary but very handy when reusing as inputs
// for e.g. timeVaryingMapped bc.
pointField faceCentres(faces.size(),point::zero);
forAll (faces, faceI)
{
faceCentres[faceI] = faces[faceI].centre(points);
}
OFstream(surfaceDir/"faceCentres")() << faceCentres;
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment