ENH: improve codeTemplates

- meshTools include/library for many (most) coded items

- add PatchFunction1 include for coded BCs to provide ready access
  to Function1 and PatchFunction1
This commit is contained in:
Mark Olesen
2021-06-01 12:07:20 +02:00
parent 2f6739b140
commit b0891824fa
28 changed files with 289 additions and 220 deletions

View File

@ -5,6 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2021 OpenCFD Ltd.
Copyright (C) YEAR AUTHOR,AFFILIATION
-------------------------------------------------------------------------------
License
@ -37,6 +38,7 @@ License
${codeInclude}
//}}} end codeInclude
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
@ -96,11 +98,11 @@ ${typeName}PatchFunction1${FieldType}
const bool faceValues
)
:
PatchFunction1<${TemplateType}>(pp, entryName, dict, faceValues)
parent_bctype(pp, entryName, dict, faceValues)
{
if (${verbose:-false})
{
printMessage("Construct ${typeName} from components");
printMessage("Construct ${typeName} PatchFunction1 from dictionary");
}
}
@ -111,7 +113,7 @@ ${typeName}PatchFunction1${FieldType}
const ${typeName}PatchFunction1${FieldType}& rhs
)
:
PatchFunction1<${TemplateType}>(rhs)
parent_bctype(rhs)
{}
@ -122,13 +124,13 @@ ${typeName}PatchFunction1${FieldType}
const polyPatch& pp
)
:
PatchFunction1<${TemplateType}>(rhs, pp)
parent_bctype(rhs, pp)
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
tmp<Field<${TemplateType}>>
Foam::tmp<Foam::Field<Foam::${TemplateType}>>
${typeName}PatchFunction1${FieldType}::value
(
const scalar x