DFT-EFE
 
Loading...
Searching...
No Matches
PointChargePotentialFunction.h
Go to the documentation of this file.
1#ifndef dftefePointChargePotentialFunction_h
2#define dftefePointChargePotentialFunction_h
3
5#include "MemorySpaceType.h"
6#include "MemoryStorage.h"
7#include <memory>
8#include "TypeConfig.h"
9#include <vector>
10
11namespace dftefe
12{
13 namespace utils
14 {
16 {
17 public:
19 const std::vector<utils::Point> &atomCoordinates,
20 const std::vector<double> & atomCharges);
21
22 PointChargePotentialFunction(const utils::Point &atomCoordinates,
23 const double atomCharges);
24
25 double
26 operator()(const utils::Point &point) const override;
27 std::vector<double>
28 operator()(const std::vector<utils::Point> &points) const override;
29
30 protected:
31 void
32 evalHost(size_type numPoints, const double *t, double *q) const override;
33
34#ifdef DFTEFE_WITH_DEVICE
35 void
36 evalDevice(size_type numPoints,
37 const double *t,
38 double * q) const override;
39#endif
40
41 private:
42 std::vector<utils::Point> d_atomCoordinates;
43 std::vector<double> d_z;
46
47#ifdef DFTEFE_WITH_DEVICE
48 mutable std::unique_ptr<MemoryStorage<double, MemorySpace::DEVICE>>
49 d_atomCoordsFlatDevice;
50 mutable std::unique_ptr<MemoryStorage<double, MemorySpace::DEVICE>>
51 d_zDevice;
52#endif
53 };
54
55 } // namespace utils
56} // namespace dftefe
57
58#endif // dftefePointChargePotentialFunction_h
Definition: PointChargePotentialFunction.h:16
std::vector< double > d_z
Definition: PointChargePotentialFunction.h:43
size_type d_numAtoms
Definition: PointChargePotentialFunction.h:44
size_type d_dim
Definition: PointChargePotentialFunction.h:45
std::vector< utils::Point > d_atomCoordinates
Definition: PointChargePotentialFunction.h:42
void evalHost(size_type numPoints, const double *t, double *q) const override
Definition: PointChargePotentialFunction.cpp:71
double operator()(const utils::Point &point) const override
Definition: PointChargePotentialFunction.cpp:26
Definition: PointImpl.h:13
Abstract base for scalar functions of a spatial point.
Definition: ScalarSpatialFunction.h:23
dealii includes
Definition: AtomFieldDataSpherical.cpp:31
std::uint64_t size_type
Definition: TypeConfig.h:9