/
pppm_conp_intel.h
112 lines (93 loc) · 3.08 KB
/
pppm_conp_intel.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
/* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
http://lammps.sandia.gov, Sandia National Laboratories
Steve Plimpton, sjplimp@sandia.gov
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
certain rights in this software. This software is distributed under
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
/* ----------------------------------------------------------------------
Version: Mar/2021
Shern Ren Tee (UQ AIBN), s.tee@uq.edu.au
------------------------------------------------------------------------- */
#ifdef KSPACE_CLASS
KSpaceStyle(pppm/conp/intel,PPPMCONPIntel)
#else
#ifndef LMP_PPPM_CONP_INTEL_H
#define LMP_PPPM_CONP_INTEL_H
#include "pppm_intel.h"
#include "kspacemodule.h"
#include "intel_buffers.h"
namespace LAMMPS_NS {
class PPPMCONPIntel : public PPPMIntel, public KSpaceModule {
public:
PPPMCONPIntel(class LAMMPS *);
~PPPMCONPIntel();
void compute(int, int);
void conp_setup(bool inflag) {lowmemflag = inflag;}
void conp_post_neighbor(bool, bool);
void a_cal(double*);
void a_read();
void b_cal(double*);
void conp_pre_force() {elyte_mapped = false;particles_mapped = false;}
void update_charge();
double compute_particle_potential(int i) {
if (_use_table == 1) {
return compute_particle_potential<1>(i);
} else {
return compute_particle_potential<0>(i);
}
}
double return_qsum() {return qsum;}
protected:
class KSpaceModule * my_ewald;
template<class flt_t, class acc_t, int use_table>
void aaa_map_rho(IntelBuffers<flt_t,acc_t> *buffers);
template<class flt_t, class acc_t>
void aaa_map_rho(IntelBuffers<flt_t,acc_t> *buffers) {
if (_use_table == 1) {
aaa_map_rho<flt_t,acc_t,1>(buffers);
} else {
aaa_map_rho<flt_t,acc_t,0>(buffers);
}
}
template<class flt_t, class acc_t, int use_table>
void elyte_make_rho(IntelBuffers<flt_t,acc_t> *buffers);
template<class flt_t, class acc_t>
void elyte_make_rho(IntelBuffers<flt_t,acc_t> *buffers) {
if (_use_table == 1) {
elyte_make_rho<flt_t,acc_t,1>(buffers);
} else {
elyte_make_rho<flt_t,acc_t,0>(buffers);
}
}
template<class flt_t, class acc_t>
void ele_make_rho(IntelBuffers<flt_t,acc_t> *buffers);
template<int use_table>
double compute_particle_potential(int i);
void conp_make_rho();
void ele_make_rho();
void conp_compute_first(int,int);
bool first_bcal,first_postneighbor;
bool particles_mapped;
void setup_allocate();
void ele_allocate(int);
void elyte_allocate(int);
void setup_deallocate();
void ele_deallocate();
void elyte_deallocate();
int* j2i;
bool elyte_mapped;
FFT_SCALAR ***ele2rho;
FFT_SCALAR ***ele_density_brick;
FFT_SCALAR ***elyte_density_brick;
int jmax;
void elyte_map_rho_pois();
void elyte_poisson();
void fill_j2i();
};
}
#endif
#endif