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

Allowing to define an array varible with component size one #19567

Merged
merged 6 commits into from
Dec 8, 2021

Conversation

yjung-anl
Copy link
Contributor

closes #19564

Copy link
Member

@loganharbour loganharbour left a comment

Choose a reason for hiding this comment

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

  • Add a test. Array diffusion with a variable with one component is sufficient.
  • is_av/av -> array. FV is well known. AV is not

@yjung-anl
Copy link
Contributor Author

@loganharbour Thank you for super quick review!

@loganharbour
Copy link
Member

loganharbour commented Dec 7, 2021

@loganharbour Thank you for super quick review!

Timed out well with watching tv 😆

I’m good with all of this and understand the purpose - we just need to be stringent given that these chunks of code are ran in almost every use of moose

@moosebuild
Copy link
Contributor

moosebuild commented Dec 7, 2021

Job Documentation on 49b4b02 wanted to post the following:

View the site here

This comment will be updated on new commits.

@moosebuild
Copy link
Contributor

moosebuild commented Dec 7, 2021

Job Coverage on 49b4b02 wanted to post the following:

Framework coverage

c25336 #19567 49b4b0
Total Total +/- New
Rate 82.17% 82.17% -0.00% 86.67%
Hits 72864 72872 +8 13
Misses 15806 15809 +3 2

Diff coverage report

Full coverage report

Modules coverage

Chemical reactions

c25336 #19567 49b4b0
Total Total +/- New
Rate 93.27% 93.27% - 100.00%
Hits 873 873 - 2
Misses 63 63 - 0

Diff coverage report

Full coverage report

Contact

c25336 #19567 49b4b0
Total Total +/- New
Rate 87.90% 87.90% - 100.00%
Hits 2273 2273 - 1
Misses 313 313 - 0

Diff coverage report

Full coverage report

Heat conduction

c25336 #19567 49b4b0
Total Total +/- New
Rate 88.77% 88.77% - 100.00%
Hits 2997 2997 - 1
Misses 379 379 - 0

Diff coverage report

Full coverage report

Navier stokes

c25336 #19567 49b4b0
Total Total +/- New
Rate 83.16% 83.16% - 100.00%
Hits 7607 7607 - 3
Misses 1540 1540 - 0

Diff coverage report

Full coverage report

Phase field

c25336 #19567 49b4b0
Total Total +/- New
Rate 90.20% 90.20% - 100.00%
Hits 11926 11926 - 5
Misses 1296 1296 - 0

Diff coverage report

Full coverage report

Richards

c25336 #19567 49b4b0
Total Total +/- New
Rate 97.64% 97.64% - 100.00%
Hits 3346 3346 - 1
Misses 81 81 - 0

Diff coverage report

Full coverage report

Full coverage reports

Reports

Warnings

  • framework new line coverage rate 86.67% is less than the suggested 90.0%

This comment will be updated on new commits.

@yjung-anl
Copy link
Contributor Author

Changes

  • av and is_av are renamed to array_variable and is_array_variable. A variable can be explicitly defined as an array variable in input deck using the parameter array_variable=true as:
[Variables]
  [u]
    order = THIRD
    family = MONOMIAL
    block = 0
    components = 1
    array_variable = true
  []
[]
  • A test case corresponding to this PR was included in test/tests/variables/array_variable/array_variable_size_one_test.i
  • Rebased on top of next branch

Copy link
Member

@loganharbour loganharbour left a comment

Choose a reason for hiding this comment

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

  • array_variable -> array
  • Clean up determineType (remove redundant parameter)
  • Move error check to a better location and add a test for it

I'm good after this!

framework/include/actions/AddVariableAction.h Outdated Show resolved Hide resolved
framework/src/actions/AddVariableAction.C Outdated Show resolved Hide resolved
framework/src/actions/AddVariableAction.C Outdated Show resolved Hide resolved
framework/src/actions/AddVariableAction.C Outdated Show resolved Hide resolved
framework/src/systems/SystemBase.C Outdated Show resolved Hide resolved
framework/src/variables/MooseVariableBase.C Outdated Show resolved Hide resolved
framework/src/variables/MooseVariableBase.C Outdated Show resolved Hide resolved
@moosebuild
Copy link
Contributor

Job Precheck on 0c178c0 wanted to post the following:

Your code requires style changes.

A patch was auto generated and copied here
You can directly apply the patch by running, in the top level of your repository:

curl -s https://mooseframework.inl.gov/docs/PRs/19567/style.patch | git apply -v

Alternatively, with your repository up to date and in the top level of your repository:

git clang-format d3a9b367b41eb0c9d4b8ecdcafaccbad43bf8d96

@loganharbour
Copy link
Member

@lindsayad can you take a look at this please - I know that you're the one that did most of the variable cleaning and I would like a 👍🏼 or 👎🏼 on the AddVariableAction::determineType() deprecation

@loganharbour
Copy link
Member

I think that we will also want to add

params.set<bool>("array") = true;

in ArrayMooseVariable::validParams()

but I'd like a ✅ from @lindsayad on that one too

lindsayad
lindsayad previously approved these changes Dec 7, 2021
Copy link
Member

@lindsayad lindsayad left a comment

Choose a reason for hiding this comment

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

I would kind of like to see a coverage report, but this looks fine to me

@loganharbour
Copy link
Member

loganharbour commented Dec 7, 2021

@lindsayad good for another review - I thought that we might of broke something, but we didn't. Decided to keep the test that I made anyway

This basically tests creating an array variable from a MooseArrayVariable instead of a MooseVariableBase

Copy link
Member

@lindsayad lindsayad left a comment

Choose a reason for hiding this comment

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

👍 pending a favorable coverage report

Copy link
Member

@loganharbour loganharbour left a comment

Choose a reason for hiding this comment

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

Coverage is favorable.

Docs failure is unrelated and patch is currently in bison devel

@loganharbour loganharbour merged commit 6463c45 into idaholab:next Dec 8, 2021
@YaqiWang
Copy link
Contributor

YaqiWang commented Dec 8, 2021

@yjung-anl can you update Griffin really quick to use the new function?

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.

Allowing to define an array varible with component size one
5 participants