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

Retrieving a material property in a BC does not trigger an error if it's not supplied #5309

Closed
permcody opened this issue Jun 25, 2015 · 11 comments
Labels
C: Framework P: normal A defect affecting operation with a low possibility of significantly affects. T: defect An anomaly, which is anything that deviates from expectations.

Comments

@permcody
Copy link
Member

Reported by Alex Lindsay.

@dschwen made the following comment:
This can be replicated by removing the material k3bnd in
moose/test/tests/materials/boundary_material/bnd_coupling_vol.i

@permcody permcody added C: Framework T: defect An anomaly, which is anything that deviates from expectations. P: normal A defect affecting operation with a low possibility of significantly affects. labels Jun 25, 2015
@lindsayad
Copy link
Member

Any hints on how this might be fixed? It seems mysterious that an IntegratedBC can get material properties from a material object defined on a block, but then won't complain when the properties it's requesting don't exist. It seems like it should either be able to do neither or both.

Is there a reason that checkBoundaryMatProps() is commented out in FEProblem::checkProblemIntegrity?

@permcody
Copy link
Member Author

There's some interplay between block/boundary restrictable and these materials check. I looked at it for a few minutes but wanted to vomit because we basically have two different systems checking material properties implemented. One was built by me a long time ago but @dschwen built another along side mine. They are both doing part of the work so it's a big mess now. It's on my to do list to clean them both up and get back to a single unified system for checking properties. I'm not sure when I'll get to it...

@dschwen
Copy link
Member

dschwen commented Nov 12, 2015

Hmm, I did? I guess I must have. The uses are slightly different. One system (yours) is for integrity checks (making the simulation fail if data has been requested that is not available) mine is for implementing "optional" material properties. But I agree that those are almost the same and should have a unified code base. If I recall correctly though my system was rather small and just populated a lookup map. I don't think I touched the integrity check system much.

@lindsayad
Copy link
Member

Can we set up a paypal account so I can donate $20 to the first person who fixes this?? :-)

@permcody
Copy link
Member Author

That's a great idea. We vote on tickets with our money... Hmm...

On Thu, Jan 14, 2016 at 9:37 AM Alex Lindsay notifications@github.com
wrote:

Can we set up a paypal account so I can donate $20 to the first person who
fixes this?? :-)


Reply to this email directly or view it on GitHub
#5309 (comment).

@lindsayad
Copy link
Member

@permcody I can fix this by

  1. uncommenting checkBoundaryMatProps() in FEProblem::checkProblemIntegrity()
  2. Replacing MaterialPropertyInterface(parameters) with MaterialPropertyInterface(parameters, boundaryIDs()) in the IntegratedBC constructor

Admittedly, I now have to define another material in my input file, a la:

[Materials]
[./jac_block]
block = '0'
type = JacMat
mean_en = p
em = w
[../]
[./jac_boundary]
boundary = 'left right'
type = JacMat
mean_en = p
em = w
[../]
[]

but now I get the checks that I need. Is this good enough for the framework?

@permcody
Copy link
Member Author

Which is probably why that check isn't in there. My guess is that this
would fail a few a LOT of tests. This really needs to be fixed but I want
to spend more time then just hacking something together for the current
problem we are thinking about. I think we'd like block restricted materials
to work for exterior boundaries too (the normal case). However, we have to
be careful about interior boundaries. You don't necessarily want materials
defined where they butt up against one and other in the interior.

On Thu, Jan 14, 2016 at 11:25 AM Alex Lindsay notifications@github.com
wrote:

@permcody https://github.com/permcody I can fix this by

  1. uncommenting checkBoundaryMatProps() in
    FEProblem::checkProblemIntegrity()
  2. Replacing MaterialPropertyInterface(parameters) with
    MaterialPropertyInterface(parameters, boundaryIDs()) in the IntegratedBC
    constructor

Admittedly, I now have to define another material in my input file, a la:

[Materials]
[./jac_block]
block = '0'
type = JacMat
mean_en = p
em = w
[../]
[./jac_boundary]
boundary = 'left right'
type = JacMat
mean_en = p
em = w
[../]
[]

but now I get the checks that I need. Is this good enough for the
framework?


Reply to this email directly or view it on GitHub
#5309 (comment).

@lindsayad
Copy link
Member

Yea, you're right. I was taking way too simple a view and not thinking about what this would break. Yes, sure enough 8 tests failed when I tried to run this.

@permcody
Copy link
Member Author

That's just moose_test. We have dozens of live applications...

On Thu, Jan 14, 2016 at 1:57 PM Alex Lindsay notifications@github.com
wrote:

Yea, you're right. I was taking way too simple a view and not thinking
about what this would break. Yes, sure enough 8 tests failed when I tried
to run this.


Reply to this email directly or view it on GitHub
#5309 (comment).

@permcody
Copy link
Member Author

@aeslaughter - you might check this again...

@lindsayad
Copy link
Member

Maybe not a lot of people use materials in their integratedBCs, but I'm still getting bitten by this. Luckily with Valgrind's help, I'm now tracking down uninitialized materials in my BCs.

aeslaughter added a commit to aeslaughter/moose that referenced this issue Sep 13, 2017
aeslaughter added a commit to aeslaughter/moose that referenced this issue Sep 13, 2017
aeslaughter added a commit to aeslaughter/moose that referenced this issue Sep 13, 2017
aeslaughter added a commit to aeslaughter/moose that referenced this issue Sep 13, 2017
aeslaughter added a commit to aeslaughter/moose that referenced this issue Sep 13, 2017
aeslaughter added a commit to aeslaughter/moose that referenced this issue Sep 19, 2017
andrsd added a commit to andrsd/moose that referenced this issue Sep 27, 2017
jarons pushed a commit to jarons/moose that referenced this issue Oct 5, 2017
jarons pushed a commit to jarons/moose that referenced this issue Oct 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: Framework P: normal A defect affecting operation with a low possibility of significantly affects. T: defect An anomaly, which is anything that deviates from expectations.
Projects
None yet
Development

No branches or pull requests

3 participants