LCOV - code coverage report
Current view: top level - src/Meshes - Mesh.h (source / functions) Coverage Total Hit
Test: report.info Lines: 100.0 % 2 2
Test Date: 2025-05-15 13:47:30 Functions: 66.7 % 36 24
Branches: 50.0 % 2 1

             Branch data     Line data    Source code
       1                 :             : //
       2                 :             : // Class Mesh
       3                 :             : //   The Mesh base class. Right now, this mainly acts as a standard base
       4                 :             : //   class for all meshes so that other objects can register as users of
       5                 :             : //   the mesh and can be notified if the mesh changes (e.g., it is rescaled
       6                 :             : //   or restructured entirely).
       7                 :             : //
       8                 :             : #ifndef IPPL_MESH_H
       9                 :             : #define IPPL_MESH_H
      10                 :             : 
      11                 :             : #include "Types/Vector.h"
      12                 :             : 
      13                 :             : namespace ippl {
      14                 :             :     template <typename T, unsigned Dim>
      15                 :             :     class Mesh {
      16                 :             :     public:
      17                 :             :         typedef T value_type;
      18                 :             :         enum {
      19                 :             :             Dimension = Dim
      20                 :             :         };
      21                 :             : 
      22                 :             :         typedef Vector<T, Dim> vector_type;
      23                 :             :         typedef Vector<vector_type, Dim> matrix_type;
      24                 :             : 
      25         [ +  - ]:         564 :         Mesh(){};
      26                 :             : 
      27                 :         588 :         virtual ~Mesh(){};
      28                 :             : 
      29                 :             :         // Get the origin of mesh vertex positions
      30                 :             :         vector_type getOrigin() const;
      31                 :             : 
      32                 :             :         // Set the origin of mesh vertex positions
      33                 :             :         void setOrigin(const vector_type& origin);
      34                 :             : 
      35                 :             :         const vector_type& getGridsize() const;
      36                 :             : 
      37                 :             :         /*!
      38                 :             :          * Query the cell volume of the grid
      39                 :             :          * @return The volume of a single mesh cell
      40                 :             :          */
      41                 :             :         virtual T getCellVolume() const = 0;
      42                 :             : 
      43                 :             :         /*!
      44                 :             :          * Query the volume of the represented domain
      45                 :             :          * @return Total volume of the mesh
      46                 :             :          */
      47                 :             :         virtual T getMeshVolume() const = 0;
      48                 :             : 
      49                 :             :         T getGridsize(size_t dim) const;
      50                 :             : 
      51                 :             :     protected:
      52                 :             :         vector_type origin_m;     // Origin of mesh coordinates (vertices)
      53                 :             :         vector_type gridSizes_m;  // Sizes (number of vertices)
      54                 :             :     };
      55                 :             : }  // namespace ippl
      56                 :             : 
      57                 :             : #include "Meshes/Mesh.hpp"
      58                 :             : 
      59                 :             : #endif
        

Generated by: LCOV version 2.0-1