[LORENE] Cmp/Tenseur: bug or feature?
Reinhard Prix
Reinhard.Prix at aei.mpg.de
Mon Nov 10 20:14:34 CET 2003
Hi,
I've just noticed a slightly odd 'feature' in using scalar Tenseurs,
and I'm not sure if it is intended, or how one is supposed to deal with this.
Given a scalar nphi, which has ETATZERO, but nphi.c[0] = 0x0
(as appears in hydro_euler in the Newtonian case).
When doing an assignment to another scalar, the Tensor uuu say,
by using Cmp's like this (where omega=0)
> uuu.set() = (omega - nphi() ) / nnn();
then uuu seems to be setup properly, namely one can do
> cout << uuu.set() << endl;
and gets
> *** Cmp IDENTICALLY ZERO
but if you do the same via tensor-assignment, namely
> uuu = (omega - nphi() ) / nnn();
then trying to access the Cmp of uuu
> cout << uuu.set() << endl;
yields
> tenseur.C:820: Cmp &Tenseur::set (): Assertion `etat == 2' failed
apparently because of uuu.c[0] = 0x0, propagated from nphi...
Now, I'm not sure if that's the way it's supposed to be, but it does
seem rather confusing to me...
I would think that either .set() should survive a .c[0]==0x0 if it
has ETATZERO, or the Cmp c[0] should be created also when doing a
tensor-assignment.
Furthermore, I'm not even sure if the fact that nphi has
ETATZERO but c[0] == 0x0 is not an anomalie to begin with...
Thanks for any hints ;)
Cheers,
Reinhard
--
-----------------------------------------------------
MPI fuer Gravitationsphysik |
Albert-Einstein Institut |
Am Muehlenberg | Tel: +49(0)331 567 7128
14476 Golm b. Potsdam | Fax: +49(0)331 567 7298
Germany |
-----------------------------------------------------
More information about the Lorene.list
mailing list