Corrected constructors for clang

This commit is contained in:
Henry
2011-06-09 13:45:02 +01:00
parent 84bdcedb33
commit 9ef2864870
3 changed files with 11 additions and 7 deletions

View File

@ -94,13 +94,15 @@ functions
Info<< "\nEvaluating analytical solution" << endl;
volVectorField centres = UA.mesh().C();
volScalarField magCentres = mag(centres);
volScalarField theta = acos((centres & vector(1,0,0))/magCentres);
const volVectorField& centres = UA.mesh().C();
volScalarField magCentres(mag(centres));
volScalarField theta(acos((centres & vector(1,0,0))/magCentres));
volVectorField cs2theta =
volVectorField cs2theta
(
cos(2*theta)*vector(1,0,0)
+ sin(2*theta)*vector(0,1,0);
+ sin(2*theta)*vector(0,1,0)
);
UA = uInfX*(dimensionedVector(vector(1,0,0))
- pow((radius/magCentres),2)*cs2theta);
@ -109,8 +111,10 @@ functions
UA.write();
volScalarField error("error", mag(U-UA)/mag(UA));
Info<<"Writing relative error in U to " << error.objectPath()
<< endl;
error.write();
#};
}