https://mooseframework.inl.gov
Loading...
Searching...
No Matches
PotentialToFieldAux.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 "PotentialToFieldAux.h"
11
13
16{
18 params.addClassDescription("An AuxKernel that calculates the electrostatic electric field given "
19 "the electrostatic potential.");
20 MooseEnum sign("positive=1 negative=-1", "negative");
21 params.addParam<MooseEnum>("sign", sign, "Sign of potential gradient.");
22 return params;
23}
24
26 : VariableGradientComponent(parameters), _sign(getParam<MooseEnum>("sign"))
27{
28}
29
30Real
registerMooseObject("ElectromagneticsApp", PotentialToFieldAux)
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)
This AuxKernel calculates the electrostatic electric field given the electrostatic potential.
static InputParameters validParams()
Real _sign
Sign prefactor for calculation as determined via MooseEnum (default = negative, or -1)
PotentialToFieldAux(const InputParameters &parameters)
virtual Real computeValue() override
static InputParameters validParams()
virtual Real computeValue() override