<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd">
<article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article">
 <front>
  <journal-meta>
   <journal-id journal-id-type="publisher-id">
    jsea
   </journal-id>
   <journal-title-group>
    <journal-title>
     Journal of Software Engineering and Applications
    </journal-title>
   </journal-title-group>
   <issn pub-type="epub">
    1945-3116
   </issn>
   <issn publication-format="print">
    1945-3124
   </issn>
   <publisher>
    <publisher-name>
     Scientific Research Publishing
    </publisher-name>
   </publisher>
  </journal-meta>
  <article-meta>
   <article-id pub-id-type="doi">
    10.4236/jsea.2024.179039
   </article-id>
   <article-id pub-id-type="publisher-id">
    jsea-136109
   </article-id>
   <article-categories>
    <subj-group subj-group-type="heading">
     <subject>
      Articles
     </subject>
    </subj-group>
    <subj-group subj-group-type="Discipline-v2">
     <subject>
      Computer Science 
     </subject>
     <subject>
       Communications
     </subject>
    </subj-group>
   </article-categories>
   <title-group>
    Implementation of the Integrated Green’s Function Method for 3D Poisson’s Equation in a Large Aspect Ratio Computational Domain
   </title-group>
   <contrib-group>
    <contrib contrib-type="author" xlink:type="simple">
     <name name-style="western">
      <surname>
       Ji
      </surname>
      <given-names>
       Qiang
      </given-names>
     </name>
    </contrib>
    <contrib contrib-type="author" xlink:type="simple">
     <name name-style="western">
      <surname>
       Chad
      </surname>
      <given-names>
       Mitchell
      </given-names>
     </name>
    </contrib>
    <contrib contrib-type="author" xlink:type="simple">
     <name name-style="western">
      <surname>
       Remi
      </surname>
      <given-names>
       Lehe
      </given-names>
     </name>
    </contrib>
    <contrib contrib-type="author" xlink:type="simple">
     <name name-style="western">
      <surname>
       Arianna
      </surname>
      <given-names>
       Formenti
      </given-names>
     </name>
    </contrib>
   </contrib-group> 
   <aff id="affnull">
    <addr-line>
     aLawrence Berkeley National Laboratory, Berkeley, CA, USA
    </addr-line> 
   </aff> 
   <pub-date pub-type="epub">
    <day>
     12
    </day> 
    <month>
     09
    </month>
    <year>
     2024
    </year>
   </pub-date> 
   <volume>
    17
   </volume> 
   <issue>
    09
   </issue>
   <fpage>
    740
   </fpage>
   <lpage>
    749
   </lpage>
   <history>
    <date date-type="received">
     <day>
      22,
     </day>
     <month>
      August
     </month>
     <year>
      2024
     </year>
    </date>
    <date date-type="published">
     <day>
      17,
     </day>
     <month>
      August
     </month>
     <year>
      2024
     </year> 
    </date> 
    <date date-type="accepted">
     <day>
      17,
     </day>
     <month>
      September
     </month>
     <year>
      2024
     </year> 
    </date>
   </history>
   <permissions>
    <copyright-statement>
     © Copyright 2014 by authors and Scientific Research Publishing Inc. 
    </copyright-statement>
    <copyright-year>
     2014
    </copyright-year>
    <license>
     <license-p>
      This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/
     </license-p>
    </license>
   </permissions>
   <abstract>
    The solution of Poisson’s Equation plays an important role in many areas, including modeling high-intensity and high-brightness beams in particle accelerators. For the computational domain with a large aspect ratio, the integrated Green’s function method has been adopted to solve the 3D Poisson equation subject to open boundary conditions. In this paper, we report on the efficient implementation of this method, which can save more than a factor of 50 computing time compared with the direct brute force implementation and its improvement under certain extreme conditions.
   </abstract>
   <kwd-group> 
    <kwd>
     Green’s Function
    </kwd> 
    <kwd>
      Poisson Equation
    </kwd> 
    <kwd>
      Particle Accelerator
    </kwd>
   </kwd-group>
  </article-meta>
 </front>
 <body>
  <sec id="s1">
   <title>1. Introduction</title>
   <p>The solution of the three-dimensional (3D) Poisson equation plays an important role in many fields. In particle accelerator research, the nonlinear space-charge effects due to Coulomb interactions among charged particles play an important role in high-intensity and high-brightness beam physics since such effects can cause beam quality degradation, halo formation, and even particle losses. In order to study the space-charge effects in the charged particle beam self-consistently, one needs to solve the 3D Poisson equation at each time step with the evolving particle density distribution. When the beam (e.g. electron beam) energy increases, in the beam frame computational domain, the longitudinal to transverse aspect ratio becomes larger and larger due to the relativistic effect. In such a case, an integrated Green’s function method was developed and showed to be more effective than the standard Green’s function method to solve the 3D Poisson equation subject to open boundary conditions since it does not require resolving the variation of the Green’s function through the computational domain <xref ref-type="bibr" rid="scirp.136109-1">
     [1]
    </xref>. In recent years, this method has been adopted in a number of particle accelerator beam dynamics codes for the self-consistent simulation of the space-charge effects <xref ref-type="bibr" rid="scirp.136109-2">
     [2]
    </xref>-<xref ref-type="bibr" rid="scirp.136109-11">
     [11]
    </xref>. However, there is no publication on how this method is implemented. Direct implementation of the mathematical expression of the integrated Green’s function method can result in substantially more computational cost. In this paper, we report on an efficient implementation method that reduces the computational cost by more than a factor 50 and alternative expressions that avoid cancellation errors under certain extreme conditions.</p>
  </sec><sec id="s2">
   <title>2. Integrated Green’s Function Solution to 3D Poisson’s Equation</title>
   <p>The electric potential 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       ϕ 
     </mi> 
    </math> of the space-charge fields satisfies the following Poisson’s Equation:</p>
   <p>
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msup> 
       <mo>
         ∇ 
       </mo> 
       <mn>
         2 
       </mn> 
      </msup> 
      <mi>
        ϕ 
      </mi> 
      <mo>
        = 
      </mo> 
      <mo>
        − 
      </mo> 
      <mfrac> 
       <mi>
         ρ 
       </mi> 
       <mrow> 
        <msub> 
         <mi>
           ϵ 
         </mi> 
         <mn>
           0 
         </mn> 
        </msub> 
       </mrow> 
      </mfrac> 
     </mrow> 
    </math>(1)</p>
   <p>where 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       ρ 
     </mi> 
    </math> is the charge density distribution function, and 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mi>
         ϵ 
       </mi> 
       <mn>
         0 
       </mn> 
      </msub> 
     </mrow> 
    </math> is the permittivity in vacuum. The solution of the above Poisson’s Equation subject to the 3D free space open boundary condition can be written as:</p>
   <p>
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        ϕ 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <mi>
          x 
        </mi> 
        <mo>
          , 
        </mo> 
        <mi>
          y 
        </mi> 
        <mo>
          , 
        </mo> 
        <mi>
          z 
        </mi> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
      <mo>
        = 
      </mo> 
      <mfrac> 
       <mn>
         1 
       </mn> 
       <mrow> 
        <mn>
          4 
        </mn> 
        <mi>
          π 
        </mi> 
        <msub> 
         <mi>
           ϵ 
         </mi> 
         <mn>
           0 
         </mn> 
        </msub> 
       </mrow> 
      </mfrac> 
      <mstyle displaystyle="true"> 
       <mrow> 
        <mo>
          ∭ 
        </mo> 
        <mrow> 
         <mi>
           G 
         </mi> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mrow> 
           <mi>
             x 
           </mi> 
           <mo>
             − 
           </mo> 
           <msup> 
            <mi>
              x 
            </mi> 
            <mo>
              ′ 
            </mo> 
           </msup> 
           <mo>
             , 
           </mo> 
           <mi>
             y 
           </mi> 
           <mo>
             − 
           </mo> 
           <msup> 
            <mi>
              y 
            </mi> 
            <mo>
              ′ 
            </mo> 
           </msup> 
           <mo>
             , 
           </mo> 
           <mi>
             z 
           </mi> 
           <mo>
             − 
           </mo> 
           <msup> 
            <mi>
              z 
            </mi> 
            <mo>
              ′ 
            </mo> 
           </msup> 
          </mrow> 
          <mo>
            ) 
          </mo> 
         </mrow> 
         <mi>
           ρ 
         </mi> 
         <mrow> 
          <mo>
            ( 
          </mo> 
          <mrow> 
           <msup> 
            <mi>
              x 
            </mi> 
            <mo>
              ′ 
            </mo> 
           </msup> 
           <mo>
             , 
           </mo> 
           <msup> 
            <mi>
              y 
            </mi> 
            <mo>
              ′ 
            </mo> 
           </msup> 
           <mo>
             , 
           </mo> 
           <msup> 
            <mi>
              z 
            </mi> 
            <mo>
              ′ 
            </mo> 
           </msup> 
          </mrow> 
          <mo>
            ) 
          </mo> 
         </mrow> 
         <mtext>
           d 
         </mtext> 
         <msup> 
          <mi>
            x 
          </mi> 
          <mo>
            ′ 
          </mo> 
         </msup> 
         <mtext>
           d 
         </mtext> 
         <msup> 
          <mi>
            y 
          </mi> 
          <mo>
            ′ 
          </mo> 
         </msup> 
         <mtext>
           d 
         </mtext> 
         <msup> 
          <mi>
            z 
          </mi> 
          <mo>
            ′ 
          </mo> 
         </msup> 
        </mrow> 
       </mrow> 
      </mstyle> 
     </mrow> 
    </math>(2)</p>
   <p>where the Green’s function G is given by:</p>
   <p>
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        G 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <mi>
          x 
        </mi> 
        <mo>
          − 
        </mo> 
        <msup> 
         <mi>
           x 
         </mi> 
         <mo>
           ′ 
         </mo> 
        </msup> 
        <mo>
          , 
        </mo> 
        <mi>
          y 
        </mi> 
        <mo>
          − 
        </mo> 
        <msup> 
         <mi>
           y 
         </mi> 
         <mo>
           ′ 
         </mo> 
        </msup> 
        <mo>
          , 
        </mo> 
        <mi>
          z 
        </mi> 
        <mo>
          − 
        </mo> 
        <msup> 
         <mi>
           z 
         </mi> 
         <mo>
           ′ 
         </mo> 
        </msup> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
      <mo>
        = 
      </mo> 
      <mfrac> 
       <mn>
         1 
       </mn> 
       <mrow> 
        <msqrt> 
         <mrow> 
          <msup> 
           <mrow> 
            <mrow> 
             <mo>
               ( 
             </mo> 
             <mrow> 
              <mi>
                x 
              </mi> 
              <mo>
                − 
              </mo> 
              <msup> 
               <mi>
                 x 
               </mi> 
               <mo>
                 ′ 
               </mo> 
              </msup> 
             </mrow> 
             <mo>
               ) 
             </mo> 
            </mrow> 
           </mrow> 
           <mn>
             2 
           </mn> 
          </msup> 
          <mo>
            + 
          </mo> 
          <msup> 
           <mrow> 
            <mrow> 
             <mo>
               ( 
             </mo> 
             <mrow> 
              <mi>
                y 
              </mi> 
              <mo>
                − 
              </mo> 
              <msup> 
               <mi>
                 y 
               </mi> 
               <mo>
                 ′ 
               </mo> 
              </msup> 
             </mrow> 
             <mo>
               ) 
             </mo> 
            </mrow> 
           </mrow> 
           <mn>
             2 
           </mn> 
          </msup> 
          <mo>
            + 
          </mo> 
          <msup> 
           <mrow> 
            <mrow> 
             <mo>
               ( 
             </mo> 
             <mrow> 
              <mi>
                z 
              </mi> 
              <mo>
                − 
              </mo> 
              <msup> 
               <mi>
                 z 
               </mi> 
               <mo>
                 ′ 
               </mo> 
              </msup> 
             </mrow> 
             <mo>
               ) 
             </mo> 
            </mrow> 
           </mrow> 
           <mn>
             2 
           </mn> 
          </msup> 
         </mrow> 
        </msqrt> 
       </mrow> 
      </mfrac> 
     </mrow> 
    </math>(3)</p>
   <p>To compute the above integral numerically, we define a computational domain containing the beam with a range of 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <mn>
          0 
        </mn> 
        <mo>
          , 
        </mo> 
        <msub> 
         <mi>
           L 
         </mi> 
         <mi>
           x 
         </mi> 
        </msub> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
     </mrow> 
    </math>, 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <mn>
          0 
        </mn> 
        <mo>
          , 
        </mo> 
        <msub> 
         <mi>
           L 
         </mi> 
         <mi>
           y 
         </mi> 
        </msub> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
     </mrow> 
    </math> and 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <mn>
          0 
        </mn> 
        <mo>
          , 
        </mo> 
        <msub> 
         <mi>
           L 
         </mi> 
         <mi>
           z 
         </mi> 
        </msub> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
     </mrow> 
    </math>, and discretize each dimension using 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mi>
         N 
       </mi> 
       <mi>
         x 
       </mi> 
      </msub> 
     </mrow> 
    </math>, 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mi>
         N 
       </mi> 
       <mi>
         y 
       </mi> 
      </msub> 
     </mrow> 
    </math> and 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mi>
         N 
       </mi> 
       <mi>
         z 
       </mi> 
      </msub> 
     </mrow> 
    </math> grid points. Then, we decompose this integral in the entire computational domain as a summation of 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mi>
         N 
       </mi> 
       <mi>
         x 
       </mi> 
      </msub> 
      <mo>
        × 
      </mo> 
      <msub> 
       <mi>
         N 
       </mi> 
       <mi>
         y 
       </mi> 
      </msub> 
      <mo>
        × 
      </mo> 
      <msub> 
       <mi>
         N 
       </mi> 
       <mi>
         z 
       </mi> 
      </msub> 
     </mrow> 
    </math> small cell integrals with each grid point located at the center of the cell.</p>
   <p>
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mtable> 
      <mtr> 
       <mtd> 
        <mi>
          ϕ 
        </mi> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <msub> 
           <mi>
             x 
           </mi> 
           <mi>
             i 
           </mi> 
          </msub> 
          <mo>
            , 
          </mo> 
          <msub> 
           <mi>
             y 
           </mi> 
           <mi>
             j 
           </mi> 
          </msub> 
          <mo>
            , 
          </mo> 
          <msub> 
           <mi>
             z 
           </mi> 
           <mi>
             k 
           </mi> 
          </msub> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
        <mo>
          = 
        </mo> 
        <mfrac> 
         <mn>
           1 
         </mn> 
         <mrow> 
          <mn>
            4 
          </mn> 
          <mi>
            π 
          </mi> 
          <msub> 
           <mi>
             ϵ 
           </mi> 
           <mn>
             0 
           </mn> 
          </msub> 
         </mrow> 
        </mfrac> 
        <mstyle displaystyle="true"> 
         <munderover> 
          <mo>
            ∑ 
          </mo> 
          <mrow> 
           <msup> 
            <mi>
              i 
            </mi> 
            <mo>
              ′ 
            </mo> 
           </msup> 
           <mo>
             = 
           </mo> 
           <mn>
             1 
           </mn> 
          </mrow> 
          <mrow> 
           <msub> 
            <mi>
              N 
            </mi> 
            <mi>
              x 
            </mi> 
           </msub> 
          </mrow> 
         </munderover> 
         <mrow> 
          <mstyle displaystyle="true"> 
           <munderover> 
            <mo>
              ∑ 
            </mo> 
            <mrow> 
             <msup> 
              <mi>
                j 
              </mi> 
              <mo>
                ′ 
              </mo> 
             </msup> 
             <mo>
               = 
             </mo> 
             <mn>
               1 
             </mn> 
            </mrow> 
            <mrow> 
             <msub> 
              <mi>
                N 
              </mi> 
              <mi>
                y 
              </mi> 
             </msub> 
            </mrow> 
           </munderover> 
           <mrow> 
            <mstyle displaystyle="true"> 
             <munderover> 
              <mo>
                ∑ 
              </mo> 
              <mrow> 
               <msup> 
                <mi>
                  k 
                </mi> 
                <mo>
                  ′ 
                </mo> 
               </msup> 
               <mo>
                 = 
               </mo> 
               <mn>
                 1 
               </mn> 
              </mrow> 
              <mrow> 
               <msub> 
                <mi>
                  N 
                </mi> 
                <mi>
                  z 
                </mi> 
               </msub> 
              </mrow> 
             </munderover> 
             <mrow> 
              <mstyle displaystyle="true"> 
               <mrow> 
                <msubsup> 
                 <mo>
                   ∫ 
                 </mo> 
                 <mrow> 
                  <msub> 
                   <mi>
                     x 
                   </mi> 
                   <msup> 
                    <mi>
                      i 
                    </mi> 
                    <mo>
                      ′ 
                    </mo> 
                   </msup> 
                  </msub> 
                  <mo>
                    − 
                  </mo> 
                  <mrow> 
                   <mrow> 
                    <msub> 
                     <mi>
                       h 
                     </mi> 
                     <mi>
                       x 
                     </mi> 
                    </msub> 
                   </mrow> 
                   <mo>
                     / 
                   </mo> 
                   <mn>
                     2 
                   </mn> 
                  </mrow> 
                 </mrow> 
                 <mrow> 
                  <msub> 
                   <mi>
                     x 
                   </mi> 
                   <msup> 
                    <mi>
                      i 
                    </mi> 
                    <mo>
                      ′ 
                    </mo> 
                   </msup> 
                  </msub> 
                  <mo>
                    + 
                  </mo> 
                  <mrow> 
                   <mrow> 
                    <msub> 
                     <mi>
                       h 
                     </mi> 
                     <mi>
                       x 
                     </mi> 
                    </msub> 
                   </mrow> 
                   <mo>
                     / 
                   </mo> 
                   <mn>
                     2 
                   </mn> 
                  </mrow> 
                 </mrow> 
                </msubsup> 
                <mrow> 
                 <mtext>
                   d 
                 </mtext> 
                 <msup> 
                  <mi>
                    x 
                  </mi> 
                  <mo>
                    ′ 
                  </mo> 
                 </msup> 
                </mrow> 
               </mrow> 
              </mstyle> 
              <mstyle displaystyle="true"> 
               <mrow> 
                <msubsup> 
                 <mo>
                   ∫ 
                 </mo> 
                 <mrow> 
                  <msub> 
                   <mi>
                     x 
                   </mi> 
                   <msup> 
                    <mi>
                      j 
                    </mi> 
                    <mo>
                      ′ 
                    </mo> 
                   </msup> 
                  </msub> 
                  <mo>
                    − 
                  </mo> 
                  <mrow> 
                   <mrow> 
                    <msub> 
                     <mi>
                       h 
                     </mi> 
                     <mi>
                       y 
                     </mi> 
                    </msub> 
                   </mrow> 
                   <mo>
                     / 
                   </mo> 
                   <mn>
                     2 
                   </mn> 
                  </mrow> 
                 </mrow> 
                 <mrow> 
                  <msub> 
                   <mi>
                     x 
                   </mi> 
                   <msup> 
                    <mi>
                      j 
                    </mi> 
                    <mo>
                      ′ 
                    </mo> 
                   </msup> 
                  </msub> 
                  <mo>
                    + 
                  </mo> 
                  <mrow> 
                   <mrow> 
                    <msub> 
                     <mi>
                       h 
                     </mi> 
                     <mi>
                       y 
                     </mi> 
                    </msub> 
                   </mrow> 
                   <mo>
                     / 
                   </mo> 
                   <mn>
                     2 
                   </mn> 
                  </mrow> 
                 </mrow> 
                </msubsup> 
                <mrow> 
                 <mtext>
                   d 
                 </mtext> 
                 <msup> 
                  <mi>
                    y 
                  </mi> 
                  <mo>
                    ′ 
                  </mo> 
                 </msup> 
                </mrow> 
               </mrow> 
              </mstyle> 
              <mstyle displaystyle="true"> 
               <mrow> 
                <msubsup> 
                 <mo>
                   ∫ 
                 </mo> 
                 <mrow> 
                  <msub> 
                   <mi>
                     x 
                   </mi> 
                   <msup> 
                    <mi>
                      k 
                    </mi> 
                    <mo>
                      ′ 
                    </mo> 
                   </msup> 
                  </msub> 
                  <mo>
                    − 
                  </mo> 
                  <mrow> 
                   <mrow> 
                    <msub> 
                     <mi>
                       h 
                     </mi> 
                     <mi>
                       z 
                     </mi> 
                    </msub> 
                   </mrow> 
                   <mo>
                     / 
                   </mo> 
                   <mn>
                     2 
                   </mn> 
                  </mrow> 
                 </mrow> 
                 <mrow> 
                  <msub> 
                   <mi>
                     x 
                   </mi> 
                   <msup> 
                    <mi>
                      k 
                    </mi> 
                    <mo>
                      ′ 
                    </mo> 
                   </msup> 
                  </msub> 
                  <mo>
                    + 
                  </mo> 
                  <mrow> 
                   <mrow> 
                    <msub> 
                     <mi>
                       h 
                     </mi> 
                     <mi>
                       z 
                     </mi> 
                    </msub> 
                   </mrow> 
                   <mo>
                     / 
                   </mo> 
                   <mn>
                     2 
                   </mn> 
                  </mrow> 
                 </mrow> 
                </msubsup> 
                <mrow> 
                 <mtext>
                   d 
                 </mtext> 
                 <msup> 
                  <mi>
                    z 
                  </mi> 
                  <mo>
                    ′ 
                  </mo> 
                 </msup> 
                </mrow> 
               </mrow> 
              </mstyle> 
             </mrow> 
            </mstyle> 
           </mrow> 
          </mstyle> 
         </mrow> 
        </mstyle> 
       </mtd> 
      </mtr> 
      <mtr> 
       <mtd> 
        <mtext>
            
        </mtext> 
        <mtext>
            
        </mtext> 
        <mo>
          × 
        </mo> 
        <mi>
          G 
        </mi> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <msub> 
           <mi>
             x 
           </mi> 
           <mi>
             i 
           </mi> 
          </msub> 
          <mo>
            − 
          </mo> 
          <msup> 
           <mi>
             x 
           </mi> 
           <mo>
             ′ 
           </mo> 
          </msup> 
          <mo>
            , 
          </mo> 
          <msub> 
           <mi>
             y 
           </mi> 
           <mi>
             j 
           </mi> 
          </msub> 
          <mo>
            − 
          </mo> 
          <msup> 
           <mi>
             y 
           </mi> 
           <mo>
             ′ 
           </mo> 
          </msup> 
          <mo>
            , 
          </mo> 
          <msub> 
           <mi>
             z 
           </mi> 
           <mi>
             k 
           </mi> 
          </msub> 
          <mo>
            − 
          </mo> 
          <msup> 
           <mi>
             z 
           </mi> 
           <mo>
             ′ 
           </mo> 
          </msup> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
        <mi>
          ρ 
        </mi> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <msup> 
           <mi>
             x 
           </mi> 
           <mo>
             ′ 
           </mo> 
          </msup> 
          <mo>
            , 
          </mo> 
          <msup> 
           <mi>
             y 
           </mi> 
           <mo>
             ′ 
           </mo> 
          </msup> 
          <mo>
            , 
          </mo> 
          <msup> 
           <mi>
             z 
           </mi> 
           <mo>
             ′ 
           </mo> 
          </msup> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
       </mtd> 
      </mtr> 
     </mtable> 
    </math>(4)</p>
   <p>where 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mi>
         h 
       </mi> 
       <mi>
         x 
       </mi> 
      </msub> 
      <mo>
        = 
      </mo> 
      <mrow> 
       <mrow> 
        <msub> 
         <mi>
           L 
         </mi> 
         <mi>
           x 
         </mi> 
        </msub> 
       </mrow> 
       <mo>
         / 
       </mo> 
       <mrow> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <msub> 
           <mi>
             N 
           </mi> 
           <mi>
             x 
           </mi> 
          </msub> 
          <mo>
            − 
          </mo> 
          <mn>
            1 
          </mn> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
       </mrow> 
      </mrow> 
     </mrow> 
    </math>, 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mi>
         h 
       </mi> 
       <mi>
         y 
       </mi> 
      </msub> 
      <mo>
        = 
      </mo> 
      <mrow> 
       <mrow> 
        <msub> 
         <mi>
           L 
         </mi> 
         <mi>
           y 
         </mi> 
        </msub> 
       </mrow> 
       <mo>
         / 
       </mo> 
       <mrow> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <msub> 
           <mi>
             N 
           </mi> 
           <mi>
             y 
           </mi> 
          </msub> 
          <mo>
            − 
          </mo> 
          <mn>
            1 
          </mn> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
       </mrow> 
      </mrow> 
     </mrow> 
    </math>, and 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mi>
         h 
       </mi> 
       <mi>
         z 
       </mi> 
      </msub> 
      <mo>
        = 
      </mo> 
      <mrow> 
       <mrow> 
        <msub> 
         <mi>
           L 
         </mi> 
         <mi>
           x 
         </mi> 
        </msub> 
       </mrow> 
       <mo>
         / 
       </mo> 
       <mrow> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <msub> 
           <mi>
             N 
           </mi> 
           <mi>
             z 
           </mi> 
          </msub> 
          <mo>
            − 
          </mo> 
          <mn>
            1 
          </mn> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
       </mrow> 
      </mrow> 
     </mrow> 
    </math>. If we assume that the charge density is constant within each cell centered at the grid point 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <msub> 
         <mi>
           x 
         </mi> 
         <mi>
           i 
         </mi> 
        </msub> 
        <mo>
          , 
        </mo> 
        <msub> 
         <mi>
           y 
         </mi> 
         <mi>
           j 
         </mi> 
        </msub> 
        <mo>
          , 
        </mo> 
        <msub> 
         <mi>
           z 
         </mi> 
         <mi>
           k 
         </mi> 
        </msub> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
     </mrow> 
    </math>, i.e. 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        ρ 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <msup> 
         <mi>
           x 
         </mi> 
         <mo>
           ′ 
         </mo> 
        </msup> 
        <mo>
          , 
        </mo> 
        <msup> 
         <mi>
           y 
         </mi> 
         <mo>
           ′ 
         </mo> 
        </msup> 
        <mo>
          , 
        </mo> 
        <msup> 
         <mi>
           z 
         </mi> 
         <mo>
           ′ 
         </mo> 
        </msup> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
      <mo>
        = 
      </mo> 
      <mi>
        ρ 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <msub> 
         <mi>
           x 
         </mi> 
         <mi>
           i 
         </mi> 
        </msub> 
        <mo>
          , 
        </mo> 
        <msub> 
         <mi>
           y 
         </mi> 
         <mi>
           j 
         </mi> 
        </msub> 
        <mo>
          , 
        </mo> 
        <msub> 
         <mi>
           z 
         </mi> 
         <mi>
           k 
         </mi> 
        </msub> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
     </mrow> 
    </math>, from the above equation, the electric potential on this grid point can be approximated as:</p>
   <p>
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        ϕ 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <msub> 
         <mi>
           x 
         </mi> 
         <mi>
           i 
         </mi> 
        </msub> 
        <mo>
          , 
        </mo> 
        <msub> 
         <mi>
           y 
         </mi> 
         <mi>
           j 
         </mi> 
        </msub> 
        <mo>
          , 
        </mo> 
        <msub> 
         <mi>
           z 
         </mi> 
         <mi>
           k 
         </mi> 
        </msub> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
      <mo>
        = 
      </mo> 
      <mfrac> 
       <mn>
         1 
       </mn> 
       <mrow> 
        <mn>
          4 
        </mn> 
        <mi>
          π 
        </mi> 
        <msub> 
         <mi>
           ϵ 
         </mi> 
         <mn>
           0 
         </mn> 
        </msub> 
       </mrow> 
      </mfrac> 
      <mstyle displaystyle="true"> 
       <munderover> 
        <mo>
          ∑ 
        </mo> 
        <mrow> 
         <msup> 
          <mi>
            i 
          </mi> 
          <mo>
            ′ 
          </mo> 
         </msup> 
         <mo>
           = 
         </mo> 
         <mn>
           1 
         </mn> 
        </mrow> 
        <mrow> 
         <msub> 
          <mi>
            N 
          </mi> 
          <mi>
            x 
          </mi> 
         </msub> 
        </mrow> 
       </munderover> 
       <mrow> 
        <mstyle displaystyle="true"> 
         <munderover> 
          <mo>
            ∑ 
          </mo> 
          <mrow> 
           <msup> 
            <mi>
              j 
            </mi> 
            <mo>
              ′ 
            </mo> 
           </msup> 
           <mo>
             = 
           </mo> 
           <mn>
             1 
           </mn> 
          </mrow> 
          <mrow> 
           <msub> 
            <mi>
              N 
            </mi> 
            <mi>
              y 
            </mi> 
           </msub> 
          </mrow> 
         </munderover> 
         <mrow> 
          <mstyle displaystyle="true"> 
           <munderover> 
            <mo>
              ∑ 
            </mo> 
            <mrow> 
             <msup> 
              <mi>
                k 
              </mi> 
              <mo>
                ′ 
              </mo> 
             </msup> 
             <mo>
               = 
             </mo> 
             <mn>
               1 
             </mn> 
            </mrow> 
            <mrow> 
             <msub> 
              <mi>
                N 
              </mi> 
              <mi>
                z 
              </mi> 
             </msub> 
            </mrow> 
           </munderover> 
           <mrow> 
            <mover accent="true"> 
             <mi>
               G 
             </mi> 
             <mo>
               ¯ 
             </mo> 
            </mover> 
            <mrow> 
             <mo>
               ( 
             </mo> 
             <mrow> 
              <msub> 
               <mi>
                 x 
               </mi> 
               <mi>
                 i 
               </mi> 
              </msub> 
              <mo>
                − 
              </mo> 
              <msub> 
               <mi>
                 x 
               </mi> 
               <msup> 
                <mi>
                  i 
                </mi> 
                <mo>
                  ′ 
                </mo> 
               </msup> 
              </msub> 
              <mo>
                , 
              </mo> 
              <msub> 
               <mi>
                 y 
               </mi> 
               <mi>
                 j 
               </mi> 
              </msub> 
              <mo>
                − 
              </mo> 
              <msub> 
               <mi>
                 y 
               </mi> 
               <msup> 
                <mi>
                  j 
                </mi> 
                <mo>
                  ′ 
                </mo> 
               </msup> 
              </msub> 
              <mo>
                , 
              </mo> 
              <msub> 
               <mi>
                 z 
               </mi> 
               <mi>
                 k 
               </mi> 
              </msub> 
              <mo>
                − 
              </mo> 
              <msub> 
               <mi>
                 z 
               </mi> 
               <msup> 
                <mi>
                  k 
                </mi> 
                <mo>
                  ′ 
                </mo> 
               </msup> 
              </msub> 
             </mrow> 
             <mo>
               ) 
             </mo> 
            </mrow> 
            <mi>
              ρ 
            </mi> 
            <mrow> 
             <mo>
               ( 
             </mo> 
             <mrow> 
              <msub> 
               <mi>
                 x 
               </mi> 
               <msup> 
                <mi>
                  i 
                </mi> 
                <mo>
                  ′ 
                </mo> 
               </msup> 
              </msub> 
              <mo>
                , 
              </mo> 
              <msub> 
               <mi>
                 y 
               </mi> 
               <msup> 
                <mi>
                  j 
                </mi> 
                <mo>
                  ′ 
                </mo> 
               </msup> 
              </msub> 
              <mo>
                , 
              </mo> 
              <msub> 
               <mi>
                 z 
               </mi> 
               <msup> 
                <mi>
                  k 
                </mi> 
                <mo>
                  ′ 
                </mo> 
               </msup> 
              </msub> 
             </mrow> 
             <mo>
               ) 
             </mo> 
            </mrow> 
           </mrow> 
          </mstyle> 
         </mrow> 
        </mstyle> 
       </mrow> 
      </mstyle> 
     </mrow> 
    </math>(5)</p>
   <p>where 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mi>
         x 
       </mi> 
       <mi>
         i 
       </mi> 
      </msub> 
      <mo>
        = 
      </mo> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <mi>
          i 
        </mi> 
        <mo>
          − 
        </mo> 
        <mn>
          1 
        </mn> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
      <msub> 
       <mi>
         h 
       </mi> 
       <mi>
         x 
       </mi> 
      </msub> 
     </mrow> 
    </math>, 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mi>
         y 
       </mi> 
       <mi>
         j 
       </mi> 
      </msub> 
      <mo>
        = 
      </mo> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <mi>
          j 
        </mi> 
        <mo>
          − 
        </mo> 
        <mn>
          1 
        </mn> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
      <msub> 
       <mi>
         h 
       </mi> 
       <mi>
         y 
       </mi> 
      </msub> 
     </mrow> 
    </math>, and 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mi>
         z 
       </mi> 
       <mi>
         k 
       </mi> 
      </msub> 
      <mo>
        = 
      </mo> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <mi>
          k 
        </mi> 
        <mo>
          − 
        </mo> 
        <mn>
          1 
        </mn> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
      <msub> 
       <mi>
         h 
       </mi> 
       <mi>
         z 
       </mi> 
      </msub> 
     </mrow> 
    </math>, and the effective Green function 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mover accent="true"> 
      <mi>
        G 
      </mi> 
      <mo>
        ¯ 
      </mo> 
     </mover> 
    </math> is given as:</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"> <mtable columnalign="left"> 
      <mtr> 
       <mtd> 
        <mover accent="true"> 
         <mi>
           G 
         </mi> 
         <mo>
           ¯ 
         </mo> 
        </mover> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <msub> 
           <mi>
             x 
           </mi> 
           <mi>
             i 
           </mi> 
          </msub> 
          <mo>
            − 
          </mo> 
          <msub> 
           <mi>
             x 
           </mi> 
           <msup> 
            <mi>
              i 
            </mi> 
            <mo>
              ′ 
            </mo> 
           </msup> 
          </msub> 
          <mo>
            , 
          </mo> 
          <msub> 
           <mi>
             y 
           </mi> 
           <mi>
             j 
           </mi> 
          </msub> 
          <mo>
            − 
          </mo> 
          <msub> 
           <mi>
             y 
           </mi> 
           <msup> 
            <mi>
              j 
            </mi> 
            <mo>
              ′ 
            </mo> 
           </msup> 
          </msub> 
          <mo>
            , 
          </mo> 
          <msub> 
           <mi>
             z 
           </mi> 
           <mi>
             k 
           </mi> 
          </msub> 
          <mo>
            − 
          </mo> 
          <msub> 
           <mi>
             z 
           </mi> 
           <msup> 
            <mi>
              k 
            </mi> 
            <mo>
              ′ 
            </mo> 
           </msup> 
          </msub> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
       </mtd> 
      </mtr> 
      <mtr> 
       <mtd> 
        <mo>
          = 
        </mo> 
        <mstyle displaystyle="true"> 
         <mrow> 
          <msubsup> 
           <mo>
             ∫ 
           </mo> 
           <mrow> 
            <msub> 
             <mi>
               x 
             </mi> 
             <msup> 
              <mi>
                i 
              </mi> 
              <mo>
                ′ 
              </mo> 
             </msup> 
            </msub> 
            <mo>
              − 
            </mo> 
            <mrow> 
             <mrow> 
              <msub> 
               <mi>
                 h 
               </mi> 
               <mi>
                 x 
               </mi> 
              </msub> 
             </mrow> 
             <mo>
               / 
             </mo> 
             <mn>
               2 
             </mn> 
            </mrow> 
           </mrow> 
           <mrow> 
            <msub> 
             <mi>
               x 
             </mi> 
             <msup> 
              <mi>
                i 
              </mi> 
              <mo>
                ′ 
              </mo> 
             </msup> 
            </msub> 
            <mo>
              + 
            </mo> 
            <mrow> 
             <mrow> 
              <msub> 
               <mi>
                 h 
               </mi> 
               <mi>
                 x 
               </mi> 
              </msub> 
             </mrow> 
             <mo>
               / 
             </mo> 
             <mn>
               2 
             </mn> 
            </mrow> 
           </mrow> 
          </msubsup> 
          <mrow> 
           <mtext>
             d 
           </mtext> 
           <msup> 
            <mi>
              x 
            </mi> 
            <mo>
              ′ 
            </mo> 
           </msup> 
          </mrow> 
         </mrow> 
        </mstyle> 
        <mstyle displaystyle="true"> 
         <mrow> 
          <msubsup> 
           <mo>
             ∫ 
           </mo> 
           <mrow> 
            <msub> 
             <mi>
               x 
             </mi> 
             <msup> 
              <mi>
                j 
              </mi> 
              <mo>
                ′ 
              </mo> 
             </msup> 
            </msub> 
            <mo>
              − 
            </mo> 
            <mrow> 
             <mrow> 
              <msub> 
               <mi>
                 h 
               </mi> 
               <mi>
                 y 
               </mi> 
              </msub> 
             </mrow> 
             <mo>
               / 
             </mo> 
             <mn>
               2 
             </mn> 
            </mrow> 
           </mrow> 
           <mrow> 
            <msub> 
             <mi>
               x 
             </mi> 
             <msup> 
              <mi>
                j 
              </mi> 
              <mo>
                ′ 
              </mo> 
             </msup> 
            </msub> 
            <mo>
              + 
            </mo> 
            <mrow> 
             <mrow> 
              <msub> 
               <mi>
                 h 
               </mi> 
               <mi>
                 y 
               </mi> 
              </msub> 
             </mrow> 
             <mo>
               / 
             </mo> 
             <mn>
               2 
             </mn> 
            </mrow> 
           </mrow> 
          </msubsup> 
          <mrow> 
           <mtext>
             d 
           </mtext> 
           <msup> 
            <mi>
              y 
            </mi> 
            <mo>
              ′ 
            </mo> 
           </msup> 
          </mrow> 
         </mrow> 
        </mstyle> 
        <mstyle displaystyle="true"> 
         <mrow> 
          <msubsup> 
           <mo>
             ∫ 
           </mo> 
           <mrow> 
            <msub> 
             <mi>
               x 
             </mi> 
             <msup> 
              <mi>
                k 
              </mi> 
              <mo>
                ′ 
              </mo> 
             </msup> 
            </msub> 
            <mo>
              − 
            </mo> 
            <mrow> 
             <mrow> 
              <msub> 
               <mi>
                 h 
               </mi> 
               <mi>
                 z 
               </mi> 
              </msub> 
             </mrow> 
             <mo>
               / 
             </mo> 
             <mn>
               2 
             </mn> 
            </mrow> 
           </mrow> 
           <mrow> 
            <msub> 
             <mi>
               x 
             </mi> 
             <msup> 
              <mi>
                k 
              </mi> 
              <mo>
                ′ 
              </mo> 
             </msup> 
            </msub> 
            <mo>
              + 
            </mo> 
            <mrow> 
             <mrow> 
              <msub> 
               <mi>
                 h 
               </mi> 
               <mi>
                 z 
               </mi> 
              </msub> 
             </mrow> 
             <mo>
               / 
             </mo> 
             <mn>
               2 
             </mn> 
            </mrow> 
           </mrow> 
          </msubsup> 
          <mrow> 
           <mtext>
             d 
           </mtext> 
           <msup> 
            <mi>
              z 
            </mi> 
            <mo>
              ′ 
            </mo> 
           </msup> 
          </mrow> 
         </mrow> 
        </mstyle> 
        <mo>
          × 
        </mo> 
        <mi>
          G 
        </mi> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <msub> 
           <mi>
             x 
           </mi> 
           <mi>
             i 
           </mi> 
          </msub> 
          <mo>
            − 
          </mo> 
          <msup> 
           <mi>
             x 
           </mi> 
           <mo>
             ′ 
           </mo> 
          </msup> 
          <mo>
            , 
          </mo> 
          <msub> 
           <mi>
             y 
           </mi> 
           <mi>
             j 
           </mi> 
          </msub> 
          <mo>
            − 
          </mo> 
          <msup> 
           <mi>
             y 
           </mi> 
           <mo>
             ′ 
           </mo> 
          </msup> 
          <mo>
            , 
          </mo> 
          <msub> 
           <mi>
             z 
           </mi> 
           <mi>
             k 
           </mi> 
          </msub> 
          <mo>
            − 
          </mo> 
          <msup> 
           <mi>
             z 
           </mi> 
           <mo>
             ′ 
           </mo> 
          </msup> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
       </mtd> 
      </mtr> 
     </mtable> 
    </math>(6)</p>
   <p>where 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mi>
         h 
       </mi> 
       <mi>
         x 
       </mi> 
      </msub> 
     </mrow> 
    </math>, 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mi>
         h 
       </mi> 
       <mi>
         y 
       </mi> 
      </msub> 
     </mrow> 
    </math>, and 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mi>
         h 
       </mi> 
       <mi>
         z 
       </mi> 
      </msub> 
     </mrow> 
    </math> are cell size in each dimension, respectively. The above integral can be calculated analytically in a closed form for the Green’s function given in Equation (3) as <xref ref-type="bibr" rid="scirp.136109-12">
     [12]
    </xref>:</p>
   <p>
    <math xmlns="http://www.w3.org/1998/Math/MathML" display="inline"> <mtable> 
      <mtr> 
       <mtd> 
        <mover accent="true"> 
         <mi>
           G 
         </mi> 
         <mo>
           ¯ 
         </mo> 
        </mover> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <mi>
            x 
          </mi> 
          <mo>
            , 
          </mo> 
          <mi>
            y 
          </mi> 
          <mo>
            , 
          </mo> 
          <mi>
            z 
          </mi> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
        <mo>
          = 
        </mo> 
        <mi>
          f 
        </mi> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <mi>
            x 
          </mi> 
          <mo>
            + 
          </mo> 
          <mfrac> 
           <mrow> 
            <msub> 
             <mi>
               h 
             </mi> 
             <mi>
               x 
             </mi> 
            </msub> 
           </mrow> 
           <mn>
             2 
           </mn> 
          </mfrac> 
          <mo>
            , 
          </mo> 
          <mi>
            y 
          </mi> 
          <mo>
            + 
          </mo> 
          <mfrac> 
           <mrow> 
            <msub> 
             <mi>
               h 
             </mi> 
             <mi>
               y 
             </mi> 
            </msub> 
           </mrow> 
           <mn>
             2 
           </mn> 
          </mfrac> 
          <mo>
            , 
          </mo> 
          <mi>
            z 
          </mi> 
          <mo>
            + 
          </mo> 
          <mfrac> 
           <mrow> 
            <msub> 
             <mi>
               h 
             </mi> 
             <mi>
               z 
             </mi> 
            </msub> 
           </mrow> 
           <mn>
             2 
           </mn> 
          </mfrac> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
        <mo>
          − 
        </mo> 
        <mi>
          f 
        </mi> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <mi>
            x 
          </mi> 
          <mo>
            + 
          </mo> 
          <mfrac> 
           <mrow> 
            <msub> 
             <mi>
               h 
             </mi> 
             <mi>
               x 
             </mi> 
            </msub> 
           </mrow> 
           <mn>
             2 
           </mn> 
          </mfrac> 
          <mo>
            , 
          </mo> 
          <mi>
            y 
          </mi> 
          <mo>
            + 
          </mo> 
          <mfrac> 
           <mrow> 
            <msub> 
             <mi>
               h 
             </mi> 
             <mi>
               y 
             </mi> 
            </msub> 
           </mrow> 
           <mn>
             2 
           </mn> 
          </mfrac> 
          <mo>
            , 
          </mo> 
          <mi>
            z 
          </mi> 
          <mo>
            − 
          </mo> 
          <mfrac> 
           <mrow> 
            <msub> 
             <mi>
               h 
             </mi> 
             <mi>
               z 
             </mi> 
            </msub> 
           </mrow> 
           <mn>
             2 
           </mn> 
          </mfrac> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
       </mtd> 
      </mtr> 
      <mtr> 
       <mtd> 
        <mtext>
            
        </mtext> 
        <mtext>
            
        </mtext> 
        <mo>
          + 
        </mo> 
        <mi>
          f 
        </mi> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <mi>
            x 
          </mi> 
          <mo>
            − 
          </mo> 
          <mfrac> 
           <mrow> 
            <msub> 
             <mi>
               h 
             </mi> 
             <mi>
               x 
             </mi> 
            </msub> 
           </mrow> 
           <mn>
             2 
           </mn> 
          </mfrac> 
          <mo>
            , 
          </mo> 
          <mi>
            y 
          </mi> 
          <mo>
            − 
          </mo> 
          <mfrac> 
           <mrow> 
            <msub> 
             <mi>
               h 
             </mi> 
             <mi>
               y 
             </mi> 
            </msub> 
           </mrow> 
           <mn>
             2 
           </mn> 
          </mfrac> 
          <mo>
            , 
          </mo> 
          <mi>
            z 
          </mi> 
          <mo>
            + 
          </mo> 
          <mfrac> 
           <mrow> 
            <msub> 
             <mi>
               h 
             </mi> 
             <mi>
               z 
             </mi> 
            </msub> 
           </mrow> 
           <mn>
             2 
           </mn> 
          </mfrac> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
        <mo>
          − 
        </mo> 
        <mi>
          f 
        </mi> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <mi>
            x 
          </mi> 
          <mo>
            − 
          </mo> 
          <mfrac> 
           <mrow> 
            <msub> 
             <mi>
               h 
             </mi> 
             <mi>
               x 
             </mi> 
            </msub> 
           </mrow> 
           <mn>
             2 
           </mn> 
          </mfrac> 
          <mo>
            , 
          </mo> 
          <mi>
            y 
          </mi> 
          <mo>
            − 
          </mo> 
          <mfrac> 
           <mrow> 
            <msub> 
             <mi>
               h 
             </mi> 
             <mi>
               y 
             </mi> 
            </msub> 
           </mrow> 
           <mn>
             2 
           </mn> 
          </mfrac> 
          <mo>
            , 
          </mo> 
          <mi>
            z 
          </mi> 
          <mo>
            − 
          </mo> 
          <mfrac> 
           <mrow> 
            <msub> 
             <mi>
               h 
             </mi> 
             <mi>
               z 
             </mi> 
            </msub> 
           </mrow> 
           <mn>
             2 
           </mn> 
          </mfrac> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
       </mtd> 
      </mtr> 
      <mtr> 
       <mtd> 
        <mtext>
            
        </mtext> 
        <mtext>
            
        </mtext> 
        <mo>
          + 
        </mo> 
        <mi>
          f 
        </mi> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <mi>
            x 
          </mi> 
          <mo>
            + 
          </mo> 
          <mfrac> 
           <mrow> 
            <msub> 
             <mi>
               h 
             </mi> 
             <mi>
               x 
             </mi> 
            </msub> 
           </mrow> 
           <mn>
             2 
           </mn> 
          </mfrac> 
          <mo>
            , 
          </mo> 
          <mi>
            y 
          </mi> 
          <mo>
            − 
          </mo> 
          <mfrac> 
           <mrow> 
            <msub> 
             <mi>
               h 
             </mi> 
             <mi>
               y 
             </mi> 
            </msub> 
           </mrow> 
           <mn>
             2 
           </mn> 
          </mfrac> 
          <mo>
            , 
          </mo> 
          <mi>
            z 
          </mi> 
          <mo>
            − 
          </mo> 
          <mfrac> 
           <mrow> 
            <msub> 
             <mi>
               h 
             </mi> 
             <mi>
               z 
             </mi> 
            </msub> 
           </mrow> 
           <mn>
             2 
           </mn> 
          </mfrac> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
        <mo>
          − 
        </mo> 
        <mi>
          f 
        </mi> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <mi>
            x 
          </mi> 
          <mo>
            + 
          </mo> 
          <mfrac> 
           <mrow> 
            <msub> 
             <mi>
               h 
             </mi> 
             <mi>
               x 
             </mi> 
            </msub> 
           </mrow> 
           <mn>
             2 
           </mn> 
          </mfrac> 
          <mo>
            , 
          </mo> 
          <mi>
            y 
          </mi> 
          <mo>
            − 
          </mo> 
          <mfrac> 
           <mrow> 
            <msub> 
             <mi>
               h 
             </mi> 
             <mi>
               y 
             </mi> 
            </msub> 
           </mrow> 
           <mn>
             2 
           </mn> 
          </mfrac> 
          <mo>
            , 
          </mo> 
          <mi>
            z 
          </mi> 
          <mo>
            + 
          </mo> 
          <mfrac> 
           <mrow> 
            <msub> 
             <mi>
               h 
             </mi> 
             <mi>
               z 
             </mi> 
            </msub> 
           </mrow> 
           <mn>
             2 
           </mn> 
          </mfrac> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
       </mtd> 
      </mtr> 
      <mtr> 
       <mtd> 
        <mtext>
            
        </mtext> 
        <mtext>
            
        </mtext> 
        <mo>
          + 
        </mo> 
        <mi>
          f 
        </mi> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <mi>
            x 
          </mi> 
          <mo>
            − 
          </mo> 
          <mfrac> 
           <mrow> 
            <msub> 
             <mi>
               h 
             </mi> 
             <mi>
               x 
             </mi> 
            </msub> 
           </mrow> 
           <mn>
             2 
           </mn> 
          </mfrac> 
          <mo>
            , 
          </mo> 
          <mi>
            y 
          </mi> 
          <mo>
            + 
          </mo> 
          <mfrac> 
           <mrow> 
            <msub> 
             <mi>
               h 
             </mi> 
             <mi>
               y 
             </mi> 
            </msub> 
           </mrow> 
           <mn>
             2 
           </mn> 
          </mfrac> 
          <mo>
            , 
          </mo> 
          <mi>
            z 
          </mi> 
          <mo>
            − 
          </mo> 
          <mfrac> 
           <mrow> 
            <msub> 
             <mi>
               h 
             </mi> 
             <mi>
               z 
             </mi> 
            </msub> 
           </mrow> 
           <mn>
             2 
           </mn> 
          </mfrac> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
        <mo>
          − 
        </mo> 
        <mi>
          f 
        </mi> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <mi>
            x 
          </mi> 
          <mo>
            − 
          </mo> 
          <mfrac> 
           <mrow> 
            <msub> 
             <mi>
               h 
             </mi> 
             <mi>
               x 
             </mi> 
            </msub> 
           </mrow> 
           <mn>
             2 
           </mn> 
          </mfrac> 
          <mo>
            , 
          </mo> 
          <mi>
            y 
          </mi> 
          <mo>
            + 
          </mo> 
          <mfrac> 
           <mrow> 
            <msub> 
             <mi>
               h 
             </mi> 
             <mi>
               y 
             </mi> 
            </msub> 
           </mrow> 
           <mn>
             2 
           </mn> 
          </mfrac> 
          <mo>
            , 
          </mo> 
          <mi>
            z 
          </mi> 
          <mo>
            + 
          </mo> 
          <mfrac> 
           <mrow> 
            <msub> 
             <mi>
               h 
             </mi> 
             <mi>
               z 
             </mi> 
            </msub> 
           </mrow> 
           <mn>
             2 
           </mn> 
          </mfrac> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
       </mtd> 
      </mtr> 
     </mtable> 
    </math>(7)</p>
   <p>where</p>
   <p>
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mtable> 
      <mtr> 
       <mtd> 
        <mi>
          f 
        </mi> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <mi>
            x 
          </mi> 
          <mo>
            , 
          </mo> 
          <mi>
            y 
          </mi> 
          <mo>
            , 
          </mo> 
          <mi>
            z 
          </mi> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
        <mo>
          = 
        </mo> 
        <mi>
          y 
        </mi> 
        <mi>
          z 
        </mi> 
        <mi>
          ln 
        </mi> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <mi>
            x 
          </mi> 
          <mo>
            + 
          </mo> 
          <mi>
            r 
          </mi> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
        <mo>
          + 
        </mo> 
        <mi>
          x 
        </mi> 
        <mi>
          z 
        </mi> 
        <mi>
          ln 
        </mi> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <mi>
            y 
          </mi> 
          <mo>
            + 
          </mo> 
          <mi>
            r 
          </mi> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
        <mo>
          + 
        </mo> 
        <mi>
          x 
        </mi> 
        <mi>
          y 
        </mi> 
        <mi>
          ln 
        </mi> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <mi>
            z 
          </mi> 
          <mo>
            + 
          </mo> 
          <mi>
            r 
          </mi> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
       </mtd> 
      </mtr> 
      <mtr> 
       <mtd> 
        <mtext>
            
        </mtext> 
        <mtext>
            
        </mtext> 
        <mo>
          − 
        </mo> 
        <mfrac> 
         <mrow> 
          <msup> 
           <mi>
             z 
           </mi> 
           <mn>
             2 
           </mn> 
          </msup> 
         </mrow> 
         <mn>
           2 
         </mn> 
        </mfrac> 
        <mi>
          arctan 
        </mi> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <mfrac> 
           <mrow> 
            <mi>
              x 
            </mi> 
            <mi>
              y 
            </mi> 
           </mrow> 
           <mrow> 
            <mi>
              z 
            </mi> 
            <mi>
              r 
            </mi> 
           </mrow> 
          </mfrac> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
        <mo>
          − 
        </mo> 
        <mfrac> 
         <mrow> 
          <msup> 
           <mi>
             y 
           </mi> 
           <mn>
             2 
           </mn> 
          </msup> 
         </mrow> 
         <mn>
           2 
         </mn> 
        </mfrac> 
        <mi>
          arctan 
        </mi> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <mfrac> 
           <mrow> 
            <mi>
              x 
            </mi> 
            <mi>
              z 
            </mi> 
           </mrow> 
           <mrow> 
            <mi>
              y 
            </mi> 
            <mi>
              r 
            </mi> 
           </mrow> 
          </mfrac> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
        <mo>
          − 
        </mo> 
        <mfrac> 
         <mrow> 
          <msup> 
           <mi>
             x 
           </mi> 
           <mn>
             2 
           </mn> 
          </msup> 
         </mrow> 
         <mn>
           2 
         </mn> 
        </mfrac> 
        <mi>
          arctan 
        </mi> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <mfrac> 
           <mrow> 
            <mi>
              y 
            </mi> 
            <mi>
              z 
            </mi> 
           </mrow> 
           <mrow> 
            <mi>
              x 
            </mi> 
            <mi>
              r 
            </mi> 
           </mrow> 
          </mfrac> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
       </mtd> 
      </mtr> 
     </mtable> 
    </math>(8)</p>
   <p>where 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        r 
      </mi> 
      <mo>
        = 
      </mo> 
      <msqrt> 
       <mrow> 
        <msup> 
         <mi>
           x 
         </mi> 
         <mn>
           2 
         </mn> 
        </msup> 
        <mo>
          + 
        </mo> 
        <msup> 
         <mi>
           y 
         </mi> 
         <mn>
           2 
         </mn> 
        </msup> 
        <mo>
          + 
        </mo> 
        <msup> 
         <mi>
           z 
         </mi> 
         <mn>
           2 
         </mn> 
        </msup> 
       </mrow> 
      </msqrt> 
     </mrow> 
    </math>. With the effective Green’s function 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mover accent="true"> 
      <mi>
        G 
      </mi> 
      <mo>
        ¯ 
      </mo> 
     </mover> 
    </math>, the summation of Equation (5) can be computed effectively using the FFT method <xref ref-type="bibr" rid="scirp.136109-1">
     [1]
    </xref> <xref ref-type="bibr" rid="scirp.136109-13">
     [13]
    </xref>.</p>
  </sec><sec id="s3">
   <title>3. Efficient Implementation</title>
   <p>The effective Green’s function in the above equation involves eight f-function evaluations. The range of the variables in the function f covers the range from 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mo>
        − 
      </mo> 
      <msub> 
       <mi>
         L 
       </mi> 
       <mi>
         x 
       </mi> 
      </msub> 
     </mrow> 
    </math> to 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mi>
         L 
       </mi> 
       <mi>
         x 
       </mi> 
      </msub> 
     </mrow> 
    </math>, 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mo>
        − 
      </mo> 
      <msub> 
       <mi>
         L 
       </mi> 
       <mi>
         y 
       </mi> 
      </msub> 
     </mrow> 
    </math> to 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mi>
         L 
       </mi> 
       <mi>
         y 
       </mi> 
      </msub> 
     </mrow> 
    </math>, and 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mo>
        − 
      </mo> 
      <msub> 
       <mi>
         L 
       </mi> 
       <mi>
         z 
       </mi> 
      </msub> 
     </mrow> 
    </math> to 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mi>
         L 
       </mi> 
       <mi>
         z 
       </mi> 
      </msub> 
     </mrow> 
    </math>, which suggests two times grid points are needed in each dimension for this function. However, a careful check of Equation (6) suggests that the effective Green’s function should have the same symmetry property as the original Green’s function, i.e., changing the sign of an individual variable in Equation (7) will not affect the value of the function. This can be seen from Equation (6), 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mover accent="true"> 
       <mi>
         G 
       </mi> 
       <mo>
         ¯ 
       </mo> 
      </mover> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <msub> 
         <mi>
           x 
         </mi> 
         <mi>
           i 
         </mi> 
        </msub> 
        <mo>
          − 
        </mo> 
        <msub> 
         <mi>
           x 
         </mi> 
         <msup> 
          <mi>
            i 
          </mi> 
          <mo>
            ′ 
          </mo> 
         </msup> 
        </msub> 
        <mo>
          , 
        </mo> 
        <msub> 
         <mi>
           y 
         </mi> 
         <mi>
           j 
         </mi> 
        </msub> 
        <mo>
          − 
        </mo> 
        <msub> 
         <mi>
           y 
         </mi> 
         <msup> 
          <mi>
            j 
          </mi> 
          <mo>
            ′ 
          </mo> 
         </msup> 
        </msub> 
        <mo>
          , 
        </mo> 
        <msub> 
         <mi>
           z 
         </mi> 
         <mi>
           k 
         </mi> 
        </msub> 
        <mo>
          − 
        </mo> 
        <msub> 
         <mi>
           z 
         </mi> 
         <msup> 
          <mi>
            k 
          </mi> 
          <mo>
            ′ 
          </mo> 
         </msup> 
        </msub> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
      <mo>
        = 
      </mo> 
      <mi>
        G 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <msub> 
         <mi>
           x 
         </mi> 
         <mi>
           i 
         </mi> 
        </msub> 
        <mo>
          − 
        </mo> 
        <msub> 
         <mi>
           x 
         </mi> 
         <msup> 
          <mi>
            i 
          </mi> 
          <mo>
            ′ 
          </mo> 
         </msup> 
        </msub> 
        <mo>
          , 
        </mo> 
        <msub> 
         <mi>
           y 
         </mi> 
         <mi>
           j 
         </mi> 
        </msub> 
        <mo>
          − 
        </mo> 
        <msub> 
         <mi>
           y 
         </mi> 
         <msup> 
          <mi>
            j 
          </mi> 
          <mo>
            ′ 
          </mo> 
         </msup> 
        </msub> 
        <mo>
          , 
        </mo> 
        <msub> 
         <mi>
           z 
         </mi> 
         <mi>
           k 
         </mi> 
        </msub> 
        <mo>
          − 
        </mo> 
        <msub> 
         <mi>
           z 
         </mi> 
         <msup> 
          <mi>
            k 
          </mi> 
          <mo>
            ′ 
          </mo> 
         </msup> 
        </msub> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
      <msub> 
       <mi>
         h 
       </mi> 
       <mi>
         x 
       </mi> 
      </msub> 
      <msub> 
       <mi>
         h 
       </mi> 
       <mi>
         y 
       </mi> 
      </msub> 
      <msub> 
       <mi>
         h 
       </mi> 
       <mi>
         z 
       </mi> 
      </msub> 
      <mo>
        + 
      </mo> 
      <mi>
        O 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <msubsup> 
         <mi>
           h 
         </mi> 
         <mi>
           x 
         </mi> 
         <mn>
           3 
         </mn> 
        </msubsup> 
        <msubsup> 
         <mi>
           h 
         </mi> 
         <mi>
           y 
         </mi> 
         <mn>
           3 
         </mn> 
        </msubsup> 
        <msubsup> 
         <mi>
           h 
         </mi> 
         <mi>
           z 
         </mi> 
         <mn>
           3 
         </mn> 
        </msubsup> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
     </mrow> 
    </math> or by using Equation (7) and 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        f 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <mo>
          − 
        </mo> 
        <mi>
          x 
        </mi> 
        <mo>
          , 
        </mo> 
        <mi>
          y 
        </mi> 
        <mo>
          , 
        </mo> 
        <mi>
          z 
        </mi> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
      <mo>
        = 
      </mo> 
      <mo>
        − 
      </mo> 
      <mi>
        f 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <mi>
          x 
        </mi> 
        <mo>
          , 
        </mo> 
        <mi>
          y 
        </mi> 
        <mo>
          , 
        </mo> 
        <mi>
          z 
        </mi> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
      <mo>
        + 
      </mo> 
      <mi>
        y 
      </mi> 
      <mi>
        z 
      </mi> 
      <mi>
        ln 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <msup> 
         <mi>
           y 
         </mi> 
         <mn>
           2 
         </mn> 
        </msup> 
        <mo>
          + 
        </mo> 
        <msup> 
         <mi>
           z 
         </mi> 
         <mn>
           2 
         </mn> 
        </msup> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
     </mrow> 
    </math> results in 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mover accent="true"> 
       <mi>
         G 
       </mi> 
       <mo>
         ¯ 
       </mo> 
      </mover> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <mo>
          − 
        </mo> 
        <mi>
          x 
        </mi> 
        <mo>
          , 
        </mo> 
        <mi>
          y 
        </mi> 
        <mo>
          , 
        </mo> 
        <mi>
          z 
        </mi> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
      <mo>
        = 
      </mo> 
      <mover accent="true"> 
       <mi>
         G 
       </mi> 
       <mo>
         ¯ 
       </mo> 
      </mover> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <mi>
          x 
        </mi> 
        <mo>
          , 
        </mo> 
        <mi>
          y 
        </mi> 
        <mo>
          , 
        </mo> 
        <mi>
          z 
        </mi> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
     </mrow> 
    </math> for x (same applies to y and z). Hence, only the first quadrant of the effective Green’s function is needed. This saves the computational cost by about a factor of eight. Furthermore, by computing the f function on one corner of the integrated cell for an extended grid (i.e., 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        N 
      </mi> 
      <mo>
        + 
      </mo> 
      <mn>
        1 
      </mn> 
     </mrow> 
    </math> instead of N) 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msup> 
       <mi>
         G 
       </mi> 
       <mrow> 
        <mi>
          t 
        </mi> 
        <mi>
          m 
        </mi> 
        <mi>
          p 
        </mi> 
       </mrow> 
      </msup> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <mi>
          i 
        </mi> 
        <mo>
          , 
        </mo> 
        <mi>
          j 
        </mi> 
        <mo>
          , 
        </mo> 
        <mi>
          k 
        </mi> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
      <mo>
        = 
      </mo> 
      <mi>
        f 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <msub> 
         <mi>
           x 
         </mi> 
         <mi>
           i 
         </mi> 
        </msub> 
        <mo>
          − 
        </mo> 
        <mrow> 
         <mrow> 
          <msub> 
           <mi>
             h 
           </mi> 
           <mi>
             x 
           </mi> 
          </msub> 
         </mrow> 
         <mo>
           / 
         </mo> 
         <mn>
           2 
         </mn> 
        </mrow> 
        <mo>
          , 
        </mo> 
        <msub> 
         <mi>
           y 
         </mi> 
         <mi>
           j 
         </mi> 
        </msub> 
        <mo>
          − 
        </mo> 
        <mrow> 
         <mrow> 
          <msub> 
           <mi>
             h 
           </mi> 
           <mi>
             y 
           </mi> 
          </msub> 
         </mrow> 
         <mo>
           / 
         </mo> 
         <mn>
           2 
         </mn> 
        </mrow> 
        <mo>
          , 
        </mo> 
        <msub> 
         <mi>
           z 
         </mi> 
         <mi>
           k 
         </mi> 
        </msub> 
        <mo>
          − 
        </mo> 
        <mrow> 
         <mrow> 
          <msub> 
           <mi>
             h 
           </mi> 
           <mi>
             z 
           </mi> 
          </msub> 
         </mrow> 
         <mo>
           / 
         </mo> 
         <mn>
           2 
         </mn> 
        </mrow> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
     </mrow> 
    </math> for 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        i 
      </mi> 
      <mo>
        = 
      </mo> 
      <mn>
        1 
      </mn> 
      <mo>
        , 
      </mo> 
      <mo>
        ⋯ 
      </mo> 
      <mo>
        , 
      </mo> 
      <msub> 
       <mi>
         N 
       </mi> 
       <mi>
         x 
       </mi> 
      </msub> 
      <mo>
        + 
      </mo> 
      <mn>
        1 
      </mn> 
     </mrow> 
    </math>, 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        j 
      </mi> 
      <mo>
        = 
      </mo> 
      <mn>
        1 
      </mn> 
      <mo>
        , 
      </mo> 
      <mo>
        ⋯ 
      </mo> 
      <mo>
        , 
      </mo> 
      <msub> 
       <mi>
         N 
       </mi> 
       <mi>
         y 
       </mi> 
      </msub> 
      <mo>
        + 
      </mo> 
      <mn>
        1 
      </mn> 
     </mrow> 
    </math>, and 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        k 
      </mi> 
      <mo>
        = 
      </mo> 
      <mn>
        1 
      </mn> 
      <mo>
        , 
      </mo> 
      <mo>
        ⋯ 
      </mo> 
      <mo>
        , 
      </mo> 
      <msub> 
       <mi>
         N 
       </mi> 
       <mi>
         z 
       </mi> 
      </msub> 
      <mo>
        + 
      </mo> 
      <mn>
        1 
      </mn> 
     </mrow> 
    </math>, the f function values at the other seven corners of the cell in the Equation (7) can be obtained from the shift of this function on the grid. For example, the f function value at the upper right corner of the cell will be 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        f 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <msub> 
         <mi>
           x 
         </mi> 
         <mi>
           i 
         </mi> 
        </msub> 
        <mo>
          + 
        </mo> 
        <mrow> 
         <mrow> 
          <msub> 
           <mi>
             h 
           </mi> 
           <mi>
             x 
           </mi> 
          </msub> 
         </mrow> 
         <mo>
           / 
         </mo> 
         <mn>
           2 
         </mn> 
        </mrow> 
        <mo>
          , 
        </mo> 
        <msub> 
         <mi>
           y 
         </mi> 
         <mi>
           j 
         </mi> 
        </msub> 
        <mo>
          + 
        </mo> 
        <mrow> 
         <mrow> 
          <msub> 
           <mi>
             h 
           </mi> 
           <mi>
             y 
           </mi> 
          </msub> 
         </mrow> 
         <mo>
           / 
         </mo> 
         <mn>
           2 
         </mn> 
        </mrow> 
        <mo>
          , 
        </mo> 
        <msub> 
         <mi>
           z 
         </mi> 
         <mi>
           k 
         </mi> 
        </msub> 
        <mo>
          + 
        </mo> 
        <mrow> 
         <mrow> 
          <msub> 
           <mi>
             h 
           </mi> 
           <mi>
             z 
           </mi> 
          </msub> 
         </mrow> 
         <mo>
           / 
         </mo> 
         <mn>
           2 
         </mn> 
        </mrow> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
      <mo>
        = 
      </mo> 
      <msup> 
       <mi>
         G 
       </mi> 
       <mrow> 
        <mi>
          t 
        </mi> 
        <mi>
          m 
        </mi> 
        <mi>
          p 
        </mi> 
       </mrow> 
      </msup> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <mi>
          i 
        </mi> 
        <mo>
          + 
        </mo> 
        <mn>
          1 
        </mn> 
        <mo>
          , 
        </mo> 
        <mi>
          j 
        </mi> 
        <mo>
          + 
        </mo> 
        <mn>
          1 
        </mn> 
        <mo>
          , 
        </mo> 
        <mi>
          k 
        </mi> 
        <mo>
          + 
        </mo> 
        <mn>
          1 
        </mn> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
     </mrow> 
    </math> for 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        i 
      </mi> 
      <mo>
        = 
      </mo> 
      <mn>
        1 
      </mn> 
      <mo>
        , 
      </mo> 
      <mo>
        ⋯ 
      </mo> 
      <mo>
        , 
      </mo> 
      <msub> 
       <mi>
         N 
       </mi> 
       <mi>
         x 
       </mi> 
      </msub> 
     </mrow> 
    </math>, 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        j 
      </mi> 
      <mo>
        = 
      </mo> 
      <mn>
        1 
      </mn> 
      <mo>
        , 
      </mo> 
      <mo>
        ⋯ 
      </mo> 
      <mo>
        , 
      </mo> 
      <msub> 
       <mi>
         N 
       </mi> 
       <mi>
         y 
       </mi> 
      </msub> 
     </mrow> 
    </math>, and 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        k 
      </mi> 
      <mo>
        = 
      </mo> 
      <mn>
        1 
      </mn> 
      <mo>
        , 
      </mo> 
      <mo>
        ⋯ 
      </mo> 
      <mo>
        , 
      </mo> 
      <msub> 
       <mi>
         N 
       </mi> 
       <mi>
         z 
       </mi> 
      </msub> 
     </mrow> 
    </math>. Only one f function evaluation is needed instead of eight function evaluations in Equation (7). This saves the computational cost by another factor of eight. In total, the efficient implementation can save the computing time of the effective Green’s function by more than a factor of 60 compared with the direct brute force implementation. An illustration of this implementation in Fortran90 is given in <xref ref-type="fig" rid="fig1">
     Figure 1
    </xref>.</p>
   <fig id="fig1" position="float">
    <label>Figure 1</label>
    <caption>
     <title>Figure 1. The Fortran90 implementation of the effective Green’s function calculation.</title>
    </caption>
    <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/9303327-rId116.jpeg?20240920035511" />
   </fig>
   <p>As a test of the practical performance of the above implementation, we measured the computing time of the above implementation and the computing time of the brute force implementation with a variety of problem sizes 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        N 
      </mi> 
      <mo>
        × 
      </mo> 
      <mi>
        N 
      </mi> 
      <mo>
        × 
      </mo> 
      <mi>
        N 
      </mi> 
     </mrow> 
    </math>. <xref ref-type="fig" rid="fig2">
     Figure 2
    </xref> shows the speedup of the above implementation as a function of one-dimensional grid points in the real application. More than 50 speedup is achieved for problem sizes greater than 64 × 64 × 64.</p>
   <p>From the above implementation, it is seen that the variable x, y, z in Equation (8) will be less than zero only when 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        i 
      </mi> 
      <mn>
        0 
      </mn> 
      <mo>
        = 
      </mo> 
      <mn>
        1 
      </mn> 
     </mrow> 
    </math>, or 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        j 
      </mi> 
      <mn>
        0 
      </mn> 
      <mo>
        = 
      </mo> 
      <mn>
        1 
      </mn> 
     </mrow> 
    </math>, or 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        k 
      </mi> 
      <mn>
        0 
      </mn> 
      <mo>
        = 
      </mo> 
      <mn>
        1 
      </mn> 
     </mrow> 
    </math>. The negative value of the variable could cause cancellation error in the evaluation of 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        x 
      </mi> 
      <mo>
        + 
      </mo> 
      <mi>
        r 
      </mi> 
     </mrow> 
    </math>, or 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        y 
      </mi> 
      <mo>
        + 
      </mo> 
      <mi>
        r 
      </mi> 
     </mrow> 
    </math>, or 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        z 
      </mi> 
      <mo>
        + 
      </mo> 
      <mi>
        r 
      </mi> 
     </mrow> 
    </math>. In some extreme applications, e.g., with very high electron beam energy, the longitudinal bunch length in the beam frame can be much larger than the transverse beam size. This results in the 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mrow> 
       <mo>
         | 
       </mo> 
       <mi>
         z 
       </mi> 
       <mo>
         | 
       </mo> 
      </mrow> 
      <mo>
        ≃ 
      </mo> 
      <mi>
        r 
      </mi> 
     </mrow> 
    </math> and a large cancellation error in 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        z 
      </mi> 
      <mo>
        + 
      </mo> 
      <mi>
        r 
      </mi> 
     </mrow> 
    </math> and even overflow of 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        ln 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <mi>
          z 
        </mi> 
        <mo>
          + 
        </mo> 
        <mi>
          r 
        </mi> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
     </mrow> 
    </math> for 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        z 
      </mi> 
      <mo>
        &lt; 
      </mo> 
      <mn>
        0 
      </mn> 
     </mrow> 
    </math>.</p>
   <p>The aforementioned cancellation error is due to the subtraction of two close real numbers on finite precision digital computers. This numerical cancellation error can be mitigated by either increasing the precision of each number on a computer or by using the following alternative expressions to replace the original summation in the Equation (8) or the Equation (8) itself.</p>
   <fig id="fig2" position="float">
    <label>Figure 2</label>
    <caption>
     <title>Figure 2. The speedup of the efficient implementation as a function of one-dimensional grid points.</title>
    </caption>
    <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/9303327-rId139.jpeg?20240920035511" />
   </fig>
   <p>Firstly, we can declare the variables x, y, z, and r in the above implementation as quadruple precision. This substantially increases the accuracy of each variable on a digital computer and reduces the cancellation error due to the double-precision representation of a variable.</p>
   <p>Secondly, by making use of the function relationship 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mtext>
        arcsinh 
      </mtext> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mi>
         x 
       </mi> 
       <mo>
         ) 
       </mo> 
      </mrow> 
      <mo>
        = 
      </mo> 
      <mi>
        ln 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <mi>
          x 
        </mi> 
        <mo>
          + 
        </mo> 
        <msqrt> 
         <mrow> 
          <mn>
            1 
          </mn> 
          <mo>
            + 
          </mo> 
          <msup> 
           <mi>
             x 
           </mi> 
           <mn>
             2 
           </mn> 
          </msup> 
         </mrow> 
        </msqrt> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
     </mrow> 
    </math>, neglecting the terms that do not contribute to the field calculation (i.e. 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mfrac> 
       <mn>
         1 
       </mn> 
       <mn>
         2 
       </mn> 
      </mfrac> 
      <mi>
        y 
      </mi> 
      <mi>
        z 
      </mi> 
      <mi>
        ln 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <msup> 
         <mi>
           y 
         </mi> 
         <mn>
           2 
         </mn> 
        </msup> 
        <mo>
          + 
        </mo> 
        <msup> 
         <mi>
           z 
         </mi> 
         <mn>
           2 
         </mn> 
        </msup> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
      <mo>
        + 
      </mo> 
      <mfrac> 
       <mn>
         1 
       </mn> 
       <mn>
         2 
       </mn> 
      </mfrac> 
      <mi>
        x 
      </mi> 
      <mi>
        z 
      </mi> 
      <mi>
        ln 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <msup> 
         <mi>
           x 
         </mi> 
         <mn>
           2 
         </mn> 
        </msup> 
        <mo>
          + 
        </mo> 
        <msup> 
         <mi>
           z 
         </mi> 
         <mn>
           2 
         </mn> 
        </msup> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
      <mo>
        + 
      </mo> 
      <mfrac> 
       <mn>
         1 
       </mn> 
       <mn>
         2 
       </mn> 
      </mfrac> 
      <mi>
        x 
      </mi> 
      <mi>
        y 
      </mi> 
      <mi>
        ln 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <msup> 
         <mi>
           x 
         </mi> 
         <mn>
           2 
         </mn> 
        </msup> 
        <mo>
          + 
        </mo> 
        <msup> 
         <mi>
           y 
         </mi> 
         <mn>
           2 
         </mn> 
        </msup> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
     </mrow> 
    </math>), the Equation (8) can be rewritten as:</p>
   <p>
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mtable> 
      <mtr> 
       <mtd> 
        <mi>
          f 
        </mi> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <mi>
            x 
          </mi> 
          <mo>
            , 
          </mo> 
          <mi>
            y 
          </mi> 
          <mo>
            , 
          </mo> 
          <mi>
            z 
          </mi> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
        <mo>
          = 
        </mo> 
        <mi>
          y 
        </mi> 
        <mi>
          z 
        </mi> 
        <mtext>
            
        </mtext> 
        <mtext>
          arcsinh 
        </mtext> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <mfrac> 
           <mi>
             x 
           </mi> 
           <mrow> 
            <msqrt> 
             <mrow> 
              <msup> 
               <mi>
                 y 
               </mi> 
               <mn>
                 2 
               </mn> 
              </msup> 
              <mo>
                + 
              </mo> 
              <msup> 
               <mi>
                 z 
               </mi> 
               <mn>
                 2 
               </mn> 
              </msup> 
             </mrow> 
            </msqrt> 
           </mrow> 
          </mfrac> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
        <mo>
          + 
        </mo> 
        <mi>
          x 
        </mi> 
        <mi>
          z 
        </mi> 
        <mtext>
            
        </mtext> 
        <mtext>
          arcsinh 
        </mtext> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <mfrac> 
           <mi>
             y 
           </mi> 
           <mrow> 
            <msqrt> 
             <mrow> 
              <msup> 
               <mi>
                 x 
               </mi> 
               <mn>
                 2 
               </mn> 
              </msup> 
              <mo>
                + 
              </mo> 
              <msup> 
               <mi>
                 z 
               </mi> 
               <mn>
                 2 
               </mn> 
              </msup> 
             </mrow> 
            </msqrt> 
           </mrow> 
          </mfrac> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
       </mtd> 
      </mtr> 
      <mtr> 
       <mtd> 
        <mtext>
            
        </mtext> 
        <mtext>
            
        </mtext> 
        <mo>
          + 
        </mo> 
        <mi>
          x 
        </mi> 
        <mi>
          y 
        </mi> 
        <mtext>
            
        </mtext> 
        <mtext>
          arcsinh 
        </mtext> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <mfrac> 
           <mi>
             z 
           </mi> 
           <mrow> 
            <msqrt> 
             <mrow> 
              <msup> 
               <mi>
                 x 
               </mi> 
               <mn>
                 2 
               </mn> 
              </msup> 
              <mo>
                + 
              </mo> 
              <msup> 
               <mi>
                 y 
               </mi> 
               <mn>
                 2 
               </mn> 
              </msup> 
             </mrow> 
            </msqrt> 
           </mrow> 
          </mfrac> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
        <mo>
          − 
        </mo> 
        <mfrac> 
         <mrow> 
          <msup> 
           <mi>
             z 
           </mi> 
           <mn>
             2 
           </mn> 
          </msup> 
         </mrow> 
         <mn>
           2 
         </mn> 
        </mfrac> 
        <mi>
          arctan 
        </mi> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <mfrac> 
           <mrow> 
            <mi>
              x 
            </mi> 
            <mi>
              y 
            </mi> 
           </mrow> 
           <mrow> 
            <mi>
              z 
            </mi> 
            <mi>
              r 
            </mi> 
           </mrow> 
          </mfrac> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
       </mtd> 
      </mtr> 
      <mtr> 
       <mtd> 
        <mtext>
            
        </mtext> 
        <mtext>
            
        </mtext> 
        <mo>
          − 
        </mo> 
        <mfrac> 
         <mrow> 
          <msup> 
           <mi>
             y 
           </mi> 
           <mn>
             2 
           </mn> 
          </msup> 
         </mrow> 
         <mn>
           2 
         </mn> 
        </mfrac> 
        <mi>
          arctan 
        </mi> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <mfrac> 
           <mrow> 
            <mi>
              x 
            </mi> 
            <mi>
              z 
            </mi> 
           </mrow> 
           <mrow> 
            <mi>
              y 
            </mi> 
            <mi>
              r 
            </mi> 
           </mrow> 
          </mfrac> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
        <mo>
          − 
        </mo> 
        <mfrac> 
         <mrow> 
          <msup> 
           <mi>
             x 
           </mi> 
           <mn>
             2 
           </mn> 
          </msup> 
         </mrow> 
         <mn>
           2 
         </mn> 
        </mfrac> 
        <mi>
          arctan 
        </mi> 
        <mrow> 
         <mo>
           ( 
         </mo> 
         <mrow> 
          <mfrac> 
           <mrow> 
            <mi>
              y 
            </mi> 
            <mi>
              z 
            </mi> 
           </mrow> 
           <mrow> 
            <mi>
              x 
            </mi> 
            <mi>
              r 
            </mi> 
           </mrow> 
          </mfrac> 
         </mrow> 
         <mo>
           ) 
         </mo> 
        </mrow> 
       </mtd> 
      </mtr> 
     </mtable> 
    </math>(9)</p>
   <p>This equation avoids the sum of two close but opposite sign variables in the original equation and the resultant cancellation error.</p>
   <p>Thirdly, one can define a small tolerance number 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mi>
       ϵ 
     </mi> 
    </math> (e.g. 10<sup>−</sup><sup>10</sup>) and use the Taylor expansion to obtain the following approximation:</p>
   <p>
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mtable columnalign="left"> 
      <mtr> 
       <mtd> 
        <mi>
          x 
        </mi> 
        <mo>
          + 
        </mo> 
        <mi>
          r 
        </mi> 
        <mo>
          = 
        </mo> 
        <mi>
          x 
        </mi> 
        <mo>
          + 
        </mo> 
        <mrow> 
         <mo>
           | 
         </mo> 
         <mi>
           x 
         </mi> 
         <mo>
           | 
         </mo> 
        </mrow> 
        <mo>
          + 
        </mo> 
        <mfrac> 
         <mn>
           1 
         </mn> 
         <mn>
           2 
         </mn> 
        </mfrac> 
        <mfrac> 
         <mrow> 
          <msup> 
           <mi>
             y 
           </mi> 
           <mn>
             2 
           </mn> 
          </msup> 
          <mo>
            + 
          </mo> 
          <msup> 
           <mi>
             z 
           </mi> 
           <mn>
             2 
           </mn> 
          </msup> 
         </mrow> 
         <mrow> 
          <mrow> 
           <mo>
             | 
           </mo> 
           <mi>
             x 
           </mi> 
           <mo>
             | 
           </mo> 
          </mrow> 
         </mrow> 
        </mfrac> 
        <mo>
          , 
        </mo> 
        <mtext>
            
        </mtext> 
        <mtext>
            
        </mtext> 
        <mtext>
            
        </mtext> 
        <mtext>
          for 
        </mtext> 
        <mtext>
            
        </mtext> 
        <mrow> 
         <mo>
           | 
         </mo> 
         <mrow> 
          <mi>
            x 
          </mi> 
          <mo>
            + 
          </mo> 
          <mi>
            r 
          </mi> 
         </mrow> 
         <mo>
           | 
         </mo> 
        </mrow> 
        <mo>
          &lt; 
        </mo> 
        <mi>
          ϵ 
        </mi> 
       </mtd> 
      </mtr> 
      <mtr> 
       <mtd> 
        <mi>
          y 
        </mi> 
        <mo>
          + 
        </mo> 
        <mi>
          r 
        </mi> 
        <mo>
          = 
        </mo> 
        <mi>
          y 
        </mi> 
        <mo>
          + 
        </mo> 
        <mrow> 
         <mo>
           | 
         </mo> 
         <mi>
           y 
         </mi> 
         <mo>
           | 
         </mo> 
        </mrow> 
        <mo>
          + 
        </mo> 
        <mfrac> 
         <mn>
           1 
         </mn> 
         <mn>
           2 
         </mn> 
        </mfrac> 
        <mfrac> 
         <mrow> 
          <msup> 
           <mi>
             x 
           </mi> 
           <mn>
             2 
           </mn> 
          </msup> 
          <mo>
            + 
          </mo> 
          <msup> 
           <mi>
             z 
           </mi> 
           <mn>
             2 
           </mn> 
          </msup> 
         </mrow> 
         <mrow> 
          <mrow> 
           <mo>
             | 
           </mo> 
           <mi>
             y 
           </mi> 
           <mo>
             | 
           </mo> 
          </mrow> 
         </mrow> 
        </mfrac> 
        <mo>
          , 
        </mo> 
        <mtext>
            
        </mtext> 
        <mtext>
            
        </mtext> 
        <mtext>
            
        </mtext> 
        <mtext>
          for 
        </mtext> 
        <mtext>
            
        </mtext> 
        <mrow> 
         <mo>
           | 
         </mo> 
         <mrow> 
          <mi>
            y 
          </mi> 
          <mo>
            + 
          </mo> 
          <mi>
            r 
          </mi> 
         </mrow> 
         <mo>
           | 
         </mo> 
        </mrow> 
        <mo>
          &lt; 
        </mo> 
        <mi>
          ϵ 
        </mi> 
       </mtd> 
      </mtr> 
      <mtr> 
       <mtd> 
        <mi>
          z 
        </mi> 
        <mo>
          + 
        </mo> 
        <mi>
          r 
        </mi> 
        <mo>
          = 
        </mo> 
        <mi>
          z 
        </mi> 
        <mo>
          + 
        </mo> 
        <mrow> 
         <mo>
           | 
         </mo> 
         <mi>
           z 
         </mi> 
         <mo>
           | 
         </mo> 
        </mrow> 
        <mo>
          + 
        </mo> 
        <mfrac> 
         <mn>
           1 
         </mn> 
         <mn>
           2 
         </mn> 
        </mfrac> 
        <mfrac> 
         <mrow> 
          <msup> 
           <mi>
             x 
           </mi> 
           <mn>
             2 
           </mn> 
          </msup> 
          <mo>
            + 
          </mo> 
          <msup> 
           <mi>
             y 
           </mi> 
           <mn>
             2 
           </mn> 
          </msup> 
         </mrow> 
         <mrow> 
          <mrow> 
           <mo>
             | 
           </mo> 
           <mi>
             z 
           </mi> 
           <mo>
             | 
           </mo> 
          </mrow> 
         </mrow> 
        </mfrac> 
        <mo>
          , 
        </mo> 
        <mtext>
            
        </mtext> 
        <mtext>
            
        </mtext> 
        <mtext>
            
        </mtext> 
        <mtext>
          for 
        </mtext> 
        <mtext>
            
        </mtext> 
        <mrow> 
         <mo>
           | 
         </mo> 
         <mrow> 
          <mi>
            x 
          </mi> 
          <mo>
            + 
          </mo> 
          <mi>
            r 
          </mi> 
         </mrow> 
         <mo>
           | 
         </mo> 
        </mrow> 
        <mo>
          &lt; 
        </mo> 
        <mi>
          ϵ 
        </mi> 
       </mtd> 
      </mtr> 
     </mtable> 
    </math>(10)</p>
   <p>The above approximation is used in the natural logarithm function to mitigate the cancellation error.</p>
   <p>Fourthly, one can rewrite the expression in the natural logarithm function of Equation (8) as:</p>
   <p>
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mtable columnalign="left"> 
      <mtr> 
       <mtd> 
        <mi>
          x 
        </mi> 
        <mo>
          + 
        </mo> 
        <mi>
          r 
        </mi> 
        <mo>
          = 
        </mo> 
        <mfrac> 
         <mrow> 
          <msup> 
           <mi>
             y 
           </mi> 
           <mn>
             2 
           </mn> 
          </msup> 
          <mo>
            + 
          </mo> 
          <msup> 
           <mi>
             z 
           </mi> 
           <mn>
             2 
           </mn> 
          </msup> 
         </mrow> 
         <mrow> 
          <mi>
            r 
          </mi> 
          <mo>
            − 
          </mo> 
          <mi>
            x 
          </mi> 
         </mrow> 
        </mfrac> 
        <mo>
          , 
        </mo> 
        <mtext>
            
        </mtext> 
        <mtext>
            
        </mtext> 
        <mtext>
            
        </mtext> 
        <mtext>
          for 
        </mtext> 
        <mtext>
            
        </mtext> 
        <mi>
          x 
        </mi> 
        <mo>
          &lt; 
        </mo> 
        <mn>
          0 
        </mn> 
       </mtd> 
      </mtr> 
      <mtr> 
       <mtd> 
        <mi>
          y 
        </mi> 
        <mo>
          + 
        </mo> 
        <mi>
          r 
        </mi> 
        <mo>
          = 
        </mo> 
        <mfrac> 
         <mrow> 
          <msup> 
           <mi>
             x 
           </mi> 
           <mn>
             2 
           </mn> 
          </msup> 
          <mo>
            + 
          </mo> 
          <msup> 
           <mi>
             z 
           </mi> 
           <mn>
             2 
           </mn> 
          </msup> 
         </mrow> 
         <mrow> 
          <mi>
            r 
          </mi> 
          <mo>
            − 
          </mo> 
          <mi>
            y 
          </mi> 
         </mrow> 
        </mfrac> 
        <mo>
          , 
        </mo> 
        <mtext>
            
        </mtext> 
        <mtext>
            
        </mtext> 
        <mtext>
            
        </mtext> 
        <mtext>
          for 
        </mtext> 
        <mtext>
            
        </mtext> 
        <mi>
          y 
        </mi> 
        <mo>
          &lt; 
        </mo> 
        <mn>
          0 
        </mn> 
       </mtd> 
      </mtr> 
      <mtr> 
       <mtd> 
        <mi>
          z 
        </mi> 
        <mo>
          + 
        </mo> 
        <mi>
          r 
        </mi> 
        <mo>
          = 
        </mo> 
        <mfrac> 
         <mrow> 
          <msup> 
           <mi>
             x 
           </mi> 
           <mn>
             2 
           </mn> 
          </msup> 
          <mo>
            + 
          </mo> 
          <msup> 
           <mi>
             y 
           </mi> 
           <mn>
             2 
           </mn> 
          </msup> 
         </mrow> 
         <mrow> 
          <mi>
            r 
          </mi> 
          <mo>
            − 
          </mo> 
          <mi>
            z 
          </mi> 
         </mrow> 
        </mfrac> 
        <mo>
          , 
        </mo> 
        <mtext>
            
        </mtext> 
        <mtext>
            
        </mtext> 
        <mtext>
            
        </mtext> 
        <mtext>
          for 
        </mtext> 
        <mtext>
            
        </mtext> 
        <mi>
          z 
        </mi> 
        <mo>
          &lt; 
        </mo> 
        <mn>
          0 
        </mn> 
       </mtd> 
      </mtr> 
     </mtable> 
    </math>(11)</p>
   <p>The above expression turns the original summation of two opposite sign variables into an expression that includes subtraction of these variables and avoids the cancellation error.</p>
  </sec><sec id="s4">
   <title>4. A Benchmark Example</title>
   <p>As a test, we used a 100 pC electron beam with a 3D Gaussian density distribution and computed the electric fields in the beam frame from all of the above schemes and from a semi-analytical solution. The semi-analytical electric potential in the rest beam frame for a Gaussian density distribution is given by <xref ref-type="bibr" rid="scirp.136109-14">
     [14]
    </xref>:</p>
   <p>
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        ϕ 
      </mi> 
      <mrow> 
       <mo>
         ( 
       </mo> 
       <mrow> 
        <mi>
          x 
        </mi> 
        <mo>
          , 
        </mo> 
        <mi>
          y 
        </mi> 
        <mo>
          , 
        </mo> 
        <mi>
          z 
        </mi> 
       </mrow> 
       <mo>
         ) 
       </mo> 
      </mrow> 
      <mo>
        = 
      </mo> 
      <mfrac> 
       <mi>
         Q 
       </mi> 
       <mrow> 
        <mn>
          4 
        </mn> 
        <mi>
          π 
        </mi> 
        <msub> 
         <mi>
           ϵ 
         </mi> 
         <mn>
           0 
         </mn> 
        </msub> 
       </mrow> 
      </mfrac> 
      <msqrt> 
       <mrow> 
        <mfrac> 
         <mn>
           2 
         </mn> 
         <mi>
           π 
         </mi> 
        </mfrac> 
       </mrow> 
      </msqrt> 
      <mstyle displaystyle="true"> 
       <mrow> 
        <msubsup> 
         <mo>
           ∫ 
         </mo> 
         <mn>
           0 
         </mn> 
         <mi>
           ∞ 
         </mi> 
        </msubsup> 
        <mrow> 
         <mfrac> 
          <mrow> 
           <msup> 
            <mtext>
              e 
            </mtext> 
            <mrow> 
             <mfrac> 
              <mrow> 
               <mo>
                 − 
               </mo> 
               <msup> 
                <mi>
                  λ 
                </mi> 
                <mn>
                  2 
                </mn> 
               </msup> 
               <msup> 
                <mi>
                  x 
                </mi> 
                <mn>
                  2 
                </mn> 
               </msup> 
              </mrow> 
              <mrow> 
               <mn>
                 2 
               </mn> 
               <mrow> 
                <mo>
                  ( 
                </mo> 
                <mrow> 
                 <msup> 
                  <mi>
                    λ 
                  </mi> 
                  <mn>
                    2 
                  </mn> 
                 </msup> 
                 <msubsup> 
                  <mi>
                    σ 
                  </mi> 
                  <mi>
                    x 
                  </mi> 
                  <mn>
                    2 
                  </mn> 
                 </msubsup> 
                 <mo>
                   + 
                 </mo> 
                 <mn>
                   1 
                 </mn> 
                </mrow> 
                <mo>
                  ) 
                </mo> 
               </mrow> 
              </mrow> 
             </mfrac> 
            </mrow> 
           </msup> 
           <msup> 
            <mtext>
              e 
            </mtext> 
            <mrow> 
             <mfrac> 
              <mrow> 
               <mo>
                 − 
               </mo> 
               <msup> 
                <mi>
                  λ 
                </mi> 
                <mn>
                  2 
                </mn> 
               </msup> 
               <msup> 
                <mi>
                  y 
                </mi> 
                <mn>
                  2 
                </mn> 
               </msup> 
              </mrow> 
              <mrow> 
               <mn>
                 2 
               </mn> 
               <mrow> 
                <mo>
                  ( 
                </mo> 
                <mrow> 
                 <msup> 
                  <mi>
                    λ 
                  </mi> 
                  <mn>
                    2 
                  </mn> 
                 </msup> 
                 <msubsup> 
                  <mi>
                    σ 
                  </mi> 
                  <mi>
                    y 
                  </mi> 
                  <mn>
                    2 
                  </mn> 
                 </msubsup> 
                 <mo>
                   + 
                 </mo> 
                 <mn>
                   1 
                 </mn> 
                </mrow> 
                <mo>
                  ) 
                </mo> 
               </mrow> 
              </mrow> 
             </mfrac> 
            </mrow> 
           </msup> 
           <msup> 
            <mtext>
              e 
            </mtext> 
            <mrow> 
             <mfrac> 
              <mrow> 
               <mo>
                 − 
               </mo> 
               <msup> 
                <mi>
                  λ 
                </mi> 
                <mn>
                  2 
                </mn> 
               </msup> 
               <msup> 
                <mi>
                  z 
                </mi> 
                <mn>
                  2 
                </mn> 
               </msup> 
              </mrow> 
              <mrow> 
               <mn>
                 2 
               </mn> 
               <mrow> 
                <mo>
                  ( 
                </mo> 
                <mrow> 
                 <msup> 
                  <mi>
                    λ 
                  </mi> 
                  <mn>
                    2 
                  </mn> 
                 </msup> 
                 <msubsup> 
                  <mi>
                    σ 
                  </mi> 
                  <mi>
                    z 
                  </mi> 
                  <mn>
                    2 
                  </mn> 
                 </msubsup> 
                 <mo>
                   + 
                 </mo> 
                 <mn>
                   1 
                 </mn> 
                </mrow> 
                <mo>
                  ) 
                </mo> 
               </mrow> 
              </mrow> 
             </mfrac> 
            </mrow> 
           </msup> 
          </mrow> 
          <mrow> 
           <msqrt> 
            <mrow> 
             <mrow> 
              <mo>
                ( 
              </mo> 
              <mrow> 
               <msup> 
                <mi>
                  λ 
                </mi> 
                <mn>
                  2 
                </mn> 
               </msup> 
               <msubsup> 
                <mi>
                  σ 
                </mi> 
                <mi>
                  x 
                </mi> 
                <mn>
                  2 
                </mn> 
               </msubsup> 
               <mo>
                 + 
               </mo> 
               <mn>
                 1 
               </mn> 
              </mrow> 
              <mo>
                ) 
              </mo> 
             </mrow> 
             <mrow> 
              <mo>
                ( 
              </mo> 
              <mrow> 
               <msup> 
                <mi>
                  λ 
                </mi> 
                <mn>
                  2 
                </mn> 
               </msup> 
               <msubsup> 
                <mi>
                  σ 
                </mi> 
                <mi>
                  y 
                </mi> 
                <mn>
                  2 
                </mn> 
               </msubsup> 
               <mo>
                 + 
               </mo> 
               <mn>
                 1 
               </mn> 
              </mrow> 
              <mo>
                ) 
              </mo> 
             </mrow> 
             <mrow> 
              <mo>
                ( 
              </mo> 
              <mrow> 
               <msup> 
                <mi>
                  λ 
                </mi> 
                <mn>
                  2 
                </mn> 
               </msup> 
               <msubsup> 
                <mi>
                  σ 
                </mi> 
                <mi>
                  z 
                </mi> 
                <mn>
                  2 
                </mn> 
               </msubsup> 
               <mo>
                 + 
               </mo> 
               <mn>
                 1 
               </mn> 
              </mrow> 
              <mo>
                ) 
              </mo> 
             </mrow> 
            </mrow> 
           </msqrt> 
          </mrow> 
         </mfrac> 
         <mtext>
           d 
         </mtext> 
         <mi>
           λ 
         </mi> 
        </mrow> 
       </mrow> 
      </mstyle> 
     </mrow> 
    </math>(12)</p>
   <p>where Q is the total charge of the beam, and 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mi>
         σ 
       </mi> 
       <mi>
         x 
       </mi> 
      </msub> 
     </mrow> 
    </math>, 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mi>
         σ 
       </mi> 
       <mi>
         y 
       </mi> 
      </msub> 
     </mrow> 
    </math>, 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mi>
         σ 
       </mi> 
       <mi>
         z 
       </mi> 
      </msub> 
     </mrow> 
    </math> are the RMS sizes of the beam in each dimension. In this test, we assumed that 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mi>
         σ 
       </mi> 
       <mi>
         x 
       </mi> 
      </msub> 
      <mo>
        = 
      </mo> 
      <msub> 
       <mi>
         σ 
       </mi> 
       <mi>
         y 
       </mi> 
      </msub> 
      <mo>
        = 
      </mo> 
      <mn>
        0.5 
      </mn> 
     </mrow> 
    </math> mm and 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <msub> 
       <mi>
         σ 
       </mi> 
       <mi>
         z 
       </mi> 
      </msub> 
      <mo>
        = 
      </mo> 
      <mn>
        1 
      </mn> 
     </mrow> 
    </math> mm. We varied electron beam kinetic energy so that the electron beam longitudinal bunch length 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        γ 
      </mi> 
      <msub> 
       <mi>
         σ 
       </mi> 
       <mi>
         z 
       </mi> 
      </msub> 
     </mrow> 
    </math> in the beam frame increased with the increase of beam energy. This increases the longitudinal-to-transverse aspect ratio with the increase of beam energy in the beam frame. We used 129 × 129 × 257 grid points to solve the Poisson equation using the above integrated Green’s function method in the rest beam frame. Electric fields are numerically computed from 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        E 
      </mi> 
      <mo>
        = 
      </mo> 
      <mo>
        − 
      </mo> 
      <mo>
        ∇ 
      </mo> 
      <mi>
        ϕ 
      </mi> 
     </mrow> 
    </math> in this frame using a second-order finite difference approximation.</p>
   <p>
    <xref ref-type="fig" rid="fig3">
     Figure 3
    </xref> shows horizontal and longitudinal electric fields as a function of longitudinal coordinate z in the beam frame from the semi-analytical solution and from the original integrated Green’s function method at 100 GeV electron beam energy. It is seen that the electric fields from the numerical integrated Green’s function solution agree with those from the semi-analytical solution very well.</p>
   <p>In order to check the valid regime of the integrated Green’s function method, we varied the electron beam kinetic energy from 100 GeV to 100 TeV. This results in about 2 × 10<sup>5</sup> to 2 × 10<sup>8</sup> longitudinal-to-transverse aspect ratio for the computational cells in the rest beam frame. <xref ref-type="fig" rid="fig4">
     Figure 4
    </xref> shows the maximum horizontal relative electric field error and the maximum longitudinal relative electric field error as a function of the electron beam kinetic energy using the original double</p>
   <fig id="fig3" position="float">
    <label>Figure 3</label>
    <caption>
     <title>Figure 3. Horizontal electric field E<sub>x</sub> (top) and longitudinal electric field E<sub>z</sub> (bottom) as a function of longitudinal coordinate z in the beam from the semi-analytical solution (magenta) and from the integrated Green’s function method (green) at 100 GeV electron beam energy. There are two lines in each plot sitting on top of each other.</title>
    </caption>
    <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/9303327-rId168.jpeg?20240920035511" />
   </fig>
   <p>precision logarithm integrated Green’s function (IGF), the quadruple precision logarithm IGF, the arcsinh IGF, the approximated logarithm IGF, and the rewritten logarithm IGF. Here, the differences between the numerical solutions from the integrated Green’s function method and the semi-analytical solutions were calculated on the three-dimensional 33 × 33 × 65 grid points for both the horizontal electric field and the longitudinal electric field. These differences are normalized by the maximum values of the horizontal electric field and the longitudinal field from the semi-analytical model, respectively, to attain the 3D relative errors. The maximum relative errors are attained from the relative errors on the 3D grid. It is seen that all five integrated Green’s function implementations yield nearly the same less than 0.1% relative errors up to 50 TeV beam energy. This is probably due to the fact that the cancellation error occurs only 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        z 
      </mi> 
      <mo>
        = 
      </mo> 
      <mo>
        − 
      </mo> 
      <mfrac> 
       <mrow> 
        <msub> 
         <mi>
           h 
         </mi> 
         <mi>
           z 
         </mi> 
        </msub> 
       </mrow> 
       <mn>
         2 
       </mn> 
      </mfrac> 
     </mrow> 
    </math> and</p>
   <fig id="fig4" position="float">
    <label>Figure 4</label>
    <caption>
     <title>Figure 4. The maximum horizontal relative electric field error (top) and the maximum longitudinal relative electric field error (bottom) as a function of the electron beam kinetic energy using the original double precision logarithm IGF (plus), the quadruple precision logarithm IGF (cross), the arcsinh IGF (star), the approximated logarithm IGF (empty square), and the rewritten logarithm IGF (solid square).</title>
    </caption>
    <graphic mimetype="image" position="float" xlink:type="simple" xlink:href="https://html.scirp.org/file/9303327-rId171.jpeg?20240920035511" />
   </fig>
   <p>has a small contribution to the total 3D summation. At the 100 TeV electron beam energy, the original logarithm integrated Green’s function fails due to the cancellation error in the evaluation of 
    <math display="inline" xmlns="http://www.w3.org/1998/Math/MathML"> <mrow> 
      <mi>
        z 
      </mi> 
      <mo>
        + 
      </mo> 
      <mi>
        r 
      </mi> 
     </mrow> 
    </math> and the resultant overflow of the logarithm function. The other four mitigation schemes all work well and yield less than 0.1% relative errors. The computational cost of the quadruple precision implementation of the IGF is the highest (more than 10 times the original IGF) due to the lack of direct hardware support for such operations. The computational cost of the arcsinh implementation of the IGF is about a factor of two of that of the original IGF. The computational costs of the approximated IGF and the rewritten IGF implementations are close to that of the original IGF, while the rewritten IGF implementation does not need to specify any tolerance number.</p>
  </sec><sec id="s5">
   <title>5. Conclusion</title>
   <p>In this paper, we present an efficient implementation of the integrated Green’s function method to solve the 3D Poisson’s Equation in a large aspect ratio computational domain subject to the open boundary conditions. Our implementation suggests more than a factor of 50 reduction of computational cost compared with the direct brute force implementation. Furthermore, several alternative expressions are proposed to avoid cancellation errors and work well under extreme conditions. This implementation can have applications in many fields, such as high-brightness beam physics in particle accelerators, plasma physics, and micromagnetics, where the solution of 3D Poisson equation in the large aspect ratio computational domain is needed.</p>
  </sec><sec id="s6">
   <title>Acknowledgements</title>
   <p>This work was supported by the U.S. Department of Energy under Contract No. DE-AC02-05CH11231 and used computer resources at the National Energy Research Scientific Computing Center.</p>
  </sec>
 </body><back>
  <ref-list>
   <title>References</title>
   <ref id="scirp.136109-ref1">
    <label>1</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Qiang, J., Lidia, S., Ryne, R.D. and Limborg-Deprey, C. (2006) Three-Dimensional Quasistatic Model for High Brightness Beam Dynamics Simulation. Physical Review Special Topics—Accelerators and Beams, 9, Article 044204. &gt;https://doi.org/10.1103/physrevstab.9.044204
    </mixed-citation>
   </ref>
   <ref id="scirp.136109-ref2">
    <label>2</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Qiang, J., Ryne, R.D., Venturini, M., Zholents, A.A. and Pogorelov, I.V. (2009) High Resolution Simulation of Beam Dynamics in Electron Linacs for X-Ray Free Electron Lasers. Physical Review Special Topics—Accelerators and Beams, 12, Article 100702. &gt;https://doi.org/10.1103/physrevstab.12.100702
    </mixed-citation>
   </ref>
   <ref id="scirp.136109-ref3">
    <label>3</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Floettmann, K. (2017) ASTRA: A Space-Charge TRacking Algorithm. &gt;https://www.desy.de/~mpyflo/Astra_manual/Astra-Manual_V3.2.pdf 
    </mixed-citation>
   </ref>
   <ref id="scirp.136109-ref4">
    <label>4</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Adelmann, A., et al. (2018) The OPAL (Object Oriented Parallel Accelerator Library) Framework. Paul Scherrer Institut PSI-PR-08-02.&gt;https://gitlab.psi.ch/OPAL/src/wikis/home 
    </mixed-citation>
   </ref>
   <ref id="scirp.136109-ref5">
    <label>5</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Tomin, S., et al. (2017) OCELOT as a Framework for Beam Dynamics Simulations of X-Ray Sources. Proceedings of the 8th International Particle Accelerator Conference, Copenhagen, 14-19 May 2017, 2642. 
    </mixed-citation>
   </ref>
   <ref id="scirp.136109-ref6">
    <label>6</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Mayes, C.E., Ryne, R.D. and Sagan, D.C. (2018) 3D Space Charge in BMAD. Proceedings of the 9th International Particle Accelerator Conference, Vancouver, 29 April-4 May 2018, 3428. 
    </mixed-citation>
   </ref>
   <ref id="scirp.136109-ref7">
    <label>7</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Oeftiger, A. and Hegglin, S. (2016) Space Charge Modules for PyHEADTAIL. Proceedings of HB 2016, Malmo, 3-8 July 2016, 124.
    </mixed-citation>
   </ref>
   <ref id="scirp.136109-ref8">
    <label>8</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Latina, A. (2020) RF-Track Reference Manual. Tech. &gt;https://zenodo.org/record/3887085 
    </mixed-citation>
   </ref>
   <ref id="scirp.136109-ref9">
    <label>9</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Iadarola, G., et al. (2023) Xsuite: An Integrated Beam Physics Simulation Framework. Proceedings of HB 2023, Geneva, 9-13 October 2023, 73. 
    </mixed-citation>
   </ref>
   <ref id="scirp.136109-ref10">
    <label>10</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Fedeli, L., Huebl, A., Boillod-Cerneux, F., Clark, T., Gott, K., Hillairet, C., et al. (2022) Pushing the Frontier in the Design of Laser-Based Electron Accelerators with Groundbreaking Mesh-Refined Particle-in-Cell Simulations on Exascale-Class Supercomputers. SC22: International Conference for High Performance Computing, Networking, Storage and Analysis, Dallas, 13-18 November 2022, 1-12. &gt;https://doi.org/10.1109/sc41404.2022.00008 
    </mixed-citation>
   </ref>
   <ref id="scirp.136109-ref11">
    <label>11</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Huebl, A., Lehe, R., Mitchell, C.E., Qiang, J., Ryne, R.D., Sandberg, R.T. and Vay, J. (2022) Next Generation Computational Tools for the Modeling and Design of Particle Accelerators at Exascale. Proceedings of 2022 North American Particle Accelerator Conference, Albuquerque, 7-12 August 2022, 302-306.
    </mixed-citation>
   </ref>
   <ref id="scirp.136109-ref12">
    <label>12</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Qiang, J., Lidia, S., Ryne, R.D. and Limborg-Deprey, C. (2007) Erratum: Three-Dimensional Quasistatic Model for High Brightness Beam Dynamics Simulation. Physical Review Special Topics—Accelerators and Beams, 10, Article 129901. &gt;https://doi.org/10.1103/physrevstab.10.129901 
    </mixed-citation>
   </ref>
   <ref id="scirp.136109-ref13">
    <label>13</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Hockney, R. and Eastwood, J. (1988) Computer Simulation Using Particles. Taylor&amp;Francis. &gt;https://doi.org/10.1201/9781439822050 
    </mixed-citation>
   </ref>
   <ref id="scirp.136109-ref14">
    <label>14</label>
    <mixed-citation publication-type="other" xlink:type="simple">
     Stupakov, G. and Penn, G. (2018) Classical Mechanics and Electromagnetism in Accelerator Physics. Springer.
    </mixed-citation>
   </ref>
  </ref-list>
 </back>
</article>