From 1902c7cbb9c0b59965eab73ad6404c548da72bcd Mon Sep 17 00:00:00 2001 From: Petr Krysl Date: Wed, 19 Jun 2024 14:50:12 -0700 Subject: [PATCH] propagate labels --- Project.toml | 2 +- README.md | 2 +- src/MeshHexahedronModule.jl | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Project.toml b/Project.toml index 5130aa4b..6f7217fb 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "FinEtools" uuid = "91bb5406-6c9a-523d-811d-0644c4229550" authors = ["Petr Krysl "] -version = "8.0.24" +version = "8.0.25" [deps] DataDrop = "aa547a04-dd37-49ab-8e73-656744f8a8fc" diff --git a/README.md b/README.md index bcfc5f96..f406ec32 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ The package supports application packages, for instance: ## News -- 06/17/2024: Propagate labels of extruded triangles. +- 06/19/2024: Propagate labels of extruded quadrilaterals and triangles. - 05/19/2024: Make it possible to have different kinds of degrees of freedom. - 04/19/2024: Replace asserts with errors. - 04/11/2024: Speed up box selection of elements. diff --git a/src/MeshHexahedronModule.jl b/src/MeshHexahedronModule.jl index 7e88b8f1..0b05563c 100644 --- a/src/MeshHexahedronModule.jl +++ b/src/MeshHexahedronModule.jl @@ -391,6 +391,7 @@ function _doextrude(fens, fes::FESetQ4, nLayers, extrusionh) nn1 = count(fens) nnt = nn1 * nLayers ngc = count(fes) * nLayers + labels = zeros(Int, ngc) conn = connasarray(fes) hconn = zeros(eltype(conn), ngc, 8) xyz = zeros(eltype(fens.xyz), nn1 * (nLayers + 1), 3) @@ -407,12 +408,13 @@ function _doextrude(fens, fes::FESetQ4, nLayers, extrusionh) gc = 1 for k = 1:nLayers for i in eachindex(fes) - hconn[gc, :] = - [broadcast(+, conn[i, :], (k - 1) * nn1) broadcast(+, conn[i, :], k * nn1)] + hconn[gc, :] = [broadcast(+, conn[i, :], (k - 1) * nn1) broadcast(+, conn[i, :], k * nn1)] + labels[gc] = fes.label[i] gc = gc + 1 end end efes = FESetH8(hconn) + setlabel!(efes, labels) efens = FENodeSet(xyz) return efens, efes end