You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<h1>Poisson Solver<aclass="headerlink" href="#poisson-solver" title="Permalink to this heading"></a></h1>
169
-
<p>AMReX provides FFT based Poisson solvers. <codeclass="code highlight cpp c++ docutils literal highlight-c++"><spanclass="n">FFT</span><spanclass="o">::</span><spanclass="n">Poisson</span><spanclass="w"></span></code> supports
170
-
periodic (<codeclass="code highlight cpp c++ docutils literal highlight-c++"><spanclass="n">FFT</span><spanclass="o">::</span><spanclass="n">Boundary</span><spanclass="o">::</span><spanclass="n">periodic</span><spanclass="w"></span></code>), homogeneous Neumann
171
-
(<codeclass="code highlight cpp c++ docutils literal highlight-c++"><spanclass="n">FFT</span><spanclass="o">::</span><spanclass="n">Boundary</span><spanclass="o">::</span><spanclass="n">even</span><spanclass="w"></span></code>), and homogeneous Dirichlet
170
+
<p>AMReX provides FFT based Poisson solvers. Here, Poisson’s equation is</p>
171
+
<divclass="math notranslate nohighlight">
172
+
\[\nabla^2 \phi = \rho.\]</div>
173
+
<p><codeclass="code highlight cpp c++ docutils literal highlight-c++"><spanclass="n">FFT</span><spanclass="o">::</span><spanclass="n">Poisson</span><spanclass="w"></span></code> supports periodic (<codeclass="code highlight cpp c++ docutils literal highlight-c++"><spanclass="n">FFT</span><spanclass="o">::</span><spanclass="n">Boundary</span><spanclass="o">::</span><spanclass="n">periodic</span><spanclass="w"></span></code>),
174
+
homogeneous Neumann (<codeclass="code highlight cpp c++ docutils literal highlight-c++"><spanclass="n">FFT</span><spanclass="o">::</span><spanclass="n">Boundary</span><spanclass="o">::</span><spanclass="n">even</span><spanclass="w"></span></code>), and homogeneous Dirichlet
172
175
(<codeclass="code highlight cpp c++ docutils literal highlight-c++"><spanclass="n">FFT</span><spanclass="o">::</span><spanclass="n">Boundary</span><spanclass="o">::</span><spanclass="n">odd</span><spanclass="w"></span></code>) boundaries using FFT. Below is an example of
<p><codeclass="code highlight cpp c++ docutils literal highlight-c++"><spanclass="n">FFT</span><spanclass="o">::</span><spanclass="n">PoissonOpenBC</span><spanclass="w"></span></code> is a 3D only solver that supports open
201
+
boundaries. Its implementation utilizes <codeclass="code highlight cpp c++ docutils literal highlight-c++"><spanclass="n">FFT</span><spanclass="o">::</span><spanclass="n">OpenBCSolver</span><spanclass="w"></span></code>, which can
202
+
be used for implementing convolution based solvers with a user provided
203
+
Green’s function. If users want to extend the open BC solver to 2D or other
204
+
types of Green’s function, they could use <codeclass="code highlight cpp c++ docutils literal highlight-c++"><spanclass="n">FFT</span><spanclass="o">::</span><spanclass="n">PoissonOpenBC</span><spanclass="w"></span></code> as an
205
+
example. Below is an example of solving Poisson’s equation with open
<spanclass="n">MultiFab</span><spanclass="w"></span><spanclass="nf">soln</span><spanclass="p">(...);</span><spanclass="w"></span><spanclass="c1">// soln can be either nodal or cell-centered.</span>
209
+
<spanclass="n">MultiFab</span><spanclass="w"></span><spanclass="nf">rhs</span><spanclass="p">(...);</span><spanclass="w"></span><spanclass="c1">// rhs must have the same index type as soln.</span>
210
+
211
+
<spanclass="kt">int</span><spanclass="w"></span><spanclass="n">ng</span><spanclass="w"></span><spanclass="o">=</span><spanclass="w"></span><spanclass="p">...;</span><spanclass="w"></span><spanclass="c1">// ng can be non-zero, if we want to compute potential</span>
212
+
<spanclass="w"></span><spanclass="c1">// outside the domain.</span>
<p><codeclass="code highlight cpp c++ docutils literal highlight-c++"><spanclass="n">FFT</span><spanclass="o">::</span><spanclass="n">PoissonHybrid</span><spanclass="w"></span></code> is a 3D only solver that supports periodic
198
218
boundaries in the first two dimensions and Neumann boundary in the last
199
219
dimension. The last dimension is solved with a tridiagonal solver that can
<divclass="ttc" id="aclassamrex_1_1BoxArray_html"><divclass="ttname"><ahref="classamrex_1_1BoxArray.html">amrex::BoxArray</a></div><divclass="ttdoc">A collection of Boxes stored in an Array.</div><divclass="ttdef"><b>Definition:</b> AMReX_BoxArray.H:548</div></div>
194
+
<divclass="ttc" id="aclassamrex_1_1BoxArray_html"><divclass="ttname"><ahref="classamrex_1_1BoxArray.html">amrex::BoxArray</a></div><divclass="ttdoc">A collection of Boxes stored in an Array.</div><divclass="ttdef"><b>Definition:</b> AMReX_BoxArray.H:549</div></div>
195
195
<divclass="ttc" id="aclassamrex_1_1DistributionMapping_html"><divclass="ttname"><ahref="classamrex_1_1DistributionMapping.html">amrex::DistributionMapping</a></div><divclass="ttdoc">Calculates the distribution of FABs to MPI processes.</div><divclass="ttdef"><b>Definition:</b> AMReX_DistributionMapping.H:41</div></div>
196
196
<divclass="ttc" id="aclassamrex_1_1Geometry_html"><divclass="ttname"><ahref="classamrex_1_1Geometry.html">amrex::Geometry</a></div><divclass="ttdoc">Rectangular problem domain geometry.</div><divclass="ttdef"><b>Definition:</b> AMReX_Geometry.H:73</div></div>
197
197
<divclass="ttc" id="aclassamrex_1_1RealBox_html"><divclass="ttname"><ahref="classamrex_1_1RealBox.html">amrex::RealBox</a></div><divclass="ttdoc">A Box with real dimensions. A RealBox is OK iff volume >= 0.</div><divclass="ttdef"><b>Definition:</b> AMReX_RealBox.H:21</div></div>
<divclass="ttc" id="aclassamrex_1_1AmrData_html_aff316a96447744ee3bd4e3abbb555f6b"><divclass="ttname"><ahref="classamrex_1_1AmrData.html#aff316a96447744ee3bd4e3abbb555f6b">amrex::AmrData::PlotFileVersion</a></div><divclass="ttdeci">const std::string & PlotFileVersion() const</div><divclass="ttdef"><b>Definition:</b> AMReX_AmrData.H:116</div></div>
397
-
<divclass="ttc" id="aclassamrex_1_1BoxArray_html"><divclass="ttname"><ahref="classamrex_1_1BoxArray.html">amrex::BoxArray</a></div><divclass="ttdoc">A collection of Boxes stored in an Array.</div><divclass="ttdef"><b>Definition:</b> AMReX_BoxArray.H:548</div></div>
397
+
<divclass="ttc" id="aclassamrex_1_1BoxArray_html"><divclass="ttname"><ahref="classamrex_1_1BoxArray.html">amrex::BoxArray</a></div><divclass="ttdoc">A collection of Boxes stored in an Array.</div><divclass="ttdef"><b>Definition:</b> AMReX_BoxArray.H:549</div></div>
<divclass="ttc" id="aclassamrex_1_1DistributionMapping_html"><divclass="ttname"><ahref="classamrex_1_1DistributionMapping.html">amrex::DistributionMapping</a></div><divclass="ttdoc">Calculates the distribution of FABs to MPI processes.</div><divclass="ttdef"><b>Definition:</b> AMReX_DistributionMapping.H:41</div></div>
400
400
<divclass="ttc" id="aclassamrex_1_1FArrayBox_html"><divclass="ttname"><ahref="classamrex_1_1FArrayBox.html">amrex::FArrayBox</a></div><divclass="ttdoc">A Fortran Array of REALs.</div><divclass="ttdef"><b>Definition:</b> AMReX_FArrayBox.H:229</div></div>
Copy file name to clipboardExpand all lines: amrex/docs_html/doxygen/AMReX__AmrLevel_8H_source.html
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -731,8 +731,8 @@
731
731
<divclass="ttc" id="aclassamrex_1_1Amr_html"><divclass="ttname"><ahref="classamrex_1_1Amr.html">amrex::Amr</a></div><divclass="ttdoc">Manage hierarchy of levels for time-dependent AMR computations.</div><divclass="ttdef"><b>Definition:</b> AMReX_Amr.H:35</div></div>
732
732
<divclass="ttc" id="aclassamrex_1_1Amr_html_a5db40812e41cec37353e6308befc77da"><divclass="ttname"><ahref="classamrex_1_1Amr.html#a5db40812e41cec37353e6308befc77da">amrex::Amr::getLevel</a></div><divclass="ttdeci">AmrLevel & getLevel(int lev) noexcept</div><divclass="ttdoc">AmrLevel lev.</div><divclass="ttdef"><b>Definition:</b> AMReX_Amr.H:189</div></div>
733
733
<divclass="ttc" id="aclassamrex_1_1Amr_html_a8101a391189955c50c7a36d359f3f5ed"><divclass="ttname"><ahref="classamrex_1_1Amr.html#a8101a391189955c50c7a36d359f3f5ed">amrex::Amr::levelSteps</a></div><divclass="ttdeci">int levelSteps(int lev) const noexcept</div><divclass="ttdoc">Number of time steps at specified level.</div><divclass="ttdef"><b>Definition:</b> AMReX_Amr.H:103</div></div>
734
-
<divclass="ttc" id="aclassamrex_1_1BoxArray_html"><divclass="ttname"><ahref="classamrex_1_1BoxArray.html">amrex::BoxArray</a></div><divclass="ttdoc">A collection of Boxes stored in an Array.</div><divclass="ttdef"><b>Definition:</b> AMReX_BoxArray.H:548</div></div>
735
-
<divclass="ttc" id="aclassamrex_1_1BoxArray_html_ac492bfeacfc03ff2dcb5375e5422d417"><divclass="ttname"><ahref="classamrex_1_1BoxArray.html#ac492bfeacfc03ff2dcb5375e5422d417">amrex::BoxArray::size</a></div><divclass="ttdeci">Long size() const noexcept</div><divclass="ttdoc">Return the number of boxes in the BoxArray.</div><divclass="ttdef"><b>Definition:</b> AMReX_BoxArray.H:595</div></div>
734
+
<divclass="ttc" id="aclassamrex_1_1BoxArray_html"><divclass="ttname"><ahref="classamrex_1_1BoxArray.html">amrex::BoxArray</a></div><divclass="ttdoc">A collection of Boxes stored in an Array.</div><divclass="ttdef"><b>Definition:</b> AMReX_BoxArray.H:549</div></div>
735
+
<divclass="ttc" id="aclassamrex_1_1BoxArray_html_ac492bfeacfc03ff2dcb5375e5422d417"><divclass="ttname"><ahref="classamrex_1_1BoxArray.html#ac492bfeacfc03ff2dcb5375e5422d417">amrex::BoxArray::size</a></div><divclass="ttdeci">Long size() const noexcept</div><divclass="ttdoc">Return the number of boxes in the BoxArray.</div><divclass="ttdef"><b>Definition:</b> AMReX_BoxArray.H:596</div></div>
<divclass="ttc" id="aclassamrex_1_1DeriveList_html"><divclass="ttname"><ahref="classamrex_1_1DeriveList.html">amrex::DeriveList</a></div><divclass="ttdoc">A list of DeriveRecs.</div><divclass="ttdef"><b>Definition:</b> AMReX_Derive.H:364</div></div>
Copy file name to clipboardExpand all lines: amrex/docs_html/doxygen/AMReX__AmrMesh_8H_source.html
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -422,7 +422,7 @@
422
422
<divclass="ttc" id="aclassamrex_1_1AmrMesh_html_af4a41ee86449b2afa949b6d68f6faf6f"><divclass="ttname"><ahref="classamrex_1_1AmrMesh.html#af4a41ee86449b2afa949b6d68f6faf6f">amrex::AmrMesh::blockingFactor</a></div><divclass="ttdeci">const IntVect & blockingFactor(int lev) const noexcept</div><divclass="ttdoc">Return the blocking factor at level lev.</div><divclass="ttdef"><b>Definition:</b> AMReX_AmrMesh.H:203</div></div>
<divclass="ttc" id="aclassamrex_1_1BoxArray_html"><divclass="ttname"><ahref="classamrex_1_1BoxArray.html">amrex::BoxArray</a></div><divclass="ttdoc">A collection of Boxes stored in an Array.</div><divclass="ttdef"><b>Definition:</b> AMReX_BoxArray.H:548</div></div>
425
+
<divclass="ttc" id="aclassamrex_1_1BoxArray_html"><divclass="ttname"><ahref="classamrex_1_1BoxArray.html">amrex::BoxArray</a></div><divclass="ttdoc">A collection of Boxes stored in an Array.</div><divclass="ttdef"><b>Definition:</b> AMReX_BoxArray.H:549</div></div>
426
426
<divclass="ttc" id="aclassamrex_1_1BoxList_html"><divclass="ttname"><ahref="classamrex_1_1BoxList.html">amrex::BoxList</a></div><divclass="ttdoc">A class for managing a List of Boxes that share a common IndexType. This class implements operations ...</div><divclass="ttdef"><b>Definition:</b> AMReX_BoxList.H:52</div></div>
<divclass="ttc" id="aclassamrex_1_1DistributionMapping_html"><divclass="ttname"><ahref="classamrex_1_1DistributionMapping.html">amrex::DistributionMapping</a></div><divclass="ttdoc">Calculates the distribution of FABs to MPI processes.</div><divclass="ttdef"><b>Definition:</b> AMReX_DistributionMapping.H:41</div></div>
0 commit comments