https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
12registerMooseObject("ElectromagneticsApp", CurlCurlField);
13registerMooseObject("ElectromagneticsApp", ADCurlCurlField);
14
15template <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
26template <bool is_ad>
28 : GenericKernelCurl<is_ad>(parameters), _coeff(this->template getParam<Real>("coeff"))
29{
30}
31
32template <bool is_ad>
35{
36 return _coeff * _curl_u[_qp] * _curl_test[_i][_qp];
37}
38
39template <bool is_ad>
40Real
42{
43 return _coeff * _curl_phi[_j][_qp] * _curl_test[_i][_qp];
44}
registerMooseObject("ElectromagneticsApp", CurlCurlField)
Moose::GenericType< Real, is_ad > GenericReal
Weak form contribution corresponding to the curl(curl(E)) where E is the electric field vector.
CurlCurlFieldTempl(const InputParameters &parameters)
virtual GenericReal< is_ad > computeQpResidual() override
static InputParameters validParams()
virtual Real computeQpJacobian() override
static InputParameters validParams()
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)