Skip to content

Curvature tensor and projections #1206

@macmyn

Description

@macmyn

Hi, I'm trying to calculate a curvature tensor on a 3d surface mesh. My dynamic equations involve $C_ij$ and the trace of the curvature tensor $C^k_k$.

Gridap seems happy for me to do the following :

model = GmshDiscreteModel("icosphere.msh")

Γ = Triangulation(model)

order = 2
Vn = FESpace(
    Γ,
    ReferenceFE(lagrangian, VectorValue{3,Float64}, order),
    conformity=:H1
)

Vcij = FESpace(
    Γ,
    ReferenceFE(lagrangian, TensorValue{3,3,Float64}, order),
    conformity=:L2
)

Vckk = FESpace(
    Γ,
    ReferenceFE(lagrangian, Float64, order),
    conformity=:L2
)

n_Γ = get_normal_vector(Γ)

I3 = one(TensorValue{3,3,Float64})
P = I3 - n_Γ ⊗ n_Γ

Cij = - (P ⊙ ∇(n_Γ)) ⊙ P
Ckk = tr(Cij)

Cij_interp = interpolate(Cij, Vcij)
Ckk_interp = interpolate(Ckk, Vckk)

normals = interpolate(n_Γ, Vn)

When I save, I get the expected normals, but the other quantities are all zero. Is this not allowed? Is there some other way I could define these? The Gridap machinery seems well-suited to this sort of thing, but perhaps I'm missing something.

Many thanks!

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