@@ -56,64 +56,11 @@ Long nBytesOwned (T const&) noexcept { return 0; }
5656template <typename T>
5757Long nBytesOwned (BaseFab<T> const & fab) noexcept { return fab.nBytesOwned (); }
5858
59- /*
60- A Collection of Fortran Array-like Objects
61-
62-
63- The FabArray<FAB> class implements a collection (stored as an array) of
64- Fortran array-like objects. The parameterized type FAB is intended to be
65- any class derived from BaseFab<T>. For example, FAB may be a BaseFab of
66- integers, so we could write:
67-
68- FabArray<BaseFab<int> > int_fabs;
69-
70- Then int_fabs is a FabArray that can hold a collection of BaseFab<int>
71- objects.
72-
73- FabArray is not just a general container class for Fortran arrays. It is
74- intended to hold "grid" data for use in finite difference calculations in
75- which the data is defined on a union of (usually disjoint) rectangular
76- regions embedded in a uniform index space. This region, called the valid
77- region, is represented by a BoxArray. For the purposes of this discussion,
78- the Kth Box in the BoxArray represents the interior region of the Kth grid.
79-
80- Since the intent is to be used with finite difference calculations a
81- FabArray also includes the notion of a boundary region for each grid. The
82- boundary region is specified by the ngrow parameter which tells the FabArray
83- to allocate each FAB to be ngrow cells larger in all directions than the
84- underlying Box. The larger region covered by the union of all the FABs is
85- called the region of definition. The underlying notion is that the valid
86- region contains the grid interior data and the region of definition includes
87- the interior region plus the boundary areas.
88-
89- Operations are available to copy data from the valid regions into these
90- boundary areas where the two overlap. The number of components, that is,
91- the number of values that can be stored in each cell of a FAB, is either
92- given as an argument to the constructor or is inherent in the definition of
93- the underlying FAB. Each FAB in the FabArray will have the same number of
94- components.
95-
96- In summary, a FabArray is an array of FABs. The Kth element contains a FAB
97- that holds the data for the Kth grid, a Box that defines the valid region
98- of the Kth grid.
99-
100- A typical use for a FabArray would be to hold the solution vector or
101- right-hand-side when solving a linear system of equations on a union of
102- rectangular grids. The copy operations would be used to copy data from the
103- valid regions of neighboring grids into the boundary regions after each
104- relaxation step of the iterative method. If a multigrid method is used, a
105- FabArray could be used to hold the data at each level in the multigrid
106- hierarchy.
107-
108- This class is a concrete class not a polymorphic one.
109-
110- This class does NOT provide a copy constructor or assignment operator.
111- */
112-
113- //
114- // alloc: allocate memory or not
115- //
59+ /* *
60+ * \brief FabArray memory allocation information
61+ */
11662struct MFInfo {
63+ // alloc: allocate memory or not
11764 bool alloc = true ;
11865 Arena* arena = nullptr ;
11966 Vector<std::string> tags;
@@ -314,6 +261,60 @@ Add (FabArray<FAB>& dst, FabArray<FAB> const& src, int srccomp, int dstcomp, int
314261 }
315262}
316263
264+ /* *
265+ * \brief An Array of FortranArrayBox(FAB)-like Objects
266+ *
267+ * The FabArray<FAB> class implements a collection (stored as an array) of
268+ * Fortran array box-like ( \p FAB ) objects. The parameterized type \p FAB is intended to be
269+ * any class derived from BaseFab<T>. For example, \p FAB may be a BaseFab of
270+ * integers, so we could write:
271+ *
272+ * FabArray<BaseFab<int> > int_fabs;
273+ *
274+ * Then int_fabs is a FabArray that can hold a collection of BaseFab<int>
275+ * objects.
276+ *
277+ * FabArray is not just a general container class for Fortran arrays. It is
278+ * intended to hold "grid" data for use in finite difference calculations in
279+ * which the data is defined on a union of (usually disjoint) rectangular
280+ * regions embedded in a uniform index space. This region, called the valid
281+ * region, is represented by a BoxArray. For the purposes of this discussion,
282+ * the Kth Box in the BoxArray represents the interior region of the Kth grid.
283+ *
284+ * Since the intent is to be used with finite difference calculations a
285+ * FabArray also includes the notion of a boundary region for each grid. The
286+ * boundary region is specified by the ngrow parameter which tells the FabArray
287+ * to allocate each \p FAB to be ngrow cells larger in all directions than the
288+ * underlying Box. The larger region covered by the union of all the \p FABs is
289+ * called the region of definition. The underlying notion is that the valid
290+ * region contains the grid interior data and the region of definition includes
291+ * the interior region plus the boundary areas.
292+ *
293+ * Operations are available to copy data from the valid regions into these
294+ * boundary areas where the two overlap. The number of components, that is,
295+ * the number of values that can be stored in each cell of a \p FAB, is either
296+ * given as an argument to the constructor or is inherent in the definition of
297+ * the underlying \p FAB. Each \p FAB in the FabArray will have the same number of
298+ * components.
299+ *
300+ * In summary, a FabArray is an array of \p FABs. The Kth element contains a \p FAB
301+ * that holds the data for the Kth grid, a Box that defines the valid region
302+ * of the Kth grid.
303+ *
304+ * A typical use for a FabArray would be to hold the solution vector or
305+ * right-hand-side when solving a linear system of equations on a union of
306+ * rectangular grids. The copy operations would be used to copy data from the
307+ * valid regions of neighboring grids into the boundary regions after each
308+ * relaxation step of the iterative method. If a multigrid method is used, a
309+ * FabArray could be used to hold the data at each level in the multigrid
310+ * hierarchy.
311+ *
312+ * This class is a concrete class not a polymorphic one.
313+ *
314+ * This class does NOT provide a copy constructor or assignment operator.
315+ *
316+ * \tparam FAB FortranArrayBox-like object. Typically a derived class of BaseFab. Not to be confused with FabArrayBase.
317+ */
317318template <class FAB >
318319class FabArray
319320 :
@@ -338,8 +339,9 @@ public:
338339 FabArray () noexcept ;
339340
340341 /* *
341- * \brief Construct an empty FabArray<FAB> that has a default Arena. If
342- * `define` is called later with a nullptr as MFInfo's arena, the
342+ * \brief Construct an empty FabArray<FAB> that has a default Arena.
343+ *
344+ * If `define` is called later with a nullptr as MFInfo's arena, the
343345 * default Arena `a` will be used. If the arena in MFInfo is not a
344346 * nullptr, the MFInfo's arena will be used.
345347 */
0 commit comments