SubField: Added "reuse" constructor
This doesn't add any functionality, but it is necessary to unify the interface with Field for classes that are templated on their container
This commit is contained in:
@ -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<Type>&);
|
||||
|
||||
//- Copy constructor or reuse as specified
|
||||
inline SubField(SubField<Type>&, bool reuse);
|
||||
|
||||
|
||||
// Member Functions
|
||||
|
||||
|
||||
@ -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<Type>::SubField
|
||||
{}
|
||||
|
||||
|
||||
template<class Type>
|
||||
inline Foam::SubField<Type>::SubField
|
||||
(
|
||||
SubField<Type>& sfield,
|
||||
bool reuse
|
||||
)
|
||||
:
|
||||
tmp<SubField<Type>>::refCount(),
|
||||
SubList<Type>(sfield)
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
template<class Type>
|
||||
|
||||
Reference in New Issue
Block a user