Skip to content

Commit

Permalink
Add conductivity boundaries to Dirichlet BC list for wave port mode c…
Browse files Browse the repository at this point in the history
…alculation
  • Loading branch information
sebastiangrimberg committed Jun 11, 2024
1 parent ddc2ca7 commit 6fb1bb3
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion palace/models/waveportoperator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1092,7 +1092,8 @@ void WavePortOperator::SetUpBoundaryProperties(const IoData &iodata,
// are touching and share one or more edges.
mfem::Array<int> dbc_bcs;
dbc_bcs.Reserve(static_cast<int>(iodata.boundaries.pec.attributes.size() +
iodata.boundaries.auxpec.attributes.size()));
iodata.boundaries.auxpec.attributes.size() +
iodata.boundaries.conductivity.size()));
for (auto attr : iodata.boundaries.pec.attributes)
{
if (attr <= 0 || attr > bdr_attr_max)
Expand All @@ -1109,6 +1110,17 @@ void WavePortOperator::SetUpBoundaryProperties(const IoData &iodata,
}
dbc_bcs.Append(attr);
}
for (const auto &data : iodata.boundaries.conductivity)
{
for (auto attr : data.attributes)
{
if (attr <= 0 || attr > bdr_attr_max)
{
continue; // Can just ignore if wrong
}
dbc_bcs.Append(attr);
}
}
// If user accidentally specifies a surface as both "PEC" and "WavePortPEC", this is fine
// so allow for duplicates in the attribute list.
dbc_bcs.Sort();
Expand Down

0 comments on commit 6fb1bb3

Please sign in to comment.