Skip to content

Commit

Permalink
Merge pull request #61 from gridap/bugfix-periodic-cartesian-meshes
Browse files Browse the repository at this point in the history
Periodic meshes
  • Loading branch information
JordiManyer authored Feb 28, 2024
2 parents dab8a42 + 316039d commit 67e02e8
Show file tree
Hide file tree
Showing 5 changed files with 673 additions and 352 deletions.
30 changes: 13 additions & 17 deletions src/OctreeDistributedDiscreteModels.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1222,7 +1222,6 @@ function Gridap.Adaptivity.refine(model::OctreeDistributedDiscreteModel{Dc,Dp};
false,
model)


return ref_model, dglue
else
new_parts = isa(parts,Nothing) ? model.parts : parts
Expand Down Expand Up @@ -2014,7 +2013,7 @@ const p8est_face_corners = [ 0 2 4 6 ;
2 3 6 7 ;
0 1 2 3 ;
4 5 6 7 ]

const p8est_subface_to_hanging_edges_within_subface =
[
1 3;
Expand Down Expand Up @@ -2163,22 +2162,19 @@ function setup_non_conforming_distributed_discrete_model(::Type{Val{Dc}},
non_conforming_glue=
generate_cell_faces_and_non_conforming_glue(Val{Dc},ptr_pXest_lnodes, cell_prange)


nlvertices = map(non_conforming_glue) do ncglue
ncglue.num_regular_faces[1]+ncglue.num_hanging_faces[1]
cell_corner_lids = map(gridap_cell_faces[1]) do cell_lids
Gridap.Arrays.Table(cell_lids.data,cell_lids.ptrs) # JaggedArray -> Table
end

node_coordinates=generate_node_coordinates(Val{Dc},
gridap_cell_faces[1],
nlvertices,
ptr_pXest_connectivity,
ptr_pXest,
ptr_pXest_ghost)

grid,topology=generate_grid_and_topology(Val{Dc},
gridap_cell_faces[1],
nlvertices,
node_coordinates)
cell_vertex_coordinates = generate_cell_vertex_coordinates(
Val{Dc},
cell_corner_lids,
ptr_pXest_connectivity,
ptr_pXest,
ptr_pXest_ghost
)
grid, topology = generate_grid_and_topology(
Val{Dc},cell_corner_lids,cell_vertex_coordinates
)

map(topology,gridap_cell_faces[Dc]) do topology,cell_faces
cell_faces_gridap = Gridap.Arrays.Table(cell_faces.data,cell_faces.ptrs)
Expand Down
Loading

0 comments on commit 67e02e8

Please sign in to comment.