From 20a1ef7b20004d13c238a09a20c7fa15c279772d Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Tue, 21 May 2024 18:53:38 +0100 Subject: [PATCH] dictionary: Updated the global() function to return the global state of the parent dictionary if the parent dictionary is valid. --- src/OpenFOAM/db/dictionary/dictionaryIO.C | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/OpenFOAM/db/dictionary/dictionaryIO.C b/src/OpenFOAM/db/dictionary/dictionaryIO.C index b099de2fec..1faf29d5b1 100644 --- a/src/OpenFOAM/db/dictionary/dictionaryIO.C +++ b/src/OpenFOAM/db/dictionary/dictionaryIO.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 @@ -152,7 +152,14 @@ bool Foam::dictionary::read(Istream& is, const bool keepHeader) bool Foam::dictionary::global() const { - return false; + if (&parent_ != &dictionary::null) + { + return parent_.global(); + } + else + { + return false; + } }