Message: Re: Getting NAN for values of Point in a magnetic field class Not Logged In (login)

## Re: Getting NAN for values of Point in a magnetic field class

Forum: Fields: Magnetic and Otherwise
Re: Getting NAN for values of Point in a magnetic field class (Aaron Liblong)
Re: Re: Getting NAN for values of Point in a magnetic field class (Gumplinger Peter)
Re: Re: Getting NAN for values of Point in a magnetic field class (Aaron Liblong)
Re: Re: Getting NAN for values of Point in a magnetic field class (Gumplinger Peter)
Re: Re: Getting NAN for values of Point in a magnetic field class (Aaron Liblong)
Date: 18 Jul, 2012
From: Gumplinger Peter <Gumplinger Peter>

 ```> The main problem is that when I set > the field to a constant value, after the first step it no longer remains > constant ``` This is entirely YOUR problem. It has nothing to do with Geant4. It is you who calculates the field at every location and you do that with some logic that is entirely yours. If your routines misbehave look at them and figure out where the problem is. ```> This also highlights an instance of the values initially stored in the > field matrix not matching what they were previously set to. ``` your problem entirely ```> Other than that, you mentioned that problems may be arising because I'm > using an unphysical field/particle setup. Just for the sake of the > simulation, shouldn't I be able to simulate a physically impossible > field (such as a magnetic monopole)? Or does the G4 particle tracking > rely on a field that more or less satisfies Maxwell's equations? ``` The numerical integral (in most cases, the Runge Kutta solver) needs to converge. It may not if the values for the field you return are too erratic at the location it requests. Nature is asymptotic with very few singularities or step functions. Peter

 to: "Re: Getting NAN for values of Point in a magnetic field class"
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 ]