LCOV - code coverage report
Current view: top level - simplemd/configurations - VTKConfiguration.h Coverage Total Hit
Test: coverage.info Lines: 50.0 % 2 1
Test Date: 2026-08-21 15:14:06 Functions: - 0 0

            Line data    Source code
       1              : // Copyright (C) 2015 Technische Universitaet Muenchen
       2              : // This file is part of the Mamico project. For conditions of distribution
       3              : // and use, please see the copyright notice in Mamico's main folder, or at
       4              : // www5.in.tum.de/mamico
       5              : #ifndef _MOLECULARDYNAMICS_CONFIGURATIONS_VTKCONFIGURATION_H_
       6              : #define _MOLECULARDYNAMICS_CONFIGURATIONS_VTKCONFIGURATION_H_
       7              : 
       8              : #include "simplemd/MolecularDynamicsDefinitions.h"
       9              : #include "tarch/configuration/Configuration.h"
      10              : #include "tarch/la/Vector.h"
      11              : #include <iostream>
      12              : 
      13              : namespace simplemd {
      14              : namespace configurations {
      15              : class VTKConfiguration;
      16              : }
      17              : } // namespace simplemd
      18              : 
      19              : /** configuration input for VTK output.
      20              :  *  @author Philipp Neumann
      21              :  */
      22              : class simplemd::configurations::VTKConfiguration : public tarch::configuration::Configuration {
      23              : public:
      24              :   VTKConfiguration();
      25          408 :   virtual ~VTKConfiguration() {}
      26              : 
      27              :   void parseSubtag(tinyxml2::XMLElement* node);
      28              : 
      29              :   /**
      30              :    * Return name of xml tag that is associated to the configuration.
      31              :    */
      32              :   virtual std::string getTag() const;
      33              : 
      34              :   /**
      35              :    * Is config valid?
      36              :    *
      37              :    * This operation usually fails, if
      38              :    *
      39              :    * - parseSubtag() hasn't been called, i.e. configuration has not been
      40              :    *   used, or
      41              :    * - parseSubtag() failed due to a wrong file.
      42              :    *
      43              :    * If a tag ain't optional and parseSubtag() was not called (first case)
      44              :    */
      45              :   bool isValid() const;
      46              : 
      47              :   /** getters for all parsed and computed quantities */
      48            0 :   const std::string& getFilename() const { return _filename; }
      49              :   const unsigned int& getWriteEveryTimestep() const { return _writeEveryTimestep; }
      50              : 
      51              : private:
      52              :   static const std::string FILENAME;
      53              :   static const std::string WRITE_EVERY_TIMESTEP;
      54              : 
      55              :   /** name stem of the corresponding vtk file */
      56              :   std::string _filename;
      57              : 
      58              :   /** number of timesteps per vtk output. If this value is zero, no output is written at all */
      59              :   unsigned int _writeEveryTimestep;
      60              : 
      61              :   bool _isValid;
      62              : };
      63              : #endif // _MOLECULARDYNAMICS_CONFIGURATIONS_VTKCONFIGURATION_H_
        

Generated by: LCOV version 2.0-1