<commit_before>#include "RobinReflectionBC.h"
#include "Function.h"

template <>
InputParameters
validParams<RobinReflectionBC>()
{
  InputParameters params = validParams<IntegratedBC>();

  params.addRequiredParam<Real>("theta", "Incidence angle");
  params.addRequiredCoupledVar("coupled_field", "Coupled field variable");
  params.addRequiredParam<Real>("length", "length of slab");
  MooseEnum component("imaginary real","real");
  params.addParam<MooseEnum>("component", component, "Real or Imaginary wave component.");
  params.addRequiredParam<Real>("k", "Wave number");
  params.addRequiredParam<FunctionName>("inverseMuR", "Inverse relative permeability");
  return params;
}

RobinReflectionBC::RobinReflectionBC(const InputParameters & parameters)
  : IntegratedBC(parameters),

    _theta(getParam<Real>("theta")),
    _coupled_val(coupledValue("coupled_field")),
    _L(getParam<Real>("length")),
    _component(getParam<MooseEnum>("component")),
    _k(getParam<Real>("k")),
    _inverseMuR(getFunction("inverseMuR"))

{
}

Real
RobinReflectionBC::computeQpResidual()
{

  Real _coefficient = _k * std::cos(_theta * 2 * libMesh::pi / 360.);

  if (_component == "real")
  {
    return -_test[_i][_qp] * _inverseMuR.value(_t,_q_point[_qp]) * _coefficient * (_coupled_val[_qp] - 2 * std::sin(_coefficient * _L));
  }
  else
  {
    return -_test[_i][_qp] * _inverseMuR.value(_t,_q_point[_qp]) * _coefficient * (2 * std::cos(_coefficient * _L) - _coupled_val[_qp]);
  }
}<commit_msg>Testing of RobinBC continues.<commit_after>#include "RobinReflectionBC.h"
#include "Function.h"

template <>
InputParameters
validParams<RobinReflectionBC>()
{
  InputParameters params = validParams<IntegratedBC>();

  params.addRequiredParam<Real>("theta", "Incidence angle");
  params.addRequiredCoupledVar("coupled_field", "Coupled field variable");
  params.addRequiredParam<Real>("length", "length of slab");
  MooseEnum component("imaginary real","real");
  params.addParam<MooseEnum>("component", component, "Real or Imaginary wave component.");
  params.addRequiredParam<Real>("k", "Wave number");
  params.addRequiredParam<FunctionName>("inverseMuR", "Inverse relative permeability");
  return params;
}

RobinReflectionBC::RobinReflectionBC(const InputParameters & parameters)
  : IntegratedBC(parameters),

    _theta(getParam<Real>("theta")),
    _coupled_val(coupledValue("coupled_field")),
    _L(getParam<Real>("length")),
    _component(getParam<MooseEnum>("component")),
    _k(getParam<Real>("k")),
    _inverseMuR(getFunction("inverseMuR"))

{
}

Real
RobinReflectionBC::computeQpResidual()
{

  Real _coefficient = _k * std::cos(_theta * 2 * libMesh::pi / 360.);

  if (_component == "real")
  {
    return -_test[_i][_qp] * _inverseMuR.value(_t,_q_point[_qp]) * _coefficient * (_coupled_val[_qp] - 2 * std::sin(_coefficient * _q_point[_qp](0)));
  }
  else
  {
    return -_test[_i][_qp] * _inverseMuR.value(_t,_q_point[_qp]) * _coefficient * (2 * std::cos(_coefficient * _q_point[_qp](0)) - _coupled_val[_qp]);
  }
}
{'fraction_non_alphanumeric': 0.16193931398416886, 'fraction_numerical': 0.004617414248021108, 'mean_word_length': 6.452088452088452, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2646937', 'n_tokens_mistral': 1041, 'n_tokens_neox': 1001, 'n_words': 161}