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

How can I find the Sup of the Left hand side of the Bilnear form

+2 votes


Hi,
I need to calculate the supremum of the left hand side with respect to test and trial function of my bilinear form after solving for the u as a post process to do some error estimation. so after finding the u, a will be a matrix in ufl
sup_{u} sup_{v} a(u,v)/{||u|| ||v||}
|| . || is the L_2 norm in the domain.

I also need to calculate the
inf_{u} a(w,w)/{||u||^2 }

$$ a(u,v)=f(v) $$
$$\underset{u \in \Omega}{\sup} \;\underset{v \in \Omega}{\sup} \; \frac{a(u,v)}{|| u ||_\Omega || v ||_\Omega} $$

$$ \underset{u \in \Omega}{\inf} \; \frac{a(u,u)}{|| u ||^2_\Omega } $$

I dont know exactly how i can find sup of the a with respect to my test and trial function which is the ufl form.
for example I am using this code.

from __future__ import division
from dolfin import *
import pickle
import numpy, scipy.io
import csv


mesh=UnitSquareMesh(8, 8)
V = VectorFunctionSpace(mesh, "Lagrange", 1)
class Bottom(SubDomain):
          def inside(self, x, on_boundary):
              return (near(x[1], 0.0) )

class Top(SubDomain):
           def inside(self, x, on_boundary):
               return (near(x[1], 1.0) )
top = Top()
bottom = Bottom()
                # Initialize mesh function for boundary domains
boundaries = FacetFunction("uint", mesh)
boundaries.set_all(0)
top.mark(boundaries, 2)
bottom.mark(boundaries, 4)
bc = DirichletBC(V, (0.0, 0.0), boundaries,4)
                # Define new measures associated with the interior domains and exterior boundaries
ds = Measure("ds")[boundaries]
                # Define trial and test functions

u=TrialFunction(V)
v=TestFunction(V)
f = Expression(("0.0", "scale"),  scale = 100 )

E=10.0
nu=0.3
mu=E/(2.0*(1.0+nu))
lmbda=E*nu/((1.0+nu)*(1.0-2.0*nu))
def sigma(v):
    return 2.0*mu*sym(grad(v))+lmbda*tr(sym(grad(v)))*Identity(v.cell().d)
a=inner(sigma(u), sym(grad(v)))*dx
L=inner(f, v)*ds(2)
u = Function(V)
solve(a == L, u, bc)

Thanks.

asked Feb 6, 2014 by Bahram FEniCS Novice (400 points)
edited Feb 9, 2014 by Bahram
...