From 6fb1bb3d8ff2b9aaa87f10758c8358d38eac6d29 Mon Sep 17 00:00:00 2001 From: Sebastian Grimberg Date: Tue, 11 Jun 2024 14:22:34 -0700 Subject: [PATCH] Add conductivity boundaries to Dirichlet BC list for wave port mode calculation --- palace/models/waveportoperator.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/palace/models/waveportoperator.cpp b/palace/models/waveportoperator.cpp index e18ca8772..2e32d7a0f 100644 --- a/palace/models/waveportoperator.cpp +++ b/palace/models/waveportoperator.cpp @@ -1092,7 +1092,8 @@ void WavePortOperator::SetUpBoundaryProperties(const IoData &iodata, // are touching and share one or more edges. mfem::Array dbc_bcs; dbc_bcs.Reserve(static_cast(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) @@ -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();