New question #104259 on DOLFIN:
https://answers.launchpad.net/dolfin/+question/104259

I would like to use FacetNormal function for specifying a subdomain on the 
boundary.
Sample code looks like:

n = FacetNormal(mesh)
class Boundary_Inflow(SubDomain):
        def __init__(self, normal, velocity):
                self.n = normal
                self.v = velocity
                SubDomain.__init__(self)

        def inside(self, x, on_boundary):
                return on_boundary and dot3D(self.n(x), self.v(x)) < -DOLFIN_EPS

where dot3D is just a dot product of vectors in 3D.

Unfortunately, I get the following error: "Couldn't map 'n' to a float, 
returning object unchanged."

Is there any way to cast "n" to some object that could be mapped to float?

Any suggestions would be very valuable.

-- 
You received this question notification because you are a member of
DOLFIN Team, which is an answer contact for DOLFIN.

_______________________________________________
Mailing list: https://launchpad.net/~dolfin
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~dolfin
More help   : https://help.launchpad.net/ListHelp

Reply via email to