Remove method Dimension::newComposite()
This commit is contained in:
@@ -39,7 +39,6 @@ namespace Opm {
|
|||||||
|
|
||||||
bool equal(const Dimension& other) const;
|
bool equal(const Dimension& other) const;
|
||||||
bool isCompositable() const;
|
bool isCompositable() const;
|
||||||
static Dimension newComposite(const std::string& dim, double SIfactor, double SIoffset = 0.0);
|
|
||||||
|
|
||||||
bool operator==( const Dimension& ) const;
|
bool operator==( const Dimension& ) const;
|
||||||
bool operator!=( const Dimension& ) const;
|
bool operator!=( const Dimension& ) const;
|
||||||
|
|||||||
@@ -75,13 +75,6 @@ namespace Opm {
|
|||||||
bool Dimension::isCompositable() const
|
bool Dimension::isCompositable() const
|
||||||
{ return m_SIoffset == 0.0; }
|
{ return m_SIoffset == 0.0; }
|
||||||
|
|
||||||
Dimension Dimension::newComposite(const std::string& dim , double SIfactor, double SIoffset) {
|
|
||||||
Dimension dimension;
|
|
||||||
dimension.m_SIfactor = SIfactor;
|
|
||||||
dimension.m_SIoffset = SIoffset;
|
|
||||||
return dimension;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool Dimension::equal(const Dimension& other) const {
|
bool Dimension::equal(const Dimension& other) const {
|
||||||
return *this == other;
|
return *this == other;
|
||||||
|
|||||||
@@ -1195,7 +1195,7 @@ namespace {
|
|||||||
|
|
||||||
SIfactor *= dim.getSIScaling();
|
SIfactor *= dim.getSIScaling();
|
||||||
}
|
}
|
||||||
return Dimension::newComposite( dimension , SIfactor );
|
return Dimension( SIfactor );
|
||||||
}
|
}
|
||||||
|
|
||||||
Dimension UnitSystem::parse(const std::string& dimension) const {
|
Dimension UnitSystem::parse(const std::string& dimension) const {
|
||||||
@@ -1214,7 +1214,7 @@ namespace {
|
|||||||
if (dividend.getSIOffset() != 0.0 || divisor.getSIOffset() != 0.0)
|
if (dividend.getSIOffset() != 0.0 || divisor.getSIOffset() != 0.0)
|
||||||
throw std::invalid_argument("Composite dimensions cannot currently require a conversion offset");
|
throw std::invalid_argument("Composite dimensions cannot currently require a conversion offset");
|
||||||
|
|
||||||
return Dimension::newComposite( dimension, dividend.getSIScaling() / divisor.getSIScaling() );
|
return Dimension( dividend.getSIScaling() / divisor.getSIScaling() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -41,11 +41,6 @@ BOOST_AUTO_TEST_CASE(CreateDimension) {
|
|||||||
BOOST_CHECK_EQUAL(1 , length.getSIScaling());
|
BOOST_CHECK_EQUAL(1 , length.getSIScaling());
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(makeComposite) {
|
|
||||||
auto composite = Dimension::newComposite("Length*Length*Length/Time" , 100);
|
|
||||||
BOOST_CHECK_EQUAL(100 , composite.getSIScaling());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(CreateUnitSystem) {
|
BOOST_AUTO_TEST_CASE(CreateUnitSystem) {
|
||||||
UnitSystem system(UnitSystem::UnitType::UNIT_TYPE_METRIC);
|
UnitSystem system(UnitSystem::UnitType::UNIT_TYPE_METRIC);
|
||||||
|
|||||||
Reference in New Issue
Block a user