idaholab / moose

Multiphysics Object Oriented Simulation Environment
https://www.mooseframework.org
GNU Lesser General Public License v2.1
1.65k stars 1.02k forks source link

Allow Nodal AuxKernel Gradients When Shape Function Allows #15442

Open iwhalvic opened 4 years ago

iwhalvic commented 4 years ago

Reason

Currently Nodal Aux Kernels cannot link to coupled gradient values. This is due to the gradient being ill-defined at the node for many common shape functions (such as Lagrange) .

However, some implemented shape functions rely on solving for the nodal gradient values (such as 1D Cubic Hermite). When using these shape function it may be expected that linking to these nodal gradient values is allowed.

Design

Current error structure should be retained if attempting to link to a coupled gradient value if the shape function used is truly ill-defined at nodal points (which will likely be the most common scenario).

Error should not be thrown when using shape functions with well defined nodal gradients. Accessing gradients should occur with similar syntax to accessing gradient Values when using Elemental Aux Kernels

Impact

Adding something new, compatibility should be retained.

iwhalvic commented 4 years ago

@lindsayad

lindsayad commented 4 years ago

Very nice ticket. Thanks @iwhalvic !