mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
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:
@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user