← Back to team overview

dolfin team mailing list archive

Re: [Branch ~dolfin-core/dolfin/main] Rev 5202: Added area to Face.

 

On Thursday September 16 2010 21:19:24 Harish Narayanan wrote:
> On 9/17/10 3:25 AM, Johan Hake wrote:
> >>>>>> Why not add a volume method while at it? Maybe we should let these
> >>>>>> be free functions as it does not always make sense to get an area
> >>>>>> or volume of a mesh?
> >>>>> 
> >>>>> I don't know what the dimension-independent terms are but most people
> >>>>> would probably accept "area" as meaning the length of the boundary of
> >>>>> a 2D domain.
> >>>> 
> >>>> If I had a 2D mesh and it had a method area, I would definetly think
> >>>> that it would return the area of that mesh. But that might be just
> >>>> me...
> >>> 
> >>> Anders is talking about the area of Face/Facet of a 2D mesh which is
> >>> where this discussion originated from.
> >>> 
> >>> Kristian
> >> 
> >> I agree it might be confusing. Perhaps measure() and
> >> boundary_measure() would work?
> 
> The above, for me, would really be a lot less ambiguous.
> 
> > What whith:
> >   measure(std::string type)
> > 
> > which then takes a "volume", "area", or "length" argument together with
> > an optional MeshFunction and subdomain?
> 
> This would likely just reintroduce the problem. The original concern
> here seems to have stemmed from the contextual meaning of word "area."

The point with passing a string of what you want is that you then can check 
what topology the mesh has and return exactly what the user ask for. 

The method is not dimension independent though.

  mesh.measure("area")

would mean two different things for a 2D and 3D mesh, where the first one 
gives that area of the cells, and the second one the area of the facets.

Johan



References