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

@ -30,6 +30,15 @@ Description
PatchFunction1 with the code supplied by an on-the-fly compiled C++
expression.
The code entries:
\plaintable
codeInclude | include files
codeOptions | compiler line: added to EXE_INC (Make/options)
codeLibs | linker line: added to LIB_LIBS (Make/options)
localCode | c++; local static functions
code | c++; return the patch values at (scalar x)
\endplaintable
Usage
Example:
\verbatim
@ -38,11 +47,8 @@ Usage
type uniformFixedValue;
uniformValue
{
type coded;
// Explictly supply name of generated PatchFunction1. Only needed
// if entryname ('uniformValue') would clash with existing
// runtime selection tables.
name myExpression;
type coded;
name myExpression; // Name of generated PatchFunction1
code
#{
@ -50,17 +56,17 @@ Usage
Pout<< "** Patch size:" << pp.size() << endl;
return tmp<vectorField>::New(pp.size(), vector(1, 0, 0))
#};
//codeInclude
//#{
// #include "volFields.H"
//#};
//codeOptions
//#{
// -I$(LIB_SRC)/finiteVolume/lnInclude
//#};
}
//codeInclude
//#{
// #include "fvCFD.H"
//#};
//codeOptions
//#{
// -I$(LIB_SRC)/finiteVolume/lnInclude
//#};
}
\endverbatim