Ignore:
Timestamp:
Dec 16, 2009, 12:14:47 PM (15 years ago)
Author:
garnier
Message:

CVS update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/documents/UserDoc/DocBookUsersGuides/ForApplicationDeveloper/xml/Detector/electroMagneticField.xml

    r904 r1222  
    1313<!--    Corrections, changes by: John APOSTOLAKIS, 7-Jul-2005 -->
    1414<!--    Converted to DocBook: Katsuya Amako, Aug-2006         -->
     15<!--    Corrections, changes by: John APOSTOLAKIS,15-Dec-2009 -->
    1516<!--                                                          -->
    1617<!-- ******************************************************** -->
     
    441442
    442443<para>
     444A new stepper for propagation in magnetic field is available in
     445release 9.3.  Choosing the G4NystromRK4 stepper provides accuracy
     446near that of G4ClassicalRK4 (4th order) with a significantly reduced
     447cost in field evaluation.   Using a novel analytical expression for
     448estimating the error of a proposed step and the Nystrom reuse of the
     449mid-point field value, it requires only 2 additional field
     450evaluations per attempted step, in place of 10 field evaluations of
     451ClassicalRK4 (which uses the general midpoint method for estimating
     452the step error.)
     453
     454<informalexample>
     455<programlisting>
     456   G4Mag_UsualEqRhs*
     457      pMagFldEquation = new G4Mag_UsualEqRhs(fMagneticField);
     458   fStepper = new G4NystromRK4( pMagFldEquation );
     459</programlisting>
     460</informalexample>
     461</para>
     462
     463<para>
     464It is proposed as an alternative stepper in the case of a pure
     465magnetic field.  It is not applicable for the simulation of electric
     466or full electromagnetic or other types of field.  For a pure
     467magnetic field, results should be fully compatible with the results
     468of ClassicalRK4 in nearly all cases.  ( The only potential exceptions
     469are large steps for tracks with small momenta - which cannot be
     470integrated well by any RK method except the Helical extended methods.)
     471</para>
     472
     473<para>
    443474You can choose an alternative stepper either when the field
    444475manager is constructed or later. At the construction of the
     
    546577the position of the track after a number of boundary crossings is
    547578directly proportional to the number of boundaries.
     579</para>
     580
     581</sect3>
     582
     583
     584<!-- ******************* Section (Level#3) ****************** -->
     585<sect3 id="sect.EMField.Pract.RedNumCall">
     586<title>
     587Reducing the number of field calls to speed-up simulation
     588</title>
     589
     590<para>
     591An additional method to reduce the number of field evaluations is
     592to utilise the new class G4CachedMagneticField class.  It is
     593applicable only for pure magnetic fields which do not vary with time.
     594
     595
     596<informalexample>
     597<programlisting>
     598  G4MagneticField * pMagField;  // Your field - Defined elsewhere
     599
     600  G4double                 distanceConst = 2.5 * millimeter;
     601  G4MagneticField * pCachedMagField= new G4CachedMagneticField(  pMagField,  distanceConst);
     602</programlisting>
     603</informalexample>
    548604</para>
    549605
Note: See TracChangeset for help on using the changeset viewer.