Skip to content

restrict_int<T>() for opt-checked casts, starting with subdomain_id inputs#4439

Open
roystgnr wants to merge 3 commits intolibMesh:develfrom
roystgnr:restrict_int
Open

restrict_int<T>() for opt-checked casts, starting with subdomain_id inputs#4439
roystgnr wants to merge 3 commits intolibMesh:develfrom
roystgnr:restrict_int

Conversation

@roystgnr
Copy link
Copy Markdown
Member

I'm certain that we need something that does conversion checking even in opt mode - otherwise we can get silent corruption and/or confusing failures when we try to read a subdomain_id above ~2^16 with a libMesh build that's using our default 16-bit subdomain_id_type. That seemed to be happening to me with the file @jwpeterson sent me to look at regarding #4358.

I'm not certain about the name here. In hindsight, perhaps even cast_int should have been called cast_value, since these methods would be useful for FP/integer interconversions (and maybe for FP/FP conversions) too?

We need this for things like file input where we really can't just
assume that the file contents are compatible with our data types.
@moosebuild
Copy link
Copy Markdown

Job Coverage, step Generate coverage on 23b0101 wanted to post the following:

Coverage

9334d7 #4439 23b010
Total Total +/- New
Rate 65.47% 65.47% +0.00% 100.00%
Hits 78229 78233 +4 21
Misses 41253 41253 - 0

Diff coverage report

Full coverage report

This comment will be updated on new commits.

@moosebuild
Copy link
Copy Markdown

Job Test MOOSE modules on 23b0101 : invalidated by @roystgnr

Kicking in the hopes that the chemical_reactions/test:thermochimica.MoRu_FV failure was an MPI fluke...

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.

2 participants