diff --git a/src/fieldSources/basicSource/IObasicSourceList.C b/src/fieldSources/fvOptions/fvIOoptionList.C similarity index 84% rename from src/fieldSources/basicSource/IObasicSourceList.C rename to src/fieldSources/fvOptions/fvIOoptionList.C index d69bffa1ec..1ea4be17d2 100644 --- a/src/fieldSources/basicSource/IObasicSourceList.C +++ b/src/fieldSources/fvOptions/fvIOoptionList.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,21 +23,21 @@ License \*---------------------------------------------------------------------------*/ -#include "IObasicSourceList.H" +#include "fvIOoptionList.H" #include "fvMesh.H" #include "Time.H" // * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // -Foam::IOobject Foam::IObasicSourceList::createIOobject +Foam::IOobject Foam::fv::IOoptionList::createIOobject ( const fvMesh& mesh ) const { IOobject io ( - "sourcesProperties", - mesh.time().constant(), + "fvOptions", + mesh.time().system(), mesh, IOobject::MUST_READ, IOobject::NO_WRITE @@ -62,21 +62,21 @@ Foam::IOobject Foam::IObasicSourceList::createIOobject // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::IObasicSourceList::IObasicSourceList +Foam::fv::IOoptionList::IOoptionList ( const fvMesh& mesh ) : IOdictionary(createIOobject(mesh)), - basicSourceList(mesh, *this) + optionList(mesh, *this) {} -bool Foam::IObasicSourceList::read() +bool Foam::fv::IOoptionList::read() { if (regIOobject::read()) { - basicSourceList::read(*this); + optionList::read(*this); return true; } else @@ -87,4 +87,3 @@ bool Foam::IObasicSourceList::read() // ************************************************************************* // - diff --git a/src/fieldSources/basicSource/IObasicSourceList.H b/src/fieldSources/fvOptions/fvIOoptionList.H similarity index 81% rename from src/fieldSources/basicSource/IObasicSourceList.H rename to src/fieldSources/fvOptions/fvIOoptionList.H index 69070b18db..0c3c973cd2 100644 --- a/src/fieldSources/basicSource/IObasicSourceList.H +++ b/src/fieldSources/fvOptions/fvIOoptionList.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,20 +22,20 @@ License along with OpenFOAM. If not, see . Class - Foam::IObasicSourceList + Foam::fv::IOoptionList Description - IObasicSourceList + IOoptionList SourceFiles - IObasicSourceList.C + IOoptionList.C \*---------------------------------------------------------------------------*/ -#ifndef IObasicSourceList_H -#define IObasicSourceList_H +#ifndef IOoptionList_H +#define IOoptionList_H -#include "basicSourceList.H" +#include "fvOptionList.H" #include "IOdictionary.H" #include "autoPtr.H" @@ -43,15 +43,17 @@ SourceFiles namespace Foam { +namespace fv +{ /*---------------------------------------------------------------------------*\ - Class IObasicSourceList Declaration + Class IOoptionList Declaration \*---------------------------------------------------------------------------*/ -class IObasicSourceList +class IOoptionList : public IOdictionary, - public basicSourceList + public optionList { private: @@ -61,10 +63,10 @@ private: IOobject createIOobject(const fvMesh& mesh) const; //- Disallow default bitwise copy construct - IObasicSourceList(const IObasicSourceList&); + IOoptionList(const IOoptionList&); //- Disallow default bitwise assignment - void operator=(const IObasicSourceList&); + void operator=(const IOoptionList&); public: @@ -72,11 +74,11 @@ public: // Constructors //- Construct from components with list of field names - IObasicSourceList(const fvMesh& mesh); + IOoptionList(const fvMesh& mesh); //- Destructor - virtual ~IObasicSourceList() + virtual ~IOoptionList() {} @@ -89,6 +91,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +} // End namespace fv } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/fieldSources/basicSource/basicSource.C b/src/fieldSources/fvOptions/fvOption.C similarity index 78% rename from src/fieldSources/basicSource/basicSource.C rename to src/fieldSources/fvOptions/fvOption.C index 7732f89f9a..067e0403b5 100644 --- a/src/fieldSources/basicSource/basicSource.C +++ b/src/fieldSources/fvOptions/fvOption.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -23,7 +23,7 @@ License \*---------------------------------------------------------------------------*/ -#include "basicSource.H" +#include "fvOption.H" #include "fvMesh.H" #include "fvMatrices.H" #include "volFields.H" @@ -33,12 +33,15 @@ License namespace Foam { - defineTypeNameAndDebug(basicSource, 0); - defineRunTimeSelectionTable(basicSource, dictionary); + namespace fv + { + defineTypeNameAndDebug(option, 0); + defineRunTimeSelectionTable(option, dictionary); + } template<> const char* NamedEnum < - basicSource::selectionModeType, + fv::option::selectionModeType, 5 >::names[] = { @@ -49,20 +52,20 @@ namespace Foam "all" }; - const NamedEnum - basicSource::selectionModeTypeNames_; + const NamedEnum + fv::option::selectionModeTypeNames_; } // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // -bool Foam::basicSource::alwaysApply() const +bool Foam::fv::option::alwaysApply() const { return false; } -void Foam::basicSource::setSelection(const dictionary& dict) +void Foam::fv::option::setSelection(const dictionary& dict) { switch (selectionMode_) { @@ -94,10 +97,8 @@ void Foam::basicSource::setSelection(const dictionary& dict) } default: { - FatalErrorIn - ( - "basicSource::setSelection(const dictionary&)" - ) << "Unknown selectionMode " + FatalErrorIn("option::setSelection(const dictionary&)") + << "Unknown selectionMode " << selectionModeTypeNames_[selectionMode_] << ". Valid selectionMode types are" << selectionModeTypeNames_ << exit(FatalError); @@ -106,7 +107,7 @@ void Foam::basicSource::setSelection(const dictionary& dict) } -void Foam::basicSource::setCellSet() +void Foam::fv::option::setCellSet() { switch (selectionMode_) { @@ -127,7 +128,7 @@ void Foam::basicSource::setCellSet() label globalCellI = returnReduce(cellI, maxOp