mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Corrected constructors for clang
This commit is contained in:
@ -198,7 +198,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
const label cellI = args.optionLookupOrDefault("cell", 0);
|
const label cellI = args.optionLookupOrDefault("cell", 0);
|
||||||
|
|
||||||
tensorField mI = momentOfInertia::meshInertia(mesh);
|
tensorField mI(momentOfInertia::meshInertia(mesh));
|
||||||
|
|
||||||
tensor& J = mI[cellI];
|
tensor& J = mI[cellI];
|
||||||
|
|
||||||
|
|||||||
@ -60,7 +60,7 @@ int main(int argc, char *argv[])
|
|||||||
pointPatchVectorField::calculatedType()
|
pointPatchVectorField::calculatedType()
|
||||||
);
|
);
|
||||||
|
|
||||||
pointVectorField V = U + 2*U;
|
pointVectorField V(U + 2*U);
|
||||||
|
|
||||||
Info<< "End\n" << endl;
|
Info<< "End\n" << endl;
|
||||||
|
|
||||||
|
|||||||
@ -94,13 +94,15 @@ functions
|
|||||||
|
|
||||||
Info<< "\nEvaluating analytical solution" << endl;
|
Info<< "\nEvaluating analytical solution" << endl;
|
||||||
|
|
||||||
volVectorField centres = UA.mesh().C();
|
const volVectorField& centres = UA.mesh().C();
|
||||||
volScalarField magCentres = mag(centres);
|
volScalarField magCentres(mag(centres));
|
||||||
volScalarField theta = acos((centres & vector(1,0,0))/magCentres);
|
volScalarField theta(acos((centres & vector(1,0,0))/magCentres));
|
||||||
|
|
||||||
volVectorField cs2theta =
|
volVectorField cs2theta
|
||||||
|
(
|
||||||
cos(2*theta)*vector(1,0,0)
|
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))
|
UA = uInfX*(dimensionedVector(vector(1,0,0))
|
||||||
- pow((radius/magCentres),2)*cs2theta);
|
- pow((radius/magCentres),2)*cs2theta);
|
||||||
@ -109,8 +111,10 @@ functions
|
|||||||
UA.write();
|
UA.write();
|
||||||
|
|
||||||
volScalarField error("error", mag(U-UA)/mag(UA));
|
volScalarField error("error", mag(U-UA)/mag(UA));
|
||||||
|
|
||||||
Info<<"Writing relative error in U to " << error.objectPath()
|
Info<<"Writing relative error in U to " << error.objectPath()
|
||||||
<< endl;
|
<< endl;
|
||||||
|
|
||||||
error.write();
|
error.write();
|
||||||
#};
|
#};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user