Skip to content

Commit

Permalink
Merge branch 'master' of github.com:gridap/Gridap.jl into refinement-…
Browse files Browse the repository at this point in the history
…rule-subface-glue

 Conflicts:
	src/Adaptivity/AdaptedDiscreteModels.jl
        src/Adaptivity/EdgeBasedRefinement.jl
  • Loading branch information
amartinhuertas committed Jul 11, 2023
2 parents 2fa1cf3 + 94419b8 commit 0e9e065
Show file tree
Hide file tree
Showing 12 changed files with 331 additions and 816 deletions.
7 changes: 7 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Jacobi polynomial bases. Since PR [#896](https://github.com/gridap/Gridap.jl/pull/896).

- Replaced newest vertex bisection mesh adaptation in
`src/Geometry/NewestVertexBisection.jl` with appropriate changes to
`src/Adaptivity/EdgeBasedRefinement.jl`. see PR
[#901](https://github.com/gridap/Gridap.jl/pull/901).

### Fixed

- ODE operators cache linear system at initial time or the time stored by the operator. Before, the linear system was cached at time `t = 0.0`, which cannot be done if the operator is not well-defined at `t = 0.0`. Since PR [#891](https://github.com/gridap/Gridap.jl/pull/891).
- Fixed the method `get_normal_vector` for `AdaptedTriangulation`. The method `get_facet_normal`
was using default, it's now using the spetialized implementation for the underlying triangulation type.
Since PR [#884](https://github.com/gridap/Gridap.jl/pull/884).

- Fixed `cell_dof_ids` for the case of vectorial `ConstantFESpace`. Since PR [#888](https://github.com/gridap/Gridap.jl/pull/888)

## [0.17.17] - 2023-02-24

### Added
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ DataStructures = "0.18.13"
DocStringExtensions = "0.8.1, 0.9"
FastGaussQuadrature = "0.4.2"
FileIO = "1.2.2, 1.3, 1.4"
FillArrays = "0.8.4, 0.9, 0.10, 0.11, 0.12, 0.13"
FillArrays = "0.8.4, 0.9, 0.10, 0.11, 0.12, 0.13, 1"
ForwardDiff = "0.10.10"
JLD2 = "0.1.11, 0.3, 0.4"
JSON = "0.21.0"
Expand Down
11 changes: 9 additions & 2 deletions src/Adaptivity/AdaptedDiscreteModels.jl
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,15 @@ function refine(model::UnstructuredDiscreteModel,::AdaptivityMethod,args...;kwar
@abstractmethod
end

function refine(model::UnstructuredDiscreteModel,args...;refinement_method=EdgeBasedRefinement(),kwargs...)
return refine(refinement_method,model,args...;kwargs...)
# Handle the user's requested choice for refinement
function string_to_refinement(refinement_method::String, model)
refinement_method == "red_green" && return RedGreenRefinement()
refinement_method == "nvb" && return NVBRefinement(model)
error("refinement_method $refinement_method not recognized")
end

function refine(model::UnstructuredDiscreteModel,args...;refinement_method="red_green",kwargs...)
return refine(string_to_refinement(refinement_method, model),model,args...;kwargs...)
end

# CartesianDiscreteModel refining
Expand Down
324 changes: 283 additions & 41 deletions src/Adaptivity/EdgeBasedRefinement.jl

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/FESpaces/ConstantFESpaces.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ cell_basis=SingleFieldFEBasis(
cell_dof_basis_array=lazy_map(get_dof_basis,cell_reffe)
cell_dof_basis=CellDof(cell_dof_basis_array,Triangulation(model),ReferenceDomain())

cell_dof_ids=Fill(Int32[1],num_cells(model))
cell_dof_ids=Fill(Int32(1):Int32(num_components(field_type)),num_cells(model))
A=typeof(cell_basis)
B=typeof(cell_dof_basis)
C=typeof(cell_dof_ids)
Expand Down
3 changes: 0 additions & 3 deletions src/Geometry/Geometry.jl
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ export compute_vertex_node
export get_node_face_owner
export compute_node_face_owner
export get_triangulation
export newest_vertex_bisection

export UnstructuredDiscreteModel
export CartesianDiscreteModel
Expand Down Expand Up @@ -222,8 +221,6 @@ include("GridPortions.jl")

include("DiscreteModelPortions.jl")

include("NewestVertexBisection.jl")

include("Triangulations.jl")

include("BoundaryTriangulations.jl")
Expand Down
Loading

0 comments on commit 0e9e065

Please sign in to comment.