1 | /*
|
---|
2 | * VMGJob.hpp
|
---|
3 | *
|
---|
4 | * Created on: Jul 12, 2012
|
---|
5 | * Author: heber
|
---|
6 | */
|
---|
7 |
|
---|
8 | #ifndef VMGJOB_HPP_
|
---|
9 | #define VMGJOB_HPP_
|
---|
10 |
|
---|
11 |
|
---|
12 | // include config.h
|
---|
13 | #ifdef HAVE_CONFIG_H
|
---|
14 | #include <config.h>
|
---|
15 | #endif
|
---|
16 |
|
---|
17 | #include "boost/serialization/export.hpp"
|
---|
18 | #include "boost/serialization/vector.hpp"
|
---|
19 |
|
---|
20 | #include "JobMarket/Jobs/FragmentJob.hpp"
|
---|
21 | #include "Jobs/Grid/SamplingGrid.hpp"
|
---|
22 |
|
---|
23 | #include <vector>
|
---|
24 |
|
---|
25 | /** This class encapsulates a VMG Job.
|
---|
26 | *
|
---|
27 | * VMGJob calculates the long-range contribution that is missed out so far in the
|
---|
28 | * MPQCJob where the SCF cycle is calculated. To this end
|
---|
29 | *
|
---|
30 | */
|
---|
31 | class VMGJob : public FragmentJob
|
---|
32 | {
|
---|
33 | public:
|
---|
34 | /** Constructor for class VMGJob.
|
---|
35 | *
|
---|
36 | * @param _JobId id of the job
|
---|
37 | * @param _begin offset of the domain
|
---|
38 | * @param _size edge length of the cubic(!) domain
|
---|
39 | * @param _level level is \f$2^{\text{level}}\f$ grid points
|
---|
40 | * @param _sampled_input vector of sampled points of the grid as right-hand side
|
---|
41 | */
|
---|
42 | VMGJob(const JobId_t _JobId,
|
---|
43 | const SamplingGrid density_grid);
|
---|
44 | virtual ~VMGJob();
|
---|
45 |
|
---|
46 | FragmentResult::ptr Work();
|
---|
47 |
|
---|
48 | private:
|
---|
49 | void InitVMG();
|
---|
50 |
|
---|
51 | private:
|
---|
52 | //!> sampled density required as input
|
---|
53 | const SamplingGrid density_grid;
|
---|
54 | //!> sampled potential as output of the job
|
---|
55 | SamplingGrid potential_grid;
|
---|
56 |
|
---|
57 | private:
|
---|
58 | /** private default cstor for serialization only
|
---|
59 | */
|
---|
60 | VMGJob();
|
---|
61 |
|
---|
62 | friend class boost::serialization::access;
|
---|
63 | // serialization
|
---|
64 | template <typename Archive>
|
---|
65 | void serialize(Archive& ar, const unsigned int version)
|
---|
66 | {
|
---|
67 | ar & boost::serialization::base_object<FragmentJob>(*this);
|
---|
68 | ar & const_cast< SamplingGrid &>(density_grid);
|
---|
69 | ar & potential_grid;
|
---|
70 | }
|
---|
71 | };
|
---|
72 |
|
---|
73 | // we need to give this class a unique key for serialization
|
---|
74 | // its is only serialized through its base class FragmentJob
|
---|
75 | BOOST_CLASS_EXPORT_KEY(VMGJob)
|
---|
76 |
|
---|
77 | #endif /* VMGJOB_HPP_ */
|
---|