[bugfix]: recover velocity field in a more general way.

avoiding compilation failure in e.g. waves2Foam
This commit is contained in:
Danial Khazaei 2019-02-15 23:19:15 +03:30
parent be47d0ece1
commit c429f3b275
No known key found for this signature in database
GPG key ID: F4F9B78264E84372

View file

@ -61,7 +61,11 @@ else
const scalar deltaX = Foam::cbrt(mesh.V()[0]); const scalar deltaX = Foam::cbrt(mesh.V()[0]);
velMag = mag(U[0]); // recover velocity field in a more general way
const volVectorField& URef
= mesh.db().lookupObject<const volVectorField>("U");
velMag = mag(URef[0]);
CoNum = velMag*deltaT/deltaX; CoNum = velMag*deltaT/deltaX;