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 "SideIntegralMaterialProperty.h" 11 : 12 : #include "metaphysicl/raw_type.h" 13 : 14 : registerMooseObject("MooseApp", SideIntegralMaterialProperty); 15 : registerMooseObject("MooseApp", ADSideIntegralMaterialProperty); 16 : 17 : template <bool is_ad> 18 : InputParameters 19 57303 : SideIntegralMaterialPropertyTempl<is_ad>::validParams() 20 : { 21 57303 : InputParameters params = IndexableProperty<SideIntegralPostprocessor, is_ad>::validParams(); 22 57303 : params.addClassDescription("Compute the integral of a scalar material property component over " 23 : "the domain."); 24 57303 : return params; 25 0 : } 26 : 27 : template <bool is_ad> 28 127 : SideIntegralMaterialPropertyTempl<is_ad>::SideIntegralMaterialPropertyTempl( 29 : const InputParameters & parameters) 30 127 : : SideIntegralPostprocessor(parameters), _prop(this) 31 : { 32 127 : } 33 : 34 : template <bool is_ad> 35 : void 36 125 : SideIntegralMaterialPropertyTempl<is_ad>::initialSetup() 37 : { 38 : // check if the material property type and number of supplied components match 39 125 : _prop.check(); 40 117 : } 41 : 42 : template <bool is_ad> 43 : Real 44 1440 : SideIntegralMaterialPropertyTempl<is_ad>::computeQpIntegral() 45 : { 46 1440 : return MetaPhysicL::raw_value(_prop[_qp]); 47 : } 48 : 49 : template class SideIntegralMaterialPropertyTempl<false>; 50 : template class SideIntegralMaterialPropertyTempl<true>;