← Back to team overview

dolfin team mailing list archive

Re: [Branch ~dolfin-core/dolfin/main] Rev 5701: Bug fix in Face::area() + some cleanups

 

On Sat, Feb 26, 2011 at 09:09:44AM +0000, Garth N. Wells wrote:
>
>
> On 26/02/11 09:06, Anders Logg wrote:
> > On Sat, Feb 26, 2011 at 08:20:18AM +0000, Garth N. Wells wrote:
> >> Why call the mesh topology dim function in Face when for a face the mesh
> >> dim must be 3?
> >
> > It could also be that the Face is itself the cell (triangle) of a 2D
> > mesh,
>
> I don't understand this - Face comes from a cell, so how can a Face be a
> triangle in a 2D mesh. What would it's cell have been?

Face means that the topological dimension is 2 so it just means it's a
triangle, either in regular 2D mesh or a facet embedded in 3D.

For a 2D mesh, the triangles are both Faces and Cells.

But what would happen in those functions in 2D is that we would
compute the connectivity between Faces and Cells which means the
connectivity between Cells and Cells (2 --> 2), so we would compute
the neighboring cells, and then ask those cells (which are triangles)
to compute the area of their i:th facets (which would be edges), where
i is the index of the Face (triangle) relative to that neighbor.

So in summary, we would do something completely crazy. When I think
of it, why are some of those functions even there? I understand we can
have area(), but normal() shouldn't be there (it should be in Facet).
We could also replace area() by something neutral (like measure) and
put that into Facet and it would evaluate to either the area of a face
or the length of an edge.

--
Anders


> Garth
>
> > but then some (or maybe all) of those functions called may break
> > down so some dimension checking + throwing an error is probably a
> > better alternative.
> >
> >> Garth
> >>
> >> On 26/02/11 00:58, noreply@xxxxxxxxxxxxx wrote:
> >>> ------------------------------------------------------------
> >>> revno: 5701
> >>> committer: Anders Logg <logg@xxxxxxxxx>
> >>> branch nick: dolfin
> >>> timestamp: Sat 2011-02-26 01:36:14 +0100
> >>> message:
> >>>   Bug fix in Face::area() + some cleanups
> >>> modified:
> >>>   dolfin/mesh/Face.cpp
> >>>
> >>>
> >>
> >> _______________________________________________
> >> Mailing list: https://launchpad.net/~dolfin
> >> Post to     : dolfin@xxxxxxxxxxxxxxxxxxx
> >> Unsubscribe : https://launchpad.net/~dolfin
> >> More help   : https://help.launchpad.net/ListHelp



References