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 28605 : ValueJumpIndicatorTempl<ComputeValueType>::validParams() 18 : { 19 28605 : InputParameters params = InternalSideIndicatorTempl<ComputeValueType>::validParams(); 20 28605 : params.addClassDescription("Compute the jump of the solution across element bondaries."); 21 28605 : return params; 22 0 : } 23 : 24 : template <typename ComputeValueType> 25 39 : ValueJumpIndicatorTempl<ComputeValueType>::ValueJumpIndicatorTempl( 26 : const InputParameters & parameters) 27 39 : : InternalSideIndicatorTempl<ComputeValueType>(parameters) 28 : { 29 39 : } 30 : 31 : template <> 32 : Real 33 4320 : ValueJumpIndicatorTempl<Real>::computeQpIntegral() 34 : { 35 4320 : Real jump = _u[_qp] - _u_neighbor[_qp]; 36 : 37 4320 : return jump * jump; 38 : } 39 : 40 : template <> 41 : Real 42 320 : ValueJumpIndicatorTempl<RealVectorValue>::computeQpIntegral() 43 : { 44 320 : Real jump = _normals[_qp] * (_u[_qp] - _u_neighbor[_qp]); 45 : 46 320 : return jump * jump; 47 : } 48 : 49 : // Explicitly instantiate two versions of the ValueJumpIndicatorTempl class 50 : template class ValueJumpIndicatorTempl<Real>; 51 : template class ValueJumpIndicatorTempl<RealVectorValue>;