Skip to content

Periodic background mesh #88

Description

@zjwegert

Hi,
Is there support for periodic background meshes? The MWE below does not work.

using Gridap
using GridapEmbedded,GridapEmbedded.LevelSetCutters
import Gridap.Geometry: get_node_coordinates,collect1d

model = CartesianDiscreteModel((0,1,0,1),(100,100),isperiodic=(true,true));
V_φ = TestFESpace(model,ReferenceFE(lagrangian,Float64,1))

φh = interpolate(x->-cos(4π*x[1])*cos(4*pi*x[2])/4-0.2/4,V_φ)
point_to_coords = model.grid_topology.vertex_coordinates
geo = DiscreteGeometry(get_free_dof_values(φh),point_to_coords,name="")
cutgeo = cut(model,geo)

Ω = Triangulation(cutgeo,PHYSICAL)

writevtk(Ω,"discrete_geo_periodic",cellfields=["φh"=>φh])

Based on some testing I've conducted, it seems that analytic geometries do respect periodicity of the background mesh though.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions