[238868] | 1 | /*
|
---|
| 2 | * VMGDebugGridJob.hpp
|
---|
| 3 | *
|
---|
| 4 | * Created on: Aug 31, 2012
|
---|
| 5 | * Author: heber
|
---|
| 6 | */
|
---|
| 7 |
|
---|
| 8 | #ifndef VMGDEBUGGRIDJOB_HPP_
|
---|
| 9 | #define VMGDEBUGGRIDJOB_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"
|
---|
[fbf143] | 21 | #include "Fragmentation/Summation/SetValues/SamplingGrid.hpp"
|
---|
[238868] | 22 |
|
---|
| 23 | #include <vector>
|
---|
| 24 |
|
---|
| 25 | /** This class encapsulates a Debug Grid Job.
|
---|
| 26 | *
|
---|
| 27 | * VMGDebugGridJob just stores the sampled grid into a VMG job and lets VMG
|
---|
| 28 | * print the grid in a VTK compatible format to make use of its grid_viewer
|
---|
| 29 | * for debugging purposes.
|
---|
| 30 | *
|
---|
| 31 | */
|
---|
| 32 | class VMGDebugGridJob : public FragmentJob
|
---|
| 33 | {
|
---|
| 34 | public:
|
---|
| 35 | /** Constructor for class VMGDebugGridJob.
|
---|
| 36 | *
|
---|
| 37 | * @param _JobId id of the job
|
---|
| 38 | * @param _density_grid sampled electron charge density from short-range solutions
|
---|
| 39 | */
|
---|
| 40 | VMGDebugGridJob(const JobId_t _JobId,
|
---|
| 41 | const SamplingGrid &density_grid);
|
---|
| 42 | virtual ~VMGDebugGridJob();
|
---|
| 43 |
|
---|
| 44 | FragmentResult::ptr Work();
|
---|
| 45 |
|
---|
| 46 | private:
|
---|
| 47 | void InitVMG();
|
---|
| 48 |
|
---|
| 49 | private:
|
---|
| 50 | //!> sampled density required as input
|
---|
| 51 | const SamplingGrid density_grid;
|
---|
| 52 |
|
---|
| 53 | private:
|
---|
| 54 | /** private default cstor for serialization only
|
---|
| 55 | */
|
---|
| 56 | VMGDebugGridJob();
|
---|
| 57 |
|
---|
| 58 | friend class boost::serialization::access;
|
---|
| 59 | // serialization
|
---|
| 60 | template <typename Archive>
|
---|
| 61 | void serialize(Archive& ar, const unsigned int version)
|
---|
| 62 | {
|
---|
| 63 | ar & boost::serialization::base_object<FragmentJob>(*this);
|
---|
| 64 | ar & const_cast< SamplingGrid &>(density_grid);
|
---|
| 65 | }
|
---|
| 66 | };
|
---|
| 67 |
|
---|
| 68 | // we need to give this class a unique key for serialization
|
---|
| 69 | // its is only serialized through its base class FragmentJob
|
---|
| 70 | BOOST_CLASS_EXPORT_KEY(VMGDebugGridJob)
|
---|
| 71 |
|
---|
| 72 | #endif /* VMGDEBUGGRIDJOB_HPP_ */
|
---|