Message: Re: Magnetic field nan values Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Magnetic field nan values 

Forum: Fields: Magnetic and Otherwise
Re: None Magnetic field nan values (Balint Radics)
Re: Feedback Re: Magnetic field nan values (Gumplinger Peter)
Date: 01 Nov, 2015
From: Balint Radics <Balint Radics>

Hi Peter,

thanks a lot for the advice. It did not help. Nevertheless, I did rebuild my code on Geant4.10.1.p02, but
I got the same problem. So, then I realised that for my particular process I accidentally started it at a coordinate of exactly
x=0, which probably put the initial value for the numerical integration of the e.o.m. to this small value, so 
therefore I got this behaviour from time to time. 
So I simply randomized the initial value and voila it works now, even without the nasty isnan check.

Thanks,
Balint




> On 30 Oct 2015, at 23:33, Gumplinger Peter <gum@triumf.ca> wrote:
> 
> 
> *** Discussion title: Fields: Magnetic and Otherwise
> 
> Hi Balint,
> 
> Try:
> 
> (1) change Point[3] to Point[4] in
> 
> void Field::GetFieldValue( const G4double Point[4], G4double* Bfield )
> const
> 
> (2) add as first line
> 
> if(point[0] != point[0]) return;
> 
> in your Field::GetFieldValue method
> 
> (3) switch to a newer version of Geant4.
> 
> You can also switch on
> 
> /tracking/verbose 1
> 
> to see the coordinates of the actual tracking steps.
> 
> Peter
> 
> -------------------------------------------------------------
> Visit this GEANT4 at hypernews.slac.stanford.edu message (to reply or unsubscribe) at: 
> http://hypernews.slac.stanford.edu/HyperNews/geant4/get/emfields/232/1.html 

 Add Message Add Message
to: "Re: Magnetic field nan values"

 Subscribe Subscribe

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


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]