From c6f69e7987d4ca2e4cd6f75fdcba074f6cc39fb1 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Thu, 14 Jan 2021 10:52:55 +0000 Subject: [PATCH] Function1/2: Updated the writing of Function1/2 entries within Function1/2s Resolves bug-report https://bugs.openfoam.org/view.php?id=3613 --- .../primitives/functions/Function1/Scale/Scale.C | 8 ++++---- .../primitives/functions/Function1/Sine/Sine.C | 6 +++--- .../primitives/functions/Function1/Square/Square.C | 6 +++--- .../functions/Function1/reverseRamp/reverseRamp.C | 4 ++-- .../primitives/functions/Function2/Scale/Scale2.C | 10 +++++----- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/OpenFOAM/primitives/functions/Function1/Scale/Scale.C b/src/OpenFOAM/primitives/functions/Function1/Scale/Scale.C index 990e6cb1b0..faa42e4864 100644 --- a/src/OpenFOAM/primitives/functions/Function1/Scale/Scale.C +++ b/src/OpenFOAM/primitives/functions/Function1/Scale/Scale.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2017-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2017-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -86,9 +86,9 @@ Foam::Function1s::Scale::~Scale() template void Foam::Function1s::Scale::write(Ostream& os) const { - scale_->write(os); - xScale_->write(os); - value_->write(os); + writeEntry(os, scale_()); + writeEntry(os, xScale_()); + writeEntry(os, value_()); } diff --git a/src/OpenFOAM/primitives/functions/Function1/Sine/Sine.C b/src/OpenFOAM/primitives/functions/Function1/Sine/Sine.C index fadb559813..e4fc2fb2f5 100644 --- a/src/OpenFOAM/primitives/functions/Function1/Sine/Sine.C +++ b/src/OpenFOAM/primitives/functions/Function1/Sine/Sine.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2016-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2016-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -80,10 +80,10 @@ Foam::Function1s::Sine::~Sine() template void Foam::Function1s::Sine::write(Ostream& os) const { - amplitude_->write(os); + writeEntry(os, amplitude_()); writeEntry(os, "frequency", frequency_); writeEntry(os, "start", start_); - level_->write(os); + writeEntry(os, level_()); } diff --git a/src/OpenFOAM/primitives/functions/Function1/Square/Square.C b/src/OpenFOAM/primitives/functions/Function1/Square/Square.C index a7ee7f00d9..af0ed2a4ca 100644 --- a/src/OpenFOAM/primitives/functions/Function1/Square/Square.C +++ b/src/OpenFOAM/primitives/functions/Function1/Square/Square.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2016-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2016-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -82,10 +82,10 @@ Foam::Function1s::Square::~Square() template void Foam::Function1s::Square::write(Ostream& os) const { - amplitude_->write(os); + writeEntry(os, amplitude_()); writeEntry(os, "frequency", frequency_); writeEntry(os, "start", start_); - level_->write(os); + writeEntry(os, level_()); writeEntry(os, "markSpace", markSpace_); } diff --git a/src/OpenFOAM/primitives/functions/Function1/reverseRamp/reverseRamp.C b/src/OpenFOAM/primitives/functions/Function1/reverseRamp/reverseRamp.C index 8e884e2f01..4575f66f31 100644 --- a/src/OpenFOAM/primitives/functions/Function1/reverseRamp/reverseRamp.C +++ b/src/OpenFOAM/primitives/functions/Function1/reverseRamp/reverseRamp.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2019-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2019-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -70,7 +70,7 @@ Foam::Function1s::reverseRamp::~reverseRamp() void Foam::Function1s::reverseRamp::write(Ostream& os) const { Ramp::write(os); - ramp_->write(os); + writeEntry(os, ramp_()); } diff --git a/src/OpenFOAM/primitives/functions/Function2/Scale/Scale2.C b/src/OpenFOAM/primitives/functions/Function2/Scale/Scale2.C index bb3b32ef3e..3fc8c432b3 100644 --- a/src/OpenFOAM/primitives/functions/Function2/Scale/Scale2.C +++ b/src/OpenFOAM/primitives/functions/Function2/Scale/Scale2.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2020-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -87,10 +87,10 @@ Foam::Function2s::Scale::~Scale() template void Foam::Function2s::Scale::write(Ostream& os) const { - scale_->write(os); - xScale_->write(os); - yScale_->write(os); - value_->write(os); + writeEntry(os, scale_()); + writeEntry(os, xScale_()); + writeEntry(os, yScale_()); + writeEntry(os, value_()); }