1 | /*
|
---|
2 | * InterfaceVMGJob.hpp
|
---|
3 | *
|
---|
4 | * Created on: 10.06.2012
|
---|
5 | * Author: Frederik Heber
|
---|
6 | */
|
---|
7 |
|
---|
8 | #ifndef INTERFACEVMGJOB_HPP_
|
---|
9 | #define INTERFACEVMGJOB_HPP_
|
---|
10 |
|
---|
11 | #ifdef HAVE_CONFIG_H
|
---|
12 | #include <config.h>
|
---|
13 | #endif
|
---|
14 |
|
---|
15 | #include <boost/function.hpp>
|
---|
16 |
|
---|
17 | #include "base/interface.hpp"
|
---|
18 | #include "base/vector.hpp"
|
---|
19 | #include "units/particle/bspline.hpp"
|
---|
20 | #include "units/particle/particle.hpp"
|
---|
21 |
|
---|
22 | #include "Fragmentation/Summation/Containers/VMGData.hpp"
|
---|
23 | #include "Fragmentation/Summation/SetValues/SamplingGrid.hpp"
|
---|
24 |
|
---|
25 | namespace VMG
|
---|
26 | {
|
---|
27 | class Grid;
|
---|
28 | class MGGrid;
|
---|
29 | class MGMultigrid;
|
---|
30 | }
|
---|
31 |
|
---|
32 | namespace VMGInterfaces
|
---|
33 | {
|
---|
34 |
|
---|
35 | class InterfaceVMGJob : public VMG::Interface
|
---|
36 | {
|
---|
37 | public:
|
---|
38 | enum ImportParticles_t {
|
---|
39 | DontImportParticles=0,
|
---|
40 | DoImportParticles=1,
|
---|
41 | };
|
---|
42 |
|
---|
43 | InterfaceVMGJob(const SamplingGrid &_sampled_input,
|
---|
44 | VMGData &returndata,
|
---|
45 | const std::vector< std::vector< double > > &_particle_positions,
|
---|
46 | const std::vector< double > &_particle_charges,
|
---|
47 | VMG::Boundary boundary,
|
---|
48 | int levelMin,
|
---|
49 | int levelMax,
|
---|
50 | const VMG::Vector &_box_begin,
|
---|
51 | vmg_float _box_end,
|
---|
52 | const int& near_field_cells,
|
---|
53 | const ImportParticles_t _ImportParticles=DoImportParticles,
|
---|
54 | const bool _DoPrintDebug=false,
|
---|
55 | int coarseningSteps=9,
|
---|
56 | double alpha=1.6
|
---|
57 | );
|
---|
58 |
|
---|
59 | ~InterfaceVMGJob() {}
|
---|
60 |
|
---|
61 | void ImportRightHandSide(VMG::Multigrid& multigrid);
|
---|
62 | void ExportSolution(VMG::Grid& grid);
|
---|
63 |
|
---|
64 | protected:
|
---|
65 | VMG::Particle::BSpline spl;
|
---|
66 |
|
---|
67 | private:
|
---|
68 | //!> sampled density on the grid as input
|
---|
69 | const SamplingGrid sampled_input;
|
---|
70 | //!> sampled potential on the grid as output
|
---|
71 | VMGData &returndata;
|
---|
72 | //!> number of grid points per axis as \f$2^{\mathrm{level}}\f$
|
---|
73 | const int level;
|
---|
74 | //!> nuclei charges
|
---|
75 | std::list<VMG::Particle::Particle> particles;
|
---|
76 |
|
---|
77 | //!> contains start of grid intervals
|
---|
78 | double box_begin[3];
|
---|
79 | //!> contains end of grid intervals
|
---|
80 | double box_end[3];
|
---|
81 |
|
---|
82 | //!> whether we import particles (true) or evaluate only
|
---|
83 | const ImportParticles_t ImportParticles;
|
---|
84 |
|
---|
85 | //!> whether we do print grid for debug visualization or not
|
---|
86 | const bool DoPrintDebug;
|
---|
87 | };
|
---|
88 |
|
---|
89 | }
|
---|
90 |
|
---|
91 | #endif /* INTERFACEVMGJOB_HPP_ */
|
---|