ufl team mailing list archive
-
ufl team
-
Mailing list archive
-
Message #01245
Upwinding function
To get upwinding in a DG formulation of the advection-diffusion eqn with
the FFC .form language, we used
vector = VectorElement("Lagrange", "triangle", 2)
scalar = FiniteElement("Discontinuous Lagrange", "triangle", 1)
constant = FiniteElement("Discontinuous Lagrange", "triangle", 0)
u = TrialFunction(scalar)
b = Function(vector)
of = Function(constant)
def upwind(u, b):
return [b[i]('+')*(of('+')*u('+') + of('-')*u('-')) for i in range(2)]
to return the product b*u, with u taken from the 'upwind' side. How
should the function 'upwind' look using UFL?
Garth
Follow ups