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
getADMaterialProperty does not report nonexistent material property #21867
Comments
Not by design. The code has explicit checks for non existing AD properties.
|
It looks like if there's no default value, non-AD properties end up doing this:
whereas AD properties do this:
|
Are you comparing |
I'm comparing the else branch in |
Can you just link to the the code? Are you in MaterialPropertyInterface? |
I don't know how to link to a specific line, but yes, |
Line 752 vs. 795 |
can look into this when I'm back |
I got GOT again yesterday! @lindsayad I'll go ahead and have a go at this unless you object. |
Forgot about this. Yea go ahead if you want to! If you run into problems let me know |
- Added getADMaterialPropertyByName(name, mat_data) - Added getGenericMaterialPropertyByName(name, mat_data) - Made getMaterialPropertyByName(name) and getADMaterialPropertyByName(name) call getGenericMaterialPropertyByName(name) instead of the other way around Refs idaholab#21867
Bug Description
When using
getADMaterialProperty
and the user passing a nonexistent material property, it seems a zero value is used silently instead of reporting to the user that the property does not exist.Steps to Reproduce
Run the following input file and observe that it runs despite the usage of nonexistent material properties:
(See first comment. I uploaded wrong file originally, and now Github is not letting me upload a different one to the description: "Something went really wrong, and we can't process that file.")
Note that the non-AD version
getMaterialProperty
does not have this issue: if in the input file above, you use the non-AD version of the kernels (remove "AD" from their names), you'll get an error message.Impact
This is dangerous because there is no indication to the user of an issue.
The text was updated successfully, but these errors were encountered: