LCOV - code coverage report
Current view: top level - src/Field - BConds.hpp (source / functions) Coverage Total Hit
Test: final_report.info Lines: 44.4 % 27 12
Test Date: 2025-07-19 00:25:23 Functions: 37.2 % 113 42

            Line data    Source code
       1              : //   Class BConds
       2              : //   This is the container class for the field BCs.
       3              : //   It calls the findBCNeighbors and apply in the
       4              : //   respective BC classes to apply field BCs
       5              : //
       6              : namespace ippl {
       7              :     template <typename Field, unsigned Dim>
       8            0 :     void BConds<Field, Dim>::write(std::ostream& os) const {
       9            0 :         os << "BConds: (" << std::endl;
      10            0 :         const_iterator it = bc_m.begin();
      11            0 :         for (; it != bc_m.end() - 1; ++it) {
      12            0 :             (*it)->write(os);
      13            0 :             os << "," << std::endl;
      14              :         }
      15            0 :         (*it)->write(os);
      16            0 :         os << std::endl << ")";
      17            0 :     }
      18              : 
      19              :     template <typename Field, unsigned Dim>
      20          440 :     void BConds<Field, Dim>::findBCNeighbors(Field& field) {
      21         3352 :         for (auto& bc : bc_m) {
      22         2912 :             bc->findBCNeighbors(field);
      23              :         }
      24          440 :         Kokkos::fence();
      25          440 :         field.getCommunicator().barrier();
      26          440 :     }
      27              : 
      28              :     template <typename Field, unsigned Dim>
      29          292 :     void BConds<Field, Dim>::apply(Field& field) {
      30         2332 :         for (auto& bc : bc_m) {
      31         2040 :             bc->apply(field);
      32              :         }
      33          292 :         Kokkos::fence();
      34          292 :         field.getCommunicator().barrier();
      35          292 :     }
      36              : 
      37              :     template <typename Field, unsigned Dim>
      38            0 :     void BConds<Field, Dim>::assignGhostToPhysical(Field& field) {
      39            0 :         for (auto& bc : bc_m) {
      40            0 :             bc->assignGhostToPhysical(field);
      41              :         }
      42            0 :         Kokkos::fence();
      43            0 :         field.getCommunicator().barrier();
      44            0 :     }
      45              : 
      46              :     template <typename Field, unsigned Dim>
      47              :     bool BConds<Field, Dim>::changesPhysicalCells() const {
      48              :         for (const auto& bc : bc_m) {
      49              :             if (bc->changesPhysicalCells()) {
      50              :                 return true;
      51              :             }
      52              :         }
      53              :         return false;
      54              :     }
      55              : }  // namespace ippl
        

Generated by: LCOV version 2.0-1