Access the vertices associated to a facet

Asked by Thomas Betz on 2013-04-09

Hi,

i would like to implement (in Python) a loop over all facets of my mesh, in which I mark all those facets, whose associated vertices satisfy a certain condition.
Via facet.midpoint() I get the midpoint of a facet.
But what about the "endpoints", i.e., the vertices? How to access them?

Thank you very much for your help.

Thomas

Question information

Language:
English Edit question
Status:
Solved
For:
FEniCS Project Edit question
Assignee:
No assignee Edit question
Solved by:
Anders Logg
Solved:
2013-04-09
Last query:
2013-04-09
Last reply:
2013-04-09
Best Anders Logg (logg) said : #1

On Tue, Apr 09, 2013 at 12:06:08PM -0000, Thomas Betz wrote:
> New question #226265 on FEniCS Project:
> https://answers.launchpad.net/fenics/+question/226265
>
> Hi,
>
> i would like to implement (in Python) a loop over all facets of my mesh, in which I mark all those facets, whose associated vertices satisfy a certain condition.
> Via facet.midpoint() I get the midpoint of a facet.
> But what about the "endpoints", i.e., the vertices? How to access them?
>
> Thank you very much for your help.

v0 = Vertex(mesh, facet.entities(0)[0])
v1 = Vertex(mesh, facet.entities(0)[1])

--
Anders

Thomas Betz (tbetz) said : #2

Again, thanks a lot!!!