STYLE: trailing whitespace, doxygen, error messages from fileOperation

This commit is contained in:
Mark Olesen
2017-12-13 17:56:34 +01:00
parent 0af97856f1
commit bc8420e14f
33 changed files with 65 additions and 102 deletions

View File

@ -36,7 +36,7 @@ namespace Foam
namespace dragModels namespace dragModels
{ {
defineTypeNameAndDebug(GidaspowErgunWenYu, 0); defineTypeNameAndDebug(GidaspowErgunWenYu, 0);
addToRunTimeSelectionTable(dragModel, GidaspowErgunWenYu, dictionary); addToRunTimeSelectionTable(dragModel, GidaspowErgunWenYu, dictionary);
} }
} }

View File

@ -1,5 +1,5 @@
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude -I$(LIB_SRC)/finiteVolume/lnInclude
EXE_LIBS = \ EXE_LIBS = \
-lfiniteVolume \ -lfiniteVolume \

View File

@ -1,16 +1,13 @@
#!/bin/bash #!/bin/sh
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Script # Script
# find-trailingspace # git-find-trailingspace
# #
# Description # Description
# Search for files with trailing whitesapce # Use git grep to search for files with trailing whitespace
# #
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
cd $WM_PROJECT_DIR || exit 1
tab=$'\t' git grep -c -P '\s+$' -- $@
git grep -c -E "[ $tab]+"'$' -- $@
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -1,15 +0,0 @@
Misc. tools for finding and/or repairing common documentation problems
See the comments in the scripts.
1. find-suspiciousTags
2. fix-Class
3. find-tinyDescription
4. find-placeholderDescription
5. find-retagged
Misc Tools
1. find-templateInComments
2. find-its
3. find-junkFiles
4. find-longlines

View File

@ -227,12 +227,6 @@ Foam::fileOperations::collatedFileOperation::collatedFileOperation
} }
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::fileOperations::collatedFileOperation::~collatedFileOperation()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::fileName Foam::fileOperations::collatedFileOperation::objectPath Foam::fileName Foam::fileOperations::collatedFileOperation::objectPath

View File

@ -99,7 +99,7 @@ public:
//- Destructor //- Destructor
virtual ~collatedFileOperation(); virtual ~collatedFileOperation() = default;
// Member Functions // Member Functions

View File

@ -54,10 +54,10 @@ namespace Foam
false false
) )
); );
word fileOperation::processorsDir = "processors";
} }
Foam::word Foam::fileOperation::processorsDir = "processors";
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
@ -143,30 +143,25 @@ bool Foam::fileOperation::isFileOrDir(const bool isFile, const fileName& f)
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::fileOperation::fileOperation()
{}
Foam::autoPtr<Foam::fileOperation> Foam::fileOperation::New Foam::autoPtr<Foam::fileOperation> Foam::fileOperation::New
( (
const word& type, const word& handlerType,
const bool verbose const bool verbose
) )
{ {
if (debug) if (debug)
{ {
InfoInFunction << "Constructing fileOperation" << endl; InfoInFunction << "Constructing fileHandler" << endl;
} }
wordConstructorTable::iterator cstrIter = auto cstrIter = wordConstructorTablePtr_->cfind(handlerType);
wordConstructorTablePtr_->find(type);
if (cstrIter == wordConstructorTablePtr_->end()) if (!cstrIter.found())
{ {
FatalErrorInFunction FatalErrorInFunction
<< "Unknown fileOperation type " << "Unknown fileHandler type "
<< type << nl << nl << handlerType << nl << nl
<< "Valid fileOperation types are" << endl << "Valid fileHandler types :" << endl
<< wordConstructorTablePtr_->sortedToc() << wordConstructorTablePtr_->sortedToc()
<< abort(FatalError); << abort(FatalError);
} }
@ -175,12 +170,6 @@ Foam::autoPtr<Foam::fileOperation> Foam::fileOperation::New
} }
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::fileOperation::~fileOperation()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::fileName Foam::fileOperation::objectPath Foam::fileName Foam::fileOperation::objectPath
@ -278,10 +267,8 @@ Foam::fileName Foam::fileOperation::filePath(const fileName& fName) const
{ {
return fName; return fName;
} }
else
{ return fileName::null;
return fileName::null;
}
} }

View File

@ -24,6 +24,15 @@ License
Class Class
Foam::fileOperation Foam::fileOperation
Description
An encapsulation of filesystem-related operations.
Namespace
Foam::fileOperations
Description
Namespace for implementations of a fileOperation
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef fileOperation_H #ifndef fileOperation_H
@ -75,7 +84,7 @@ public:
// Static data // Static data
//- Return the processors directory name (usually "processors") //- The processors directory name (usually "processors")
static word processorsDir; static word processorsDir;
//- Default fileHandler //- Default fileHandler
@ -108,7 +117,7 @@ public:
// Constructors // Constructors
//- Construct null //- Construct null
fileOperation(); fileOperation() = default;
// Declare run-time constructor selection table // Declare run-time constructor selection table
@ -127,12 +136,16 @@ public:
// Selectors // Selectors
//- Select type //- Select fileHandler-type
static autoPtr<fileOperation> New(const word& type, const bool verbose); static autoPtr<fileOperation> New
(
const word& handlerType,
const bool verbose
);
//- Destructor //- Destructor
virtual ~fileOperation(); virtual ~fileOperation() = default;
// Member Functions // Member Functions

View File

@ -489,13 +489,6 @@ masterUncollatedFileOperation
} }
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::fileOperations::masterUncollatedFileOperation::
~masterUncollatedFileOperation()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
bool Foam::fileOperations::masterUncollatedFileOperation::mkDir bool Foam::fileOperations::masterUncollatedFileOperation::mkDir

View File

@ -427,7 +427,7 @@ public:
//- Destructor //- Destructor
virtual ~masterUncollatedFileOperation(); virtual ~masterUncollatedFileOperation() = default;
// Member Functions // Member Functions

View File

@ -161,12 +161,6 @@ Foam::fileOperations::uncollatedFileOperation::uncollatedFileOperation
} }
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::fileOperations::uncollatedFileOperation::~uncollatedFileOperation()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
bool Foam::fileOperations::uncollatedFileOperation::mkDir bool Foam::fileOperations::uncollatedFileOperation::mkDir

View File

@ -77,7 +77,7 @@ public:
//- Destructor //- Destructor
virtual ~uncollatedFileOperation(); virtual ~uncollatedFileOperation() = default;
// Member Functions // Member Functions

View File

@ -3,7 +3,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-2015 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.

View File

@ -89,7 +89,7 @@ tmp<volScalarField> kOmegaSSTDDES<BasicTurbulenceModel>::dTilda
return max return max
( (
lRAS lRAS
- fd(magGradU) - fd(magGradU)
*max *max
( (

View File

@ -153,7 +153,7 @@ void Foam::porosityModelList::addResistance
( (
const fvVectorMatrix& UEqn, const fvVectorMatrix& UEqn,
volTensorField& AU, volTensorField& AU,
bool correctAUprocBC bool correctAUprocBC
) )
{ {
forAll(*this, i) forAll(*this, i)

View File

@ -44,7 +44,7 @@ Description
entered in the same form as the timeVaryingMappedFixedValue condition, entered in the same form as the timeVaryingMappedFixedValue condition,
except that no interpolation in time is supported. These should be except that no interpolation in time is supported. These should be
located in the directory: located in the directory:
\$FOAM_CASE/constant/boundaryData/<patchName>/points \$FOAM_CASE/constant/boundaryData/<patchName>/points
\$FOAM_CASE/constant/boundaryData/<patchName>/0/\{R|U|L\} \$FOAM_CASE/constant/boundaryData/<patchName>/0/\{R|U|L\}

View File

@ -25,7 +25,7 @@ Class
Foam::displacementComponentLaplacianFvMotionSolver Foam::displacementComponentLaplacianFvMotionSolver
Group Group
grpMeshMotionSolvers grpMeshMotionSolvers
Description Description
Mesh motion solver for an fvMesh. Based on solving the cell-centre Mesh motion solver for an fvMesh. Based on solving the cell-centre

View File

@ -25,7 +25,7 @@ Class
Foam::velocityComponentLaplacianFvMotionSolver Foam::velocityComponentLaplacianFvMotionSolver
Group Group
grpMeshMotionSolvers grpMeshMotionSolvers
Description Description
Mesh motion solver for an fvMesh. Based on solving the cell-centre Mesh motion solver for an fvMesh. Based on solving the cell-centre

View File

@ -25,7 +25,7 @@ Class
Foam::displacementSBRStressFvMotionSolver Foam::displacementSBRStressFvMotionSolver
Group Group
grpMeshMotionSolvers grpMeshMotionSolvers
Description Description
Mesh motion solver for an fvMesh. Based on solving the cell-centre Mesh motion solver for an fvMesh. Based on solving the cell-centre

View File

@ -25,7 +25,7 @@ Class
Foam::displacementLaplacianFvMotionSolver Foam::displacementLaplacianFvMotionSolver
Group Group
grpMeshMotionSolvers grpMeshMotionSolvers
Description Description
Mesh motion solver for an fvMesh. Based on solving the cell-centre Mesh motion solver for an fvMesh. Based on solving the cell-centre

View File

@ -25,7 +25,7 @@ Class
Foam::surfaceAlignedSBRStressFvMotionSolver Foam::surfaceAlignedSBRStressFvMotionSolver
Group Group
grpMeshMotionSolvers grpMeshMotionSolvers
Description Description
Mesh motion solver for an fvMesh. Based on solving the cell-centre Mesh motion solver for an fvMesh. Based on solving the cell-centre

View File

@ -25,7 +25,7 @@ Class
Foam::velocityLaplacianFvMotionSolver Foam::velocityLaplacianFvMotionSolver
Group Group
grpMeshMotionSolvers grpMeshMotionSolvers
Description Description
Mesh motion solver for an fvMesh. Based on solving the cell-centre Mesh motion solver for an fvMesh. Based on solving the cell-centre

View File

@ -57,7 +57,7 @@ void Foam::fv::acousticDampingSource::setBlendingFactor()
const vectorField& Cf = mesh_.C(); const vectorField& Cf = mesh_.C();
const scalar pi = constant::mathematical::pi; const scalar pi = constant::mathematical::pi;
forAll(cells_, i) forAll(cells_, i)
{ {
label celli = cells_[i]; label celli = cells_[i];

View File

@ -40,24 +40,24 @@ Description
To provide a Joule heating contribution according to: To provide a Joule heating contribution according to:
Differential form of Joule heating - power per unit volume: Differential form of Joule heating - power per unit volume:
\f[ \f[
\frac{d(P)}{d(V)} = J \cdot E \frac{d(P)}{d(V)} = J \cdot E
\f] \f]
where \f$ J \f$ is the current density and \f$ E \f$ the electric field. where \f$ J \f$ is the current density and \f$ E \f$ the electric field.
If no magnetic field is present: If no magnetic field is present:
\f[ \f[
J = \sigma E J = \sigma E
\f] \f]
The electric field given by The electric field given by
\f[ \f[
E = \grad V E = \grad V
\f] \f]
Therefore: Therefore:
\f[ \f[
@ -79,7 +79,7 @@ Usage
sigma table sigma table
( (
(273 1e5) (273 1e5)
(1000 1e5) (1000 1e5)
); );
} }
\endverbatim \endverbatim

View File

@ -84,7 +84,7 @@ Foam::TimeScaleModels::isotropic::oneByTau
static const scalar a = static const scalar a =
8.0*sqrt(2.0)/(5.0*constant::mathematical::pi) 8.0*sqrt(2.0)/(5.0*constant::mathematical::pi)
*0.25*(3.0 - e_)*(1.0 + e_); *0.25*(3.0 - e_)*(1.0 + e_);
return a*f*alphaPacked_/max(alphaPacked_ - alpha, SMALL); return a*f*alphaPacked_/max(alphaPacked_ - alpha, SMALL);
} }

View File

@ -4608,7 +4608,7 @@ void Foam::snappyLayerDriver::doLayers
if (!preBalance) if (!preBalance)
{ {
// Check if there are faceZones on processor boundaries. This // Check if there are faceZones on processor boundaries. This
// requires balancing to move them off the processor boundaries. // requires balancing to move them off the processor boundaries.
// Is face on a faceZone // Is face on a faceZone
PackedBoolList isExtrudedZoneFace(mesh.nFaces()); PackedBoolList isExtrudedZoneFace(mesh.nFaces());

View File

@ -52,7 +52,7 @@ Hanning::Hanning(const dictionary& dict, const label nSamples)
// Extend range if required // Extend range if required
label offset = extended_ ? 1 : 0; label offset = extended_ ? 1 : 0;
scalar m = nSamples - 1 + 2*offset; scalar m = nSamples - 1 + 2*offset;
scalarField t(nSamples); scalarField t(nSamples);
forAll(t, i) forAll(t, i)
{ {

View File

@ -333,7 +333,7 @@ void reactingOneDim::solveEnergy()
NOTE: The moving mesh option is only correct for reaction such as NOTE: The moving mesh option is only correct for reaction such as
Solid -> Gas, thus the ddt term is compesated exaclty by chemistrySh and Solid -> Gas, thus the ddt term is compesated exaclty by chemistrySh and
the mesh flux is not necessary. the mesh flux is not necessary.
if (regionMesh().moving()) if (regionMesh().moving())
{ {
surfaceScalarField phihMesh surfaceScalarField phihMesh

View File

@ -26,7 +26,7 @@ Class
Group Group
grpRigidBodyDynamicsJoints grpRigidBodyDynamicsJoints
Description Description
Revolute joint for rotation about the z-axis Revolute joint for rotation about the z-axis

View File

@ -25,7 +25,7 @@ Class
Foam::rigidBodyMeshMotion Foam::rigidBodyMeshMotion
Group Group
grpMeshMotionSolvers grpMeshMotionSolvers
Description Description
Rigid-body mesh motion solver for fvMesh. Rigid-body mesh motion solver for fvMesh.

View File

@ -25,7 +25,7 @@ Class
Foam::sixDoFRigidBodyMotionSolver Foam::sixDoFRigidBodyMotionSolver
Group Group
grpMeshMotionSolvers grpMeshMotionSolvers
Description Description
6-DoF solid-body mesh motion solver for an fvMesh. 6-DoF solid-body mesh motion solver for an fvMesh.

View File

@ -153,7 +153,7 @@ bool Foam::functionObjects::specieReactionRates<ChemistryModelType>::write()
} }
file() << nl << endl; file() << nl << endl;
return true; return true;
} }

View File

@ -81,7 +81,7 @@ Description
- A scalar transport equation for the carrier specie is required, e.g. - A scalar transport equation for the carrier specie is required, e.g.
supplied via a function object or in the main solver. This specie supplied via a function object or in the main solver. This specie
transports the vapour phase in the main ragion. transports the vapour phase in the main ragion.
- The boundary condition of this specie on the coupled wall must be - The boundary condition of this specie on the coupled wall must be
fixedGradient in order to allow condensation or evaporation of the fixedGradient in order to allow condensation or evaporation of the
vapour in or out of this wall vapour in or out of this wall