moose icon indicating copy to clipboard operation
moose copied to clipboard

Initial work on contact for explicit finite element dynamics

Open recuero opened this issue 1 year ago • 8 comments

Closes #25666.

Closes #26243.

recuero avatar Nov 15 '23 21:11 recuero

Job Documentation on 3c5651e wanted to post the following:

View the site here

This comment will be updated on new commits.

moosebuild avatar Nov 16 '23 01:11 moosebuild

@recuero do you think it makes more sense for a mechanics person to review this or do you want me to review it?

lindsayad avatar Jan 05 '24 04:01 lindsayad

I believe @dschwen will want to review it. I'll be happy to address your comments too.

I still need to address a threading diff on a critical time step output, which I don't know if it's related to the code in this PR.

recuero avatar Jan 05 '24 07:01 recuero

I'm happy to let @dschwen have the reins 😄

lindsayad avatar Jan 05 '24 20:01 lindsayad

still need to address a threading diff on a critical time step output, which I don't know if it's related to the code in this PR.

If you want any help looking at this let me know. Is it repeatable?

lindsayad avatar Jan 05 '24 20:01 lindsayad

It seems repeatable. I haven't looked into it yet. I have a small suspicion that we may be summing the output of threads instead of just getting the minimum. I'll ping you if I can't figure it out, thanks!

recuero avatar Jan 05 '24 20:01 recuero

Job Coverage on 3c5651e wanted to post the following:

Framework coverage

1ac1dd #26073 3c5651
Total Total +/- New
Rate 85.29% 85.29% -0.00% 82.35%
Hits 100826 100890 +64 84
Misses 17388 17401 +13 18

Diff coverage report

Full coverage report

Modules coverage

Contact

1ac1dd #26073 3c5651
Total Total +/- New
Rate 90.31% 90.44% +0.13% 91.70%
Hits 4456 4931 +475 475
Misses 478 521 +43 43

Diff coverage report

Full coverage report

Solid mechanics

1ac1dd #26073 3c5651
Total Total +/- New
Rate 84.87% 84.88% +0.00% 85.71%
Hits 27122 27134 +12 12
Misses 4834 4835 +1 2

Diff coverage report

Full coverage report

Full coverage reports

Reports

Warnings

  • framework new line coverage rate 82.35% is less than the suggested 90.0%
  • solid_mechanics new line coverage rate 85.71% is less than the suggested 90.0%

This comment will be updated on new commits.

moosebuild avatar Jan 11 '24 17:01 moosebuild

Job Docker moose-dev on 7a6ed09 : invalidated by @recuero

moosebuild avatar Jan 22 '24 20:01 moosebuild

@dschwen @lindsayad This should be ready for review.

recuero avatar Feb 05 '24 22:02 recuero

My biggest concern is the poor line coverage in the framework. This reflects the leaking of the contact module into the framework. Is there something we can do about this? Perhaps add some virtual methods in NonlinearSystemBase and create a NonlinearSystem derived class in the contact module? That's just a spitball.

My smaller concern is the proliferation of writable variables through different systems in MOOSE

lindsayad avatar Feb 08 '24 03:02 lindsayad

Perhaps add some virtual methods in NonlinearSystemBase and create a NonlinearSystem derived class in the contact module?

That'll fix the coverage issue. We'd need to create that contact-specific nonlinear system from the framework, I believe. Maybe with CONTACT_ENABLED macros? There may be a better solution, I don't like the one I just thought of.

An alternative way of looking at this is that contact, just now, requires additional, general capabilities. That 'overwrite' method is probably not that different in nature from presetting Dirichlet BCs? Maybe cooking up a test in the framework to cover that code would be enough?

recuero avatar Feb 14 '24 00:02 recuero

That'll fix the coverage issue. We'd need to create that contact-specific nonlinear system from the framework, I believe. Maybe with CONTACT_ENABLED macros? There may be a better solution, I don't like the one I just thought of.

Definitely don't want to do macros. I would be in favor of something more _factory and MooseObject based, e.g. make Systems moose objects that can be easily derived from and buildable by the factory. This would allow users to create arbitrary Systems in their modules/applications without the framework needing the details, just like our other systems (using lower case systems here to mean systems like Kernels, BoundaryConditions, etc.)

An alternative way of looking at this is that contact, just now, requires additional, general capabilities. That 'overwrite' method is probably not that different in nature from presetting Dirichlet BCs? Maybe cooking up a test in the framework to cover that code would be enough?

Yes if you can make framework level tests for the framework code you've added then I would be supportive of keeping the new code in the framework

lindsayad avatar Feb 15 '24 16:02 lindsayad

Job OpenMPI on 25644b9 : invalidated by @recuero

moosebuild avatar Feb 20 '24 15:02 moosebuild

It seems like the balance tests might be a little long for dbg. Might be an intermittent failure:

[299.9s]  TIMEOUT contact/test:explicit_dynamics.test_balance FAILED (TIMEOUT) [previous results: TIMEOUT,FINISHED]
[300.0s]  TIMEOUT contact/test:explicit_dynamics.test_balance_overwrite FAILED (TIMEOUT) [previous results: TIMEOUT,FINISHED]

lindsayad avatar Feb 21 '24 06:02 lindsayad

@recuero please review my commits and see what you think. I'll see how testing does. If something fails from my changes I will fix it

I've reviewed the framework pieces. @dschwen I'll let you review the contact pieces

lindsayad avatar Feb 21 '24 06:02 lindsayad

Looks great to me, nice cleanup!

recuero avatar Feb 23 '24 22:02 recuero

thanks for your great contributions @recuero

lindsayad avatar Mar 04 '24 19:03 lindsayad