LCOV - code coverage report
Current view: top level - core - ActionToGetData.h (source / functions) Hit Total Coverage
Test: plumed test coverage Lines: 1 3 33.3 %
Date: 2025-04-08 21:11:17 Functions: 1 2 50.0 %

          Line data    Source code
       1             : /* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
       2             :    Copyright (c) 2017-2023 The plumed team
       3             :    (see the PEOPLE file at the root of the distribution for a list of names)
       4             : 
       5             :    See http://www.plumed.org for more information.
       6             : 
       7             :    This file is part of plumed, version 2.
       8             : 
       9             :    plumed is free software: you can redistribute it and/or modify
      10             :    it under the terms of the GNU Lesser General Public License as published by
      11             :    the Free Software Foundation, either version 3 of the License, or
      12             :    (at your option) any later version.
      13             : 
      14             :    plumed is distributed in the hope that it will be useful,
      15             :    but WITHOUT ANY WARRANTY; without even the implied warranty of
      16             :    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      17             :    GNU Lesser General Public License for more details.
      18             : 
      19             :    You should have received a copy of the GNU Lesser General Public License
      20             :    along with plumed.  If not, see <http://www.gnu.org/licenses/>.
      21             : +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */
      22             : #ifndef __PLUMED_core_ActionToGetData_h
      23             : #define __PLUMED_core_ActionToGetData_h
      24             : 
      25             : #include "ActionWithArguments.h"
      26             : #include "ActionPilot.h"
      27             : #include "DataPassingObject.h"
      28             : 
      29             : namespace PLMD {
      30             : 
      31             : class ActionToGetData :
      32             :   public ActionPilot,
      33             :   public ActionWithArguments {
      34             : private:
      35             : /// What do you want to collect to pass back to python
      36             :   enum {val,deriv,force} gtype;
      37             : /// This holds the pointer that we are setting
      38             :   std::unique_ptr<DataPassingObject> mydata;
      39             : /// This temporarily holds the data so it can be passed out
      40             :   std::vector<double> data;
      41             : public:
      42             :   static void registerKeywords(Keywords& keys);
      43             :   explicit ActionToGetData(const ActionOptions&ao);
      44             : /// Get the rank of the output
      45             :   void get_rank( const TypesafePtr & rank );
      46             : /// Get the shape of the output
      47             :   void get_shape( const TypesafePtr & dims );
      48             : /// Set the memory that holds the output
      49             :   void set_memory( const TypesafePtr & val );
      50             : /// Actually set the values for the output
      51             :   void calculate();
      52       12437 :   void apply() {}
      53           0 :   ActionToGetData* castToActionToGetData() noexcept final {
      54           0 :     return this;
      55             :   }
      56             : };
      57             : 
      58             : }
      59             : #endif

Generated by: LCOV version 1.16