21 "Calculates the current density vector field (in A/m^2) when given electrostatic " 22 "potential (electrostatic = true, default) or electric field.");
23 params.
addParam<
bool>(
"electrostatic",
25 "Whether the electric field is based on electrostatic potential or is " 26 "fully electromagnetic (default = TRUE)");
27 params.
addCoupledVar(
"potential",
"Electrostatic potential variable");
28 params.
addCoupledVar(
"electric_field",
"Electric field variable (electromagnetic)");
36 _is_es(getParam<bool>(
"electrostatic")),
37 _grad_potential(isParamValid(
"potential") ? coupledGradient(
"potential") : _grad_zero),
38 _electric_field(isParamValid(
"electric_field") ? coupledVectorValue(
"electric_field")
41 _conductivity(getGenericMaterialProperty<
Real, is_ad>(
"electrical_conductivity"))
48 ", an electric field vector variable has been provided when `electrostatic = TRUE`. Please " 49 "either provide an electrostatic potential variable only or set `electrostatic = FALSE`!");
55 ", an electrostatic potential variable has been provided when `electrostatic = " 56 "FALSE`. Please either provide an electric field vector variable only or set " 57 "`electrostatic = TRUE`!");
63 ", both electrostatic potential and electric field variables have been provided. " 64 "Please only provide one or the other!");
Calculates the current density vector field (in A/m^2) when given electrostatic potential (electrosta...
const bool & _is_es
Is the current density based on electrostatic potential?
virtual const std::string & name() const
CurrentDensityTempl(const InputParameters ¶meters)
bool isParamValid(const std::string &name) const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual RealVectorValue computeValue() override
void mooseError(Args &&... args) const
static InputParameters validParams()
registerMooseObject("ElectromagneticsApp", CurrentDensity)
static InputParameters validParams()