From: Matthias Maier Date: Thu, 24 Apr 2025 21:09:27 +0000 (-0500) Subject: Step 81: fix logic inversion when selecting absorbing boundary conditions X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F18385%2Fhead;p=dealii.git Step 81: fix logic inversion when selecting absorbing boundary conditions --- diff --git a/examples/step-81/step-81.cc b/examples/step-81/step-81.cc index eb1b788c27..9e4eaa13f1 100644 --- a/examples/step-81/step-81.cc +++ b/examples/step-81/step-81.cc @@ -504,7 +504,7 @@ namespace Step81 GridGenerator::hyper_cube(triangulation, -scaling, scaling); triangulation.refine_global(refinements); - if (!absorbing_boundary) + if (absorbing_boundary) { for (auto &face : triangulation.active_face_iterators()) if (face->at_boundary()) @@ -710,6 +710,11 @@ namespace Step81 // \f} // respectively. The test variables and the PML are implemented // similarly as the domain. + // + // If we are at the domain boundary $\partial\Omega$ and absorbing + // boundary conditions are set (id == 1) we assemble + // the corresponding boundary term: + // const FEValuesExtractors::Vector real_part(0); const FEValuesExtractors::Vector imag_part(dim); for (const auto &face : cell->face_iterators()) @@ -717,7 +722,7 @@ namespace Step81 if (face->at_boundary()) { const auto id = face->boundary_id(); - if (id != 0) + if (id == 1) { fe_face_values.reinit(cell, face);