Commit cde7af30 authored by Hahn, Steven's avatar Hahn, Steven
Browse files

Remove unused member function

Refs #0
parent f9a61e39
......@@ -192,13 +192,6 @@ public:
virtual std::vector<std::string> getLocalAttributeNames() const {
return std::vector<std::string>();
}
/// Return a value of attribute attName
virtual Attribute getLocalAttribute(size_t i,
const std::string &attName) const {
(void)i;
throw std::invalid_argument("Attribute " + attName +
" not found in function " + this->name());
}
/// Set a value to attribute attName
virtual void setLocalAttribute(size_t i, const std::string &attName,
const Attribute &) {
......
......@@ -85,9 +85,6 @@ public:
std::vector<std::string> getLocalAttributeNames() const override {
return std::vector<std::string>(1, "domains");
}
/// Return a value of attribute attName
Attribute getLocalAttribute(size_t i,
const std::string &attName) const override;
/// Set a value to attribute attName
void setLocalAttribute(size_t i, const std::string &attName,
const Attribute &) override;
......
......@@ -188,34 +188,6 @@ void MultiDomainFunction::iterationFinished() {
}
}
/// Return a value of attribute attName
IFunction::Attribute
MultiDomainFunction::getLocalAttribute(size_t i,
const std::string &attName) const {
if (attName != "domains") {
throw std::invalid_argument("MultiDomainFunction does not have attribute " +
attName);
}
if (i >= nFunctions()) {
throw std::out_of_range("Function index is out of range.");
}
try {
auto it = m_domains.at(i);
if (it.size() == 1 && it.front() == i) {
return IFunction::Attribute("i");
} else if (!it.empty()) {
auto out = std::to_string(it.front());
for (auto i = it.begin() + 1; i != it.end(); ++i) {
out += "," + std::to_string(*i);
}
return IFunction::Attribute(out);
}
} catch (const std::out_of_range &) {
return IFunction::Attribute("All");
}
return IFunction::Attribute("");
}
/**
* Set a value to a "local" attribute, ie an attribute related to a member
*function.
......
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