FFC

Support use of coordinates in forms

Registered by Garth Wells

UFL permits the coordinate x to be used in forms. This should be supported by FFC.

Blueprint information

Status:
Complete
Approver:
None
Priority:
Medium
Drafter:
None
Direction:
Needs approval
Assignee:
Kristian B. Ølgaard
Definition:
Approved
Series goal:
None
Implementation:
Implemented
Milestone target:
None
Started by
Kristian B. Ølgaard
Completed by
Kristian B. Ølgaard

Related branches

Sprints

Whiteboard

I guess the coordinates should be the integration point coordinates? It should be relatively easy (for quadrature representation) to use an affine map from the reference cell to the physical cell.

It is now possible to do:

element = FiniteElement("Lagrange", triangle, 1)

v = TestFunction(element)
u = TrialFunction(element)
#f = Coefficient(element)
#g = Coefficient(element)

x = triangle.x[0]
d_x = triangle.x[0] - 0.5
d_y = triangle.x[1] - 0.5

f = 10.0*exp(-(d_x*d_x + d_y*d_y) / 0.02)
g = sin(5.0*x)

a = inner(grad(v), grad(u))*dx
L = v*f*dx + v*g*ds

in the Poisson demo.

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.