For example :
from dolfin import * mesh = UnitSquareMesh(3,3) n = FacetNormal(mesh) cc = Facet(mesh,0)
Then how can I know the normal vector on "cc"? Thanks! And can I change the direction of the normal vector on a facet?
I know how to calculate the vector of a given facet, here we give '0':
from dolfin import * mesh = UnitSquareMesh(3,3) n = FacetNormal(mesh) cc = Facet(mesh,0) cc_normal_vec = [cc.normal().x(), cc.normal().y(),cc.normal().z()]
But I still don't know how to change the direction of it !
What about
cc_normal_vec = -[cc.normal().x(), cc.normal().y(),cc.normal().z()]
?
Perhaps it can't , because I want to change it but not get the opposite direction ,for I want to integrate on some interior facets with given direction by myself! Thank you all the same!
Facet has a member function Facet::normal:
Facet
Facet::normal
from dolfin import * mesh = UnitSquareMesh(3, 3) cc = Facet(mesh, 0) n = cc.normal() print n.str(True)
Thank you, I don't know it before your words !