Hi,
I had to use a 15-Node element with point values and I specified it as follows and it worked.
V = FunctionSpace(mesh, 'Lagrange', 4)
However, I got the below warning :
Question: How to specify such an element in the future?
Thanks, Vas
The warning probably comes from a line like this
f = Expression("x[0]*x[1]")
Do rather
f = Expression("x[0]*x[1]", degree=2)
or
e = FiniteElement("Lagrange", mesh.ufl_cell(), 2) f = Expression("x[0]*x[1]", element=e)
or similar.
Hi Jan, I explored both suggestions, both worked and thanks. The first suggestion being shorter was used to explore the issue more deeper. These are my observations: Say my pde was as follows: Laplace = f(x) with u(x) = u0(x) In my problem, u0(x) =0. I explored three Lagrange elements, V = FunctionSpace(mesh, 'Lagrange', 1); linear V = FunctionSpace(mesh, 'Lagrange', 2);quadratic V = FunctionSpace(mesh, 'Lagrange', 4);quartic In all cases, I had, u0 = Expression('0',degree=2) as suggested. In each situation, I did not get the below warning, the reason for my original question. When I first raised the question, I thought I had to specify something extra for higher order elements. It does not appear to be so now. The common, "degree=2 " can only specify the order of the pde. Although it worked, I am not sure why it worked? Any clarification is appreciated. *** Warning: Automatic determination of degree for Expressions has been deprecated in FEniCS version 2016.1. *** It will (likely) be removed in the next FEniCS release. *** Specify the polynomial degree for interpolation of Expression, or provide a FiniteElement
degree=2 is not the order of PDE. It is a shortcut for Lagrange degree 2 element, i.e.
degree=2
is equivalent to
Thanks, Jan. Your clarification is greatly appreciated. Regards vas.