LCOV - code coverage report
Current view: top level - coupling/interface - MDSimulation.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 2 2 100.0 %
Date: 2025-06-25 11:26:37 Functions: 0 0 -

          Line data    Source code
       1             : #pragma once
       2             : 
       3             : #include "coupling/services/CouplingCellService.h"
       4             : 
       5             : namespace coupling {
       6             : namespace interface {
       7             : /**
       8             :  *      @brief generic interface class for different microscopic (MD) solvers.
       9             :  *  @author Philipp Neumann
      10             :  */
      11          12 : class MDSimulation {
      12             : public:
      13             :   /** Destructor */
      14          12 :   virtual ~MDSimulation() {}
      15             : 
      16             :   /** switches coupling off*/
      17             :   virtual void switchOffCoupling() = 0;
      18             : 
      19             :   /** switches coupling on*/
      20             :   virtual void switchOnCoupling() = 0;
      21             : 
      22             :   /** simulates numberTimesteps time steps and starts at time step no.
      23             :    *firstTimestep
      24             :    *    @param numberTimesteps
      25             :    *    @param firstTimestep
      26             :    */
      27             :   virtual void simulateTimesteps(const unsigned int& numberTimesteps, const unsigned int& firstTimestep) = 0;
      28             : 
      29             :   // simulates a single time step
      30             :   // virtual void simulateTimestep(const unsigned int &thisTimestep ){const
      31             :   // unsigned int steps=1; simulateTimesteps(thisTimestep,steps);} TODO BUG
      32             : 
      33             :   /** sortMoleculesIntoCells*/
      34             :   virtual void sortMoleculesIntoCells() = 0;
      35             : 
      36             :   /** setCouplingCellService
      37             :    *    @param couplingCellService
      38             :    */
      39             :   virtual void setCouplingCellService(coupling::services::CouplingCellService<MDSIMULATIONFACTORY_DIMENSION>* couplingCellService) = 0;
      40             : 
      41             :   /** initialises the _molecularDynamicsSimulation solver
      42             :    *    @sa simplemd::MolecularDynamicsSimulation::initServices()
      43             :    *    @todo Philipp ??
      44             :    */
      45             :   virtual void init() = 0;
      46             : 
      47             :   /** initialises the _molecularDynamicsSimulation solver
      48             :    *    @param multiMDService
      49             :    *    @param localMDSimulation
      50             :    *    @sa simplemd::MolecularDynamicsSimulation::initServices(const
      51             :    *tarch::utils::MultiMDService<MD_DIM>& multiMDService,unsigned int
      52             :    *localMDSimulation)
      53             :    *    @todo Philipp ??
      54             :    */
      55             :   virtual void init(const tarch::utils::MultiMDService<MDSIMULATIONFACTORY_DIMENSION>& multiMDService, unsigned int localMDSimulation) = 0;
      56             : 
      57             :   /** shuts down the MD simulation*/
      58             :   virtual void shutdown() = 0;
      59             : 
      60             :   /** Saves the simulation result as check point in the file filestem
      61             :    *    @param filestem
      62             :    *    @param t
      63             :    */
      64             :   virtual void writeCheckpoint(const std::string& filestem, const unsigned int& t) = 0;
      65             : };
      66             : } // namespace interface
      67             : } // namespace coupling

Generated by: LCOV version 1.14