Gradient-Enhanced Mixin#

Module for the gradient-enhanced mixin class.

class GradientEnhancedMixin[source]

Bases: object

Mixin that augments residual losses with a gradient-based regularization term.

The additional penalty is the norm of the residual gradient with respect to the spatial input variables. It is only applied to the conditions whose names are listed in regularized_conditions.

Designed to be used in combination with any solver inheriting from BaseSolver and using LabelTensor as input.