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