Skip to content

Commit

Permalink
FabArraySet, more methods
Browse files Browse the repository at this point in the history
  • Loading branch information
eebasso committed Oct 9, 2023
1 parent 9c54154 commit 48b4b16
Show file tree
Hide file tree
Showing 10 changed files with 468 additions and 223 deletions.
82 changes: 41 additions & 41 deletions Src/Base/AMReX_BaseFabArraySet.H
Original file line number Diff line number Diff line change
@@ -1,56 +1,56 @@
#include <AMReX_FabArray.H>

namespace amrex {

/**
* \brief BaseFabArraySet
*
* \tparam MF FabArray or derived class
* \tparam encodedIxTypes
*/
// template <class MF, unsigned long encodedIxTypes>
class BaseFabArraySet {
// #include <AMReX_FabArray.H>

// namespace amrex {

// /**
// * \brief BaseFabArraySet
// *
// * \tparam MF FabArray or derived class
// * \tparam encodedIxTypes
// */
// // template <class MF, unsigned long encodedIxTypes>
// class BaseFabArraySet {

public:
// public:

BaseFabArraySet () = default;
~BaseFabArraySet () = default;
// BaseFabArraySet () = default;
// ~BaseFabArraySet () = default;

BaseFabArraySet (BaseFabArraySet&& rhs) noexcept = default;
BaseFabArraySet (const BaseFabArraySet& rhs) = default;
BaseFabArraySet& operator= (const BaseFabArraySet& rhs) = default;
BaseFabArraySet& operator= (BaseFabArraySet&& rhs) = default;
// BaseFabArraySet (BaseFabArraySet&& rhs) noexcept = default;
// BaseFabArraySet (const BaseFabArraySet& rhs) = default;
// BaseFabArraySet& operator= (const BaseFabArraySet& rhs) = default;
// BaseFabArraySet& operator= (BaseFabArraySet&& rhs) = default;

//! Return the grow factor that defines the region of definition.
[[nodiscard]] int nGrow (int direction = 0) const noexcept { return m_nGrowVect[direction]; }
// //! Return the grow factor that defines the region of definition.
// [[nodiscard]] int nGrow (int direction = 0) const noexcept { return m_nGrowVect[direction]; }

[[nodiscard]] IntVect nGrowVect () const noexcept { return m_nGrowVect; }
// [[nodiscard]] IntVect nGrowVect () const noexcept { return m_nGrowVect; }

//! Return number of variables (aka components) associated with each point.
//! Need to decide if nComp reutrns the number of elements in the set or the number of components in each MF
[[nodiscard]] int nComp () const noexcept { return m_nComp; }
// //! Return number of variables (aka components) associated with each point.
// //! Need to decide if nComp reutrns the number of elements in the set or the number of components in each MF
// [[nodiscard]] int nComp () const noexcept { return m_nComp; }

//Return whether this BaseFabArraySet is empty
[[nodiscard]] bool empty () const noexcept { return m_boxarray.empty(); }
// //Return whether this BaseFabArraySet is empty
// [[nodiscard]] bool empty () const noexcept { return m_boxarray.empty(); }

/**
* \brief Return a constant reference to the nodal BoxArray that defines the
* valid region associated with this BaseFabArraySet.
*/
[[nodiscard]] const BoxArray& boxArray () const noexcept { return m_boxarray; }
// /**
// * \brief Return a constant reference to the nodal BoxArray that defines the
// * valid region associated with this BaseFabArraySet.
// */
// [[nodiscard]] const BoxArray& boxArray () const noexcept { return m_boxarray; }

//! Return constant reference to associated DistributionMapping.
[[nodiscard]] const DistributionMapping& DistributionMap () const noexcept { return m_distributionMap; }
// //! Return constant reference to associated DistributionMapping.
// [[nodiscard]] const DistributionMapping& DistributionMap () const noexcept { return m_distributionMap; }

protected:
// protected:


BoxArray m_boxarray;
DistributionMapping m_distributionMap;
IntVect m_nGrowVect;
int m_nComp;
// BoxArray m_boxarray;
// DistributionMapping m_distributionMap;
// IntVect m_nGrowVect;
// int m_nComp;


};
// };

}
// }
Loading

0 comments on commit 48b4b16

Please sign in to comment.