← Back to team overview

dolfin team mailing list archive

Integration over facets

 

Hi

I was wondering if someone could assist me with the following problem.  I
have a variational problem defined on some 3D mesh (let us say a unit cube
for arguments sake) using Nedelec elements.  The functional I have consists
of 3 parts - one where integration takes place over the volume of the mesh
and a second and third part that are constructed by integrating tangential
components over two of the sides of the cube.  In pydolfin terms:

===================
mesh = UnitCube(32, 32)
V = FunctionSpace(mesh, "Nedelec", 1)

# Define variational problem
v = TestFunction(V)
u = TrialFunction(V)

# define the parts of the functional
volume = (dot(curl(v), curl(u)) - dot(v, u))*dx

surface_1 = (dot(*tangential*(v), *tangential*(u)) + dot(v, E))*dS_1

surface_2 = (dot(*tangential*(v), *tangential*(u)))*dS_2
===================

volume, surface_1, and surface_2 can then be assembled to obtain a matrix
equation.  E is a known source term and *tangential*() represents the
component of the test or trial function tangential to the surface over which
is being integrated.

I have a couple of questions:
Firstly, what would be a good way to implement the tangential operator - ie
is is good enough to simply define a vector function normal to the surface
and use the cross operator?

and

Secondly, how would I go about specifying the integration over the two
different faces of the cube (ie dS_1 and dS_2)?

Any assistance would be much appreciated.
Evan