DOC: fixed documented use of expression functions

- `functions<scalar>` and `functions<vector>` were erroneously
   documented in header as `lookup<scalar>` etc.

INT: handle fluent square brackets (fixes #2429)

- patch applied from openfoam.org
This commit is contained in:
Mark Olesen
2022-03-30 16:45:30 +02:00
parent c7f4ba1969
commit ecf8d260c4
2 changed files with 13 additions and 10 deletions

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com \\ / A nd | www.openfoam.com
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation Copyright (C) 2011-2016,2022 OpenFOAM Foundation
Copyright (C) 2021 OpenCFD Ltd. Copyright (C) 2021 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -158,6 +158,7 @@ quote \"
dash "-" dash "-"
dotColonDash [.:-] dotColonDash [.:-]
commaPipe [,\|] commaPipe [,\|]
squareBracket [\[\]]
schemeSpecialInitial [!$%&*/\\:;<=>?~_^#.@'] schemeSpecialInitial [!$%&*/\\:;<=>?~_^#.@']
schemeSpecialSubsequent [.+-] schemeSpecialSubsequent [.+-]
@ -172,6 +173,7 @@ zeroLabel {digit}*
signedInteger [-+]?{integer} signedInteger [-+]?{integer}
word ({alpha}|{digit}|{dotColonDash})* word ({alpha}|{digit}|{dotColonDash})*
wordBraces ({word}|{lbrac}|{rbrac})* wordBraces ({word}|{lbrac}|{rbrac})*
wordSquareBrackets ({word}|{squareBracket})*
wordBracesExtras ({word}|{lbrac}|{rbrac}|{commaPipe})* wordBracesExtras ({word}|{lbrac}|{rbrac}|{commaPipe})*
exponent_part [eE][-+]?{digit}+ exponent_part [eE][-+]?{digit}+
@ -193,7 +195,7 @@ scalarList ({scalarListElement}+{space})
schemeSymbolList ({schemeSymbolListElement}+{space}) schemeSymbolList ({schemeSymbolListElement}+{space})
starStar ("**") starStar ("**")
text ({space}({word}*{space})*) text ({space}({wordSquareBrackets}*{space})*)
textBraces ({space}({wordBraces}*{space})*) textBraces ({space}({wordBraces}*{space})*)
textExtras ({space}({word}*{commaPipe}{space})*) textExtras ({space}({word}*{commaPipe}{space})*)
textBracesExtras ({space}({wordBracesExtras}*{space})*) textBracesExtras ({space}({wordBracesExtras}*{space})*)

View File

@ -6,7 +6,7 @@
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright (C) 2010-2018 Bernhard Gschaider Copyright (C) 2010-2018 Bernhard Gschaider
Copyright (C) 2019-2021 OpenCFD Ltd. Copyright (C) 2019-2022 OpenCFD Ltd.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
This file is part of OpenFOAM. This file is part of OpenFOAM.
@ -36,8 +36,8 @@ Description
\table \table
Property | Description | Required | Default Property | Description | Required | Default
variables | List of variables for expressions | no | () variables | List of variables for expressions | no | ()
lookup\<scalar\> | Dictionary of scalar Function1 | no | {} functions\<scalar\> | Dictionary of scalar Function1 | no | {}
lookup\<vector\> | Dictionary of vector Function1 | no | {} functions\<vector\> | Dictionary of vector Function1 | no | {}
allowShadowing | Allow variables to shadow field names | no | false allowShadowing | Allow variables to shadow field names | no | false
\endtable \endtable
@ -49,9 +49,10 @@ Description
debug.parser | Add debug for parser | no | false debug.parser | Add debug for parser | no | false
\endtable \endtable
The \c lookup<scalar> and \c lookup<vector> are dictionaries The \c functions<scalar> and \c functions<vector> entries are
of Function1 definitions that can either be used to establish dictionaries of Foam::Function1 definitions that can either be used
a time-varying quantity, to remap a field of scalar values, or both. to establish a time-varying quantity, to remap a field of scalar
values, or both.
SourceFiles SourceFiles
exprDriverI.H exprDriverI.H
@ -64,8 +65,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#ifndef expressions_exprDriver_H #ifndef Foam_expressions_exprDriver_H
#define expressions_exprDriver_H #define Foam_expressions_exprDriver_H
#include "exprResult.H" #include "exprResult.H"
#include "exprString.H" #include "exprString.H"