Thread Previous • Date Previous • Date Next • Thread Next |
On 08/07/10 11:49, Kristian Oelgaard wrote:
On 8 July 2010 08:22, Garth N. Wells<gnw20@xxxxxxxxx> wrote:On Jul 8 2010, Anders Logg wrote:On Wed, Jul 07, 2010 at 10:34:39PM +0100, Kristian Oelgaard wrote:On 7 July 2010 20:22, Garth N. Wells<gnw20@xxxxxxxxx> wrote:On 07/07/10 20:14, Anders Logg wrote:On Wed, Jul 07, 2010 at 06:26:20PM +0100, Kristian Oelgaard wrote:Supporting CellVolume makes it possible to do: CG = FiniteElement("Lagrange", triangle, 2) DG = FiniteElement("DG", triangle, 0) v = TestFunction(DG) f = Coefficient(CG) vol = triangle.vWould it be better to call it vol or volume instead of v? Or does it have to be a one-letter word?. . . or call it 'volume'.It can be whatever we want, I just followed what was already there. Should we then rename 'd', 'n' and 'x' to 'geometric_dimension', 'facet_normal', and 'spatial_coordinate' while we're at it?I think d, n, x are fine, but v does not necessarily look like a volume to me (it looks like a test function).I agree - d, n and x are all commonly used, but v for volume isn't.I changed 'v' to 'volume' and fixed a few bugs along the way. On a related note, should we implement CellDiagonal too? We use cell.diagonal() for MeshSize in SpecialFunctions.h of DOLFIN and since we often use MeshSize for the 'h' coefficient in DG forms e.g., PoissonDG we could remove the need for this function evaluation. The code to compute the CellDiagonal could just be copied from IntervalCell, TriangleCell and TetrahedronCell of DOLFIN and dumped in codesnippets.py.
What if we call it 'Circumradius'?I recall that the agreed not have have CellSize because of the ambiguity in its definition, but circumradius is unambiguous, so I vote to add it.
Garth
KristianGarth-- AndersKristianGarth
Thread Previous • Date Previous • Date Next • Thread Next |