Skip to content
Snippets Groups Projects
Commit c70c12a2 authored by Henry Weller's avatar Henry Weller
Browse files

functionObjects: Simplified organization and naming

parent ff6d8914
No related branches found
No related tags found
No related merge requests found
Showing
with 81 additions and 126 deletions
...@@ -6,13 +6,9 @@ targetType=libso ...@@ -6,13 +6,9 @@ targetType=libso
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
set -x set -x
wmake $targetType cloud
wmake $targetType field wmake $targetType field
wmake $targetType forces wmake $targetType forces
wmake $targetType fvTools wmake $targetType lagrangian
wmake $targetType IO
wmake $targetType jobControl
wmake $targetType systemCall
wmake $targetType utilities wmake $targetType utilities
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation, either version 3 of the License, or (at your option)
any later version.
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.
You should have received a copy of the GNU General Public License along with
OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\defgroup grpIOFunctionObjects Input/output function objects
@{
\ingroup grpFunctionObjects
This group contains input/output-based function objects
@}
\*---------------------------------------------------------------------------*/
partialWrite/partialWrite.C
partialWrite/partialWriteFunctionObject.C
removeRegisteredObject/removeRegisteredObject.C
removeRegisteredObject/removeRegisteredObjectFunctionObject.C
writeDictionary/writeDictionary.C
writeDictionary/writeDictionaryFunctionObject.C
writeRegisteredObject/writeRegisteredObject.C
writeRegisteredObject/writeRegisteredObjectFunctionObject.C
LIB = $(FOAM_LIBBIN)/libIOFunctionObjects
EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude
LIB_LIBS = \
-lfiniteVolume \
-lmeshTools
...@@ -49,4 +49,13 @@ regionSizeDistribution/regionSizeDistributionFunctionObject.C ...@@ -49,4 +49,13 @@ regionSizeDistribution/regionSizeDistributionFunctionObject.C
histogram/histogram.C histogram/histogram.C
histogram/histogramFunctionObject.C histogram/histogramFunctionObject.C
div/div.C
div/divFunctionObject.C
grad/grad.C
grad/gradFunctionObject.C
mag/mag.C
mag/magFunctionObject.C
LIB = $(FOAM_LIBBIN)/libfieldFunctionObjects LIB = $(FOAM_LIBBIN)/libfieldFunctionObjects
...@@ -2,7 +2,7 @@ ...@@ -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) 2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
...@@ -22,24 +22,24 @@ License ...@@ -22,24 +22,24 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Typedef Typedef
Foam::IOcalcMag Foam::IOdiv
Description Description
Instance of the generic IOOutputFilter for calcMag. Instance of the generic IOOutputFilter for div.
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef IOcalcMag_H #ifndef IOdiv_H
#define IOcalcMag_H #define IOdiv_H
#include "calcMag.H" #include "div.H"
#include "IOOutputFilter.H" #include "IOOutputFilter.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam namespace Foam
{ {
typedef IOOutputFilter<calcMag> IOcalcMag; typedef IOOutputFilter<div> IOdiv;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
...@@ -23,10 +23,10 @@ License ...@@ -23,10 +23,10 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "calcFvcDiv.H" #include "div.H"
#include "volFields.H" #include "volFields.H"
#include "dictionary.H" #include "dictionary.H"
#include "calcFvcDiv.H" #include "div.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
...@@ -34,14 +34,14 @@ namespace Foam ...@@ -34,14 +34,14 @@ namespace Foam
{ {
namespace functionObjects namespace functionObjects
{ {
defineTypeNameAndDebug(calcFvcDiv, 0); defineTypeNameAndDebug(div, 0);
} }
} }
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
Foam::volScalarField& Foam::functionObjects::calcFvcDiv::divField Foam::volScalarField& Foam::functionObjects::div::divField
( (
const word& divName, const word& divName,
const dimensionSet& dims const dimensionSet& dims
...@@ -79,7 +79,7 @@ Foam::volScalarField& Foam::functionObjects::calcFvcDiv::divField ...@@ -79,7 +79,7 @@ Foam::volScalarField& Foam::functionObjects::calcFvcDiv::divField
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::functionObjects::calcFvcDiv::calcFvcDiv Foam::functionObjects::div::div
( (
const word& name, const word& name,
const objectRegistry& obr, const objectRegistry& obr,
...@@ -96,7 +96,7 @@ Foam::functionObjects::calcFvcDiv::calcFvcDiv ...@@ -96,7 +96,7 @@ Foam::functionObjects::calcFvcDiv::calcFvcDiv
} }
bool Foam::functionObjects::calcFvcDiv::viable bool Foam::functionObjects::div::viable
( (
const word& name, const word& name,
const objectRegistry& obr, const objectRegistry& obr,
...@@ -111,13 +111,13 @@ bool Foam::functionObjects::calcFvcDiv::viable ...@@ -111,13 +111,13 @@ bool Foam::functionObjects::calcFvcDiv::viable
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::functionObjects::calcFvcDiv::~calcFvcDiv() Foam::functionObjects::div::~div()
{} {}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void Foam::functionObjects::calcFvcDiv::read(const dictionary& dict) void Foam::functionObjects::div::read(const dictionary& dict)
{ {
dict.lookup("fieldName") >> fieldName_; dict.lookup("fieldName") >> fieldName_;
dict.lookup("resultName") >> resultName_; dict.lookup("resultName") >> resultName_;
...@@ -129,7 +129,7 @@ void Foam::functionObjects::calcFvcDiv::read(const dictionary& dict) ...@@ -129,7 +129,7 @@ void Foam::functionObjects::calcFvcDiv::read(const dictionary& dict)
} }
void Foam::functionObjects::calcFvcDiv::execute() void Foam::functionObjects::div::execute()
{ {
bool processed = false; bool processed = false;
...@@ -144,17 +144,17 @@ void Foam::functionObjects::calcFvcDiv::execute() ...@@ -144,17 +144,17 @@ void Foam::functionObjects::calcFvcDiv::execute()
} }
void Foam::functionObjects::calcFvcDiv::end() void Foam::functionObjects::div::end()
{ {
execute(); execute();
} }
void Foam::functionObjects::calcFvcDiv::timeSet() void Foam::functionObjects::div::timeSet()
{} {}
void Foam::functionObjects::calcFvcDiv::write() void Foam::functionObjects::div::write()
{ {
if (obr_.foundObject<regIOobject>(resultName_)) if (obr_.foundObject<regIOobject>(resultName_))
{ {
......
...@@ -22,7 +22,7 @@ License ...@@ -22,7 +22,7 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class Class
Foam::functionObjects::calcFvcDiv Foam::functionObjects::div
Group Group
grpFVFunctionObjects grpFVFunctionObjects
...@@ -33,13 +33,13 @@ Description ...@@ -33,13 +33,13 @@ Description
volume scalar field. volume scalar field.
SourceFiles SourceFiles
calcFvcDiv.C div.C
IOcalcFvcDiv.H IOdiv.H
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef calcFvcDiv_H #ifndef functionObjects_div_H
#define calcFvcDiv_H #define functionObjects_div_H
#include "volFieldsFwd.H" #include "volFieldsFwd.H"
#include "surfaceFieldsFwd.H" #include "surfaceFieldsFwd.H"
...@@ -63,14 +63,14 @@ namespace functionObjects ...@@ -63,14 +63,14 @@ namespace functionObjects
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class calcFvcDiv Declaration Class div Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class calcFvcDiv class div
{ {
// Private data // Private data
//- Name of this calcFvcDiv object //- Name of this div object
word name_; word name_;
//- Reference to the database //- Reference to the database
...@@ -102,23 +102,23 @@ class calcFvcDiv ...@@ -102,23 +102,23 @@ class calcFvcDiv
); );
//- Disallow default bitwise copy construct //- Disallow default bitwise copy construct
calcFvcDiv(const calcFvcDiv&); div(const div&);
//- Disallow default bitwise assignment //- Disallow default bitwise assignment
void operator=(const calcFvcDiv&); void operator=(const div&);
public: public:
//- Runtime type information //- Runtime type information
TypeName("calcFvcDiv"); TypeName("div");
// Constructors // Constructors
//- Construct for given objectRegistry and dictionary. //- Construct for given objectRegistry and dictionary.
// Allow the possibility to load fields from files // Allow the possibility to load fields from files
calcFvcDiv div
( (
const word& name, const word& name,
const objectRegistry&, const objectRegistry&,
...@@ -138,18 +138,18 @@ public: ...@@ -138,18 +138,18 @@ public:
//- Destructor //- Destructor
virtual ~calcFvcDiv(); virtual ~div();
// Member Functions // Member Functions
//- Return name of the set of calcFvcDiv //- Return name of the set of div
virtual const word& name() const virtual const word& name() const
{ {
return name_; return name_;
} }
//- Read the calcFvcDiv data //- Read the div data
virtual void read(const dictionary&); virtual void read(const dictionary&);
//- Execute, currently does nothing //- Execute, currently does nothing
...@@ -161,7 +161,7 @@ public: ...@@ -161,7 +161,7 @@ public:
//- Called when time was set at the end of the Time::operator++ //- Called when time was set at the end of the Time::operator++
virtual void timeSet(); virtual void timeSet();
//- Calculate the calcFvcDiv and write //- Calculate the div and write
virtual void write(); virtual void write();
//- Update for changes of mesh //- Update for changes of mesh
...@@ -182,7 +182,7 @@ public: ...@@ -182,7 +182,7 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository #ifdef NoRepository
#include "calcFvcDivTemplates.C" #include "divTemplates.C"
#endif #endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
...@@ -2,7 +2,7 @@ ...@@ -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) 2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
...@@ -23,18 +23,18 @@ License ...@@ -23,18 +23,18 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "calcMagFunctionObject.H" #include "divFunctionObject.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam namespace Foam
{ {
defineNamedTemplateTypeNameAndDebug(calcMagFunctionObject, 0); defineNamedTemplateTypeNameAndDebug(divFunctionObject, 0);
addToRunTimeSelectionTable addToRunTimeSelectionTable
( (
functionObject, functionObject,
calcMagFunctionObject, divFunctionObject,
dictionary dictionary
); );
} }
......
...@@ -22,29 +22,29 @@ License ...@@ -22,29 +22,29 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Typedef Typedef
Foam::calcFvcDivFunctionObject Foam::divFunctionObject
Description Description
FunctionObject wrapper around calcFvcDiv to allow it to be created FunctionObject wrapper around div to allow it to be created
via the functions entry within controlDict. via the functions entry within controlDict.
SourceFiles SourceFiles
calcFvcDivFunctionObject.C divFunctionObject.C
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef calcFvcDivFunctionObject_H #ifndef divFunctionObject_H
#define calcFvcDivFunctionObject_H #define divFunctionObject_H
#include "calcFvcDiv.H" #include "div.H"
#include "OutputFilterFunctionObject.H" #include "OutputFilterFunctionObject.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam namespace Foam
{ {
typedef OutputFilterFunctionObject<functionObjects::calcFvcDiv> typedef OutputFilterFunctionObject<functionObjects::div>
calcFvcDivFunctionObject; divFunctionObject;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
...@@ -29,7 +29,7 @@ License ...@@ -29,7 +29,7 @@ License
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class FieldType> template<class FieldType>
void Foam::functionObjects::calcFvcDiv::calcDiv void Foam::functionObjects::div::calcDiv
( (
const word& fieldName, const word& fieldName,
const word& resultName, const word& resultName,
......
...@@ -2,7 +2,7 @@ ...@@ -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) 2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
......
...@@ -119,8 +119,8 @@ SourceFiles ...@@ -119,8 +119,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef fieldAverage_H #ifndef functionObjects_fieldAverage_H
#define fieldAverage_H #define functionObjects_fieldAverage_H
#include "volFieldsFwd.H" #include "volFieldsFwd.H"
#include "Switch.H" #include "Switch.H"
......
...@@ -74,8 +74,8 @@ SourceFiles ...@@ -74,8 +74,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef fieldCoordinateSystemTransform_H #ifndef functionObjects_fieldCoordinateSystemTransform_H
#define fieldCoordinateSystemTransform_H #define functionObjects_fieldCoordinateSystemTransform_H
#include "OFstream.H" #include "OFstream.H"
#include "volFields.H" #include "volFields.H"
......
...@@ -75,8 +75,8 @@ SourceFiles ...@@ -75,8 +75,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef fieldMinMax_H #ifndef functionObjects_fieldMinMax_H
#define fieldMinMax_H #define functionObjects_fieldMinMax_H
#include "functionObjectFiles.H" #include "functionObjectFiles.H"
#include "Switch.H" #include "Switch.H"
......
...@@ -102,8 +102,8 @@ SourceFiles ...@@ -102,8 +102,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef cellSource_H #ifndef functionObjects_cellSource_H
#define cellSource_H #define functionObjects_cellSource_H
#include "NamedEnum.H" #include "NamedEnum.H"
#include "fieldValue.H" #include "fieldValue.H"
......
...@@ -136,8 +136,8 @@ SourceFiles ...@@ -136,8 +136,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef faceSource_H #ifndef functionObjects_faceSource_H
#define faceSource_H #define functionObjects_faceSource_H
#include "NamedEnum.H" #include "NamedEnum.H"
#include "fieldValue.H" #include "fieldValue.H"
......
...@@ -35,8 +35,8 @@ SourceFiles ...@@ -35,8 +35,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef fieldValue_H #ifndef functionObjects_fieldValue_H
#define fieldValue_H #define functionObjects_fieldValue_H
#include "functionObjectFiles.H" #include "functionObjectFiles.H"
#include "Switch.H" #include "Switch.H"
......
...@@ -73,8 +73,8 @@ SourceFiles ...@@ -73,8 +73,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef fieldValueDelta_H #ifndef functionObjects_fieldValueDelta_H
#define fieldValueDelta_H #define functionObjects_fieldValueDelta_H
#include "functionObjectFiles.H" #include "functionObjectFiles.H"
#include "fieldValue.H" #include "fieldValue.H"
......
...@@ -2,7 +2,7 @@ ...@@ -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) 2012 OpenFOAM Foundation \\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
...@@ -22,24 +22,24 @@ License ...@@ -22,24 +22,24 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Typedef Typedef
Foam::IOcalcFvcDiv Foam::IOgrad
Description Description
Instance of the generic IOOutputFilter for calcFvcDiv. Instance of the generic IOOutputFilter for grad.
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef IOcalcFvcDiv_H #ifndef IOgrad_H
#define IOcalcFvcDiv_H #define IOgrad_H
#include "calcFvcDiv.H" #include "grad.H"
#include "IOOutputFilter.H" #include "IOOutputFilter.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam namespace Foam
{ {
typedef IOOutputFilter<calcFvcDiv> IOcalcFvcDiv; typedef IOOutputFilter<grad> IOgrad;
} }
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment