LCOV - code coverage report
Current view: top level - include/solvers - memory_history_data.h (source / functions) Hit Total Coverage
Test: libMesh/libmesh: #4229 (6a9aeb) with base 727f46 Lines: 2 2 100.0 %
Date: 2025-08-19 19:27:09 Functions: 3 3 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : #ifndef MEMORY_HISTORY_DATA_H
       2             : #define MEMORY_HISTORY_DATA_H
       3             : 
       4             : // Local includes
       5             : #include "libmesh/history_data.h"
       6             : #include "libmesh/diff_system.h"
       7             : 
       8             : #include "libmesh/numeric_vector.h"
       9             : 
      10             : namespace libMesh
      11             : {
      12             :     /** MemoryHistoryData provides a data structure to store memory history data.
      13             :      * This is a companion class to MemorySolutionHistory.
      14             :      */
      15             : 
      16             :     class MemoryHistoryData : public HistoryData
      17             :     {
      18             :         public:
      19             : 
      20             :         // Constructor
      21        9028 :         MemoryHistoryData(DifferentiableSystem & system) : HistoryData(), _system(system), stored_vecs{}, stored_vec(stored_vecs.end()) {};
      22             : 
      23             :         // Destructor
      24        8784 :         ~MemoryHistoryData() {};
      25             : 
      26             :         virtual void store_initial_solution() override;
      27             :         virtual void store_primal_solution(stored_data_iterator stored_datum) override;
      28             :         virtual void store_adjoint_solution() override;
      29             :         virtual void rewrite_stored_solution() override;
      30             : 
      31             :         virtual void retrieve_primal_solution() override;
      32             :         virtual void retrieve_adjoint_solution() override;
      33             : 
      34             :         void store_vectors();
      35             :         void retrieve_vectors();
      36             : 
      37             :         private:
      38             : 
      39             :         DifferentiableSystem & _system;
      40             : 
      41             :         typedef std::map<std::string, std::unique_ptr<NumericVector<Number>>> map_type;
      42             :         typedef map_type::iterator stored_vecs_iterator;
      43             : 
      44             :         // Memory History specific Constituents
      45             :         //std::unique_ptr<MeshBase> stored_mesh;
      46             :         map_type stored_vecs;
      47             :         stored_vecs_iterator stored_vec;
      48             : 
      49             :     };
      50             : 
      51             : }
      52             : #endif

Generated by: LCOV version 1.14