Updated support for clang-3.1

This commit is contained in:
Henry
2012-06-06 17:45:18 +01:00
parent 3c6d730b5a
commit 2d2ad386a6
20 changed files with 30 additions and 30 deletions

View File

@ -13,8 +13,8 @@
volScalarField rAU1(1.0/U1Eqn.A()); volScalarField rAU1(1.0/U1Eqn.A());
volScalarField rAU2(1.0/U2Eqn.A()); volScalarField rAU2(1.0/U2Eqn.A());
surfaceScalarField rAlphaAU1f = fvc::interpolate(alpha1*rAU1); surfaceScalarField rAlphaAU1f(fvc::interpolate(alpha1*rAU1));
surfaceScalarField rAlphaAU2f = fvc::interpolate(alpha2*rAU2); surfaceScalarField rAlphaAU2f(fvc::interpolate(alpha2*rAU2));
volVectorField HbyA1("HbyA1", U1); volVectorField HbyA1("HbyA1", U1);
HbyA1 = rAU1*U1Eqn.H(); HbyA1 = rAU1*U1Eqn.H();
@ -104,7 +104,7 @@
if (pimple.finalNonOrthogonalIter()) if (pimple.finalNonOrthogonalIter())
{ {
surfaceScalarField mSfGradp = pEqnIncomp.flux()/Dp; surfaceScalarField mSfGradp(pEqnIncomp.flux()/Dp);
phi1 = phiHbyA1 + rAlphaAU1f*mSfGradp/fvc::interpolate(rho1); phi1 = phiHbyA1 + rAlphaAU1f*mSfGradp/fvc::interpolate(rho1);
phi2 = phiHbyA2 + rAlphaAU2f*mSfGradp/fvc::interpolate(rho2); phi2 = phiHbyA2 + rAlphaAU2f*mSfGradp/fvc::interpolate(rho2);

View File

@ -71,7 +71,7 @@ Foam::tmp<Foam::volScalarField> Foam::dragModels::GidaspowErgunWenYu::K
) const ) const
{ {
volScalarField alpha2(max(phase2_, scalar(1.0e-6))); volScalarField alpha2(max(phase2_, scalar(1.0e-6)));
volScalarField d = phase1_.d(); volScalarField d(phase1_.d());
volScalarField bp(pow(alpha2, -2.65)); volScalarField bp(pow(alpha2, -2.65));
volScalarField Re(max(Ur*d/phase2_.nu(), scalar(1.0e-3))); volScalarField Re(max(Ur*d/phase2_.nu(), scalar(1.0e-3)));

View File

@ -189,9 +189,9 @@
Info<< "Calculating Lame's coefficients\n" << endl; Info<< "Calculating Lame's coefficients\n" << endl;
volScalarField mu = E/(2.0*(1.0 + nu)); volScalarField mu(E/(2.0*(1.0 + nu)));
volScalarField lambda = nu*E/((1.0 + nu)*(1.0 - 2.0*nu)); volScalarField lambda(nu*E/((1.0 + nu)*(1.0 - 2.0*nu)));
volScalarField threeK = E/(1.0 - 2.0*nu); volScalarField threeK(E/(1.0 - 2.0*nu));
Switch planeStress(mechanicalProperties.lookup("planeStress")); Switch planeStress(mechanicalProperties.lookup("planeStress"));

View File

@ -159,9 +159,9 @@ void tractionDisplacementCorrectionFvPatchVectorField::updateCoeffs()
const fvPatchField<scalar>& nu = const fvPatchField<scalar>& nu =
patch().lookupPatchField<volScalarField, scalar>("nu"); patch().lookupPatchField<volScalarField, scalar>("nu");
scalarField E = rhoE/rho; scalarField E(rhoE/rho);
scalarField mu = E/(2.0*(1.0 + nu)); scalarField mu(E/(2.0*(1.0 + nu)));
scalarField lambda = nu*E/((1.0 + nu)*(1.0 - 2.0*nu)); scalarField lambda(nu*E/((1.0 + nu)*(1.0 - 2.0*nu)));
Switch planeStress(mechanicalProperties.lookup("planeStress")); Switch planeStress(mechanicalProperties.lookup("planeStress"));

View File

@ -242,8 +242,8 @@ case ThirdParty:
# using clang - not gcc # using clang - not gcc
setenv WM_CC 'clang' setenv WM_CC 'clang'
setenv WM_CXX 'clang++' setenv WM_CXX 'clang++'
#set clang_version=llvm-2.9 set clang_version=llvm-3.1
set clang_version=llvm-svn #set clang_version=llvm-svn
breaksw breaksw
default: default:
echo echo

View File

@ -264,8 +264,8 @@ OpenFOAM | ThirdParty)
# using clang - not gcc # using clang - not gcc
export WM_CC='clang' export WM_CC='clang'
export WM_CXX='clang++' export WM_CXX='clang++'
#clang_version=llvm-2.9 clang_version=llvm-3.1
clang_version=llvm-svn #clang_version=llvm-svn
;; ;;
*) *)
echo echo

View File

@ -132,7 +132,7 @@ void Foam::cylindricalInletVelocityFvPatchVectorField::updateCoeffs()
vector hatAxis = axis_/mag(axis_); vector hatAxis = axis_/mag(axis_);
const vectorField r(patch().Cf() - centre_); const vectorField r(patch().Cf() - centre_);
const vectorField d = r - (hatAxis & r)*hatAxis; const vectorField d(r - (hatAxis & r)*hatAxis);
tmp<vectorField> tangVel tmp<vectorField> tangVel
( (

View File

@ -136,7 +136,7 @@ void Foam::variableHeightFlowRateFvPatchScalarField::updateCoeffs()
const fvsPatchField<scalar>& phip = const fvsPatchField<scalar>& phip =
patch().lookupPatchField<surfaceScalarField, scalar>(phiName_); patch().lookupPatchField<surfaceScalarField, scalar>(phiName_);
scalarField alphap = this->patchInternalField(); scalarField alphap(this->patchInternalField());
forAll(phip, i) forAll(phip, i)

View File

@ -113,7 +113,7 @@ void Foam::variableHeightFlowRateInletVelocityFvPatchVectorField
// a simpler way of doing this would be nice // a simpler way of doing this would be nice
scalar avgU = -flowRate_/gSum(patch().magSf()*alphap); scalar avgU = -flowRate_/gSum(patch().magSf()*alphap);
vectorField n = patch().nf(); vectorField n(patch().nf());
operator==(n*avgU*alphap); operator==(n*avgU*alphap);

View File

@ -27,7 +27,7 @@ License
#include "dictionary.H" #include "dictionary.H"
#include "fvMesh.H" #include "fvMesh.H"
#include "fvPatchFieldMapper.H" #include "fvPatchFieldMapper.H"
//#include "fvMatrices.H" #include "volMesh.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //

View File

@ -138,7 +138,7 @@ void Foam::extendedLeastSquaresVectors::makeLeastSquaresVectors() const
const labelUList& faceCells = p.faceCells(); const labelUList& faceCells = p.faceCells();
// Build the d-vectors // Build the d-vectors
vectorField pd = p.delta(); vectorField pd(p.delta());
forAll(pd, patchFaceI) forAll(pd, patchFaceI)
{ {
@ -252,7 +252,7 @@ void Foam::extendedLeastSquaresVectors::makeLeastSquaresVectors() const
const labelUList& faceCells = p.faceCells(); const labelUList& faceCells = p.faceCells();
// Build the d-vectors // Build the d-vectors
vectorField pd = p.delta(); vectorField pd(p.delta());
forAll(p, patchFaceI) forAll(p, patchFaceI)
{ {

View File

@ -126,7 +126,7 @@ Foam::fv::fourthGrad<Type>::calcGrad
const labelUList& faceCells = p.faceCells(); const labelUList& faceCells = p.faceCells();
// Build the d-vectors // Build the d-vectors
vectorField pd = p.delta(); vectorField pd(p.delta());
const Field<GradType> neighbourSecondfGrad const Field<GradType> neighbourSecondfGrad
( (

View File

@ -132,7 +132,7 @@ void Foam::leastSquaresVectors::makeLeastSquaresVectors() const
const labelUList& faceCells = p.patch().faceCells(); const labelUList& faceCells = p.patch().faceCells();
// Build the d-vectors // Build the d-vectors
vectorField pd = p.delta(); vectorField pd(p.delta());
if (pw.coupled()) if (pw.coupled())
{ {
@ -185,7 +185,7 @@ void Foam::leastSquaresVectors::makeLeastSquaresVectors() const
const labelUList& faceCells = p.faceCells(); const labelUList& faceCells = p.faceCells();
// Build the d-vectors // Build the d-vectors
vectorField pd = p.delta(); vectorField pd(p.delta());
if (pw.coupled()) if (pw.coupled())
{ {

View File

@ -122,7 +122,7 @@ Foam::LimitedScheme<Type, Limiter, LimitFunc>::limiter
); );
// Build the d-vectors // Build the d-vectors
vectorField pd = CDweights.boundaryField()[patchi].patch().delta(); vectorField pd(CDweights.boundaryField()[patchi].patch().delta());
forAll(pLim, face) forAll(pLim, face)
{ {

View File

@ -111,7 +111,7 @@ Foam::linearUpwind<Type>::correction
); );
// Build the d-vectors // Build the d-vectors
vectorField pd = Cf.boundaryField()[patchi].patch().delta(); vectorField pd(Cf.boundaryField()[patchi].patch().delta());
forAll(pOwner, facei) forAll(pOwner, facei)
{ {

View File

@ -111,7 +111,7 @@ void Foam::skewCorrectionVectors::makeSkewCorrectionVectors() const
const labelUList& faceCells = p.faceCells(); const labelUList& faceCells = p.faceCells();
const vectorField& patchFaceCentres = Cf.boundaryField()[patchI]; const vectorField& patchFaceCentres = Cf.boundaryField()[patchI];
const vectorField& patchSf = Sf.boundaryField()[patchI]; const vectorField& patchSf = Sf.boundaryField()[patchI];
const vectorField patchD = p.delta(); const vectorField patchD(p.delta());
forAll(p, patchFaceI) forAll(p, patchFaceI)
{ {

View File

@ -294,7 +294,7 @@ void Foam::surfaceInterpolation::makeNonOrthDeltaCoeffs() const
forAll(nonOrthDeltaCoeffs.boundaryField(), patchi) forAll(nonOrthDeltaCoeffs.boundaryField(), patchi)
{ {
vectorField delta = mesh_.boundary()[patchi].delta(); vectorField delta(mesh_.boundary()[patchi].delta());
nonOrthDeltaCoeffs.boundaryField()[patchi] = nonOrthDeltaCoeffs.boundaryField()[patchi] =
1.0/max(mesh_.boundary()[patchi].nf() & delta, 0.05*mag(delta)); 1.0/max(mesh_.boundary()[patchi].nf() & delta, 0.05*mag(delta));

View File

@ -108,7 +108,7 @@ void htcConvFvPatchScalarField::updateCoeffs()
const label patchI = patch().index(); const label patchI = patch().index();
const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties"); const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
const scalarField alphaEffw = rasModel.alphaEff(patchI); const scalarField alphaEffw(rasModel.alphaEff(patchI));
const scalarField& muw = rasModel.mu().boundaryField()[patchI]; const scalarField& muw = rasModel.mu().boundaryField()[patchI];
const scalarField& rhow = rasModel.rho().boundaryField()[patchI]; const scalarField& rhow = rasModel.rho().boundaryField()[patchI];
const vectorField& Uc = rasModel.U(); const vectorField& Uc = rasModel.U();

View File

@ -158,7 +158,7 @@ void Foam::totalFlowRateAdvectiveDiffusiveFvPatchScalarField::updateCoeffs()
const fvsPatchField<scalar>& phip = const fvsPatchField<scalar>& phip =
patch().lookupPatchField<surfaceScalarField, scalar>(phiName_); patch().lookupPatchField<surfaceScalarField, scalar>(phiName_);
const scalarField alphap = turbulence.alphaEff(patchI); const scalarField alphap(turbulence.alphaEff(patchI));
refValue() = 1.0; refValue() = 1.0;
refGrad() = 0.0; refGrad() = 0.0;

View File

@ -1,7 +1,7 @@
.SUFFIXES: .C .cxx .cc .cpp .SUFFIXES: .C .cxx .cc .cpp
# -Woverloaded-virtual may produce spurious warnings, disable for now # -Woverloaded-virtual may produce spurious warnings, disable for now
c++WARN = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -Wno-overloaded-virtual c++WARN = -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -Wno-overloaded-virtual -Wno-unused-comparison
CC = clang++ -m64 CC = clang++ -m64