mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: additional patch expressions (#2114)
- snGrad, internalField, neighbourField. Functional use as per swak: "... + internalField(T) ..." ENH: additional volume/patch expressions - deltaT() STYLE: rename exprDriverWriter -> fvExprDriverWriter - the original class name was a misnomer since it holds a reference to fvExprDriver BUG: expression faceToPoint/pointToFace definitions were flipped ENH: refactor expression hierarchy and code style - handle TimeState reference at the top-level for simpler derivations - unified internal search parameters (cruft)
This commit is contained in:
@ -5,7 +5,7 @@
|
||||
\\ / A nd | www.openfoam.com
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2021 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -28,6 +28,7 @@ License
|
||||
#include "exprDriver.H"
|
||||
#include "FieldOps.H"
|
||||
#include "Random.H"
|
||||
#include "TimeState.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
@ -38,6 +39,18 @@ void Foam::expressions::exprDriver::fill_random
|
||||
const bool gaussian
|
||||
) const
|
||||
{
|
||||
if (seed <= 0)
|
||||
{
|
||||
if (timeStatePtr_)
|
||||
{
|
||||
seed = (timeStatePtr_->timeIndex() - seed);
|
||||
}
|
||||
else
|
||||
{
|
||||
seed = -seed;
|
||||
}
|
||||
}
|
||||
|
||||
if (gaussian)
|
||||
{
|
||||
Random::gaussianGeneratorOp<scalar> gen(seed);
|
||||
|
||||
Reference in New Issue
Block a user