Skip to content

Commit

Permalink
Remove old code and comment from PEC boundary condition.
Browse files Browse the repository at this point in the history
  • Loading branch information
cticenhour committed Mar 16, 2022
1 parent a17a8a5 commit 85b6043
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
4 changes: 0 additions & 4 deletions modules/electromagnetics/include/bcs/PEC.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ class PEC : public IntegratedBC
const VariableValue & _coupled_val_0;
const VariableValue & _coupled_val_1;
const VariableValue & _coupled_val_2;

int _component;

Real _penalty;
};

#endif // PEC_H
13 changes: 1 addition & 12 deletions modules/electromagnetics/src/bcs/PEC.C
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,9 @@ validParams<PEC>()
InputParameters params = validParams<IntegratedBC>();
params.addClassDescription("NodalNormals system description of the Perfect Electrical Conductor "
"(PEC) Boundary Condition, where ${\\hat{n} \\times \\vec{E} = 0}.");
MooseEnum component("x=0 y=1 z=2");
params.addRequiredParam<MooseEnum>(
"component", component, "Component/dimension of the solution variable.");
params.addCoupledVar("coupled_0", 0.0, "Coupled field variable, 0 component.");
params.addCoupledVar("coupled_1", 0.0, "Coupled field variable, 1 component.");
params.addCoupledVar("coupled_2", 0.0, "Coupled field variable, 2 component.");
params.addRequiredParam<Real>("penalty", "The penalty coefficient.");
return params;
}

Expand All @@ -24,9 +20,7 @@ PEC::PEC(const InputParameters & parameters)

_coupled_val_0(coupledValue("coupled_0")),
_coupled_val_1(coupledValue("coupled_1")),
_coupled_val_2(coupledValue("coupled_2")),
_component(getParam<MooseEnum>("component")),
_penalty(getParam<Real>("penalty"))
_coupled_val_2(coupledValue("coupled_2"))
{
}

Expand All @@ -39,10 +33,5 @@ PEC::computeQpResidual()
RealVectorValue NcF = _normals[_qp].cross(field);
RealVectorValue NcT = _normals[_qp].cross(test);

int comp = _component - 1;
if (_component == 0)
comp = 2;

// return single component of calculated cross product to be used in the residual calculation.
return -test * NcF;
}

0 comments on commit 85b6043

Please sign in to comment.