STYLE: minor adjustments for code formatting and comments

This commit is contained in:
Mark Olesen
2019-02-12 20:18:06 +01:00
committed by Andrew Heather
parent d1bc0d6e56
commit 4bc3b2b9cb
20 changed files with 82 additions and 158 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd |
\\ / A nd | Copyright (C) 2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
| Copyright (C) 2016 OpenFOAM Foundation
@ -57,7 +57,7 @@ void Foam::functionObjects::fieldsExpression::setResultName
if (!fieldNames_.empty())
{
resultName_ = typeName + '(' + fieldNames_[0];
for (label i=1; i<fieldNames_.size(); i++)
for (label i=1; i<fieldNames_.size(); ++i)
{
resultName_ += ',' + fieldNames_[i];
}
@ -99,12 +99,6 @@ Foam::functionObjects::fieldsExpression::fieldsExpression
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::functionObjects::fieldsExpression::~fieldsExpression()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
bool Foam::functionObjects::fieldsExpression::read(const dictionary& dict)
@ -116,10 +110,7 @@ bool Foam::functionObjects::fieldsExpression::read(const dictionary& dict)
dict.readEntry("fields", fieldNames_);
}
if (dict.found("result"))
{
dict.readEntry("result", resultName_);
}
dict.readIfPresent("result", resultName_);
return true;
}
@ -138,10 +129,8 @@ bool Foam::functionObjects::fieldsExpression::execute()
return false;
}
else
{
return true;
}
return true;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd |
\\ / A nd | Copyright (C) 2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
| Copyright (C) 2012-2016 OpenFOAM Foundation
@ -71,7 +71,7 @@ protected:
word resultName_;
// Protected member functions
// Protected Member Functions
void setResultName
(
@ -93,13 +93,9 @@ protected:
template<class FOType>
bool calcAllTypes(FOType& fo);
//- Calculate expression
virtual bool calc() = 0;
private:
// Private Member Functions
//- No copy construct
fieldsExpression(const fieldsExpression&) = delete;
@ -127,13 +123,13 @@ public:
//- Destructor
virtual ~fieldsExpression();
virtual ~fieldsExpression() = default;
// Member Functions
//- Read the fieldsExpression data
virtual bool read(const dictionary&);
virtual bool read(const dictionary& dict);
//- Calculate the result fields
virtual bool execute();

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2016 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2016-2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
| Copyright (C) 2016 OpenFOAM Foundation
@ -62,10 +62,8 @@ bool Foam::functionObjects::fieldsExpression::calcFieldTypes(FOType& fo)
fo.template calcFieldType<SurfFieldType>()
);
}
else
{
return false;
}
return false;
}