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

numbering of cells(facet) and the operators '+', '-'

+2 votes

Hello,

I need help for the following. Let say that we would like to compute an integral
on an interior facet F by using a bilinear form which involves the UFL operators '+' and '-'.
Does the '+' correspond to the cell1_index and the '-' to the cell2_index given by
the following code?

 for facet in facets(mesh):
     KF_cells = set();
     if interior_facets[facet] == 1: 
          for cell in cells(facet):
               KF_cells.update(facet.entities(2))
               cell1_index = list(KF_cells)[0]
               cell1 = Cell(mesh, cell1_index)
               cell2_index = list(KF_cells)[1]
               cell2 = Cell(mesh, cell2_index)

thank you in advance,
Fotini

asked Jun 5, 2014 by fotini.karakatsani FEniCS Novice (500 points)

1 Answer

0 votes

There are no guarantees other than that the + and - sides will be opposite sides of the facet.

answered Jun 12, 2014 by Garth N. Wells FEniCS Expert (35,930 points)
...