LCOV - code coverage report
Current view: top level - ext/amrex/2d-coverage-g++-24.08/include - AMReX_InterpBase.H (source / functions) Hit Total Coverage
Test: coverage_merged.info Lines: 2 2 100.0 %
Date: 2024-11-18 05:28:54 Functions: 2 3 66.7 %

          Line data    Source code
       1             : #ifndef AMREX_INTERP_BASE_H_
       2             : #define AMREX_INTERP_BASE_H_
       3             : #include <AMReX_Config.H>
       4             : 
       5             : #include <AMReX_BCRec.H>
       6             : #include <AMReX_Box.H>
       7             : #include <AMReX_Vector.H>
       8             : 
       9             : namespace amrex {
      10             : 
      11             : class InterpBase;
      12             : 
      13             : class InterpolaterBoxCoarsener final
      14             :     : public BoxConverter
      15             : {
      16             : public:
      17             :     InterpolaterBoxCoarsener (InterpBase* mapper_, const IntVect& ratio_);
      18             :     [[nodiscard]] Box doit (const Box& fine) const override;
      19             :     [[nodiscard]] BoxConverter* clone () const override;
      20             : private:
      21             :     InterpBase* mapper;
      22             :     IntVect ratio;
      23             : };
      24             : 
      25             : class InterpBase
      26             : {
      27             : public:
      28          32 :     InterpBase () = default;
      29          28 :     virtual ~InterpBase () = default;
      30             :     InterpBase (InterpBase const&) noexcept = default;
      31             :     InterpBase (InterpBase &&) noexcept = default;
      32             :     InterpBase& operator= (InterpBase const&) noexcept = default;
      33             :     InterpBase& operator= (InterpBase &&) noexcept = default;
      34             : 
      35             :     /**
      36             :     * \brief Returns coarsened box given fine box and refinement ratio.
      37             :     * This is a pure virtual function and hence MUST
      38             :     * be implemented by derived classes.
      39             :     *
      40             :     * \param fine
      41             :     * \param ratio
      42             :     */
      43             :     virtual Box CoarseBox (const Box& fine, int ratio) = 0;
      44             : 
      45             :     /**
      46             :     * \brief Returns coarsened box given fine box and refinement ratio.
      47             :     * This is a pure virtual function and hence MUST
      48             :     * be implemented by derived classes.
      49             :     *
      50             :     * \param fine
      51             :     * \param ratio
      52             :     */
      53             :     virtual Box CoarseBox (const Box& fine, const IntVect& ratio) = 0;
      54             : 
      55             :     InterpolaterBoxCoarsener BoxCoarsener (const IntVect& ratio);
      56             : 
      57             :     static Vector<int> GetBCArray (const Vector<BCRec>& bcr);
      58             : };
      59             : 
      60             : }
      61             : 
      62             : #endif

Generated by: LCOV version 1.14