Mesh refinement

API

ExtendableGrids.RGB_refine — Method
RGB_refine(
    source_grid::ExtendableGrid{T, K},
    facemarkers::Vector{Bool};
    store_parents
) -> ExtendableGrid

generates a new ExtendableGrid by red-green-blue mesh refinement of triangular meshes, see e.g.

Carstensen, C. –An Adaptive Mesh-Refining Algorithm Allowing for an H^1 Stable L^2 Projection onto Courant Finite Element Spaces– Constr Approx 20, 549–564 (2004). https://doi.org/10.1007/s00365-003-0550-5

The bool array facemarkers determines which faces should be bisected. Note, that a closuring is performed such that the first face in every triangle with a marked face is also refined.

source
ExtendableGrids.barycentric_refine — Method
barycentric_refine(
    source_grid::ExtendableGrid{T, K};
    store_parents
) -> ExtendableGrid

generates a new ExtendableGrid by barycentric refinement of each cell in the source grid

barycentric refinement is available for these ElementGeometries

  • Quadrilateral2D (first split into Triangle2D)
  • Triangle2D
source
ExtendableGrids.bulk_mark — Method
bulk_mark(
    xgrid::ExtendableGrid{Tv, Ti},
    refinement_indicators::AbstractArray{T, 1};
    ...
) -> Vector{Bool}
bulk_mark(
    xgrid::ExtendableGrid{Tv, Ti},
    refinement_indicators::AbstractArray{T, 1},
    theta;
    indicator_AT
) -> Vector{Bool}

Bulk (Doerfler) marking of faces for adaptive refinement.

The refinementindicators are given on cells (`indicatorAT == ONCELLS) or on faces (indicatorAT == ONFACES). In the first case, they are averaged to the faces from their adjacent cells. Faces with the largest indicators are marked until the cumulative sum reachesthetatimes the total sum. Returns a Bool array which can be used asfacemarkersin [RGBrefine`](@ref).

source
ExtendableGrids.uniform_refine — Method
uniform_refine(
    source_grid::ExtendableGrid{T, K};
    store_parents
) -> ExtendableGrid

generates a new ExtendableGrid by uniform refinement of each cell in the given grid

uniform refinement rules are available for these AbstractElementGeometries:

  • Line1D (bisection into two subsegments)
  • Triangle2D (red refinement into four subtriangles)
  • Quadrilateral2D (into four subquadrilaterals)
  • Tetrahedron (into eight subtetrahedrons)
  • Hexahedron (into eight subhexahedrons)

if multiple geometries are in the mesh uniform refinement will only work if all refinement rules refine faces and edges (in 3D) equally (so no hanging nodes are created)

source