LCOV - code coverage report
Current view: top level - src/BC - BC.cpp (source / functions) Coverage Total Hit
Test: coverage_merged.info Lines: 44.7 % 38 17
Test Date: 2025-02-27 04:17:48 Functions: 83.3 % 6 5

            Line data    Source code
       1              : #include "BC.H"
       2              : #include "AMReX_BC_TYPES.H"
       3              : 
       4              : namespace BC
       5              : {
       6              : namespace BCUtil
       7              : {
       8            0 : int ReadString(std::string bcstring)
       9              : {
      10              :     // From <AMReX_BC_TYPES.H>
      11            0 :     if (bcstring == "BOGUS_BC")         return amrex::BCType::mathematicalBndryTypes::bogus;
      12            0 :     if (bcstring == "INT_DIR")          return amrex::BCType::mathematicalBndryTypes::int_dir;
      13            0 :     if (bcstring == "REFLECT_ODD")      return amrex::BCType::mathematicalBndryTypes::reflect_odd;
      14            0 :     if (bcstring == "REFLECT_EVEN")     return amrex::BCType::mathematicalBndryTypes::reflect_even;
      15            0 :     if (bcstring == "FOEXTRAP")         return amrex::BCType::mathematicalBndryTypes::foextrap;
      16            0 :     if (bcstring == "EXT_DIR")          return amrex::BCType::mathematicalBndryTypes::ext_dir;
      17            0 :     if (bcstring == "HOEXTRAP")         return amrex::BCType::mathematicalBndryTypes::hoextrap;
      18              : 
      19              :     // From <AMReX_LO_BCTYPES.H>
      20            0 :     if (bcstring == "interior" )        return (int)amrex::LinOpBCType::interior;
      21            0 :     if (bcstring == "Dirichlet" ||
      22            0 :         bcstring == "dirichlet")        return (int)amrex::LinOpBCType::Dirichlet;
      23            0 :     if (bcstring == "Neumann" ||
      24            0 :         bcstring == "neumann")          return (int)amrex::LinOpBCType::Neumann;
      25            0 :     if (bcstring == "reflect_odd")      return (int)amrex::LinOpBCType::reflect_odd;
      26            0 :     if (bcstring == "Marshak")          return (int)amrex::LinOpBCType::Marshak;
      27            0 :     if (bcstring == "SanchezPomraning") return (int)amrex::LinOpBCType::SanchezPomraning;
      28            0 :     if (bcstring == "inflow")           return (int)amrex::LinOpBCType::inflow;
      29            0 :     if (bcstring == "Periodic" ||
      30            0 :         bcstring == "periodic")         return (int)amrex::LinOpBCType::Periodic;
      31            0 :     return 0;
      32              : }
      33      4186898 : bool IsPeriodic(int bctype)
      34              : {
      35              :     ///\todo We need to clean up these operators
      36      4186898 :     if (bctype == (int)amrex::BCType::mathematicalBndryTypes::int_dir) return true;
      37      4186898 :     if (bctype == (int)amrex::LinOpBCType::interior) return true;
      38      4186898 :     if (bctype == (int)amrex::LinOpBCType::Periodic) return true;
      39            0 :     else return false;
      40              : }
      41    150450693 : bool IsNeumann(int bctype)
      42              : {
      43              :     //if (bctype == INT_DIR) return true;
      44              :     //if (bctype == Interior) return true;
      45    150450693 :     if (bctype == (int)amrex::LinOpBCType::Neumann) return true;
      46      4186898 :     else return false;
      47              : }
      48    243487613 : bool IsDirichlet(int bctype)
      49              : {
      50    243487613 :     if (bctype == (int)amrex::BCType::mathematicalBndryTypes::ext_dir) return true;
      51    243487613 :     if (bctype == (int)amrex::LinOpBCType::Dirichlet) return true;
      52    150450693 :     else return false;
      53              : }
      54      4186898 : bool IsReflectEven(int bctype)
      55              : {
      56      4186898 :     if (bctype ==  (int)amrex::BCType::mathematicalBndryTypes::reflect_even) return true;
      57      4186898 :     else return false;
      58              : }
      59      4186898 : bool IsReflectOdd(int bctype)
      60              : {
      61      4186898 :     if (bctype == (int)amrex::BCType::mathematicalBndryTypes::reflect_odd) return true;
      62      4186898 :     else return false;
      63              : }
      64              : }
      65              : }
        

Generated by: LCOV version 2.0-1