diff --git a/src/OpenFOAM/dimensionSet/dimensionSet.C b/src/OpenFOAM/dimensionSet/dimensionSet.C index 86868610188a76b364a61d4e6cef222f7ae7a486..de1b547681fc1e9ac21ed463d563685068e04c8d 100644 --- a/src/OpenFOAM/dimensionSet/dimensionSet.C +++ b/src/OpenFOAM/dimensionSet/dimensionSet.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -78,6 +78,12 @@ Foam::dimensionSet::dimensionSet } +Foam::dimensionSet::dimensionSet(const dimensionSet& ds) +{ + reset(ds); +} + + // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // bool Foam::dimensionSet::dimensionless() const diff --git a/src/OpenFOAM/dimensionSet/dimensionSet.H b/src/OpenFOAM/dimensionSet/dimensionSet.H index 1b03e9e27d182a642bee6d85bd7c46395e02cf3f..105ea879a53bcca742bc9299e313d20c97b566a0 100644 --- a/src/OpenFOAM/dimensionSet/dimensionSet.H +++ b/src/OpenFOAM/dimensionSet/dimensionSet.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -158,6 +158,7 @@ private: label size_; + // Private Member Functions void push(const token&); @@ -172,6 +173,7 @@ private: tokeniser(Istream&); + // Member Functions Istream& stream() @@ -190,7 +192,6 @@ private: static bool valid(char c); static label priority(const token& t); - }; @@ -244,6 +245,15 @@ public: const scalar moles ); + //- Copy constructor + dimensionSet(const dimensionSet& ds); + + //- Construct and return a clone + autoPtr<dimensionSet> clone() const + { + return autoPtr<dimensionSet>(new dimensionSet(*this)); + } + //- Construct from Istream dimensionSet(Istream&);