ENH: Added invertAlpha option to the setAlphaField utility. Fixes #1113

This commit is contained in:
Johan Roenby
2018-12-10 11:33:57 +00:00
committed by Andrew Heather
parent ef6eb77712
commit 9f45518378

View File

@ -177,6 +177,11 @@ int main(int argc, char *argv[])
isoCutCell icc(mesh, f);
icc.volumeOfFluid(alpha1, f0);
if (dict.lookupOrDefault("invertAlpha", false))
{
alpha1 = 1 - alpha1;
}
// Writing volScalarField alpha1
ISstream::defaultPrecision(18);
alpha1.write();