New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default Function Value #2880

Closed
friedmud opened this Issue Apr 16, 2014 · 0 comments

Comments

Projects
None yet
2 participants
@friedmud
Contributor

friedmud commented Apr 16, 2014

We now have default values for coupled variables and Postprocessors and we can override them from the input file (well, for Postprocessors we will be able to after #2879).

We need the same capability for Functions.

If you look in ElementVectorL2Error.C you will see stuff like this in the constructor:

    _funcy(parameters.isParamValid("function_y") ? &getFunction("function_y") : NULL),
    _funcz(parameters.isParamValid("function_z") ? &getFunction("function_z") : NULL),

We should be able to call getFunction() and have it always return a Function... and in the case we're going to use a default value we will just construct a ConstantFunction behind the scenes and pass it through.

@permcody permcody self-assigned this Apr 21, 2014

permcody added a commit to permcody/moose that referenced this issue Apr 21, 2014

permcody added a commit to permcody/moose that referenced this issue Apr 22, 2014

@permcody permcody closed this in 4f7b901 Apr 22, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment