Commit 77e36020 authored by Andrew Heather's avatar Andrew Heather
Browse files

ENH: Added copy/clone functionality to liquids and liquidMixture classes

parent e44efb51
......@@ -62,6 +62,18 @@ Foam::liquidMixture::liquidMixture
}
Foam::liquidMixture::liquidMixture(const liquidMixture& lm)
:
components_(lm.components_),
properties_(lm.properties_.size())
{
forAll(properties_, i)
{
properties_.set(i, lm.properties_(i)->clone());
}
}
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
Foam::autoPtr<Foam::liquidMixture> Foam::liquidMixture::New
......
......@@ -119,7 +119,21 @@ public:
// Constructors
//- Construct from dictionary
liquidMixture(const dictionary&);
liquidMixture(const dictionary& dict);
//- Construct copy
liquidMixture(const liquidMixture& lm);
//- Construct and return a clone
virtual autoPtr<liquidMixture> clone() const
{
return autoPtr<liquidMixture>(new liquidMixture(*this));
}
//- Destructor
virtual ~liquidMixture()
{}
// Selectors
......
......@@ -158,4 +158,23 @@ Foam::Ar::Ar(const dictionary& dict)
{}
Foam::Ar::Ar(const Ar& liq)
:
liquid(liq),
rho_(liq.rho_),
pv_(liq.pv_),
hl_(liq.hl_),
Cp_(liq.Cp_),
h_(liq.h_),
Cpg_(liq.Cpg_),
B_(liq.B_),
mu_(liq.mu_),
mug_(liq.mug_),
K_(liq.K_),
Kg_(liq.Kg_),
sigma_(liq.sigma_),
D_(liq.D_)
{}
// ************************************************************************* //
......@@ -113,6 +113,15 @@ public:
//- Construct from dictionary
Ar(const dictionary& dict);
//- Construct copy
Ar(const Ar& liq);
//- Construct and return clone
virtual autoPtr<liquid> clone() const
{
return autoPtr<liquid>(new Ar(*this));
}
// Member Functions
......
......@@ -166,4 +166,23 @@ Foam::C10H22::C10H22(const dictionary& dict)
{}
Foam::C10H22::C10H22(const C10H22& liq)
:
liquid(liq),
rho_(liq.rho_),
pv_(liq.pv_),
hl_(liq.hl_),
Cp_(liq.Cp_),
h_(liq.h_),
Cpg_(liq.Cpg_),
B_(liq.B_),
mu_(liq.mu_),
mug_(liq.mug_),
K_(liq.K_),
Kg_(liq.Kg_),
sigma_(liq.sigma_),
D_(liq.D_)
{}
// ************************************************************************* //
......@@ -113,6 +113,15 @@ public:
//- Construct from dictionary
C10H22(const dictionary& dict);
//- Construct copy
C10H22(const C10H22& liq);
//- Construct and return clone
virtual autoPtr<liquid> clone() const
{
return autoPtr<liquid>(new C10H22(*this));
}
// Member Functions
......
......@@ -158,4 +158,23 @@ Foam::C12H26::C12H26(const dictionary& dict)
{}
Foam::C12H26::C12H26(const C12H26& liq)
:
liquid(liq),
rho_(liq.rho_),
pv_(liq.pv_),
hl_(liq.hl_),
Cp_(liq.Cp_),
h_(liq.h_),
Cpg_(liq.Cpg_),
B_(liq.B_),
mu_(liq.mu_),
mug_(liq.mug_),
K_(liq.K_),
Kg_(liq.Kg_),
sigma_(liq.sigma_),
D_(liq.D_)
{}
// ************************************************************************* //
......@@ -113,6 +113,15 @@ public:
//- Construct from dictionary
C12H26(const dictionary& dict);
//- Construct copy
C12H26(const C12H26& liq);
//- Construct and return clone
virtual autoPtr<liquid> clone() const
{
return autoPtr<liquid>(new C12H26(*this));
}
// Member Functions
......
......@@ -166,4 +166,23 @@ Foam::C13H28::C13H28(const dictionary& dict)
{}
Foam::C13H28::C13H28(const C13H28& liq)
:
liquid(liq),
rho_(liq.rho_),
pv_(liq.pv_),
hl_(liq.hl_),
Cp_(liq.Cp_),
h_(liq.h_),
Cpg_(liq.Cpg_),
B_(liq.B_),
mu_(liq.mu_),
mug_(liq.mug_),
K_(liq.K_),
Kg_(liq.Kg_),
sigma_(liq.sigma_),
D_(liq.D_)
{}
// ************************************************************************* //
......@@ -113,6 +113,15 @@ public:
//- Construct from dictionary
C13H28(const dictionary& dict);
//- Construct copy
C13H28(const C13H28& liq);
//- Construct and return clone
virtual autoPtr<liquid> clone() const
{
return autoPtr<liquid>(new C13H28(*this));
}
// Member Functions
......
......@@ -166,4 +166,23 @@ Foam::C14H30::C14H30(const dictionary& dict)
{}
Foam::C14H30::C14H30(const C14H30& liq)
:
liquid(liq),
rho_(liq.rho_),
pv_(liq.pv_),
hl_(liq.hl_),
Cp_(liq.Cp_),
h_(liq.h_),
Cpg_(liq.Cpg_),
B_(liq.B_),
mu_(liq.mu_),
mug_(liq.mug_),
K_(liq.K_),
Kg_(liq.Kg_),
sigma_(liq.sigma_),
D_(liq.D_)
{}
// ************************************************************************* //
......@@ -113,6 +113,15 @@ public:
//- Construct from dictionary
C14H30(const dictionary& dict);
//- Construct copy
C14H30(const C14H30& liq);
//- Construct and return clone
virtual autoPtr<liquid> clone() const
{
return autoPtr<liquid>(new C14H30(*this));
}
// Member Functions
......
......@@ -166,4 +166,23 @@ Foam::C16H34::C16H34(const dictionary& dict)
{}
Foam::C16H34::C16H34(const C16H34& liq)
:
liquid(liq),
rho_(liq.rho_),
pv_(liq.pv_),
hl_(liq.hl_),
Cp_(liq.Cp_),
h_(liq.h_),
Cpg_(liq.Cpg_),
B_(liq.B_),
mu_(liq.mu_),
mug_(liq.mug_),
K_(liq.K_),
Kg_(liq.Kg_),
sigma_(liq.sigma_),
D_(liq.D_)
{}
// ************************************************************************* //
......@@ -113,6 +113,15 @@ public:
//- Construct from dictionary
C16H34(const dictionary& dict);
//- Construct copy
C16H34(const C16H34& liq);
//- Construct and return clone
virtual autoPtr<liquid> clone() const
{
return autoPtr<liquid>(new C16H34(*this));
}
// Member Functions
......
......@@ -166,4 +166,23 @@ Foam::C2H5OH::C2H5OH(const dictionary& dict)
{}
Foam::C2H5OH::C2H5OH(const C2H5OH& liq)
:
liquid(liq),
rho_(liq.rho_),
pv_(liq.pv_),
hl_(liq.hl_),
Cp_(liq.Cp_),
h_(liq.h_),
Cpg_(liq.Cpg_),
B_(liq.B_),
mu_(liq.mu_),
mug_(liq.mug_),
K_(liq.K_),
Kg_(liq.Kg_),
sigma_(liq.sigma_),
D_(liq.D_)
{}
// ************************************************************************* //
......@@ -113,6 +113,15 @@ public:
//- Construct from dictionary
C2H5OH(const dictionary& dict);
//- Construct copy
C2H5OH(const C2H5OH& liq);
//- Construct and return clone
virtual autoPtr<liquid> clone() const
{
return autoPtr<liquid>(new C2H5OH(*this));
}
// Member Functions
......
......@@ -157,4 +157,23 @@ Foam::C2H6::C2H6(const dictionary& dict)
{}
Foam::C2H6::C2H6(const C2H6& liq)
:
liquid(liq),
rho_(liq.rho_),
pv_(liq.pv_),
hl_(liq.hl_),
Cp_(liq.Cp_),
h_(liq.h_),
Cpg_(liq.Cpg_),
B_(liq.B_),
mu_(liq.mu_),
mug_(liq.mug_),
K_(liq.K_),
Kg_(liq.Kg_),
sigma_(liq.sigma_),
D_(liq.D_)
{}
// ************************************************************************* //
......@@ -113,6 +113,15 @@ public:
//- Construct from dictionary
C2H6(const dictionary& dict);
//- Construct copy
C2H6(const C2H6& liq);
//- Construct and return clone
virtual autoPtr<liquid> clone() const
{
return autoPtr<liquid>(new C2H6(*this));
}
// Member Functions
......
......@@ -166,4 +166,23 @@ Foam::C2H6O::C2H6O(const dictionary& dict)
{}
Foam::C2H6O::C2H6O(const C2H6O& liq)
:
liquid(liq),
rho_(liq.rho_),
pv_(liq.pv_),
hl_(liq.hl_),
Cp_(liq.Cp_),
h_(liq.h_),
Cpg_(liq.Cpg_),
B_(liq.B_),
mu_(liq.mu_),
mug_(liq.mug_),
K_(liq.K_),
Kg_(liq.Kg_),
sigma_(liq.sigma_),
D_(liq.D_)
{}
// ************************************************************************* //
......@@ -113,6 +113,15 @@ public:
//- Construct from dictionary
C2H6O(const dictionary& dict);
//- Construct copy
C2H6O(const C2H6O& liq);
//- Construct and return clone
virtual autoPtr<liquid> clone() const
{
return autoPtr<liquid>(new C2H6O(*this));
}
// Member Functions
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment