IOobject: Added modelName member function
which constructs the name for a field property associated with the model by pre-pending the given field name with <modelType>: e.g. the generation term in the kEpsilon model is named kEpsilon:G
This commit is contained in:
@ -372,6 +372,10 @@ public:
|
|||||||
//- Return member (name without the extension)
|
//- Return member (name without the extension)
|
||||||
word member() const;
|
word member() const;
|
||||||
|
|
||||||
|
//- Return the name of the object within this model
|
||||||
|
// as <model>:<name>
|
||||||
|
inline word modelName(const char* name) const;
|
||||||
|
|
||||||
const fileName& rootPath() const;
|
const fileName& rootPath() const;
|
||||||
|
|
||||||
const fileName& caseName() const;
|
const fileName& caseName() const;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration | Website: https://openfoam.org
|
\\ / O peration | Website: https://openfoam.org
|
||||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -41,6 +41,12 @@ inline Foam::word Foam::IOobject::groupName(Name name, const word& group)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline Foam::word Foam::IOobject::modelName(const char* name) const
|
||||||
|
{
|
||||||
|
return type() + ':' + name;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class Stream>
|
template<class Stream>
|
||||||
inline Stream& Foam::IOobject::writeBanner(Stream& os, bool noHint)
|
inline Stream& Foam::IOobject::writeBanner(Stream& os, bool noHint)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user