STYLE: minor code formatting

This commit is contained in:
andy
2012-08-03 09:24:21 +01:00
parent 1618f764ab
commit a76bdc1bd2
13 changed files with 38 additions and 43 deletions

View File

@ -161,7 +161,7 @@
) )
); );
} }
else if(nuType == "field") else if (nuType == "field")
{ {
nuIO.readOpt() = IOobject::MUST_READ; nuIO.readOpt() = IOobject::MUST_READ;
nuPtr.reset nuPtr.reset

View File

@ -81,7 +81,7 @@ if (thermalStress)
); );
} }
else if(CType == "field") else if (CType == "field")
{ {
CIO.readOpt() = IOobject::MUST_READ; CIO.readOpt() = IOobject::MUST_READ;
@ -228,5 +228,4 @@ if (thermalStress)
threeKalpha = threeK*alpha; threeKalpha = threeK*alpha;
DT = k/C; DT = k/C;
} }

View File

@ -272,7 +272,7 @@ void FSD<CombThermoType, ThermoType>::calculateSourceNorm()
forAll(ft_, cellI) forAll(ft_, cellI)
{ {
if(ft_[cellI] < ftStoich) if (ft_[cellI] < ftStoich)
{ {
pc[cellI] = ft_[cellI]*(YprodTotal/ftStoich); pc[cellI] = ft_[cellI]*(YprodTotal/ftStoich);
} }

View File

@ -68,17 +68,11 @@ void Foam::interRegionHeatTransferModel::check()
} }
} }
if(!secSourceFound) if (!secSourceFound)
{ {
FatalErrorIn FatalErrorIn
( (
"constantHeatTransfer::interRegionHeatTransferModel" "constantHeatTransfer::interRegionHeatTransferModel::check()"
"("
" const word& name,"
" const word& modelType,"
" const dictionary& dict,"
" const fvMesh& mesh"
")"
) << "Secondary source name not found" << secondarySourceName_ ) << "Secondary source name not found" << secondarySourceName_
<< " in region " << secondaryMesh.name() << " in region " << secondaryMesh.name()
<< nl << nl
@ -125,9 +119,12 @@ Foam::interRegionHeatTransferModel::interRegionHeatTransferModel
} }
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::interRegionHeatTransferModel::~interRegionHeatTransferModel() Foam::interRegionHeatTransferModel::~interRegionHeatTransferModel()
{} {}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
@ -222,7 +219,7 @@ void Foam::interRegionHeatTransferModel::addSup
<< endl; << endl;
} }
} }
else if(h.dimensions() == dimTemperature) else if (h.dimensions() == dimTemperature)
{ {
eEqn += htc_*Tmapped - fvm::Sp(htc_, h); eEqn += htc_*Tmapped - fvm::Sp(htc_, h);
@ -269,4 +266,6 @@ bool Foam::interRegionHeatTransferModel::read(const dictionary& dict)
return false; return false;
} }
} }
// ************************************************************************* // // ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -68,15 +68,13 @@ Foam::scalar Foam::NoBinaryCollision<CloudType>::sigmaTcR
( (
"Foam::scalar Foam::NoBinaryCollision<CloudType>::sigmaTcR" "Foam::scalar Foam::NoBinaryCollision<CloudType>::sigmaTcR"
"(" "("
"label typeIdP," "const typename CloudType::parcelType&, "
"label typeIdQ," "const typename CloudType::parcelType"
"const vector& UP,"
"const vector& UQ"
") const" ") const"
) )
<< "sigmaTcR called on NoBinaryCollision model, this should " << "sigmaTcR called on NoBinaryCollision model, this should "
<< "not happen, this is not an actual model." << nl << "not happen, this is not an actual model." << nl
<< "Enclose calls to sigmaTcR within a if(binaryCollision().active()) " << "Enclose calls to sigmaTcR within a if (binaryCollision().active()) "
<< " check." << " check."
<< abort(FatalError); << abort(FatalError);

View File

@ -404,7 +404,7 @@ void Foam::SprayParcel<ParcelType>::solveTABEq
// oscillation frequency (squared) // oscillation frequency (squared)
scalar omega2 = TABComega*sigma/(rho*r3) - rtd*rtd; scalar omega2 = TABComega*sigma/(rho*r3) - rtd*rtd;
if(omega2 > 0) if (omega2 > 0)
{ {
scalar omega = sqrt(omega2); scalar omega = sqrt(omega2);
scalar rhoc = this->rhoc(); scalar rhoc = this->rhoc();

View File

@ -4,7 +4,7 @@
scalar minValue = min(d, dD/10.0); scalar minValue = min(d, dD/10.0);
scalar maxValue = dD; scalar maxValue = dD;
if(maxValue - minValue < SMALL) if (maxValue - minValue < SMALL)
{ {
minValue = d/10.0; minValue = d/10.0;
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -176,11 +176,11 @@ bool Foam::SHF<CloudType>::update
if (weGas > weConst_) if (weGas > weConst_)
{ {
if(weGas < weCrit1_) if (weGas < weCrit1_)
{ {
tCharSecond = c1_*pow((weGas - weConst_), cExp1_); tCharSecond = c1_*pow((weGas - weConst_), cExp1_);
} }
else if(weGas >= weCrit1_ && weGas <= weCrit2_) else if (weGas >= weCrit1_ && weGas <= weCrit2_)
{ {
tCharSecond = c2_*pow((weGas - weConst_), cExp2_); tCharSecond = c2_*pow((weGas - weConst_), cExp2_);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -163,7 +163,7 @@ void Foam::reconstructLagrangianFields
IOobjectList fields = objects.lookupClass(fieldClassName); IOobjectList fields = objects.lookupClass(fieldClassName);
if(fields.size()) if (fields.size())
{ {
Info<< " Reconstructing lagrangian " Info<< " Reconstructing lagrangian "
<< fieldClassName << "s\n" << endl; << fieldClassName << "s\n" << endl;

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -129,8 +129,7 @@ void Foam::sixDoFRigidBodyMotion::applyConstraints(scalar deltaT)
{ {
FatalErrorIn FatalErrorIn
( (
"Foam::sixDoFRigidBodyMotion::applyConstraints" "Foam::sixDoFRigidBodyMotion::applyConstraints(scalar)"
"(scalar deltaT)"
) )
<< nl << "Maximum number of sixDoFRigidBodyMotion constraint " << nl << "Maximum number of sixDoFRigidBodyMotion constraint "
<< "iterations (" << "iterations ("
@ -391,8 +390,8 @@ void Foam::sixDoFRigidBodyMotion::updatePosition
( (
"void Foam::sixDoFRigidBodyMotion::updatePosition" "void Foam::sixDoFRigidBodyMotion::updatePosition"
"(" "("
"scalar deltaT, " "scalar, "
"scalar deltaT0" "scalar"
")" ")"
) )
<< "Limited acceleration " << a() << "Limited acceleration " << a()
@ -449,9 +448,9 @@ void Foam::sixDoFRigidBodyMotion::updateForce
( (
"void Foam::sixDoFRigidBodyMotion::updateForce" "void Foam::sixDoFRigidBodyMotion::updateForce"
"(" "("
"const vector& fGlobal, " "const vector&, "
"const vector& tauGlobal, " "const vector&, "
"scalar deltaT" "scalar"
")" ")"
) )
<< "Limited acceleration " << a() << "Limited acceleration " << a()
@ -463,7 +462,7 @@ void Foam::sixDoFRigidBodyMotion::updateForce
pi() += 0.5*(1 - cDamp_)*deltaT*tau(); pi() += 0.5*(1 - cDamp_)*deltaT*tau();
if(report_) if (report_)
{ {
status(); status();
} }

View File

@ -55,7 +55,7 @@ Foam::wordList Foam::heThermo<BasicThermo, MixtureType>::heBoundaryTypes()
{ {
hbt[patchi] = gradientEnergyFvPatchScalarField::typeName; hbt[patchi] = gradientEnergyFvPatchScalarField::typeName;
} }
else if(isA<mixedFvPatchScalarField>(tbf[patchi])) else if (isA<mixedFvPatchScalarField>(tbf[patchi]))
{ {
hbt[patchi] = mixedEnergyFvPatchScalarField::typeName; hbt[patchi] = mixedEnergyFvPatchScalarField::typeName;
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -102,7 +102,7 @@ Foam::radiationCoupledBase::radiationCoupledBase
case LOOKUP: case LOOKUP:
{ {
if(!dict.found("emissivity")) if (!dict.found("emissivity"))
{ {
FatalIOErrorIn FatalIOErrorIn
( (

View File

@ -161,7 +161,7 @@ void Foam::solidReaction::setLRhs(Istream& is)
{ {
if (t == token::ADD) if (t == token::ADD)
{ {
if(isGas) if (isGas)
{ {
grhs_ = dlsrhs.shrink(); grhs_ = dlsrhs.shrink();
dlsrhs.clear(); dlsrhs.clear();
@ -177,7 +177,7 @@ void Foam::solidReaction::setLRhs(Istream& is)
} }
else if (t == token::ASSIGN) else if (t == token::ASSIGN)
{ {
if(isGas) if (isGas)
{ {
Info << "Pyrolysis Gases should appear on lhs of the" Info << "Pyrolysis Gases should appear on lhs of the"
"reaction" << endl; "reaction" << endl;
@ -188,7 +188,7 @@ void Foam::solidReaction::setLRhs(Istream& is)
dlsrhs.clear(); dlsrhs.clear();
} }
} }
else if(isGas) else if (isGas)
{ {
grhs_ = dlsrhs.shrink(); grhs_ = dlsrhs.shrink();
is.putBack(t); is.putBack(t);
@ -201,7 +201,7 @@ void Foam::solidReaction::setLRhs(Istream& is)
return; return;
} }
} }
else if(isGas) else if (isGas)
{ {
grhs_ = dlsrhs.shrink(); grhs_ = dlsrhs.shrink();
is.putBack(t); is.putBack(t);