Message: Local Electric Field Segmentation Fault Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Local Electric Field Segmentation Fault 

Keywords: local electric field
Forum: Fields: Magnetic and Otherwise
Date: 12 Jan, 2006
From: <>

Hello, I have been trying to set up a local electric field inside an enclosed volume.

I followed the example for creating a local magnetic field from the geant4 application developer's manual.

It compiles fine but the simulation exhibits strange behaviour.

The gun can shoot particles parallel to the field with no problems but when I try and shoot a beam in any other direction the simulation crashes with a segmantation fault.

Changing the strength of the field changes the behaviour of the program. If it's 250volts/cm it runs fine (although I don't see it affecting the system at all). If the strength is 250 kilovolts/cm the program segfaults again. If the strength is 100250 kilovolts/cm the program just hangs.

Can anyone suggest a solution to this problem?

Below is how I'm creating the local EField


Jason McGeachie

// Electric Field for the mother volume

  G4ElectricField*	 	motherEField;
  G4FieldManager* 		motherFieldManager;
  G4EqMagElectricField* 	EFieldEq;
  G4MagIntegratorStepper* 	fStepper;
  G4ChordFinder*          	fChordFinder = 0;
  G4MagInt_Driver*		fIntgrDriver;

  motherEField = new G4UniformElectricField(G4ThreeVector(0.,0.,0.));

  EFieldEq = new G4EqMagElectricField(motherEField);

  //motherFieldManager = G4TransportationManager::GetTransportationManager()->GetFieldManager();

  motherFieldManager = new G4FieldManager();

  fStepper = new G4ClassicalRK4(EFieldEq,8);


  if(fChordFinder) delete fChordFinder;

  fIntgrDriver = new G4MagInt_Driver(0.010*mm, 	// minimum step of 0.01mm
                                     fStepper->GetNumberOfVariables() );

  fChordFinder = new G4ChordFinder(fIntgrDriver);


  				    true);	// do daughter volumes inherit this field?

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

 Add Message Add Message
to: "Local Electric Field Segmentation Fault"

 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 ]