This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Normal vector of triangles in 3D

0 votes

Hi all,
I am trying to solve a surface diffusion and here I have to deal with normal vectors at exterior boundaries. In 'StiffnessMatrix.ufl' (see below for its contents), I called 'n = FacetNormal(domain)' but it did not work correctly. Do you have any idea about that? I am using FEniCS 1.3.0. Thanks in advance,
Best regards,
Dang

domain = Cell("triangle", geometric_dimension=3)
element = FiniteElement("CG", domain, 1)
u = TrialFunction(element)
v = TestFunction(element)
D = Coefficient(element)
g = Coefficient(element)
n = FacetNormal(domain)
a = (inner(Dgrad(u),grad(g))+inner(grad(u),Dgrad(g)))vdx - inner(Dgrad(g),n)uvds

closed with the note: The normal vectors look correct.
asked Jun 21, 2015 by dang.1032170 FEniCS Novice (180 points)
closed Jun 28, 2015 by dang.1032170
...