Subject: [Ufl] coordinate

From: "Garth N. Wells" <[email-masked]>
Date: Fri, 16 Jul 2010 19:48:05 +0100

I'm not keen on 'x' for the spatial coordinate when it's imported into 
DOLFIN (just asking for bugs). I would prefer something like

     x = SpatialCoordinate()

Garth

---

From: Anders Logg <[email-masked]>
Date: Sun, 18 Jul 2010 20:57:23 +0200

On Fri, Jul 16, 2010 at 07:48:05PM +0100, Garth N. Wells wrote:
> I'm not keen on 'x' for the spatial coordinate when it's imported
> into DOLFIN (just asking for bugs). I would prefer something like
>
>     x = SpatialCoordinate()

Yes, perhaps. But isn't this just as good or bad as the default
indices i, j, k etc which are automatically imported?

--
Anders

---

From: "Garth N. Wells" <[email-masked]>
Date: Sun, 18 Jul 2010 20:01:28 +0100

> indices i, j, k etc which are automatically imported?

I would say that's it a little bit worse. x is not commonly used in 
forms as a coordinate, but it commonly used for other things (vectors, 
mesh coordinates). Since x is uncommon in forms, I removed it.

Garth

---

From: Anders Logg <[email-masked]>
Date: Sun, 18 Jul 2010 21:14:13 +0200

On Sun, Jul 18, 2010 at 08:01:28PM +0100, Garth N. Wells wrote:
> forms as a coordinate, but it commonly used for other things
> (vectors, mesh coordinates). Since x is uncommon in forms, I removed
> it.

Good point, but we should make sure that x = SpatialCoordinate()
works.

--
Anders

---

From: Kristian Oelgaard <[email-masked]>
Date: Sun, 18 Jul 2010 20:30:27 +0100

> Good point, but we should make sure that x = SpatialCoordinate()

It will, actually the methods:

cell.n
cell.x
cell.volume
cell.circumradius

are attached as:
self.x = SpatialCoordinate(self)
etc.
insided Cell.

So in a form you can do:

volume = CellVolume(triangle)
or
volume = triangle.volume

Kristian

> Anders
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
>
> iEYEARECAAYFAkxDUoQACgkQTuwUCDsYZdFclACbBum135G8baG3ijxBZroztfLW
> LTMAniIR9hFjVaGYBgHvMLNKBE90fDPM
> =LL3W
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> Mailing list: https://launchpad.net/~ufl
> Post to     : [email-masked]
> Unsubscribe : https://launchpad.net/~ufl
> More help   : https://help.launchpad.net/ListHelp
>
>

---

From: Anders Logg <[email-masked]>
Date: Sun, 18 Jul 2010 21:32:42 +0200

> volume = CellVolume(triangle)

ok, great. Nothing to do then (except maybe adding cell.diameter and
set it to be the longest edge).

--
Anders