Skip to content

Commit

Permalink
Merge pull request #1055 from gridap/adaptivity
Browse files Browse the repository at this point in the history
Fixed orientation of barycentric refinement
  • Loading branch information
JordiManyer authored Nov 25, 2024
2 parents fd2a682 + 4de86c4 commit 09e08ad
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +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 #974, an error when weak form is real but unknown vector is complex. Since PR[#1050](https://github.com/gridap/Gridap.jl/pull/1050).
- Fixed issue where barycentric refinement rule in 3D would not produce oriented meshes. Since PR[#1055](https://github.com/gridap/Gridap.jl/pull/1055).

## [0.18.7] - 2024-10-8

Expand Down
18 changes: 9 additions & 9 deletions src/Adaptivity/EdgeBasedRefinement.jl
Original file line number Diff line number Diff line change
Expand Up @@ -911,10 +911,10 @@ function _get_barycentric_refined_connectivity(p::Polytope)
elseif p == TET
polys = [TET]
cell_type = [1, 1, 1, 1]
conn_data = [1, 2, 3, 5,
2, 3, 4, 5,
3, 1, 4, 5,
1, 2, 4, 5]
conn_data = [5, 1, 2, 3,
5, 1, 2, 4,
5, 1, 3, 4,
5, 2, 3, 4]
conn_ptrs = [1, 5, 9, 13, 17]
return polys, cell_type, Table(conn_data,conn_ptrs)
elseif p == QUAD
Expand All @@ -929,12 +929,12 @@ function _get_barycentric_refined_connectivity(p::Polytope)
elseif p == HEX # For HEX, we also create a new vertex in the center of each face
# Connectivity for each face: Face corners + face node + barycenter
face_conn = [
1,2,5,6,
2,4,5,6,
4,3,5,6,
3,1,5,6,
6, 1, 2, 5,
6, 2, 4, 5,
6, 3, 4, 5,
6, 1, 3, 5,
]
n_TET = 4 # Number of new TETs per polytope face
n_TET = 4 # Number of new TETs per polytope face (i.e per QUAD)
n_FACE = 6 # Number of faces in a HEX
n_NODE = 8 # Number of nodes in a HEX
polys = [TET]
Expand Down

0 comments on commit 09e08ad

Please sign in to comment.