Message: Re: material property table gets wrong number Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Note Re: material property table gets wrong number 

Forum: Processes Involving Optical Photons
Re: Question material property table gets wrong number (Yen-Yung Chang)
Date: 23 Feb, 2017
From: Yen-Yung Chang <Yen-Yung Chang>

A short update. I've temporarily fixed the problem. Turned out from time to time it did get no pointer to the material table...But what's still mysterious is that the reflectivity was initialized being 1.0 in the constructor. How could it be reset to 0 if there's no pointer? This was why I didn't check weather there's a pointer to material table found; I thought if there's no such a pointer, the reflectivity should have remain 1.0, which was what it started with...

Anyway, now my code runs well with the "else"

                 PropertyPointer = aMaterialPropertiesTable->GetProperty("REFLECTIVITY");
                    if (PropertyPointer) theReflectivity = PropertyPointer->Value(thePhotonMomentum);
                    else theReflectivity = 1.0;;

 Add Message Add Message
to: "Re: material property table gets wrong number"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews