ENH: writeCellCentres: dump cell volume, patch face area

This commit is contained in:
mattijs 2013-05-02 12:51:29 +01:00
parent c7dbe491c6
commit a0fc2bc0f2

View File

@ -98,6 +98,7 @@ int main(int argc, char *argv[])
cci.write();
}
volScalarField V
(
IOobject
@ -110,10 +111,19 @@ int main(int argc, char *argv[])
false
),
mesh,
dimensionedScalar("V", mesh.V().dimensions(), 0.0),
calculatedFvPatchField<scalar>::typeName
);
mesh.V().setInstance(runTime.timeName());
mesh.V().write();
V.dimensionedInternalField() = mesh.V();
forAll(V.boundaryField(), patchI)
{
V.boundaryField()[patchI] =
V.boundaryField()[patchI].patch().magSf();
}
Info<< "Writing cellVolumes and patch faceAreas to " << V.name()
<< " in " << runTime.timeName() << endl;
V.write();
}
Info<< "\nEnd\n" << endl;