Skip to content
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

Check to see if a function name could evaluate to a parsed function #8412

Merged
merged 2 commits into from Feb 10, 2017

Conversation

brianmoose
Copy link
Contributor

This just gives a warning, wasn't sure if it should be an error.
This also ignores ParsedFunctions. There seems to be several places where people
have something like:

[Functions]
  [./x]
    type = ParsedFunction
    value = x
  [../]
  [./10]
    type = ParsedFunction
    value = 10
   [../]
[]

I wasn't sure if you wanted to warn/error there as well.

closes #7659

@dschwen
Copy link
Member

dschwen commented Jan 27, 2017

If people do that it is retarded. Just delete those function blocks and the tests/inputs should still pass/run.

Copy link
Member

@dschwen dschwen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good otherwise

@@ -29,5 +29,9 @@ AddFunctionAction::AddFunctionAction(InputParameters params) :
void
AddFunctionAction::act()
{
FunctionParserBase<Real> fp;
std::string vars = "x,y,z,t,NaN,pi,e";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we may want to make this a static constant member

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, wait, this only occurs in libmesh. Well, nevermind then.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, the same string appears in FEProblemBase::getFunction. No big deal, but this was changed before (when NaN was added by Roy).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that is where I grabbed it. It would be nice if this sort of thing lived in a common place.

@moosebuild
Copy link
Contributor

Job Precheck:linux-gnu on 3569c25 : invalidated by @rwcarlsen

1 similar comment
@moosebuild
Copy link
Contributor

Job Precheck:linux-gnu on 3569c25 : invalidated by @rwcarlsen

@permcody permcody merged commit 357c547 into idaholab:devel Feb 10, 2017
@brianmoose brianmoose deleted the function-conflict-7659 branch March 16, 2017 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants