ENH: use factory Clone method for handling member clone() methods

- reduces code clutter, simplifies modification for new types.
  Handled classes:

    Function1, PatchFunction1, coordinateRotation, coordinateSystem,
    particle, liquidProperties, solidProperties
This commit is contained in:
Mark Olesen
2024-01-08 11:30:58 +01:00
committed by Andrew Heather
parent 39e054b0b8
commit 987dbe4589
110 changed files with 543 additions and 570 deletions

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2017-2019 OpenCFD Ltd
Copyright (C) 2017-2024 OpenCFD Ltd
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -206,9 +206,13 @@ public:
//- Construct as copy
DTRMParticle(const DTRMParticle& p);
//- Return a clone
virtual autoPtr<particle> clone() const
{
return particle::Clone(*this);
}
//- Factory class to read-construct particles used for
// parallel transfer
//- Factory class to read-construct particles (for parallel transfer)
class iNew
{
const polyMesh& mesh_;

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2017-2022 OpenCFD Ltd.
Copyright (C) 2017-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -100,10 +100,10 @@ public:
cachedPosition_(p.cachedPosition_)
{}
//- Construct and return a clone
//- Return a clone
virtual autoPtr<particle> clone() const
{
return autoPtr<particle>(new passivePositionParticle(*this));
return particle::Clone(*this);
}

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2021 OpenCFD Ltd.
Copyright (C) 2021-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -86,13 +86,10 @@ public:
const ${typeName}Function1_${TemplateType}& rhs
) = default;
//- Construct and return a clone
//- Return a clone
virtual tmp<Function1<${TemplateType}>> clone() const
{
return tmp<Function1<${TemplateType}>>
(
new ${typeName}Function1_${TemplateType}(*this)
);
return Function1<${TemplateType}>::Clone(*this);
}

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2020-2021 OpenCFD Ltd.
Copyright (C) 2020-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -85,12 +85,6 @@ public:
const bool faceValues = true
);
//- Copy construct
${typeName}PatchFunction1${FieldType}
(
const ${typeName}PatchFunction1${FieldType}& rhs
) = default;
//- Copy construct, resetting patch
${typeName}PatchFunction1${FieldType}
(
@ -98,25 +92,25 @@ public:
const polyPatch& pp
);
//- Construct and return a clone
//- Copy construct
${typeName}PatchFunction1${FieldType}
(
const ${typeName}PatchFunction1${FieldType}& rhs
) = default;
//- Return a clone
virtual tmp<PatchFunction1<${TemplateType}>> clone() const
{
return tmp<PatchFunction1<${TemplateType}>>
(
new ${typeName}PatchFunction1${FieldType}(*this)
);
return PatchFunction1<${TemplateType}>::Clone(*this);
}
//- Construct and return a clone setting patch
//- Return a clone, setting the patch
virtual tmp<PatchFunction1<${TemplateType}>> clone
(
const polyPatch& pp
) const
{
return tmp<PatchFunction1<${TemplateType}>>
(
new ${typeName}PatchFunction1${FieldType}(*this, pp)
);
return PatchFunction1<${TemplateType}>::Clone(*this, pp);
}

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2020-2021 OpenCFD Ltd.
Copyright (C) 2020-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -65,8 +65,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/
#ifndef Function1Types_expression_H
#define Function1Types_expression_H
#ifndef Foam_Function1Types_expression_H
#define Foam_Function1Types_expression_H
#include "Function1.H"
#include "fieldExprDriver.H"
@ -124,10 +124,10 @@ public:
//- Copy construct
explicit Function1Expression(const Function1Expression<Type>& rhs);
//- Construct and return a clone
//- Return a clone
virtual tmp<Function1<Type>> clone() const
{
return tmp<Function1<Type>>(new Function1Expression<Type>(*this));
return Function1<Type>::Clone(*this);
}

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2017-2021 OpenCFD Ltd.
Copyright (C) 2017-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -133,9 +133,7 @@ public:
//- Return clone
autoPtr<coordinateRotation> clone() const
{
return
autoPtr<coordinateRotation>::NewFrom
<coordinateRotations::euler>(*this);
return coordinateRotation::Clone(*this);
}

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2017-2022 OpenCFD Ltd.
Copyright (C) 2017-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -115,9 +115,7 @@ public:
//- Return clone
autoPtr<coordinateRotation> clone() const
{
return
autoPtr<coordinateRotation>::NewFrom
<coordinateRotations::starcd>(*this);
return coordinateRotation::Clone(*this);
}

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2017-2022 OpenCFD Ltd.
Copyright (C) 2017-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -144,9 +144,7 @@ public:
//- Return clone
autoPtr<coordinateRotation> clone() const
{
return
autoPtr<coordinateRotation>::NewFrom
<coordinateRotations::axes>(*this);
return coordinateRotation::Clone(*this);
}

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2018-2022 OpenCFD Ltd.
Copyright (C) 2018-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -120,9 +120,7 @@ public:
//- Return clone
autoPtr<coordinateRotation> clone() const
{
return
autoPtr<coordinateRotation>::NewFrom
<coordinateRotations::axisAngle>(*this);
return coordinateRotation::Clone(*this);
}

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2018-2022 OpenCFD Ltd.
Copyright (C) 2018-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -109,11 +109,18 @@ public:
// Uses all default constructors
//- Construct and return a clone
//- Return a clone
virtual autoPtr<coordinateRotation> clone() const = 0;
// Selectors
// Factory Methods
//- Clone a coordinate rotation
template<class Derived>
static autoPtr<coordinateRotation> Clone(const Derived& crot)
{
return autoPtr<coordinateRotation>(new Derived(crot));
}
//- Select construct the specified coordinate rotation type
//

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2018-2021 OpenCFD Ltd.
Copyright (C) 2018-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -89,9 +89,7 @@ public:
//- Return clone
autoPtr<coordinateRotation> clone() const
{
return
autoPtr<coordinateRotation>::NewFrom
<coordinateRotations::cylindrical>(*this);
return coordinateRotation::Clone(*this);
}

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2018-2021 OpenCFD Ltd.
Copyright (C) 2018-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -93,9 +93,7 @@ public:
//- Return clone
autoPtr<coordinateRotation> clone() const
{
return
autoPtr<coordinateRotation>::NewFrom
<coordinateRotations::identity>(*this);
return coordinateRotation::Clone(*this);
}

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2021 OpenCFD Ltd.
Copyright (C) 2021-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -89,9 +89,7 @@ public:
//- Return clone
autoPtr<coordinateRotation> clone() const
{
return
autoPtr<coordinateRotation>::NewFrom
<coordinateRotations::specified>(*this);
return coordinateRotation::Clone(*this);
}

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2013 OpenFOAM Foundation
Copyright (C) 2018-2022 OpenCFD Ltd.
Copyright (C) 2018-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -149,7 +149,7 @@ public:
//- Return clone
virtual autoPtr<coordinateSystem> clone() const
{
return autoPtr<coordinateSystem>::NewFrom<cartesian>(*this);
return coordinateSystem::Clone(*this);
}

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2018-2022 OpenCFD Ltd.
Copyright (C) 2018-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -453,7 +453,26 @@ public:
);
// Selectors
// Factory Methods
//- Clone a coordinate system
template<class Derived>
static autoPtr<coordinateSystem> Clone(const Derived& csys)
{
return autoPtr<coordinateSystem>(new Derived(csys));
}
//- Select construct the specified coordinate system type
//- with reference to objectRegistry for indirect entries.
//
// An empty modelType will be treated as "cartesian"
static autoPtr<coordinateSystem> Clone
(
const word& modelType,
const objectRegistry& obr,
const dictionary& dict,
IOobjectOption::readOption readOrigin = IOobjectOption::MUST_READ
);
//- Select construct the specified coordinate system type
//- with reference to objectRegistry for indirect entries.

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2014 OpenFOAM Foundation
Copyright (C) 2018-2022 OpenCFD Ltd.
Copyright (C) 2018-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -191,7 +191,7 @@ public:
//- Return clone
virtual autoPtr<coordinateSystem> clone() const
{
return autoPtr<coordinateSystem>::NewFrom<cylindrical>(*this);
return coordinateSystem::Clone(*this);
}

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2018-2022 OpenCFD Ltd.
Copyright (C) 2018-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -149,7 +149,7 @@ public:
//- Return clone
virtual autoPtr<coordinateSystem> clone() const
{
return autoPtr<coordinateSystem>::NewFrom<indirect>(*this);
return coordinateSystem::Clone(*this);
}

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2017-2023 OpenCFD Ltd.
Copyright (C) 2017-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -140,10 +140,10 @@ public:
//- Copy construct
explicit CSV(const CSV<Type>& csv);
//- Construct and return a clone
//- Return a clone
virtual tmp<Function1<Type>> clone() const
{
return tmp<Function1<Type>>(new CSV<Type>(*this));
return Function1<Type>::Clone(*this);
}

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2021 OpenCFD Ltd.
Copyright (C) 2021-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -84,8 +84,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/
#ifndef Function1Types_CodedFunction1_H
#define Function1Types_CodedFunction1_H
#ifndef Foam_Function1Types_CodedFunction1_H
#define Foam_Function1Types_CodedFunction1_H
#include "Function1.H"
#include "codedBase.H"
@ -184,10 +184,10 @@ public:
//- Copy construct
explicit CodedFunction1(const CodedFunction1<Type>& rhs);
//- Construct and return a clone
//- Return a clone
virtual tmp<Function1<Type>> clone() const
{
return tmp<Function1<Type>>(new CodedFunction1<Type>(*this));
return Function1<Type>::Clone(*this);
}

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2015-2021 OpenCFD Ltd.
Copyright (C) 2015-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -53,8 +53,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/
#ifndef Function1Types_Constant_H
#define Function1Types_Constant_H
#ifndef Foam_Function1Types_Constant_H
#define Foam_Function1Types_Constant_H
#include "Function1.H"
@ -118,10 +118,10 @@ public:
//- Copy constructor
explicit Constant(const Constant<Type>& rhs);
//- Construct and return a clone
//- Return a clone
virtual tmp<Function1<Type>> clone() const
{
return tmp<Function1<Type>>(new Constant<Type>(*this));
return Function1<Type>::Clone(*this);
}

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2020-2022 OpenCFD Ltd.
Copyright (C) 2020-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -96,8 +96,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/
#ifndef Function1Types_Cosine_H
#define Function1Types_Cosine_H
#ifndef Foam_Function1Types_Cosine_H
#define Foam_Function1Types_Cosine_H
#include "Sine.H"
@ -148,10 +148,10 @@ public:
Sine<Type>(rhs)
{}
//- Construct and return a clone
//- Return a clone
virtual tmp<Function1<Type>> clone() const
{
return tmp<Function1<Type>>(new Cosine<Type>(*this));
return Function1<Type>::Clone(*this);
}

View File

@ -134,17 +134,6 @@ Foam::FieldFunction1<Function1Type>::FieldFunction1
{}
template<class Function1Type>
Foam::tmp<Foam::Function1<typename Function1Type::returnType>>
Foam::FieldFunction1<Function1Type>::clone() const
{
return tmp<Function1<Type>>
(
new FieldFunction1<Function1Type>(*this)
);
}
template<class Function1Type>
Foam::tmp<Foam::Field<typename Function1Type::returnType>>
Foam::FieldFunction1<Function1Type>::integrate

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2018-2023 OpenCFD Ltd.
Copyright (C) 2018-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -164,11 +164,18 @@ public:
//- Copy construct
explicit Function1(const Function1<Type>& rhs);
//- Construct and return a clone
//- Return a clone
virtual tmp<Function1<Type>> clone() const = 0;
// Selectors
// Factory Methods
//- Clone a Function1
template<class Derived>
static tmp<Function1<Type>> Clone(const Derived& fun)
{
return tmp<Function1<Type>>(new Derived(fun));
}
//- Selector, with fallback redirection
static autoPtr<Function1<Type>> New
@ -321,8 +328,11 @@ public:
const objectRegistry* obrPtr = nullptr
);
//- Construct and return a clone
virtual tmp<Function1<Type>> clone() const;
//- Return a clone
virtual tmp<Function1<Type>> clone() const
{
return Function1<Type>::Clone(*this);
}
//- Destructor

View File

@ -25,8 +25,8 @@ License
\*---------------------------------------------------------------------------*/
#ifndef Function1Fwd_H
#define Function1Fwd_H
#ifndef Foam_Function1Fwd_H
#define Foam_Function1Fwd_H
#include "Function1.H"
#include "vector.H"

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2021 OpenCFD Ltd.
Copyright (C) 2021-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -58,8 +58,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/
#ifndef Function1Types_FunctionObjectTrigger_H
#define Function1Types_FunctionObjectTrigger_H
#ifndef Foam_Function1Types_FunctionObjectTrigger_H
#define Foam_Function1Types_FunctionObjectTrigger_H
#include "Function1.H"
#include "labelList.H"
@ -80,7 +80,6 @@ class FunctionObjectTrigger
:
public Function1<Type>
{
// Private Data
//- Trigger indices when it is considered active
@ -124,10 +123,10 @@ public:
//- Copy construct
explicit FunctionObjectTrigger(const FunctionObjectTrigger<Type>& rhs);
//- Construct and return a clone
//- Return a clone
virtual tmp<Function1<Type>> clone() const
{
return tmp<Function1<Type>>(new FunctionObjectTrigger<Type>(*this));
return Function1<Type>::Clone(*this);
}

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2021 OpenCFD Ltd.
Copyright (C) 2021-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -49,8 +49,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/
#ifndef Function1Types_FunctionObjectValue_H
#define Function1Types_FunctionObjectValue_H
#ifndef Foam_Function1Types_FunctionObjectValue_H
#define Foam_Function1Types_FunctionObjectValue_H
#include "Function1.H"
@ -116,10 +116,10 @@ public:
//- Copy construct
explicit FunctionObjectValue(const FunctionObjectValue<Type>& rhs);
//- Construct and return a clone
//- Return a clone
virtual tmp<Function1<Type>> clone() const
{
return tmp<Function1<Type>>(new FunctionObjectValue<Type>(*this));
return Function1<Type>::Clone(*this);
}

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2020-2021 OpenCFD Ltd.
Copyright (C) 2020-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -104,8 +104,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/
#ifndef Function1Types_InputValueMapper_H
#define Function1Types_InputValueMapper_H
#ifndef Foam_Function1Types_InputValueMapper_H
#define Foam_Function1Types_InputValueMapper_H
#include "Function1.H"
#include "Enum.H"
@ -201,10 +201,10 @@ public:
//- Copy construct
explicit InputValueMapper(const InputValueMapper<Type>& rhs);
//- Construct and return a clone
//- Return a clone
virtual tmp<Function1<Type>> clone() const
{
return tmp<Function1<Type>>(new InputValueMapper<Type>(*this));
return Function1<Type>::Clone(*this);
}

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2021-2022 OpenCFD Ltd.
Copyright (C) 2021-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -86,10 +86,10 @@ public:
const objectRegistry* obrPtr = nullptr
);
//- Construct and return a clone
//- Return a clone
virtual tmp<Function1<Type>> clone() const
{
return tmp<Function1<Type>>(new None<Type>(*this));
return Function1<Type>::Clone(*this);
}

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2017 OpenFOAM Foundation
Copyright (C) 2020-2022 OpenCFD Ltd.
Copyright (C) 2020-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -40,8 +40,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/
#ifndef Function1Types_OneConstant_H
#define Function1Types_OneConstant_H
#ifndef Foam_Function1Types_OneConstant_H
#define Foam_Function1Types_OneConstant_H
#include "Function1.H"
@ -93,10 +93,10 @@ public:
const objectRegistry* obrPtr = nullptr
);
//- Construct and return a clone
//- Return a clone
virtual tmp<Function1<Type>> clone() const
{
return tmp<Function1<Type>>(new OneConstant<Type>(*this));
return Function1<Type>::Clone(*this);
}

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2021 OpenCFD Ltd.
Copyright (C) 2021-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -59,8 +59,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/
#ifndef Function1Types_Polynomial_H
#define Function1Types_Polynomial_H
#ifndef Foam_Function1Types_Polynomial_H
#define Foam_Function1Types_Polynomial_H
#include "Function1.H"
#include "Tuple2.H"
@ -127,10 +127,10 @@ public:
//- Copy constructor
explicit Polynomial(const Polynomial& poly);
//- Construct and return a clone
//- Return a clone
virtual tmp<Function1<Type>> clone() const
{
return tmp<Function1<Type>>(new Polynomial<Type>(*this));
return Function1<Type>::Clone(*this);
}

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2017 OpenFOAM Foundation
Copyright (C) 2020-2021 OpenCFD Ltd.
Copyright (C) 2020-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -72,8 +72,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/
#ifndef Function1Types_Scale_H
#define Function1Types_Scale_H
#ifndef Foam_Function1Types_Scale_H
#define Foam_Function1Types_Scale_H
#include "Function1.H"
@ -133,10 +133,10 @@ public:
//- Copy construct
explicit Scale(const Scale<Type>& rhs);
//- Construct and return a clone
//- Return a clone
virtual tmp<Function1<Type>> clone() const
{
return tmp<Function1<Type>>(new Scale<Type>(*this));
return Function1<Type>::Clone(*this);
}

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2016-2017 OpenFOAM Foundation
Copyright (C) 2020-2022 OpenCFD Ltd.
Copyright (C) 2020-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -98,8 +98,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/
#ifndef Function1Types_Sine_H
#define Function1Types_Sine_H
#ifndef Foam_Function1Types_Sine_H
#define Foam_Function1Types_Sine_H
#include "Function1.H"
@ -192,10 +192,10 @@ public:
//- Copy construct
explicit Sine(const Sine<Type>& rhs);
//- Construct and return a clone
//- Return a clone
virtual tmp<Function1<Type>> clone() const
{
return tmp<Function1<Type>>(new Sine<Type>(*this));
return Function1<Type>::Clone(*this);
}

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2016-2017 OpenFOAM Foundation
Copyright (C) 2020-2021 OpenCFD Ltd.
Copyright (C) 2020-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -101,8 +101,8 @@ Note
\*---------------------------------------------------------------------------*/
#ifndef Function1Types_Square_H
#define Function1Types_Square_H
#ifndef Foam_Function1Types_Square_H
#define Foam_Function1Types_Square_H
#include "Sine.H"
@ -155,10 +155,10 @@ public:
//- Copy construct
explicit Square(const Square<Type>& rhs);
//- Construct and return a clone
//- Return a clone
virtual tmp<Function1<Type>> clone() const
{
return tmp<Function1<Type>>(new Square<Type>(*this));
return Function1<Type>::Clone(*this);
}

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2019-2021 OpenCFD Ltd.
Copyright (C) 2019-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -79,8 +79,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/
#ifndef Function1Types_Table_H
#define Function1Types_Table_H
#ifndef Foam_Function1Types_Table_H
#define Foam_Function1Types_Table_H
#include "TableBase.H"
@ -130,10 +130,10 @@ public:
//- Copy construct
explicit Table(const Table<Type>& tbl);
//- Construct and return a clone
//- Return a clone
virtual tmp<Function1<Type>> clone() const
{
return tmp<Function1<Type>>(new Table<Type>(*this));
return Function1<Type>::Clone(*this);
}

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2019-2021 OpenCFD Ltd.
Copyright (C) 2019-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -59,8 +59,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/
#ifndef Function1Types_TableFile_H
#define Function1Types_TableFile_H
#ifndef Foam_Function1Types_TableFile_H
#define Foam_Function1Types_TableFile_H
#include "TableBase.H"
@ -111,10 +111,10 @@ public:
//- Copy construct
explicit TableFile(const TableFile<Type>& tbl);
//- Construct and return a clone
//- Return a clone
virtual tmp<Function1<Type>> clone() const
{
return tmp<Function1<Type>>(new TableFile<Type>(*this));
return Function1<Type>::Clone(*this);
}

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2017 OpenFOAM Foundation
Copyright (C) 2020-2022 OpenCFD Ltd.
Copyright (C) 2020-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -40,8 +40,8 @@ Description
\*---------------------------------------------------------------------------*/
#ifndef Function1Types_Uniform_H
#define Function1Types_Uniform_H
#ifndef Foam_Function1Types_Uniform_H
#define Foam_Function1Types_Uniform_H
#include "Constant.H"
@ -89,10 +89,10 @@ public:
Constant<Type>(entryName, dict, obrPtr)
{}
//- Construct and return a clone
//- Return a clone
virtual tmp<Function1<Type>> clone() const
{
return tmp<Function1<Type>>(new Uniform<Type>(*this));
return Function1<Type>::Clone(*this);
}
};

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2017 OpenFOAM Foundation
Copyright (C) 2020-2022 OpenCFD Ltd.
Copyright (C) 2020-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -49,8 +49,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/
#ifndef Function1Types_ZeroConstant_H
#define Function1Types_ZeroConstant_H
#ifndef Foam_Function1Types_ZeroConstant_H
#define Foam_Function1Types_ZeroConstant_H
#include "Function1.H"
@ -102,10 +102,10 @@ public:
const objectRegistry* obrPtr = nullptr
);
//- Construct and return a clone
//- Return a clone
virtual tmp<Function1<Type>> clone() const
{
return tmp<Function1<Type>>(new ZeroConstant<Type>(*this));
return Function1<Type>::Clone(*this);
}

View File

@ -62,16 +62,6 @@ Foam::PatchFunction1Types::PatchExprField<Type>::PatchExprField
}
template<class Type>
Foam::PatchFunction1Types::PatchExprField<Type>::PatchExprField
(
const PatchExprField<Type>& rhs
)
:
PatchExprField<Type>(rhs, rhs.patch())
{}
template<class Type>
Foam::PatchFunction1Types::PatchExprField<Type>::PatchExprField
(
@ -86,6 +76,16 @@ Foam::PatchFunction1Types::PatchExprField<Type>::PatchExprField
{}
template<class Type>
Foam::PatchFunction1Types::PatchExprField<Type>::PatchExprField
(
const PatchExprField<Type>& rhs
)
:
PatchExprField<Type>(rhs, rhs.patch())
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Type>

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2020 OpenCFD Ltd.
Copyright (C) 2020-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -122,9 +122,6 @@ public:
const bool faceValues = true
);
//- Copy construct
explicit PatchExprField(const PatchExprField<Type>& rhs);
//- Copy construct setting patch
explicit PatchExprField
(
@ -132,22 +129,19 @@ public:
const polyPatch& pp
);
//- Construct and return a clone
//- Copy construct
explicit PatchExprField(const PatchExprField<Type>& rhs);
//- Return a clone
virtual tmp<PatchFunction1<Type>> clone() const
{
return tmp<PatchFunction1<Type>>
(
new PatchExprField<Type>(*this)
);
return PatchFunction1<Type>::Clone(*this);
}
//- Construct and return a clone setting patch
//- Return a clone, setting the patch
virtual tmp<PatchFunction1<Type>> clone(const polyPatch& pp) const
{
return tmp<PatchFunction1<Type>>
(
new PatchExprField<Type>(*this, pp)
);
return PatchFunction1<Type>::Clone(*this, pp);
}

View File

@ -73,16 +73,6 @@ Foam::PatchFunction1Types::Sampled<Type>::Sampled
}
template<class Type>
Foam::PatchFunction1Types::Sampled<Type>::Sampled
(
const Sampled<Type>& rhs
)
:
Sampled<Type>(rhs, rhs.patch())
{}
template<class Type>
Foam::PatchFunction1Types::Sampled<Type>::Sampled
(
@ -99,6 +89,16 @@ Foam::PatchFunction1Types::Sampled<Type>::Sampled
{}
template<class Type>
Foam::PatchFunction1Types::Sampled<Type>::Sampled
(
const Sampled<Type>& rhs
)
:
Sampled<Type>(rhs, rhs.patch())
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Type>

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2018-2020 OpenCFD Ltd.
Copyright (C) 2018-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -149,9 +149,6 @@ public:
const bool faceValues = true
);
//- Copy construct
explicit Sampled(const Sampled<Type>& rhs);
//- Copy construct setting patch
explicit Sampled
(
@ -159,22 +156,19 @@ public:
const polyPatch& pp
);
//- Construct and return a clone
//- Copy construct
explicit Sampled(const Sampled<Type>& rhs);
//- Return a clone
virtual tmp<PatchFunction1<Type>> clone() const
{
return tmp<PatchFunction1<Type>>
(
new Sampled<Type>(*this)
);
return PatchFunction1<Type>::Clone(*this);
}
//- Construct and return a clone setting patch
//- Return a clone, setting the patch
virtual tmp<PatchFunction1<Type>> clone(const polyPatch& pp) const
{
return tmp<PatchFunction1<Type>>
(
new Sampled<Type>(*this, pp)
);
return PatchFunction1<Type>::Clone(*this, pp);
}

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2013-2017 OpenFOAM Foundation
Copyright (C) 2019 OpenCFD Ltd.
Copyright (C) 2019-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -144,14 +144,13 @@ public:
bool newFormat = true
);
//- Construct and return a clone
autoPtr<particle> clone() const
//- Return a clone
virtual autoPtr<particle> clone() const
{
return autoPtr<particle>(new findCellParticle(*this));
return particle::Clone(*this);
}
//- Factory class to read-construct particles used for
// parallel transfer
//- Factory class to read-construct particles (for parallel transfer)
class iNew
{
const polyMesh& mesh_;

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2022 OpenCFD Ltd.
Copyright (C) 2022-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -170,10 +170,10 @@ public:
//- Construct copy
streamLineParticle(const streamLineParticle& p);
//- Construct and return a clone
autoPtr<particle> clone() const
//- Return a clone
virtual autoPtr<particle> clone() const
{
return autoPtr<particle>(new streamLineParticle(*this));
return particle::Clone(*this);
}
//- Factory class to read-construct particles used for parallel transfer

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2017-2019 OpenCFD Ltd.
Copyright (C) 2017-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -41,7 +41,6 @@ SourceFiles
#define Foam_wallBoundedParticle_H
#include "particle.H"
#include "autoPtr.H"
#include "InfoProxy.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -176,14 +175,13 @@ public:
//- Construct copy
wallBoundedParticle(const wallBoundedParticle& p);
//- Construct and return a clone
autoPtr<particle> clone() const
//- Return a clone
virtual autoPtr<particle> clone() const
{
return autoPtr<particle>(new wallBoundedParticle(*this));
return particle::Clone(*this);
}
//- Factory class to read-construct particles used for
// parallel transfer
//- Factory class to read-construct particles (for parallel transfer)
class iNew
{
const polyMesh& mesh_;

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2017-2022 OpenCFD Ltd.
Copyright (C) 2017-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -40,7 +40,6 @@ SourceFiles
#define Foam_wallBoundedStreamLineParticle_H
#include "wallBoundedParticle.H"
#include "autoPtr.H"
#include "interpolation.H"
#include "vectorList.H"
#include "InfoProxy.H"
@ -181,14 +180,13 @@ public:
//- Construct copy
wallBoundedStreamLineParticle(const wallBoundedStreamLineParticle& p);
//- Construct and return a clone
//- Return a clone
autoPtr<particle> clone() const
{
return autoPtr<particle>(new wallBoundedStreamLineParticle(*this));
return particle::Clone(*this);
}
//- Factory class to read-construct particles used for
// parallel transfer
//- Factory class to read-construct particles (for parallel transfer)
class iNew
{
const polyMesh& mesh_;

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2016 OpenCFD Ltd.
Copyright (C) 2016-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -42,7 +42,6 @@ SourceFiles
#include "particle.H"
#include "IOstream.H"
#include "autoPtr.H"
#include "contiguous.H"
#include "DSMCCloud.H"
@ -193,14 +192,13 @@ public:
bool newFormat = true
);
//- Construct and return a clone
//- Return a clone
virtual autoPtr<particle> clone() const
{
return autoPtr<particle>(new DSMCParcel<ParcelType>(*this));
return particle::Clone(*this);
}
//- Factory class to read-construct particles used for
// parallel transfer
//- Factory class to read-construct particles (for parallel transfer)
class iNew
{
const polyMesh& mesh_;

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2019 OpenCFD Ltd.
Copyright (C) 2019-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -40,7 +40,6 @@ SourceFiles
#include "particle.H"
#include "IOstream.H"
#include "autoPtr.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -109,13 +108,14 @@ public:
//- Construct as a copy
indexedParticle(const indexedParticle& p)
:
particle(p)
particle(p),
index_(p.index_)
{}
//- Construct and return a clone
//- Return a clone
virtual autoPtr<particle> clone() const
{
return autoPtr<particle>(new indexedParticle(*this));
return particle::Clone(*this);
}

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2016-2019 OpenCFD Ltd.
Copyright (C) 2016-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -46,7 +46,6 @@ SeeAlso
#include "particle.H"
#include "IOstream.H"
#include "autoPtr.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -147,20 +146,19 @@ public:
//- Construct as a copy
injectedParticle(const injectedParticle& p, const polyMesh& mesh);
//- Construct and return a (basic particle) clone
//- Return a (basic particle) clone
virtual autoPtr<particle> clone() const
{
return autoPtr<particle>(new injectedParticle(*this));
return particle::Clone(*this);
}
//- Construct and return a (basic particle) clone
virtual autoPtr<particle> clone(const polyMesh& mesh) const
{
return autoPtr<particle>(new injectedParticle(*this, mesh));
return particle::Clone(*this, mesh);
}
//- Factory class to read-construct particles used for
// parallel transfer
//- Factory class to read-construct particles (for parallel transfer)
class iNew
{
const polyMesh& mesh_;
@ -174,10 +172,7 @@ public:
autoPtr<injectedParticle> operator()(Istream& is) const
{
return autoPtr<injectedParticle>
(
new injectedParticle(mesh_, is, true)
);
return autoPtr<injectedParticle>::New(mesh_, is, true);
}
};

View File

@ -599,22 +599,6 @@ Foam::particle::particle
}
Foam::particle::particle(const particle& p)
:
mesh_(p.mesh_),
coordinates_(p.coordinates_),
celli_(p.celli_),
tetFacei_(p.tetFacei_),
tetPti_(p.tetPti_),
facei_(p.facei_),
stepFraction_(p.stepFraction_),
behind_(p.behind_),
nBehind_(p.nBehind_),
origProc_(p.origProc_),
origId_(p.origId_)
{}
Foam::particle::particle(const particle& p, const polyMesh& mesh)
:
mesh_(mesh),
@ -631,6 +615,12 @@ Foam::particle::particle(const particle& p, const polyMesh& mesh)
{}
Foam::particle::particle(const particle& p)
:
particle(p, p.mesh())
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::scalar Foam::particle::track

View File

@ -417,18 +417,35 @@ public:
const bool doLocate = true
);
//- Construct as a copy
particle(const particle& p);
//- Construct as a copy with reference to a new mesh
//- Construct as a copy with reference to a mesh
particle(const particle& p, const polyMesh& mesh);
//- Copy construct
particle(const particle& p);
//- Construct a clone
virtual autoPtr<particle> clone() const
{
return autoPtr<particle>::New(*this);
}
// Factory Methods
//- Clone a particle
template<class Derived>
static autoPtr<particle> Clone(const Derived& p)
{
return autoPtr<particle>(new Derived(p));
}
//- Clone a particle with a mesh reference
template<class Derived>
static autoPtr<particle> Clone(const Derived& p, const polyMesh& mesh)
{
return autoPtr<particle>(new Derived(p, mesh));
}
//- Factory class to read-construct particles (for parallel transfer)
class iNew
{

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2019 OpenCFD Ltd.
Copyright (C) 2019-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -40,7 +40,6 @@ SourceFiles
#include "particle.H"
#include "IOstream.H"
#include "autoPtr.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -106,10 +105,10 @@ public:
{}
//- Construct and return a clone
//- Return a clone
virtual autoPtr<particle> clone() const
{
return autoPtr<particle>(new passiveParticle(*this));
return particle::Clone(*this);
}

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2016-2019 OpenCFD Ltd.
Copyright (C) 2016-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -226,20 +226,19 @@ public:
//- Construct as a copy
CollidingParcel(const CollidingParcel& p, const polyMesh& mesh);
//- Construct and return a (basic particle) clone
//- Return a (basic particle) clone
virtual autoPtr<particle> clone() const
{
return autoPtr<particle>(new CollidingParcel(*this));
return particle::Clone(*this);
}
//- Construct and return a (basic particle) clone
//- Return a (basic particle) clone
virtual autoPtr<particle> clone(const polyMesh& mesh) const
{
return autoPtr<particle>(new CollidingParcel(*this, mesh));
return particle::Clone(*this, mesh);
}
//- Factory class to read-construct particles used for
// parallel transfer
//- Factory class to read-construct particles (for parallel transfer)
class iNew
{
const polyMesh& mesh_;

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2016-2021 OpenCFD Ltd.
Copyright (C) 2016-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -52,7 +52,6 @@ SourceFiles
#include "particle.H"
#include "IOstream.H"
#include "autoPtr.H"
#include "interpolation.H"
#include "demandDrivenEntry.H"
#include "labelFieldIOField.H"
@ -433,20 +432,19 @@ public:
//- Construct as a copy
KinematicParcel(const KinematicParcel& p, const polyMesh& mesh);
//- Construct and return a (basic particle) clone
//- Return a (basic particle) clone
virtual autoPtr<particle> clone() const
{
return autoPtr<particle>(new KinematicParcel(*this));
return particle::Clone(*this);
}
//- Construct and return a (basic particle) clone
//- Return a (basic particle) clone
virtual autoPtr<particle> clone(const polyMesh& mesh) const
{
return autoPtr<particle>(new KinematicParcel(*this, mesh));
return particle::Clone(*this, mesh);
}
//- Factory class to read-construct particles used for
// parallel transfer
//- Factory class to read-construct particles (for parallel transfer)
class iNew
{
const polyMesh& mesh_;

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2013-2017 OpenFOAM Foundation
Copyright (C) 2016-2019 OpenCFD Ltd.
Copyright (C) 2016-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -238,20 +238,19 @@ public:
//- Construct as a copy
MPPICParcel(const MPPICParcel& p, const polyMesh& mesh);
//- Construct and return a (basic particle) clone
//- Return a (basic particle) clone
virtual autoPtr<particle> clone() const
{
return autoPtr<particle>(new MPPICParcel(*this));
return particle::Clone(*this);
}
//- Construct and return a (basic particle) clone
//- Return a (basic particle) clone
virtual autoPtr<particle> clone(const polyMesh& mesh) const
{
return autoPtr<particle>(new MPPICParcel(*this, mesh));
return particle::Clone(*this, mesh);
}
//- Factory class to read-construct particles used for
// parallel transfer
//- Factory class to read-construct particles (for parallel transfer)
class iNew
{
const polyMesh& mesh_;

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2018-2019 OpenCFD Ltd.
Copyright (C) 2018-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -280,23 +280,19 @@ public:
const polyMesh& mesh
);
//- Construct and return a (basic particle) clone
//- Return a (basic particle) clone
virtual autoPtr<particle> clone() const
{
return autoPtr<particle>(new ReactingHeterogeneousParcel(*this));
return particle::Clone(*this);
}
//- Construct and return a (basic particle) clone
//- Return a (basic particle) clone
virtual autoPtr<particle> clone(const polyMesh& mesh) const
{
return autoPtr<particle>
(
new ReactingHeterogeneousParcel(*this, mesh)
);
return particle::Clone(*this, mesh);
}
//- Factory class to read-construct particles used for
// parallel transfer
//- Factory class to read-construct particles (for parallel transfer)
class iNew
{
const polyMesh& mesh_;

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2016-2019 OpenCFD Ltd.
Copyright (C) 2016-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -357,20 +357,19 @@ public:
const polyMesh& mesh
);
//- Construct and return a (basic particle) clone
//- Return a (basic particle) clone
virtual autoPtr<particle> clone() const
{
return autoPtr<particle>(new ReactingMultiphaseParcel(*this));
return particle::Clone(*this);
}
//- Construct and return a (basic particle) clone
//- Return a (basic particle) clone
virtual autoPtr<particle> clone(const polyMesh& mesh) const
{
return autoPtr<particle>(new ReactingMultiphaseParcel(*this, mesh));
return particle::Clone(*this, mesh);
}
//- Factory class to read-construct particles used for
// parallel transfer
//- Factory class to read-construct particles (for parallel transfer)
class iNew
{
const polyMesh& mesh_;

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2016-2020 OpenCFD Ltd.
Copyright (C) 2016-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -327,23 +327,19 @@ public:
//- Construct as a copy
ReactingParcel(const ReactingParcel& p);
//- Construct and return a (basic particle) clone
//- Return a (basic particle) clone
virtual autoPtr<particle> clone() const
{
return autoPtr<particle>(new ReactingParcel<ParcelType>(*this));
return particle::Clone(*this);
}
//- Construct and return a (basic particle) clone
//- Return a (basic particle) clone
virtual autoPtr<particle> clone(const polyMesh& mesh) const
{
return autoPtr<particle>
(
new ReactingParcel<ParcelType>(*this, mesh)
);
return particle::Clone(*this, mesh);
}
//- Factory class to read-construct particles used for
// parallel transfer
//- Factory class to read-construct particles (for parallel transfer)
class iNew
{
const polyMesh& mesh_;

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2016-2019 OpenCFD Ltd.
Copyright (C) 2016-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -348,20 +348,19 @@ public:
//- Construct as a copy
ThermoParcel(const ThermoParcel& p, const polyMesh& mesh);
//- Construct and return a (basic particle) clone
//- Return a (basic particle) clone
virtual autoPtr<particle> clone() const
{
return autoPtr<particle>(new ThermoParcel(*this));
return particle::Clone(*this);
}
//- Construct and return a (basic particle) clone
//- Return a (basic particle) clone
virtual autoPtr<particle> clone(const polyMesh& mesh) const
{
return autoPtr<particle>(new ThermoParcel(*this, mesh));
return particle::Clone(*this, mesh);
}
//- Factory class to read-construct particles used for
// parallel transfer
//- Factory class to read-construct particles (for parallel transfer)
class iNew
{
const polyMesh& mesh_;

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2016 OpenCFD Ltd.
Copyright (C) 2016-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -42,7 +42,6 @@ SourceFiles
#include "particle.H"
#include "IOstream.H"
#include "autoPtr.H"
#include "diagTensor.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -283,14 +282,13 @@ public:
bool newFormat = true
);
//- Construct and return a clone
autoPtr<particle> clone() const
//- Return a clone
virtual autoPtr<particle> clone() const
{
return autoPtr<particle>(new molecule(*this));
return particle::Clone(*this);
}
//- Factory class to read-construct particles used for
// parallel transfer
//- Factory class to read-construct particles (for parallel transfer)
class iNew
{
const polyMesh& mesh_;

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2016-2019 OpenCFD Ltd.
Copyright (C) 2016-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -43,7 +43,6 @@ SourceFiles
#include "particle.H"
#include "IOstream.H"
#include "autoPtr.H"
#include "interpolationCellPoint.H"
#include "contiguous.H"
@ -185,10 +184,10 @@ public:
bool newFormat = true
);
//- Construct and return a clone
//- Return a clone
virtual autoPtr<particle> clone() const
{
return autoPtr<particle>(new solidParticle(*this));
return particle::Clone(*this);
}
//- Factory class to read-construct particles (for parallel transfer)

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2016-2019 OpenCFD Ltd.
Copyright (C) 2016-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -275,23 +275,19 @@ public:
//- Construct as a copy
SprayParcel(const SprayParcel& p);
//- Construct and return a (basic particle) clone
//- Return a (basic particle) clone
virtual autoPtr<particle> clone() const
{
return autoPtr<particle>(new SprayParcel<ParcelType>(*this));
return particle::Clone(*this);
}
//- Construct and return a (basic particle) clone
//- Return a (basic particle) clone
virtual autoPtr<particle> clone(const polyMesh& mesh) const
{
return autoPtr<particle>
(
new SprayParcel<ParcelType>(*this, mesh)
);
return particle::Clone(*this, mesh);
}
//- Factory class to read-construct particles used for
// parallel transfer
//- Factory class to read-construct particles (for parallel transfer)
class iNew
{
const polyMesh& mesh_;

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2017 OpenFOAM Foundation
Copyright (C) 2017-2019 OpenCFD Ltd.
Copyright (C) 2017-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -41,7 +41,6 @@ SourceFiles
#include "bitSet.H"
#include "particle.H"
#include "autoPtr.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -164,14 +163,13 @@ public:
bool newFormat = true
);
//- Construct and return a clone
autoPtr<particle> clone() const
//- Return a clone
virtual autoPtr<particle> clone() const
{
return autoPtr<particle>::NewFrom<trackedParticle>(*this);
return particle::Clone(*this);
}
//- Factory class to read-construct particles used for
// parallel transfer
//- Factory class to read-construct particles (for parallel transfer)
class iNew
{
const polyMesh& mesh_;

View File

@ -165,16 +165,6 @@ Foam::PatchFunction1Types::CodedField<Type>::CodedField
}
template<class Type>
Foam::PatchFunction1Types::CodedField<Type>::CodedField
(
const CodedField<Type>& rhs
)
:
CodedField<Type>(rhs, rhs.patch())
{}
template<class Type>
Foam::PatchFunction1Types::CodedField<Type>::CodedField
(
@ -189,6 +179,16 @@ Foam::PatchFunction1Types::CodedField<Type>::CodedField
{}
template<class Type>
Foam::PatchFunction1Types::CodedField<Type>::CodedField
(
const CodedField<Type>& rhs
)
:
CodedField<Type>(rhs, rhs.patch())
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Type>

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2020-2021 OpenCFD Ltd.
Copyright (C) 2020-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -181,9 +181,6 @@ public:
const bool faceValues = true
);
//- Copy construct
explicit CodedField(const CodedField<Type>& rhs);
//- Copy construct, setting patch
explicit CodedField
(
@ -191,22 +188,19 @@ public:
const polyPatch& pp
);
//- Construct and return a clone
//- Copy construct
explicit CodedField(const CodedField<Type>& rhs);
//- Return a clone
virtual tmp<PatchFunction1<Type>> clone() const
{
return tmp<PatchFunction1<Type>>
(
new CodedField<Type>(*this)
);
return PatchFunction1<Type>::Clone(*this);
}
//- Construct and return a clone setting patch
//- Return a clone, setting the patch
virtual tmp<PatchFunction1<Type>> clone(const polyPatch& pp) const
{
return tmp<PatchFunction1<Type>>
(
new CodedField<Type>(*this, pp)
);
return PatchFunction1<Type>::Clone(*this, pp);
}

View File

@ -248,16 +248,6 @@ Foam::PatchFunction1Types::ConstantField<Type>::ConstantField
{}
template<class Type>
Foam::PatchFunction1Types::ConstantField<Type>::ConstantField
(
const ConstantField<Type>& rhs
)
:
ConstantField<Type>(rhs, rhs.patch())
{}
template<class Type>
Foam::PatchFunction1Types::ConstantField<Type>::ConstantField
(
@ -280,6 +270,16 @@ Foam::PatchFunction1Types::ConstantField<Type>::ConstantField
}
template<class Type>
Foam::PatchFunction1Types::ConstantField<Type>::ConstantField
(
const ConstantField<Type>& rhs
)
:
ConstantField<Type>(rhs, rhs.patch())
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Type>

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2018-2022 OpenCFD Ltd.
Copyright (C) 2018-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -147,9 +147,6 @@ public:
const bool faceValues = true
);
//- Copy construct
explicit ConstantField(const ConstantField<Type>& rhs);
//- Copy construct setting patch
explicit ConstantField
(
@ -157,19 +154,19 @@ public:
const polyPatch& pp
);
//- Construct and return a clone
//- Copy construct
explicit ConstantField(const ConstantField<Type>& rhs);
//- Return a clone
virtual tmp<PatchFunction1<Type>> clone() const
{
return tmp<PatchFunction1<Type>>(new ConstantField<Type>(*this));
return PatchFunction1<Type>::Clone(*this);
}
//- Construct and return a clone setting patch
//- Return a clone, setting the patch
virtual tmp<PatchFunction1<Type>> clone(const polyPatch& pp) const
{
return tmp<PatchFunction1<Type>>
(
new ConstantField<Type>(*this, pp)
);
return PatchFunction1<Type>::Clone(*this, pp);
}

View File

@ -167,16 +167,6 @@ Foam::PatchFunction1Types::MappedFile<Type>::MappedFile
{}
template<class Type>
Foam::PatchFunction1Types::MappedFile<Type>::MappedFile
(
const MappedFile<Type>& rhs
)
:
MappedFile<Type>(rhs, rhs.patch())
{}
template<class Type>
Foam::PatchFunction1Types::MappedFile<Type>::MappedFile
(
@ -214,6 +204,16 @@ Foam::PatchFunction1Types::MappedFile<Type>::MappedFile
}
template<class Type>
Foam::PatchFunction1Types::MappedFile<Type>::MappedFile
(
const MappedFile<Type>& rhs
)
:
MappedFile<Type>(rhs, rhs.patch())
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Type>

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2018-2022 OpenCFD Ltd.
Copyright (C) 2018-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -219,9 +219,6 @@ public:
const bool faceValues = true
);
//- Copy construct
explicit MappedFile(const MappedFile<Type>& rhs);
//- Copy construct setting patch
explicit MappedFile
(
@ -229,22 +226,19 @@ public:
const polyPatch& pp
);
//- Construct and return a clone
//- Copy construct
explicit MappedFile(const MappedFile<Type>& rhs);
//- Return a clone
virtual tmp<PatchFunction1<Type>> clone() const
{
return tmp<PatchFunction1<Type>>
(
new MappedFile<Type>(*this)
);
return PatchFunction1<Type>::Clone(*this, this->patch());
}
//- Construct and return a clone setting patch
//- Return a clone, setting the patch
virtual tmp<PatchFunction1<Type>> clone(const polyPatch& pp) const
{
return tmp<PatchFunction1<Type>>
(
new MappedFile<Type>(*this, pp)
);
return PatchFunction1<Type>::Clone(*this, pp);
}

View File

@ -58,13 +58,6 @@ Foam::PatchFunction1<Type>::PatchFunction1
{}
template<class Type>
Foam::PatchFunction1<Type>::PatchFunction1(const PatchFunction1<Type>& rhs)
:
PatchFunction1<Type>(rhs, rhs.patch())
{}
template<class Type>
Foam::PatchFunction1<Type>::PatchFunction1
(
@ -77,6 +70,13 @@ Foam::PatchFunction1<Type>::PatchFunction1
{}
template<class Type>
Foam::PatchFunction1<Type>::PatchFunction1(const PatchFunction1<Type>& rhs)
:
PatchFunction1<Type>(rhs, rhs.patch())
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Type>

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2018-2022 OpenCFD Ltd.
Copyright (C) 2018-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -147,9 +147,6 @@ public:
const bool faceValues = true
);
//- Copy construct
explicit PatchFunction1(const PatchFunction1<Type>& rhs);
//- Copy construct setting patch
explicit PatchFunction1
(
@ -157,6 +154,9 @@ public:
const polyPatch& pp
);
//- Copy construct
explicit PatchFunction1(const PatchFunction1<Type>& rhs);
//- Return a clone
virtual tmp<PatchFunction1<Type>> clone() const = 0;
@ -164,7 +164,24 @@ public:
virtual tmp<PatchFunction1<Type>> clone(const polyPatch& pp) const = 0;
// Selectors
// Factory Methods
//- Clone a PatchFunction1
template<class Derived>
static tmp<PatchFunction1<Type>>
Clone(const Derived& fun)
{
return tmp<PatchFunction1<Type>>(new Derived(fun));
}
//- Clone a PatchFunction1 with a patch
template<class Derived>
static tmp<PatchFunction1<Type>>
Clone(const Derived& fun, const polyPatch& pp)
{
return tmp<PatchFunction1<Type>>(new Derived(fun, pp));
}
//- Selector
static autoPtr<PatchFunction1<Type>> New

View File

@ -54,16 +54,6 @@ Foam::PatchFunction1Types::UniformValueField<Type>::UniformValueField
{}
template<class Type>
Foam::PatchFunction1Types::UniformValueField<Type>::UniformValueField
(
const UniformValueField<Type>& rhs
)
:
UniformValueField<Type>(rhs, rhs.patch())
{}
template<class Type>
Foam::PatchFunction1Types::UniformValueField<Type>::UniformValueField
(
@ -81,6 +71,16 @@ Foam::PatchFunction1Types::UniformValueField<Type>::UniformValueField
}
template<class Type>
Foam::PatchFunction1Types::UniformValueField<Type>::UniformValueField
(
const UniformValueField<Type>& rhs
)
:
UniformValueField<Type>(rhs, rhs.patch())
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class Type>

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2018-2021 OpenCFD Ltd.
Copyright (C) 2018-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -40,8 +40,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/
#ifndef PatchFunction1Types_UniformValueField_H
#define PatchFunction1Types_UniformValueField_H
#ifndef Foam_PatchFunction1Types_UniformValueField_H
#define Foam_PatchFunction1Types_UniformValueField_H
#include "PatchFunction1.H"
#include "Function1.H"
@ -92,9 +92,6 @@ public:
const bool faceValues = true
);
//- Copy construct
explicit UniformValueField(const UniformValueField<Type>& rhs);
//- Copy construct setting patch
explicit UniformValueField
(
@ -102,22 +99,19 @@ public:
const polyPatch& pp
);
//- Construct and return a clone
//- Copy construct
explicit UniformValueField(const UniformValueField<Type>& rhs);
//- Return a clone
virtual tmp<PatchFunction1<Type>> clone() const
{
return tmp<PatchFunction1<Type>>
(
new UniformValueField<Type>(*this)
);
return PatchFunction1<Type>::Clone(*this);
}
//- Construct and return a clone setting patch
//- Return a clone, setting the patch
virtual tmp<PatchFunction1<Type>> clone(const polyPatch& pp) const
{
return tmp<PatchFunction1<Type>>
(
new UniformValueField<Type>(*this, pp)
);
return PatchFunction1<Type>::Clone(*this, pp);
}

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2021-2022 OpenCFD Ltd.
Copyright (C) 2021-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -43,7 +43,6 @@ SourceFiles
#include "particle.H"
#include "IOstream.H"
#include "autoPtr.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -131,17 +130,17 @@ public:
//- Construct as copy
passivePositionParticle(const passivePositionParticle& p)
:
particle(p)
particle(p),
location_(p.location_)
{}
//- Construct and return a clone
//- Return a clone
virtual autoPtr<particle> clone() const
{
return autoPtr<particle>(new passivePositionParticle(*this));
return particle::Clone(*this);
}
//- Factory class to read-construct particles (for parallel transfer)
class iNew
{

View File

@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2021 OpenCFD Ltd.
Copyright (C) 2021-2024 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -45,8 +45,8 @@ SourceFiles
\*---------------------------------------------------------------------------*/
#ifndef Function1Types_Sample_H
#define Function1Types_Sample_H
#ifndef Foam_Function1Types_Sample_H
#define Foam_Function1Types_Sample_H
#include "Function1.H"
#include "point.H"
@ -121,10 +121,10 @@ public:
//- Copy constructor
explicit Sample(const Sample& poly);
//- Construct and return a clone
//- Return a clone
virtual tmp<Function1<Type>> clone() const
{
return tmp<Function1<Type>>(new Sample<Type>(*this));
return Function1<Type>::Clone(*this);
}

View File

@ -114,10 +114,10 @@ public:
//- Construct from dictionary
Ar(const dictionary& dict);
//- Construct and return clone
//- Return a clone
virtual autoPtr<liquidProperties> clone() const
{
return autoPtr<liquidProperties>::NewFrom<Ar>(*this);
return liquidProperties::Clone(*this);
}

View File

@ -114,10 +114,10 @@ public:
//- Construct from dictionary
C10H22(const dictionary& dict);
//- Construct and return clone
//- Return a clone
virtual autoPtr<liquidProperties> clone() const
{
return autoPtr<liquidProperties>::NewFrom<C10H22>(*this);
return liquidProperties::Clone(*this);
}

View File

@ -114,10 +114,10 @@ public:
//- Construct from dictionary
C12H26(const dictionary& dict);
//- Construct and return clone
//- Return a clone
virtual autoPtr<liquidProperties> clone() const
{
return autoPtr<liquidProperties>::NewFrom<C12H26>(*this);
return liquidProperties::Clone(*this);
}

View File

@ -114,10 +114,10 @@ public:
//- Construct from dictionary
C13H28(const dictionary& dict);
//- Construct and return clone
//- Return a clone
virtual autoPtr<liquidProperties> clone() const
{
return autoPtr<liquidProperties>::NewFrom<C13H28>(*this);
return liquidProperties::Clone(*this);
}

View File

@ -114,10 +114,10 @@ public:
//- Construct from dictionary
C14H30(const dictionary& dict);
//- Construct and return clone
//- Return a clone
virtual autoPtr<liquidProperties> clone() const
{
return autoPtr<liquidProperties>::NewFrom<C14H30>(*this);
return liquidProperties::Clone(*this);
}

View File

@ -114,10 +114,10 @@ public:
//- Construct from dictionary
C16H34(const dictionary& dict);
//- Construct and return clone
//- Return a clone
virtual autoPtr<liquidProperties> clone() const
{
return autoPtr<liquidProperties>::NewFrom<C16H34>(*this);
return liquidProperties::Clone(*this);
}

View File

@ -114,10 +114,10 @@ public:
//- Construct from dictionary
C2H5OH(const dictionary& dict);
//- Construct and return clone
//- Return a clone
virtual autoPtr<liquidProperties> clone() const
{
return autoPtr<liquidProperties>::NewFrom<C2H5OH>(*this);
return liquidProperties::Clone(*this);
}

View File

@ -114,10 +114,10 @@ public:
//- Construct from dictionary
C2H6(const dictionary& dict);
//- Construct and return clone
//- Return a clone
virtual autoPtr<liquidProperties> clone() const
{
return autoPtr<liquidProperties>::NewFrom<C2H6>(*this);
return liquidProperties::Clone(*this);
}

View File

@ -114,10 +114,10 @@ public:
//- Construct from dictionary
C2H6O(const dictionary& dict);
//- Construct and return clone
//- Return a clone
virtual autoPtr<liquidProperties> clone() const
{
return autoPtr<liquidProperties>::NewFrom<C2H6O>(*this);
return liquidProperties::Clone(*this);
}

View File

@ -114,10 +114,10 @@ public:
//- Construct from dictionary
C3H6O(const dictionary& dict);
//- Construct and return clone
//- Return a clone
virtual autoPtr<liquidProperties> clone() const
{
return autoPtr<liquidProperties>::NewFrom<C3H6O>(*this);
return liquidProperties::Clone(*this);
}

View File

@ -114,10 +114,10 @@ public:
//- Construct from dictionary
C3H8(const dictionary& dict);
//- Construct and return clone
//- Return a clone
virtual autoPtr<liquidProperties> clone() const
{
return autoPtr<liquidProperties>::NewFrom<C3H8>(*this);
return liquidProperties::Clone(*this);
}

View File

@ -114,10 +114,10 @@ public:
//- Construct from dictionary
C4H10O(const dictionary& dict);
//- Construct and return clone
//- Return a clone
virtual autoPtr<liquidProperties> clone() const
{
return autoPtr<liquidProperties>::NewFrom<C4H10O>(*this);
return liquidProperties::Clone(*this);
}

View File

@ -114,10 +114,10 @@ public:
//- Construct from dictionary
C6H14(const dictionary& dict);
//- Construct and return clone
//- Return a clone
virtual autoPtr<liquidProperties> clone() const
{
return autoPtr<liquidProperties>::NewFrom<C6H14>(*this);
return liquidProperties::Clone(*this);
}

View File

@ -114,10 +114,10 @@ public:
//- Construct from dictionary
C6H6(const dictionary& dict);
//- Construct and return clone
//- Return a clone
virtual autoPtr<liquidProperties> clone() const
{
return autoPtr<liquidProperties>::NewFrom<C6H6>(*this);
return liquidProperties::Clone(*this);
}

View File

@ -114,10 +114,10 @@ public:
//- Construct from dictionary
C7H16(const dictionary& dict);
//- Construct and return clone
//- Return a clone
virtual autoPtr<liquidProperties> clone() const
{
return autoPtr<liquidProperties>::NewFrom<C7H16>(*this);
return liquidProperties::Clone(*this);
}

View File

@ -114,10 +114,10 @@ public:
//- Construct from dictionary
C7H8(const dictionary& dict);
//- Construct and return clone
//- Return a clone
virtual autoPtr<liquidProperties> clone() const
{
return autoPtr<liquidProperties>::NewFrom<C7H8>(*this);
return liquidProperties::Clone(*this);
}

View File

@ -113,10 +113,10 @@ public:
//- Construct from dictionary
C8H10(const dictionary& dict);
//- Construct and return clone
//- Return a clone
virtual autoPtr<liquidProperties> clone() const
{
return autoPtr<liquidProperties>::NewFrom<C8H10>(*this);
return liquidProperties::Clone(*this);
}

View File

@ -114,10 +114,10 @@ public:
//- Construct from dictionary
C8H18(const dictionary& dict);
//- Construct and return clone
//- Return a clone
virtual autoPtr<liquidProperties> clone() const
{
return autoPtr<liquidProperties>::NewFrom<C8H18>(*this);
return liquidProperties::Clone(*this);
}

View File

@ -114,10 +114,10 @@ public:
//- Construct from dictionary
C9H20(const dictionary& dict);
//- Construct and return clone
//- Return a clone
virtual autoPtr<liquidProperties> clone() const
{
return autoPtr<liquidProperties>::NewFrom<C9H20>(*this);
return liquidProperties::Clone(*this);
}

View File

@ -114,10 +114,10 @@ public:
//- Construct from dictionary
CH3OH(const dictionary& dict);
//- Construct and return clone
//- Return a clone
virtual autoPtr<liquidProperties> clone() const
{
return autoPtr<liquidProperties>::NewFrom<CH3OH>(*this);
return liquidProperties::Clone(*this);
}

View File

@ -114,10 +114,10 @@ public:
//- Construct from dictionary
CH4N2O(const dictionary& dict);
//- Construct and return clone
//- Return a clone
virtual autoPtr<liquidProperties> clone() const
{
return autoPtr<liquidProperties>::NewFrom<CH4N2O>(*this);
return liquidProperties::Clone(*this);
}

View File

@ -113,10 +113,10 @@ public:
//- Construct from dictionary
H2O(const dictionary& dict);
//- Construct and return clone
//- Return a clone
virtual autoPtr<liquidProperties> clone() const
{
return autoPtr<liquidProperties>::NewFrom<H2O>(*this);
return liquidProperties::Clone(*this);
}

View File

@ -114,10 +114,10 @@ public:
//- Construct from dictionary
IC8H18(const dictionary& dict);
//- Construct and return clone
//- Return a clone
virtual autoPtr<liquidProperties> clone() const
{
return autoPtr<liquidProperties>::NewFrom<IC8H18>(*this);
return liquidProperties::Clone(*this);
}

View File

@ -136,10 +136,10 @@ public:
//- Construct from dictionary
IDEA(const dictionary& dict);
//- Construct and return clone
//- Return a clone
virtual autoPtr<liquidProperties> clone() const
{
return autoPtr<liquidProperties>::NewFrom<IDEA>(*this);
return liquidProperties::Clone(*this);
}

View File

@ -114,10 +114,10 @@ public:
//- Construct from dictionary
MB(const dictionary& dict);
//- Construct and return clone
//- Return a clone
virtual autoPtr<liquidProperties> clone() const
{
return autoPtr<liquidProperties>::NewFrom<MB>(*this);
return liquidProperties::Clone(*this);
}

View File

@ -114,10 +114,10 @@ public:
//- Construct from dictionary
N2(const dictionary& dict);
//- Construct and return clone
//- Return a clone
virtual autoPtr<liquidProperties> clone() const
{
return autoPtr<liquidProperties>::NewFrom<N2>(*this);
return liquidProperties::Clone(*this);
}

Some files were not shown because too many files have changed in this diff Show More