From f9671412a8baa9d662686937c534e88575c9e2c9 Mon Sep 17 00:00:00 2001 From: Jordi Manyer Date: Wed, 11 Mar 2026 23:53:37 +1100 Subject: [PATCH] Remove useless if branch in sign map creation --- NEWS.md | 6 ++++++ src/DivConformingFESpaces.jl | 4 +--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/NEWS.md b/NEWS.md index d791a38..b63c2b3 100644 --- a/NEWS.md +++ b/NEWS.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +### Fixed + +- Fixed `is_slave == false` (comparison instead of assignment) in `DivConformingFESpaces`, and simplified the boundary-facet branch by removing the now-redundant `if/else`. + ## [0.4.11] - 2026-02-20 ### Added diff --git a/src/DivConformingFESpaces.jl b/src/DivConformingFESpaces.jl index 9e6b9ea..5975a0b 100644 --- a/src/DivConformingFESpaces.jl +++ b/src/DivConformingFESpaces.jl @@ -126,9 +126,7 @@ function _generate_sign_flips(model,cell_reffes) cells_around_facets, facet_gid) is_slave=false - if (length(facet_cells_around)==1) - is_slave == false - else + if length(facet_cells_around) > 1 mx=maximum(loc_to_glo[facet_cells_around]) is_slave = (loc_to_glo[cell] == mx) end