From 364fef68f9ae751280f6fcdab304c37fd6857a5f Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Sun, 21 Jan 2024 17:35:03 +0000 Subject: [PATCH] e.g. a 1.1; // Access to sub-entries using the "/" operator, e.g. d { b 4.8; } e #calc "$a / $d/b"; --- src/OpenFOAM/db/dictionary/dictionary.C | 4 ++-- test/dictionary/testCalc | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/OpenFOAM/db/dictionary/dictionary.C b/src/OpenFOAM/db/dictionary/dictionary.C index 7b97876f07..231bb47155 100644 --- a/src/OpenFOAM/db/dictionary/dictionary.C +++ b/src/OpenFOAM/db/dictionary/dictionary.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2024 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -105,7 +105,7 @@ const Foam::entry* Foam::dictionary::lookupScopedSubEntryPtr const entry* entPtr = lookupScopedSubEntryPtr ( firstWord, - false, // recursive + recursive, patternMatch ); diff --git a/test/dictionary/testCalc b/test/dictionary/testCalc index 2f1eed0109..efc98a243e 100644 --- a/test/dictionary/testCalc +++ b/test/dictionary/testCalc @@ -29,6 +29,13 @@ c #calc "$a / $b"; c #calc "($a)/$b"; +// Access to sub-entries using the "/" operator, e.g. +d +{ + b 4.8; +} +e #calc "$a / $d/b"; + s "field"; fieldName #calc "$s + \"Name\" ";