From 6e172a708dc19887aa5b4974bebf69e7d6d1cd80 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Mon, 8 Mar 2021 14:53:22 +0000 Subject: [PATCH] fvModels: codedSource -> codedFvModel --- .../dynamicCode/codedFvModelTemplate.C | 4 +- .../dynamicCode/codedFvModelTemplate.H | 4 +- src/fvModels/Make/files | 2 +- .../codedFvModel.C} | 50 +++++++++---------- .../codedFvModel.H} | 18 +++---- 5 files changed, 39 insertions(+), 39 deletions(-) rename src/fvModels/general/{codedSource/codedSource.C => codedFvModel/codedFvModel.C} (79%) rename src/fvModels/general/{codedSource/codedSource.H => codedFvModel/codedFvModel.H} (95%) diff --git a/etc/codeTemplates/dynamicCode/codedFvModelTemplate.C b/etc/codeTemplates/dynamicCode/codedFvModelTemplate.C index eea10867f2..ef51a11023 100644 --- a/etc/codeTemplates/dynamicCode/codedFvModelTemplate.C +++ b/etc/codeTemplates/dynamicCode/codedFvModelTemplate.C @@ -79,7 +79,7 @@ defineTypeNameAndDebug(${typeName}FvModel${SourceType}, 0); addRemovableToRunTimeSelectionTable ( - option, + fvModel, ${typeName}FvModel${SourceType}, dictionary ); @@ -100,7 +100,7 @@ ${typeName}FvModel${SourceType} const fvMesh& mesh ) : - cellSetOption(name, modelType, dict, mesh) + cellSetModel(name, modelType, dict, mesh) { if (${verbose:-false}) { diff --git a/etc/codeTemplates/dynamicCode/codedFvModelTemplate.H b/etc/codeTemplates/dynamicCode/codedFvModelTemplate.H index 56ea1c2194..c9307b9587 100644 --- a/etc/codeTemplates/dynamicCode/codedFvModelTemplate.H +++ b/etc/codeTemplates/dynamicCode/codedFvModelTemplate.H @@ -32,7 +32,7 @@ SourceFiles #ifndef codedFvModelTemplate_H #define codedFvModelTemplate_H -#include "cellSetOption.H" +#include "cellSetModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -48,7 +48,7 @@ namespace fv class ${typeName}FvModel${SourceType} : - public cellSetOption + public cellSetModel { public: diff --git a/src/fvModels/Make/files b/src/fvModels/Make/files index 6584a912b6..0d97561ca3 100644 --- a/src/fvModels/Make/files +++ b/src/fvModels/Make/files @@ -1,7 +1,7 @@ cellSetModel/cellSetModel.C interRegionModel/interRegionModel.C -general/codedSource/codedSource.C +general/codedFvModel/codedFvModel.C general/semiImplicitSource/semiImplicitSource.C derived/actuationDiskSource/actuationDiskSource.C diff --git a/src/fvModels/general/codedSource/codedSource.C b/src/fvModels/general/codedFvModel/codedFvModel.C similarity index 79% rename from src/fvModels/general/codedSource/codedSource.C rename to src/fvModels/general/codedFvModel/codedFvModel.C index 188ad64be2..b97b5acea9 100644 --- a/src/fvModels/general/codedSource/codedSource.C +++ b/src/fvModels/general/codedFvModel/codedFvModel.C @@ -23,7 +23,7 @@ License \*---------------------------------------------------------------------------*/ -#include "codedSource.H" +#include "codedFvModel.H" #include "fvMesh.H" #include "fvMatrices.H" #include "dynamicCode.H" @@ -32,7 +32,7 @@ License // * * * * * * * * * * * * Private Static Data Members * * * * * * * * * * * // -const Foam::wordList Foam::fv::codedSource::codeKeys_ = +const Foam::wordList Foam::fv::codedFvModel::codeKeys_ = { "codeAddSup", "codeAddRhoSup", @@ -48,15 +48,15 @@ namespace Foam { namespace fv { - defineTypeNameAndDebug(codedSource, 0); - addToRunTimeSelectionTable(fvModel, codedSource, dictionary); + defineTypeNameAndDebug(codedFvModel, 0); + addToRunTimeSelectionTable(fvModel, codedFvModel, dictionary); } } // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -void Foam::fv::codedSource::readCoeffs() +void Foam::fv::codedFvModel::readCoeffs() { fieldName_ = coeffs().lookup("field"); @@ -69,7 +69,7 @@ void Foam::fv::codedSource::readCoeffs() } -Foam::word Foam::fv::codedSource::fieldPrimitiveTypeName() const +Foam::word Foam::fv::codedFvModel::fieldPrimitiveTypeName() const { #define fieldPrimitiveTypeNameTernary(Type, nullArg) \ mesh().foundObject>(fieldName_) \ @@ -80,7 +80,7 @@ Foam::word Foam::fv::codedSource::fieldPrimitiveTypeName() const } -void Foam::fv::codedSource::prepare +void Foam::fv::codedFvModel::prepare ( dynamicCode& dynCode, const dynamicCodeContext& context @@ -118,37 +118,37 @@ void Foam::fv::codedSource::prepare } -const Foam::word& Foam::fv::codedSource::codeName() const +const Foam::word& Foam::fv::codedFvModel::codeName() const { return name(); } -Foam::string Foam::fv::codedSource::description() const +Foam::string Foam::fv::codedFvModel::description() const { return "fvModel:: " + name(); } -void Foam::fv::codedSource::clearRedirect() const +void Foam::fv::codedFvModel::clearRedirect() const { redirectFvModelPtr_.clear(); } -const Foam::dictionary& Foam::fv::codedSource::codeDict() const +const Foam::dictionary& Foam::fv::codedFvModel::codeDict() const { return coeffs(); } -const Foam::wordList& Foam::fv::codedSource::codeKeys() const +const Foam::wordList& Foam::fv::codedFvModel::codeKeys() const { return codeKeys_; } -Foam::fvModel& Foam::fv::codedSource::redirectFvModel() const +Foam::fvModel& Foam::fv::codedFvModel::redirectFvModel() const { if (!redirectFvModelPtr_.valid()) { @@ -166,7 +166,7 @@ Foam::fvModel& Foam::fv::codedSource::redirectFvModel() const template -void Foam::fv::codedSource::addSupType +void Foam::fv::codedFvModel::addSupType ( fvMatrix& eqn, const word& fieldName @@ -176,7 +176,7 @@ void Foam::fv::codedSource::addSupType { if (debug) { - Info<< "codedSource::addSup for source " << name() << endl; + Info<< "codedFvModel::addSup for source " << name() << endl; } updateLibrary(); @@ -186,7 +186,7 @@ void Foam::fv::codedSource::addSupType template -void Foam::fv::codedSource::addSupType +void Foam::fv::codedFvModel::addSupType ( const volScalarField& rho, fvMatrix& eqn, @@ -197,7 +197,7 @@ void Foam::fv::codedSource::addSupType { if (debug) { - Info<< "codedSource::addSup for source " << name() << endl; + Info<< "codedFvModel::addSup for source " << name() << endl; } updateLibrary(); @@ -207,7 +207,7 @@ void Foam::fv::codedSource::addSupType template -void Foam::fv::codedSource::addSupType +void Foam::fv::codedFvModel::addSupType ( const volScalarField& alpha, const volScalarField& rho, @@ -219,7 +219,7 @@ void Foam::fv::codedSource::addSupType { if (debug) { - Info<< "codedSource::addSup for source " << name() << endl; + Info<< "codedFvModel::addSup for source " << name() << endl; } updateLibrary(); @@ -230,7 +230,7 @@ void Foam::fv::codedSource::addSupType // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::fv::codedSource::codedSource +Foam::fv::codedFvModel::codedFvModel ( const word& name, const word& modelType, @@ -247,22 +247,22 @@ Foam::fv::codedSource::codedSource // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -Foam::wordList Foam::fv::codedSource::addSupFields() const +Foam::wordList Foam::fv::codedFvModel::addSupFields() const { return wordList(1, fieldName_); } -FOR_ALL_FIELD_TYPES(IMPLEMENT_FV_MODEL_ADD_SUP, fv::codedSource); +FOR_ALL_FIELD_TYPES(IMPLEMENT_FV_MODEL_ADD_SUP, fv::codedFvModel); -FOR_ALL_FIELD_TYPES(IMPLEMENT_FV_MODEL_ADD_RHO_SUP, fv::codedSource); +FOR_ALL_FIELD_TYPES(IMPLEMENT_FV_MODEL_ADD_RHO_SUP, fv::codedFvModel); -FOR_ALL_FIELD_TYPES(IMPLEMENT_FV_MODEL_ADD_ALPHA_RHO_SUP, fv::codedSource); +FOR_ALL_FIELD_TYPES(IMPLEMENT_FV_MODEL_ADD_ALPHA_RHO_SUP, fv::codedFvModel); -bool Foam::fv::codedSource::read(const dictionary& dict) +bool Foam::fv::codedFvModel::read(const dictionary& dict) { if (cellSetModel::read(dict)) { diff --git a/src/fvModels/general/codedSource/codedSource.H b/src/fvModels/general/codedFvModel/codedFvModel.H similarity index 95% rename from src/fvModels/general/codedSource/codedSource.H rename to src/fvModels/general/codedFvModel/codedFvModel.H index 679c67cfce..cddab37f61 100644 --- a/src/fvModels/general/codedSource/codedSource.H +++ b/src/fvModels/general/codedFvModel/codedFvModel.H @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see . Class - Foam::fv::codedSource + Foam::fv::codedFvModel Description Constructs on-the-fly fvModel source from user-supplied code @@ -32,7 +32,7 @@ Usage \verbatim energySource { - type codedSource; + type codedFvModel; name sourceTime; selectionMode all; @@ -66,12 +66,12 @@ Usage SourceFiles - codedSource.C + codedFvModel.C \*---------------------------------------------------------------------------*/ -#ifndef codedSource_H -#define codedSource_H +#ifndef codedFvModel_H +#define codedFvModel_H #include "cellSetModel.H" #include "codedBase.H" @@ -84,10 +84,10 @@ namespace fv { /*---------------------------------------------------------------------------*\ - Class codedSource Declaration + Class codedFvModel Declaration \*---------------------------------------------------------------------------*/ -class codedSource +class codedFvModel : public cellSetModel, public codedBase @@ -173,13 +173,13 @@ class codedSource public: //- Runtime type information - TypeName("codedSource"); + TypeName("codedFvModel"); // Constructors //- Construct from components - codedSource + codedFvModel ( const word& name, const word& modelType,