https://mooseframework.inl.gov
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 
12 registerMooseObject("ElectromagneticsApp", PotentialToFieldAux);
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 
30 Real
32 {
34 }
virtual Real computeValue() override
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
registerMooseObject("ElectromagneticsApp", PotentialToFieldAux)
This AuxKernel calculates the electrostatic electric field given the electrostatic potential...
Real _sign
Sign prefactor for calculation as determined via MooseEnum (default = negative, or -1) ...
static InputParameters validParams()
T sign(T x)
virtual Real computeValue() override
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void addClassDescription(const std::string &doc_string)
PotentialToFieldAux(const InputParameters &parameters)
static InputParameters validParams()