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 "CurlCurlField.h" 11 : 12 : registerMooseObject("ElectromagneticsApp", CurlCurlField); 13 : registerMooseObject("ElectromagneticsApp", ADCurlCurlField); 14 : 15 : template <bool is_ad> 16 : InputParameters 17 1678 : CurlCurlFieldTempl<is_ad>::validParams() 18 : { 19 : InputParameters params = GenericKernelCurl<is_ad>::validParams(); 20 1678 : params.addClassDescription("Weak form term corresponding to $\\nabla \\times (a \\nabla \\times " 21 : "\\vec{E})$."); 22 3356 : params.addParam<Real>("coeff", 1.0, "Weak form coefficient (default = 1.0)."); 23 1678 : return params; 24 0 : } 25 : 26 : template <bool is_ad> 27 891 : CurlCurlFieldTempl<is_ad>::CurlCurlFieldTempl(const InputParameters & parameters) 28 1782 : : GenericKernelCurl<is_ad>(parameters), _coeff(this->template getParam<Real>("coeff")) 29 : { 30 891 : } 31 : 32 : template <bool is_ad> 33 : GenericReal<is_ad> 34 127412896 : CurlCurlFieldTempl<is_ad>::computeQpResidual() 35 : { 36 127412896 : return _coeff * _curl_u[_qp] * _curl_test[_i][_qp]; 37 : } 38 : 39 : template <bool is_ad> 40 : Real 41 66121744 : CurlCurlFieldTempl<is_ad>::computeQpJacobian() 42 : { 43 66121744 : return _coeff * _curl_phi[_j][_qp] * _curl_test[_i][_qp]; 44 : }