/* * SamplingGrid.hpp * * Created on: 25.07.2012 * Author: heber */ #ifndef SAMPLINGGRID_HPP_ #define SAMPLINGGRID_HPP_ // include config.h #ifdef HAVE_CONFIG_H #include #endif #include #include "boost/serialization/export.hpp" #include "boost/serialization/vector.hpp" #include "Jobs/Grid/SamplingGridProperties.hpp" class MPQCData; /** This class stores a sample function on a three-dimensional grid. * */ class SamplingGrid : public SamplingGridProperties { public: /** Constructor for class SamplingGrid. * * \param _begin offset for grid * \param _size edge length of grid * \param _level number of grid points in \f$2^{\text{level}}\f$ * \param _sampled_grid sample points */ SamplingGrid(const double _begin[3], const double _size, const int _level, const std::vector &_sampled_grid); /** Copy constructor for class SamplingGrid. * * \param _grid grid to copy */ SamplingGrid(const SamplingGrid &_grid); /** Copy constructor for class SamplingGrid from SamplingGridProperties. * * \param _props properties to copy */ SamplingGrid(const SamplingGridProperties &_props); /** default cstor. */ SamplingGrid() {} virtual ~SamplingGrid(); public: //!> sample points std::vector< double > sampled_grid; private: friend class MPQCData; friend class boost::serialization::access; // serialization template void serialize(Archive& ar, const unsigned int version) { ar & boost::serialization::base_object(*this); ar & const_cast< std::vector &>(sampled_grid); } }; // we need to give this class a unique key for serialization // its is only serialized through its base class FragmentJob BOOST_CLASS_EXPORT_KEY(SamplingGrid) #endif /* SAMPLINGGRID_HPP_ */