https://mooseframework.inl.gov
CurlCurlField.C
Go to the documentation of this file.
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>
18 {
20  params.addClassDescription("Weak form term corresponding to $\\nabla \\times (a \\nabla \\times "
21  "\\vec{E})$.");
22  params.addParam<Real>("coeff", 1.0, "Weak form coefficient (default = 1.0).");
23  return params;
24 }
25 
26 template <bool is_ad>
28  : GenericKernelCurl<is_ad>(parameters), _coeff(this->template getParam<Real>("coeff"))
29 {
30 }
31 
32 template <bool is_ad>
35 {
36  return _coeff * _curl_u[_qp] * _curl_test[_i][_qp];
37 }
38 
39 template <bool is_ad>
40 Real
42 {
43  return _coeff * _curl_phi[_j][_qp] * _curl_test[_i][_qp];
44 }
Moose::GenericType< Real, is_ad > GenericReal
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
virtual GenericReal< is_ad > computeQpResidual() override
Definition: CurlCurlField.C:34
Weak form contribution corresponding to the curl(curl(E)) where E is the electric field vector...
Definition: CurlCurlField.h:19
CurlCurlFieldTempl(const InputParameters &parameters)
Definition: CurlCurlField.C:27
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static InputParameters validParams()
void addClassDescription(const std::string &doc_string)
static InputParameters validParams()
Definition: CurlCurlField.C:17
virtual Real computeQpJacobian() override
Definition: CurlCurlField.C:41
registerMooseObject("ElectromagneticsApp", CurlCurlField)