diff --git a/src/OpenFOAM/fields/Fields/Field/SubField.H b/src/OpenFOAM/fields/Fields/Field/SubField.H index 68674044d6..5ce67ab1e4 100644 --- a/src/OpenFOAM/fields/Fields/Field/SubField.H +++ b/src/OpenFOAM/fields/Fields/Field/SubField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -95,6 +95,9 @@ public: //- Copy constructor inline SubField(const SubField&); + //- Copy constructor or reuse as specified + inline SubField(SubField&, bool reuse); + // Member Functions diff --git a/src/OpenFOAM/fields/Fields/Field/SubFieldI.H b/src/OpenFOAM/fields/Fields/Field/SubFieldI.H index b3633ed50f..fc29b36052 100644 --- a/src/OpenFOAM/fields/Fields/Field/SubFieldI.H +++ b/src/OpenFOAM/fields/Fields/Field/SubFieldI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -79,6 +79,18 @@ inline Foam::SubField::SubField {} +template +inline Foam::SubField::SubField +( + SubField& sfield, + bool reuse +) +: + tmp>::refCount(), + SubList(sfield) +{} + + // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template