Line data Source code
1 : //* This file is part of the MOOSE framework 2 : //* https://mooseframework.inl.gov 3 : //* 4 : //* All rights reserved, see COPYRIGHT for full restrictions 5 : //* https://github.com/idaholab/moose/blob/master/COPYRIGHT 6 : //* 7 : //* Licensed under LGPL 2.1, please see LICENSE for details 8 : //* https://www.gnu.org/licenses/lgpl-2.1.html 9 : 10 : #include "ValueJumpIndicator.h" 11 : 12 : registerMooseObject("MooseApp", ValueJumpIndicator); 13 : registerMooseObject("MooseApp", VectorValueJumpIndicator); 14 : 15 : template <typename ComputeValueType> 16 : InputParameters 17 28611 : ValueJumpIndicatorTempl<ComputeValueType>::validParams() 18 : { 19 28611 : InputParameters params = InternalSideIndicatorTempl<ComputeValueType>::validParams(); 20 28611 : params.addClassDescription("Compute the jump of the solution across element bondaries."); 21 28611 : return params; 22 0 : } 23 : 24 : template <typename ComputeValueType> 25 42 : ValueJumpIndicatorTempl<ComputeValueType>::ValueJumpIndicatorTempl( 26 : const InputParameters & parameters) 27 42 : : InternalSideIndicatorTempl<ComputeValueType>(parameters) 28 : { 29 42 : } 30 : 31 : template <> 32 : Real 33 4860 : ValueJumpIndicatorTempl<Real>::computeQpIntegral() 34 : { 35 4860 : Real jump = _u[_qp] - _u_neighbor[_qp]; 36 : 37 4860 : return jump * jump; 38 : } 39 : 40 : template <> 41 : Real 42 360 : ValueJumpIndicatorTempl<RealVectorValue>::computeQpIntegral() 43 : { 44 360 : Real jump = _normals[_qp] * (_u[_qp] - _u_neighbor[_qp]); 45 : 46 360 : return jump * jump; 47 : } 48 : 49 : // Explicitly instantiate two versions of the ValueJumpIndicatorTempl class 50 : template class ValueJumpIndicatorTempl<Real>; 51 : template class ValueJumpIndicatorTempl<RealVectorValue>;