Skip to content
Snippets Groups Projects
Commit 13ad54a5 authored by Andrew Heather's avatar Andrew Heather
Browse files

removing name - was big penalty in poly thermo

parent e7109637
Branches
Tags
No related merge requests found
......@@ -32,7 +32,6 @@ template<int PolySize>
Foam::Polynomial<PolySize>::Polynomial()
:
VectorSpace<Polynomial<PolySize>, scalar, PolySize>(),
name_("unknownPolynomialName"),
logActive_(false),
logCoeff_(0.0)
{}
......@@ -42,16 +41,17 @@ template<int PolySize>
Foam::Polynomial<PolySize>::Polynomial(const word& name, Istream& is)
:
VectorSpace<Polynomial<PolySize>, scalar, PolySize>(),
name_(is),
logActive_(false),
logCoeff_(0.0)
{
if (name_ != name)
word isName(is);
if (isName != name)
{
FatalErrorIn
(
"Polynomial<PolySize>::Polynomial(const word&, Istream&)"
) << "Expected polynomial name " << name << " but read " << name_
) << "Expected polynomial name " << name << " but read " << isName
<< nl << exit(FatalError);
}
......@@ -63,7 +63,7 @@ Foam::Polynomial<PolySize>::Polynomial(const word& name, Istream& is)
FatalErrorIn
(
"Polynomial<PolySize>::Polynomial(const word&, Istream&)"
) << "Polynomial coefficients for entry " << name_
) << "Polynomial coefficients for entry " << isName
<< " are invalid (empty)" << nl << exit(FatalError);
}
}
......@@ -72,12 +72,10 @@ Foam::Polynomial<PolySize>::Polynomial(const word& name, Istream& is)
template<int PolySize>
Foam::Polynomial<PolySize>::Polynomial
(
const word& name,
const Polynomial<PolySize>& poly
)
:
VectorSpace<Polynomial<PolySize>, scalar, PolySize>(poly),
name_(name),
logActive_(poly.logActive_),
logCoeff_(poly.logCoeff_)
{}
......@@ -85,13 +83,6 @@ Foam::Polynomial<PolySize>::Polynomial
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<int PolySize>
const Foam::word& Foam::Polynomial<PolySize>::name() const
{
return name_;
}
template<int PolySize>
bool& Foam::Polynomial<PolySize>::logActive()
{
......
......@@ -82,9 +82,6 @@ class Polynomial
{
// Private data
//- Polynomial name
word name_;
//- Include the log term? - only activated using integrateMinus1()
bool logActive_;
......@@ -107,17 +104,14 @@ public:
//- Construct from name and Istream
Polynomial(const word& name, Istream& is);
//- Copy constructor with name
Polynomial(const word& name, const Polynomial& poly);
//- Copy constructor
Polynomial(const Polynomial& poly);
// Member Functions
// Access
//- Return const access to the polynomial name
const word& name() const;
//- Return access to the log term active flag
bool& logActive();
......
......@@ -35,8 +35,7 @@ Foam::Ostream& Foam::operator<<
const Polynomial<PolySize>& poly
)
{
os << poly.name_ << token::SPACE
<< static_cast
os << static_cast
<VectorSpace<Polynomial<PolySize>, scalar, PolySize> >(poly);
// Check state of Ostream
......
......@@ -36,8 +36,8 @@ Foam::hPolynomialThermo<EquationOfState, PolySize>::hPolynomialThermo(Istream& i
Hf_(readScalar(is)),
Sf_(readScalar(is)),
cpPolynomial_("cpPolynomial", is),
dhPolynomial_("dhPolynomial", cpPolynomial_.integrate()),
sPolynomial_("sPolynomial", cpPolynomial_.integrateMinus1())
dhPolynomial_(cpPolynomial_.integrate()),
sPolynomial_(cpPolynomial_.integrateMinus1())
{}
......
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