diff --git a/src/Applications/expansion.jl b/src/Applications/expansion.jl index 3b30af4..27a083b 100644 --- a/src/Applications/expansion.jl +++ b/src/Applications/expansion.jl @@ -321,6 +321,27 @@ function expansion_mesh(::Val{:p4est_SG},mesh::Dict,ranks,params) return model end +function expansion_mesh(::Val{:p4est_SG_barycentric},mesh::Dict,ranks,params) + @assert haskey(mesh,:num_refs) + num_refs = mesh[:num_refs] + if haskey(mesh,:base_mesh) + msh_file = mesh[:base_mesh] + if !ispath(msh_file) + msh_file = joinpath(meshes_dir,"Expansion_"*msh_file*".msh") |> normpath + end + base_model = UnstructuredDiscreteModel(GmshDiscreteModel(msh_file)) + else + base_model = expansion_generate_base_mesh() + end + setup_expansion_mesh_tags!(base_model) + model = Meshers.generate_p4est_refined_mesh(ranks,base_model,num_refs) + model = simplexify(model) + model = Gridap.Adaptivity.refine(model, refinement_method = "barycentric") + model = Gridap.Adaptivity.get_model(model) + params[:model] = model + return model +end + function expansion_mesh(::Val{:p4est_MG},mesh::Dict,ranks,params) @assert haskey(mesh,:num_refs_coarse) && haskey(mesh,:ranks_per_level) num_refs_coarse = mesh[:num_refs_coarse] diff --git a/src/parameters.jl b/src/parameters.jl index 9ff6637..9de7540 100644 --- a/src/parameters.jl +++ b/src/parameters.jl @@ -375,6 +375,11 @@ const FLUID_DISCRETIZATIONS = (; :p_conformity => :H1, :p_order => (k) -> k-1, ), + :Pk_dPkm1 => (; # Scott-Vogelius + :p_space => :P, + :p_conformity => :L2, + :p_order => (k) -> k-1, + ), :SV => (; # Scott-Vogelius (Pk_dPkm1) with macro-elements :p_space => :P, :p_conformity => :L2,