Skip to content
Snippets Groups Projects
Commit 7394bbcc authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

[PL] Rename getTuple into call operator.

This simlifies access to the values while maintaining simple interface.
parent 953f53cc
No related branches found
No related tags found
No related merge requests found
......@@ -31,7 +31,7 @@ struct ConstantParameter final : public Parameter<T>
return static_cast<unsigned>(_value.size());
}
std::vector<T> const& getTuple(
std::vector<T> const& operator()(
double const /*t*/, SpatialPosition const& /*pos*/) const override
{
return _value;
......
......@@ -34,8 +34,8 @@ struct MeshElementParameter final : public Parameter<T> {
return _property.getNumberOfComponents();
}
std::vector<T> const& getTuple(double const /*t*/,
SpatialPosition const& pos) const override
std::vector<T> const& operator()(double const /*t*/,
SpatialPosition const& pos) const override
{
auto const e = pos.getElementID();
assert(e);
......
......@@ -34,8 +34,8 @@ struct MeshNodeParameter final : public Parameter<T> {
return _property.getNumberOfComponents();
}
std::vector<T> const& getTuple(double const /*t*/,
SpatialPosition const& pos) const override
std::vector<T> const& operator()(double const /*t*/,
SpatialPosition const& pos) const override
{
auto const n = pos.getNodeID();
assert(n);
......
......@@ -52,7 +52,7 @@ struct Parameter : public ParameterBase
virtual unsigned getNumberOfComponents() const = 0;
//! Returns the parameter value at the given time and position.
virtual std::vector<T> const& getTuple(
virtual std::vector<T> const& operator()(
double const t, SpatialPosition const& pos) const = 0;
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment