Skip to content
Permalink
Browse files

Merge pull request #13499 from aeslaughter/const-getFunction-13480

Update examples for const Function
  • Loading branch information...
lindsayad committed May 30, 2019
2 parents 66c8f00 + 0a88878 commit a59b57321edfe23e9342c14e4f36d63e354a96fd
@@ -21,9 +21,8 @@ class ExampleFunction : public Function
public:
ExampleFunction(const InputParameters & parameters);

virtual Real value(Real t, const Point & p) override;
virtual Real value(Real t, const Point & p) const override;

protected:
Real _alpha;
};

@@ -26,7 +26,7 @@ ExampleFunction::ExampleFunction(const InputParameters & parameters)
}

Real
ExampleFunction::value(Real /*t*/, const Point & p)
ExampleFunction::value(Real /*t*/, const Point & p) const
{
return _alpha * _alpha * libMesh::pi * libMesh::pi *
std::sin(_alpha * libMesh::pi * p(0)); // p(0) == x
@@ -21,9 +21,8 @@ class ExampleFunction : public Function
public:
ExampleFunction(const InputParameters & parameters);

virtual Real value(Real t, const Point & p) override;
virtual Real value(Real t, const Point & p) const override;

protected:
Real _alpha;
};

@@ -26,7 +26,7 @@ ExampleFunction::ExampleFunction(const InputParameters & parameters)
}

Real
ExampleFunction::value(Real /*t*/, const Point & p)
ExampleFunction::value(Real /*t*/, const Point & p) const
{
return _alpha * _alpha * libMesh::pi * libMesh::pi *
std::sin(_alpha * libMesh::pi * p(0)); // p(0) == x

0 comments on commit a59b573

Please sign in to comment.
You can’t perform that action at this time.