fvModels: codedSource -> codedFvModel

This commit is contained in:
Henry Weller
2021-03-08 14:53:22 +00:00
parent cce3e13fe3
commit 6e172a708d
5 changed files with 39 additions and 39 deletions

View File

@ -79,7 +79,7 @@ defineTypeNameAndDebug(${typeName}FvModel${SourceType}, 0);
addRemovableToRunTimeSelectionTable addRemovableToRunTimeSelectionTable
( (
option, fvModel,
${typeName}FvModel${SourceType}, ${typeName}FvModel${SourceType},
dictionary dictionary
); );
@ -100,7 +100,7 @@ ${typeName}FvModel${SourceType}
const fvMesh& mesh const fvMesh& mesh
) )
: :
cellSetOption(name, modelType, dict, mesh) cellSetModel(name, modelType, dict, mesh)
{ {
if (${verbose:-false}) if (${verbose:-false})
{ {

View File

@ -32,7 +32,7 @@ SourceFiles
#ifndef codedFvModelTemplate_H #ifndef codedFvModelTemplate_H
#define codedFvModelTemplate_H #define codedFvModelTemplate_H
#include "cellSetOption.H" #include "cellSetModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -48,7 +48,7 @@ namespace fv
class ${typeName}FvModel${SourceType} class ${typeName}FvModel${SourceType}
: :
public cellSetOption public cellSetModel
{ {
public: public:

View File

@ -1,7 +1,7 @@
cellSetModel/cellSetModel.C cellSetModel/cellSetModel.C
interRegionModel/interRegionModel.C interRegionModel/interRegionModel.C
general/codedSource/codedSource.C general/codedFvModel/codedFvModel.C
general/semiImplicitSource/semiImplicitSource.C general/semiImplicitSource/semiImplicitSource.C
derived/actuationDiskSource/actuationDiskSource.C derived/actuationDiskSource/actuationDiskSource.C

View File

@ -23,7 +23,7 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "codedSource.H" #include "codedFvModel.H"
#include "fvMesh.H" #include "fvMesh.H"
#include "fvMatrices.H" #include "fvMatrices.H"
#include "dynamicCode.H" #include "dynamicCode.H"
@ -32,7 +32,7 @@ License
// * * * * * * * * * * * * Private Static Data Members * * * * * * * * * * * // // * * * * * * * * * * * * Private Static Data Members * * * * * * * * * * * //
const Foam::wordList Foam::fv::codedSource::codeKeys_ = const Foam::wordList Foam::fv::codedFvModel::codeKeys_ =
{ {
"codeAddSup", "codeAddSup",
"codeAddRhoSup", "codeAddRhoSup",
@ -48,15 +48,15 @@ namespace Foam
{ {
namespace fv namespace fv
{ {
defineTypeNameAndDebug(codedSource, 0); defineTypeNameAndDebug(codedFvModel, 0);
addToRunTimeSelectionTable(fvModel, codedSource, dictionary); addToRunTimeSelectionTable(fvModel, codedFvModel, dictionary);
} }
} }
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
void Foam::fv::codedSource::readCoeffs() void Foam::fv::codedFvModel::readCoeffs()
{ {
fieldName_ = coeffs().lookup<word>("field"); fieldName_ = coeffs().lookup<word>("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) \ #define fieldPrimitiveTypeNameTernary(Type, nullArg) \
mesh().foundObject<VolField<Type>>(fieldName_) \ mesh().foundObject<VolField<Type>>(fieldName_) \
@ -80,7 +80,7 @@ Foam::word Foam::fv::codedSource::fieldPrimitiveTypeName() const
} }
void Foam::fv::codedSource::prepare void Foam::fv::codedFvModel::prepare
( (
dynamicCode& dynCode, dynamicCode& dynCode,
const dynamicCodeContext& context 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(); return name();
} }
Foam::string Foam::fv::codedSource::description() const Foam::string Foam::fv::codedFvModel::description() const
{ {
return "fvModel:: " + name(); return "fvModel:: " + name();
} }
void Foam::fv::codedSource::clearRedirect() const void Foam::fv::codedFvModel::clearRedirect() const
{ {
redirectFvModelPtr_.clear(); redirectFvModelPtr_.clear();
} }
const Foam::dictionary& Foam::fv::codedSource::codeDict() const const Foam::dictionary& Foam::fv::codedFvModel::codeDict() const
{ {
return coeffs(); return coeffs();
} }
const Foam::wordList& Foam::fv::codedSource::codeKeys() const const Foam::wordList& Foam::fv::codedFvModel::codeKeys() const
{ {
return codeKeys_; return codeKeys_;
} }
Foam::fvModel& Foam::fv::codedSource::redirectFvModel() const Foam::fvModel& Foam::fv::codedFvModel::redirectFvModel() const
{ {
if (!redirectFvModelPtr_.valid()) if (!redirectFvModelPtr_.valid())
{ {
@ -166,7 +166,7 @@ Foam::fvModel& Foam::fv::codedSource::redirectFvModel() const
template<class Type> template<class Type>
void Foam::fv::codedSource::addSupType void Foam::fv::codedFvModel::addSupType
( (
fvMatrix<Type>& eqn, fvMatrix<Type>& eqn,
const word& fieldName const word& fieldName
@ -176,7 +176,7 @@ void Foam::fv::codedSource::addSupType
{ {
if (debug) if (debug)
{ {
Info<< "codedSource::addSup for source " << name() << endl; Info<< "codedFvModel::addSup for source " << name() << endl;
} }
updateLibrary(); updateLibrary();
@ -186,7 +186,7 @@ void Foam::fv::codedSource::addSupType
template<class Type> template<class Type>
void Foam::fv::codedSource::addSupType void Foam::fv::codedFvModel::addSupType
( (
const volScalarField& rho, const volScalarField& rho,
fvMatrix<Type>& eqn, fvMatrix<Type>& eqn,
@ -197,7 +197,7 @@ void Foam::fv::codedSource::addSupType
{ {
if (debug) if (debug)
{ {
Info<< "codedSource::addSup for source " << name() << endl; Info<< "codedFvModel::addSup for source " << name() << endl;
} }
updateLibrary(); updateLibrary();
@ -207,7 +207,7 @@ void Foam::fv::codedSource::addSupType
template<class Type> template<class Type>
void Foam::fv::codedSource::addSupType void Foam::fv::codedFvModel::addSupType
( (
const volScalarField& alpha, const volScalarField& alpha,
const volScalarField& rho, const volScalarField& rho,
@ -219,7 +219,7 @@ void Foam::fv::codedSource::addSupType
{ {
if (debug) if (debug)
{ {
Info<< "codedSource::addSup for source " << name() << endl; Info<< "codedFvModel::addSup for source " << name() << endl;
} }
updateLibrary(); updateLibrary();
@ -230,7 +230,7 @@ void Foam::fv::codedSource::addSupType
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::fv::codedSource::codedSource Foam::fv::codedFvModel::codedFvModel
( (
const word& name, const word& name,
const word& modelType, const word& modelType,
@ -247,22 +247,22 @@ Foam::fv::codedSource::codedSource
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::wordList Foam::fv::codedSource::addSupFields() const Foam::wordList Foam::fv::codedFvModel::addSupFields() const
{ {
return wordList(1, fieldName_); 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)) if (cellSetModel::read(dict))
{ {

View File

@ -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::fv::codedSource Foam::fv::codedFvModel
Description Description
Constructs on-the-fly fvModel source from user-supplied code Constructs on-the-fly fvModel source from user-supplied code
@ -32,7 +32,7 @@ Usage
\verbatim \verbatim
energySource energySource
{ {
type codedSource; type codedFvModel;
name sourceTime; name sourceTime;
selectionMode all; selectionMode all;
@ -66,12 +66,12 @@ Usage
SourceFiles SourceFiles
codedSource.C codedFvModel.C
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef codedSource_H #ifndef codedFvModel_H
#define codedSource_H #define codedFvModel_H
#include "cellSetModel.H" #include "cellSetModel.H"
#include "codedBase.H" #include "codedBase.H"
@ -84,10 +84,10 @@ namespace fv
{ {
/*---------------------------------------------------------------------------*\ /*---------------------------------------------------------------------------*\
Class codedSource Declaration Class codedFvModel Declaration
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
class codedSource class codedFvModel
: :
public cellSetModel, public cellSetModel,
public codedBase public codedBase
@ -173,13 +173,13 @@ class codedSource
public: public:
//- Runtime type information //- Runtime type information
TypeName("codedSource"); TypeName("codedFvModel");
// Constructors // Constructors
//- Construct from components //- Construct from components
codedSource codedFvModel
( (
const word& name, const word& name,
const word& modelType, const word& modelType,