Commit c70c12a2 authored by Henry Weller's avatar Henry Weller
Browse files

functionObjects: Simplified organization and naming

parent ff6d8914
......@@ -6,13 +6,9 @@ targetType=libso
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
set -x
wmake $targetType cloud
wmake $targetType field
wmake $targetType forces
wmake $targetType fvTools
wmake $targetType IO
wmake $targetType jobControl
wmake $targetType systemCall
wmake $targetType lagrangian
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
histogram/histogram.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
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -22,24 +22,24 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Typedef
Foam::IOcalcMag
Foam::IOdiv
Description
Instance of the generic IOOutputFilter for calcMag.
Instance of the generic IOOutputFilter for div.
\*---------------------------------------------------------------------------*/
#ifndef IOcalcMag_H
#define IOcalcMag_H
#ifndef IOdiv_H
#define IOdiv_H
#include "calcMag.H"
#include "div.H"
#include "IOOutputFilter.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
typedef IOOutputFilter<calcMag> IOcalcMag;
typedef IOOutputFilter<div> IOdiv;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
......@@ -23,10 +23,10 @@ License
\*---------------------------------------------------------------------------*/
#include "calcFvcDiv.H"
#include "div.H"
#include "volFields.H"
#include "dictionary.H"
#include "calcFvcDiv.H"
#include "div.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
......@@ -34,14 +34,14 @@ namespace Foam
{
namespace functionObjects
{
defineTypeNameAndDebug(calcFvcDiv, 0);
defineTypeNameAndDebug(div, 0);
}
}
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
Foam::volScalarField& Foam::functionObjects::calcFvcDiv::divField
Foam::volScalarField& Foam::functionObjects::div::divField
(
const word& divName,
const dimensionSet& dims
......@@ -79,7 +79,7 @@ Foam::volScalarField& Foam::functionObjects::calcFvcDiv::divField
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::functionObjects::calcFvcDiv::calcFvcDiv
Foam::functionObjects::div::div
(
const word& name,
const objectRegistry& obr,
......@@ -96,7 +96,7 @@ Foam::functionObjects::calcFvcDiv::calcFvcDiv
}
bool Foam::functionObjects::calcFvcDiv::viable
bool Foam::functionObjects::div::viable
(
const word& name,
const objectRegistry& obr,
......@@ -111,13 +111,13 @@ bool Foam::functionObjects::calcFvcDiv::viable
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::functionObjects::calcFvcDiv::~calcFvcDiv()
Foam::functionObjects::div::~div()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void Foam::functionObjects::calcFvcDiv::read(const dictionary& dict)
void Foam::functionObjects::div::read(const dictionary& dict)
{
dict.lookup("fieldName") >> fieldName_;
dict.lookup("resultName") >> resultName_;
......@@ -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;
......@@ -144,17 +144,17 @@ void Foam::functionObjects::calcFvcDiv::execute()
}
void Foam::functionObjects::calcFvcDiv::end()
void Foam::functionObjects::div::end()
{
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_))
{
......
......@@ -22,7 +22,7 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::functionObjects::calcFvcDiv
Foam::functionObjects::div
Group
grpFVFunctionObjects
......@@ -33,13 +33,13 @@ Description
volume scalar field.
SourceFiles
calcFvcDiv.C
IOcalcFvcDiv.H
div.C
IOdiv.H
\*---------------------------------------------------------------------------*/
#ifndef calcFvcDiv_H
#define calcFvcDiv_H
#ifndef functionObjects_div_H
#define functionObjects_div_H
#include "volFieldsFwd.H"
#include "surfaceFieldsFwd.H"
......@@ -63,14 +63,14 @@ namespace functionObjects
{
/*---------------------------------------------------------------------------*\
Class calcFvcDiv Declaration
Class div Declaration
\*---------------------------------------------------------------------------*/
class calcFvcDiv
class div
{
// Private data
//- Name of this calcFvcDiv object
//- Name of this div object
word name_;
//- Reference to the database
......@@ -102,23 +102,23 @@ class calcFvcDiv
);
//- Disallow default bitwise copy construct
calcFvcDiv(const calcFvcDiv&);
div(const div&);
//- Disallow default bitwise assignment
void operator=(const calcFvcDiv&);
void operator=(const div&);
public:
//- Runtime type information
TypeName("calcFvcDiv");
TypeName("div");
// Constructors
//- Construct for given objectRegistry and dictionary.
// Allow the possibility to load fields from files
calcFvcDiv
div
(
const word& name,
const objectRegistry&,
......@@ -138,18 +138,18 @@ public:
//- Destructor
virtual ~calcFvcDiv();
virtual ~div();
// Member Functions
//- Return name of the set of calcFvcDiv
//- Return name of the set of div
virtual const word& name() const
{
return name_;
}
//- Read the calcFvcDiv data
//- Read the div data
virtual void read(const dictionary&);
//- Execute, currently does nothing
......@@ -161,7 +161,7 @@ public:
//- Called when time was set at the end of the Time::operator++
virtual void timeSet();
//- Calculate the calcFvcDiv and write
//- Calculate the div and write
virtual void write();
//- Update for changes of mesh
......@@ -182,7 +182,7 @@ public:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#ifdef NoRepository
#include "calcFvcDivTemplates.C"
#include "divTemplates.C"
#endif
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -23,18 +23,18 @@ License
\*---------------------------------------------------------------------------*/
#include "calcMagFunctionObject.H"
#include "divFunctionObject.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineNamedTemplateTypeNameAndDebug(calcMagFunctionObject, 0);
defineNamedTemplateTypeNameAndDebug(divFunctionObject, 0);
addToRunTimeSelectionTable
(
functionObject,
calcMagFunctionObject,
divFunctionObject,
dictionary
);
}
......
......@@ -22,29 +22,29 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Typedef
Foam::calcFvcDivFunctionObject
Foam::divFunctionObject
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.
SourceFiles
calcFvcDivFunctionObject.C
divFunctionObject.C
\*---------------------------------------------------------------------------*/
#ifndef calcFvcDivFunctionObject_H
#define calcFvcDivFunctionObject_H
#ifndef divFunctionObject_H
#define divFunctionObject_H
#include "calcFvcDiv.H"
#include "div.H"
#include "OutputFilterFunctionObject.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
typedef OutputFilterFunctionObject<functionObjects::calcFvcDiv>
calcFvcDivFunctionObject;
typedef OutputFilterFunctionObject<functionObjects::div>
divFunctionObject;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
......@@ -29,7 +29,7 @@ License
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class FieldType>
void Foam::functionObjects::calcFvcDiv::calcDiv
void Foam::functionObjects::div::calcDiv
(
const word& fieldName,
const word& resultName,
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......
......@@ -119,8 +119,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/
#ifndef fieldAverage_H
#define fieldAverage_H
#ifndef functionObjects_fieldAverage_H
#define functionObjects_fieldAverage_H
#include "volFieldsFwd.H"
#include "Switch.H"
......
......@@ -74,8 +74,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/
#ifndef fieldCoordinateSystemTransform_H
#define fieldCoordinateSystemTransform_H
#ifndef functionObjects_fieldCoordinateSystemTransform_H
#define functionObjects_fieldCoordinateSystemTransform_H
#include "OFstream.H"
#include "volFields.H"
......
......@@ -75,8 +75,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/
#ifndef fieldMinMax_H
#define fieldMinMax_H
#ifndef functionObjects_fieldMinMax_H
#define functionObjects_fieldMinMax_H
#include "functionObjectFiles.H"
#include "Switch.H"
......
......@@ -102,8 +102,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/
#ifndef cellSource_H
#define cellSource_H
#ifndef functionObjects_cellSource_H
#define functionObjects_cellSource_H
#include "NamedEnum.H"
#include "fieldValue.H"
......
......@@ -136,8 +136,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/
#ifndef faceSource_H
#define faceSource_H
#ifndef functionObjects_faceSource_H
#define functionObjects_faceSource_H
#include "NamedEnum.H"
#include "fieldValue.H"
......
......@@ -35,8 +35,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/
#ifndef fieldValue_H
#define fieldValue_H
#ifndef functionObjects_fieldValue_H
#define functionObjects_fieldValue_H
#include "functionObjectFiles.H"
#include "Switch.H"
......
......@@ -73,8 +73,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/
#ifndef fieldValueDelta_H
#define fieldValueDelta_H
#ifndef functionObjects_fieldValueDelta_H
#define functionObjects_fieldValueDelta_H
#include "functionObjectFiles.H"
#include "fieldValue.H"
......
......@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2016 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -22,24 +22,24 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Typedef
Foam::IOcalcFvcDiv
Foam::IOgrad
Description
Instance of the generic IOOutputFilter for calcFvcDiv.
Instance of the generic IOOutputFilter for grad.
\*---------------------------------------------------------------------------*/
#ifndef IOcalcFvcDiv_H
#define IOcalcFvcDiv_H
#ifndef IOgrad_H
#define IOgrad_H
#include "calcFvcDiv.H"
#include "grad.H"
#include "IOOutputFilter.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
typedef IOOutputFilter<calcFvcDiv> IOcalcFvcDiv;
typedef IOOutputFilter<grad> IOgrad;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment