mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of ssh://noisy/home/noisy3/OpenFOAM/OpenFOAM-dev
This commit is contained in:
@ -39,7 +39,6 @@
|
||||
#
|
||||
# Checks for
|
||||
# - illegal code, e.g. <TAB>
|
||||
# - copyright is current, e.g. if present, contains XXX-<current-year>
|
||||
# - columns greater than 80 for *.[CH] files
|
||||
#
|
||||
# Note
|
||||
@ -138,8 +137,8 @@ checkIllegalCode()
|
||||
{
|
||||
echo "$hookName: check bad strings/characters etc ..." 1>&2
|
||||
|
||||
reBad="(N""abla|"$'\t'")"
|
||||
msgBad="N""abla or <TAB>"
|
||||
reBad="("$'\t'")"
|
||||
msgBad="<TAB>"
|
||||
|
||||
scope=$(gitScope $@)
|
||||
|
||||
@ -167,40 +166,6 @@ checkIllegalCode()
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# check that OpenCFD copyright is current
|
||||
#
|
||||
checkCopyright()
|
||||
{
|
||||
year=$(date +%Y)
|
||||
echo "$hookName: check copyright ..." 1>&2
|
||||
|
||||
scope=$(gitScope $@)
|
||||
|
||||
badFiles=$(
|
||||
for f in $fileList
|
||||
do
|
||||
# NB: need to have OpenCFD on a separate line to prevent
|
||||
# this check being caught by itself!
|
||||
#
|
||||
# parse line numbers from grep output:
|
||||
# <lineNr>: contents
|
||||
#
|
||||
lines=$(git grep -F -hn -e Copyright \
|
||||
--and -e OpenCFD \
|
||||
--and --not -e "$year" \
|
||||
$scope"$f" |
|
||||
sed -e 's@:.*@@' |
|
||||
tr '\n' ' '
|
||||
)
|
||||
[ -n "$lines" ] && echo "$Indent$f -- lines: $lines"
|
||||
done
|
||||
)
|
||||
|
||||
dieOnBadFiles "Update copyright year, e.g. XXXX-$year"
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# limit line length to 80-columns
|
||||
#
|
||||
@ -308,9 +273,6 @@ bad=$(git diff-index --cached --check $against --) || die "$bad"
|
||||
# check for illegal code, e.g. <TAB>, etc
|
||||
checkIllegalCode
|
||||
|
||||
# ensure OpenCFD copyright contains correct year
|
||||
checkCopyright
|
||||
|
||||
# ensure code conforms to 80 columns max
|
||||
checkLineLengthNonDirective
|
||||
|
||||
|
||||
@ -39,7 +39,6 @@
|
||||
#
|
||||
# Checks for
|
||||
# - illegal code, e.g. <TAB>
|
||||
# - copyright is current, e.g. if present, contains XXX-<current-year>
|
||||
# - columns greater than 80 for *.[CH] files
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
@ -101,8 +100,8 @@ checkIllegalCode()
|
||||
{
|
||||
echo "$hookName: check bad strings/characters etc ..." 1>&2
|
||||
|
||||
reBad="(N""abla|"$'\t'"|"$'\r\n'")"
|
||||
msgBad="N""abla, <TAB> or DOS-line-endings"
|
||||
reBad="("$'\t'"|"$'\r\n'")"
|
||||
msgBad="<TAB> or DOS-line-endings"
|
||||
|
||||
scope=$(gitScope $@)
|
||||
|
||||
@ -130,40 +129,6 @@ checkIllegalCode()
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# check that OpenCFD copyright is current
|
||||
#
|
||||
checkCopyright()
|
||||
{
|
||||
year=$(date +%Y)
|
||||
echo "$hookName: check copyright ..." 1>&2
|
||||
|
||||
scope=$(gitScope $@)
|
||||
|
||||
badFiles=$(
|
||||
for f in $fileList
|
||||
do
|
||||
# NB: need to have OpenCFD on a separate line to prevent
|
||||
# this check being caught by itself!
|
||||
#
|
||||
# parse line numbers from grep output:
|
||||
# <lineNr>: contents
|
||||
#
|
||||
lines=$(git grep -F -hn -e Copyright \
|
||||
--and -e OpenCFD \
|
||||
--and --not -e "$year" \
|
||||
$scope"$f" |
|
||||
sed -e 's@:.*@@' |
|
||||
tr '\n' ' '
|
||||
)
|
||||
[ -n "$lines" ] && echo "$Indent$f -- lines: $lines"
|
||||
done
|
||||
)
|
||||
|
||||
dieOnBadFiles "Update copyright year, e.g. XXXX-$year"
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# limit line length to 80-columns
|
||||
#
|
||||
@ -297,9 +262,6 @@ do
|
||||
# check for illegal code, e.g. <TAB>, etc
|
||||
checkIllegalCode $newSHA1
|
||||
|
||||
# ensure OpenCFD copyright contains correct year
|
||||
checkCopyright $newSHA1
|
||||
|
||||
# ensure code conforms to 80 columns max
|
||||
checkLineLengthNonDirective $newSHA1
|
||||
|
||||
|
||||
@ -102,7 +102,6 @@ Foam::radiation::viewFactor::viewFactor(const volScalarField& T)
|
||||
iterCounter_(0),
|
||||
pivotIndices_(0)
|
||||
{
|
||||
|
||||
const polyBoundaryMesh& coarsePatches = coarseMesh_.boundaryMesh();
|
||||
const volScalarField::GeometricBoundaryField& Qrp = Qr_.boundaryField();
|
||||
|
||||
@ -124,7 +123,7 @@ Foam::radiation::viewFactor::viewFactor(const volScalarField& T)
|
||||
|
||||
if (debug)
|
||||
{
|
||||
Pout << "SelectedPatches:" << selectedPatches_ << endl;
|
||||
Pout<< "Selected patches:" << selectedPatches_ << endl;
|
||||
Pout<< "Number of coarse faces:" << nLocalCoarseFaces_ << endl;
|
||||
}
|
||||
|
||||
@ -228,7 +227,7 @@ Foam::radiation::viewFactor::viewFactor(const volScalarField& T)
|
||||
new scalarSquareMatrix(totalNCoarseFaces_, totalNCoarseFaces_, 0.0)
|
||||
);
|
||||
|
||||
Info << "Insert elemets in the matrix.." << endl;
|
||||
Info<< "Insert elements in the matrix..." << endl;
|
||||
|
||||
for (label procI = 0; procI < Pstream::nProcs(); procI++)
|
||||
{
|
||||
@ -479,7 +478,7 @@ void Foam::radiation::viewFactor::calculate()
|
||||
}
|
||||
}
|
||||
|
||||
Info<< "\nSolving view factor equations.." << endl;
|
||||
Info<< "\nSolving view factor equations..." << endl;
|
||||
// Negative coming into the fluid
|
||||
LUsolve(C, q);
|
||||
}
|
||||
@ -503,7 +502,7 @@ void Foam::radiation::viewFactor::calculate()
|
||||
}
|
||||
}
|
||||
}
|
||||
Info<< "\nDecomposing C matrix.." << endl;
|
||||
Info<< "\nDecomposing C matrix..." << endl;
|
||||
LUDecompose(CLU_(), pivotIndices_);
|
||||
}
|
||||
|
||||
@ -616,13 +615,13 @@ Foam::tmp<Foam::volScalarField> Foam::radiation::viewFactor::Rp() const
|
||||
Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh> >
|
||||
Foam::radiation::viewFactor::Ru() const
|
||||
{
|
||||
tmp<DimensionedField<scalar, volMesh> > tRu
|
||||
return tmp<DimensionedField<scalar, volMesh> >
|
||||
(
|
||||
new DimensionedField<scalar, volMesh>
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"tRu",
|
||||
"Ru",
|
||||
mesh_.time().timeName(),
|
||||
mesh_,
|
||||
IOobject::NO_READ,
|
||||
@ -633,8 +632,6 @@ Foam::radiation::viewFactor::Ru() const
|
||||
dimensionedScalar("zero", dimMass/dimLength/pow3(dimTime), 0.0)
|
||||
)
|
||||
);
|
||||
|
||||
return tRu;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||
\\ / A nd | Copyright (C) 2011-2011 OpenCFD Ltd.
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -23,7 +23,6 @@ License
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
inline const Foam::volScalarField& Foam::radiation::viewFactor::Qr() const
|
||||
{
|
||||
return Qr_;
|
||||
|
||||
Reference in New Issue
Block a user