ufl team mailing list archive
-
ufl team
-
Mailing list archive
-
Message #01674
Re: coordinate
On 18 July 2010 20:14, Anders Logg <logg@xxxxxxxxx> wrote:
> On Sun, Jul 18, 2010 at 08:01:28PM +0100, Garth N. Wells wrote:
>>
>>
>> On 18/07/10 19:57, Anders Logg wrote:
>> >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?
>> >
>>
>> 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.
>
> Good point, but we should make sure that x = SpatialCoordinate()
> works.
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 : ufl@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~ufl
> More help : https://help.launchpad.net/ListHelp
>
>
Follow ups
References