mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: foamFileSurfaceWriter.C : output faceCentres for convenient use with e.g. timeVaryingMapped
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user