21 "Function of RHS for manufactured solution in scalar_complex_helmholtz test.");
34 _length(getParam<
Real>(
"L")),
35 _g_0_real(getParam<
Real>(
"g0_real")),
36 _g_0_imag(getParam<
Real>(
"g0_imag")),
37 _g_l_real(getParam<
Real>(
"gL_real")),
38 _g_l_imag(getParam<
Real>(
"gL_imag")),
39 _component(getParam<
MooseEnum>(
"component"))
48 std::complex<double>
F(0, 0);
53 std::complex<double>
k(2.0 * (1.0 + p(0) /
_length), (1.0 + p(0) /
_length));
54 std::complex<double> k_l(4.0, 2.0);
55 std::complex<double>
c(12.0 * (1.0 + p(0) /
_length) * (1.0 + p(0) /
_length),
57 std::complex<double> c_l(48.0, 16.0);
59 std::complex<double> c_grad((24.0 /
_length) * (1 + p(0) /
_length),
62 std::complex<double> lambda =
k / std::sqrt(
c);
63 std::complex<double> lambda_l = k_l / std::sqrt(c_l);
65 std::complex<double> constant_1 = g_0;
66 std::complex<double> constant_2 =
67 (g_l - g_0 * std::cos(lambda_l *
_length)) / std::sin(lambda_l *
_length);
69 std::complex<double> sln_grad = -constant_1 * lambda * std::sin(lambda * p(0)) +
70 constant_2 * lambda * std::cos(lambda * p(0));
72 F = c_grad * sln_grad;
static const std::string component
static InputParameters validParams()
const Real _g_l_real
Real component of DirichletBC, where x = L.
static const std::string F
Function of RHS for manufactured solution in scalar_complex_helmholtz test.
const Real _length
Length of 1D test domain, where 0 < x < L.
registerMooseObject("ElectromagneticsTestApp", MMSTestFunc)
MMSTestFunc(const InputParameters ¶meters)
const Real _g_0_imag
Imaginary component of DirichletBC, where x = 0.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const Real _g_l_imag
Imaginary component of DirichletBC, where x = L.
virtual Real value(Real t, const Point &p) const override
static InputParameters validParams()
static const std::string k
const Real _g_0_real
Real component of DirichletBC, where x = 0.
const MooseEnum _component
Enum signifying the component of the function being calculated.