Skip to content

Commit c1876b2

Browse files
authored
Enhanced inline documentation of EB related data (#2562)
* Enhanced inline documentation of EB related data * Added ECT to the glossary * Made the EB documentation doxygen-compatible
1 parent d328010 commit c1876b2

File tree

3 files changed

+34
-8
lines changed

3 files changed

+34
-8
lines changed

Docs/source/glossary.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Abbreviations
1818
* **CI:** continuous integration, automated tests that we perform before a proposed code-change is accepted; see PR
1919
* **CPU:** `central processing unit <https://en.wikipedia.org/wiki/Central_processing_unit>`__, we usual mean a socket or generally the host-side of a computer (compared to the accelerator, e.g. GPU)
2020
* **DOE:** `The United States Department of Energy <https://en.wikipedia.org/wiki/United_States_Department_of_Energy>`__, the largest sponsor of national laboratory research in the United States of America
21+
* **ECT:** `Enlarged Cell Technique <https://ieeexplore.ieee.org/document/4463918>`__, an electromagnetic solver with accurate resolution of perfectly conducting embedded boundaries
2122
* **EB:** embedded boundary, boundary conditions inside the simulation box, e.g. following material surfaces
2223
* **EM:** electromagnetic, e.g. EM PIC
2324
* **ES:** electrostatic, e.g. ES PIC

Source/WarpX.H

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1035,17 +1035,46 @@ private:
10351035
amrex::Vector<std::array< std::unique_ptr<amrex::MultiFab>, 3 > > Efield_avg_fp;
10361036
amrex::Vector<std::array< std::unique_ptr<amrex::MultiFab>, 3 > > Bfield_avg_fp;
10371037

1038-
//EB grid info
1039-
amrex::Vector<std::array< std::unique_ptr<amrex::MultiFab>, 3 > > Venl;
1038+
//! EB: Lengths of the mesh edges
10401039
amrex::Vector<std::array< std::unique_ptr<amrex::MultiFab>, 3 > > m_edge_lengths;
1040+
//! EB: Areas of the mesh faces
10411041
amrex::Vector<std::array< std::unique_ptr<amrex::MultiFab>, 3 > > m_face_areas;
1042+
1043+
/** EB: for every mesh face flag_info_face contains a:
1044+
* * 0 if the face needs to be extended
1045+
* * 1 if the face is large enough to lend area to other faces
1046+
* * 2 if the face is actually intruded by other face
1047+
* It is initialized in WarpX::MarkCells
1048+
* This is only used for the ECT solver.*/
10421049
amrex::Vector<std::array< std::unique_ptr<amrex::iMultiFab>, 3 > > m_flag_info_face;
1050+
/** EB: for every mesh face face flag_ext_face contains a:
1051+
* * 1 if the face needs to be extended
1052+
* * 0 otherwise
1053+
* It is initialized in WarpX::MarkCells and then modified in WarpX::ComputeOneWayExtensions
1054+
* and in WarpX::ComputeEightWaysExtensions
1055+
* This is only used for the ECT solver.*/
10431056
amrex::Vector<std::array< std::unique_ptr<amrex::iMultiFab>, 3 > > m_flag_ext_face;
1057+
/** EB: m_area_mod contains the modified areas of the mesh faces, i.e. if a face is enlarged it
1058+
* contains the area of the enlarged face
1059+
* This is only used for the ECT solver.*/
10441060
amrex::Vector<std::array< std::unique_ptr<amrex::MultiFab>, 3 > > m_area_mod;
1061+
/** EB: m_borrowing contains the info about the enlarged cells, i.e. for every enlarged cell it
1062+
* contains the info of which neighbors are being intruded (and the amount of borrowed area).
1063+
* This is only used for the ECT solver.*/
10451064
amrex::Vector<std::array< std::unique_ptr<amrex::LayoutData<FaceInfoBox> >, 3 > > m_borrowing;
10461065

1047-
//This is just needed for the ECT solver
1066+
/** ECTRhofield is needed only by the ect
1067+
* solver and it contains the electromotive force density for every mesh face.
1068+
* The name ECTRhofield has been used to comply with the notation of the paper
1069+
* https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=4463918 (page 9, equation 4
1070+
* and below).
1071+
* Although it's called rho it has nothing to do with the charge density!
1072+
* This is only used for the ECT solver.*/
10481073
amrex::Vector<std::array< std::unique_ptr<amrex::MultiFab>, 3 > > ECTRhofield;
1074+
/** Venl contains the electromotive force for every mesh face, i.e. every entry is
1075+
* the corresponding entry in ECTRhofield multiplied by the total area (possibly with enlargement)
1076+
* This is only used for the ECT solver.*/
1077+
amrex::Vector<std::array< std::unique_ptr<amrex::MultiFab>, 3 > > Venl;
10491078

10501079
//EB level set
10511080
amrex::Vector<std::unique_ptr<amrex::MultiFab> > m_distance_to_eb;

Source/WarpX.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1637,11 +1637,7 @@ WarpX::AllocLevelMFs (int lev, const BoxArray& ba, const DistributionMapping& dm
16371637
Venl[lev][0] = std::make_unique<MultiFab>(amrex::convert(ba, Bx_nodal_flag), dm, ncomps, ngE, tag("Venl[x]"));
16381638
Venl[lev][1] = std::make_unique<MultiFab>(amrex::convert(ba, By_nodal_flag), dm, ncomps, ngE, tag("Venl[y]"));
16391639
Venl[lev][2] = std::make_unique<MultiFab>(amrex::convert(ba, Bz_nodal_flag), dm, ncomps, ngE, tag("Venl[z]"));
1640-
// DISCLAIMER: ECTRhofield is NOT the charge density. This multifab is needed only by the ect
1641-
// solver and it represents the electromotive force density. The name ECTRhofield has been used
1642-
// to comply with the notation of the paper
1643-
// https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=4463918 (page 9, equation 4
1644-
// and below).
1640+
16451641
ECTRhofield[lev][0] = std::make_unique<MultiFab>(amrex::convert(ba, Bx_nodal_flag), dm, ncomps, ngE, tag("ECTRhofield[x]"));
16461642
ECTRhofield[lev][1] = std::make_unique<MultiFab>(amrex::convert(ba, By_nodal_flag), dm, ncomps, ngE, tag("ECTRhofield[y]"));
16471643
ECTRhofield[lev][2] = std::make_unique<MultiFab>(amrex::convert(ba, Bz_nodal_flag), dm, ncomps, ngE, tag("ECTRhofield[z]"));

0 commit comments

Comments
 (0)