DFT-EFE
 
Loading...
Searching...
No Matches
SphericalDataAnalytical.h
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright (c) 2021. *
3 * The Regents of the University of Michigan and DFT-EFE developers. *
4 * *
5 * This file is part of the DFT-EFE code. *
6 * *
7 * DFT-EFE is free software: you can redistribute it and/or modify *
8 * it under the terms of the Lesser GNU General Public License as *
9 * published by the Free Software Foundation, either version 3 of *
10 * the License, or (at your option) any later version. *
11 * *
12 * DFT-EFE is distributed in the hope that it will be useful, but *
13 * WITHOUT ANY WARRANTY; without even the implied warranty *
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
15 * See the Lesser GNU General Public License for more details. *
16 * *
17 * You should have received a copy of the GNU Lesser General Public *
18 * License at the top level of DFT-EFE distribution. If not, see *
19 * <https://www.gnu.org/licenses/>. *
20 ******************************************************************************/
21
22/*
23 * @author Avirup Sircar
24 */
25
26#ifndef dftefeSphericalDataAnalytical_h
27#define dftefeSphericalDataAnalytical_h
28
29#include <utils/TypeConfig.h>
30#include <vector>
31#include <utils/Point.h>
32#include <atoms/SphericalData.h>
33#include <utils/Spline.h>
35#include <memory>
36#include <utils/Point.h>
37#include <atoms/Defaults.h>
39#include <utils/Exceptions.h>
40
41namespace dftefe
42{
43 namespace atoms
44 {
46 {
47 public:
48 // Assumption ScalarSpatialFunctionReal is spherically symmetric . TODO :
49 // enforce this
51 const std::vector<int> qNumbers,
53 const double cutoff,
54 const double smoothness,
55 const SphericalHarmonicFunctions & sphericalHarmonicFunc,
56 const double polarAngleTolerance = SphericalDataDefaults::POL_ANG_TOL,
58
60
61 std::vector<double>
62 getValue(const std::vector<utils::Point> &point,
63 const utils::Point & origin) override;
64
65 std::vector<double>
66 getGradientValue(const std::vector<utils::Point> &point,
67 const utils::Point & origin) override;
68
69 std::vector<double>
70 getHessianValue(const std::vector<utils::Point> &point,
71 const utils::Point & origin) override;
72
73 double
74 getValue(const utils::Point &point, const utils::Point &origin) override;
75
76 std::vector<double>
77 getGradientValue(const utils::Point &point,
78 const utils::Point &origin) override;
79
80 std::vector<double>
81 getHessianValue(const utils::Point &point,
82 const utils::Point &origin) override;
83
84 std::vector<double>
85 getRadialValue(const std::vector<double> &r) override;
86
87 std::vector<double>
88 getAngularValue(const std::vector<double> &r,
89 const std::vector<double> &theta,
90 const std::vector<double> &phi) override;
91
92 std::vector<double>
93 getRadialDerivative(const std::vector<double> &r) override;
94
95 std::vector<std::vector<double>>
96 getAngularDerivative(const std::vector<double> &r,
97 const std::vector<double> &theta,
98 const std::vector<double> &phi) override;
99
100 std::vector<int>
101 getQNumbers() const override;
102
103 double
104 getCutoff() const override;
105
106 double
107 getSmoothness() const override;
108
109 void
110 getValue(const size_type numPoints,
111 const double * points,
112 const double * origin,
113 double * out) override
114 {
116 false, "getValue not implemented for SphericalDataAnalytical.");
117 }
118
119 void
121 const double * points,
122 const double * origin,
123 double * out) override
124 {
126 false,
127 "getGradientValue not implemented for SphericalDataAnalytical.");
128 }
129
130 void
131 getHessianValue(const size_type numPoints,
132 const double * points,
133 const double * origin,
134 double * out) override
135 {
137 false,
138 "getHessianValue not implemented for SphericalDataAnalytical.");
139 }
140
141#ifdef DFTEFE_WITH_DEVICE
142 void
143 getValueDevice(
144 const size_type numPoints,
145 const double * points,
146 const double * origin,
147 double * out,
149 {
151 "getValueDevice not implemented for "
152 "SphericalDataAnalytical.");
153 }
154
155 void
156 getGradientValueDevice(
157 const size_type numPoints,
158 const double * points,
159 const double * origin,
160 double * out,
162 {
164 "getGradientValueDevice not implemented for "
165 "SphericalDataAnalytical.");
166 }
167
168 void
169 getHessianValueDevice(
170 const size_type numPoints,
171 const double * points,
172 const double * origin,
173 double * out,
175 {
177 "getHessianValueDevice not implemented for "
178 "SphericalDataAnalytical.");
179 }
180#endif
181
182 private:
183 std::vector<int> d_qNumbers;
188 double d_cutoff;
190
193 };
194
195 } // end of namespace atoms
196} // end of namespace dftefe
197#endif // dftefeSphericalDataAnalytical_h
Definition: SphericalDataAnalytical.h:46
std::vector< std::vector< double > > getAngularDerivative(const std::vector< double > &r, const std::vector< double > &theta, const std::vector< double > &phi) override
Definition: SphericalDataAnalytical.cpp:212
double d_radiusTolerance
Definition: SphericalDataAnalytical.h:186
double getSmoothness() const override
Definition: SphericalDataAnalytical.cpp:239
size_type d_dim
Definition: SphericalDataAnalytical.h:187
std::vector< double > getAngularValue(const std::vector< double > &r, const std::vector< double > &theta, const std::vector< double > &phi) override
Definition: SphericalDataAnalytical.cpp:190
std::vector< double > getValue(const std::vector< utils::Point > &point, const utils::Point &origin) override
Definition: SphericalDataAnalytical.cpp:88
const utils::ScalarSpatialFunctionReal & d_func
Definition: SphericalDataAnalytical.h:192
std::vector< double > getGradientValue(const std::vector< utils::Point > &point, const utils::Point &origin) override
Definition: SphericalDataAnalytical.cpp:110
void getValue(const size_type numPoints, const double *points, const double *origin, double *out) override
Definition: SphericalDataAnalytical.h:110
double d_smoothness
Definition: SphericalDataAnalytical.h:189
double getCutoff() const override
Definition: SphericalDataAnalytical.cpp:233
std::vector< int > d_qNumbers
Definition: SphericalDataAnalytical.h:183
void getHessianValue(const size_type numPoints, const double *points, const double *origin, double *out) override
Definition: SphericalDataAnalytical.h:131
std::vector< double > getRadialDerivative(const std::vector< double > &r) override
Definition: SphericalDataAnalytical.cpp:202
double d_polarAngleTolerance
Definition: SphericalDataAnalytical.h:184
double d_cutoffTolerance
Definition: SphericalDataAnalytical.h:185
double d_cutoff
Definition: SphericalDataAnalytical.h:188
void getGradientValue(const size_type numPoints, const double *points, const double *origin, double *out) override
Definition: SphericalDataAnalytical.h:120
std::vector< int > getQNumbers() const override
Definition: SphericalDataAnalytical.cpp:227
std::vector< double > getRadialValue(const std::vector< double > &r) override
Definition: SphericalDataAnalytical.cpp:180
std::vector< double > getHessianValue(const std::vector< utils::Point > &point, const utils::Point &origin) override
Definition: SphericalDataAnalytical.cpp:122
const SphericalHarmonicFunctions & d_sphericalHarmonicFunc
Definition: SphericalDataAnalytical.h:191
static const double POL_ANG_TOL
Setting all the SphericalDataDefaults.
Definition: Defaults.h:43
static const size_type DEFAULT_DIM
Definition: Defaults.h:60
Definition: SphericalData.h:41
Definition: SphericalHarmonicFunctions.h:19
Definition: PointImpl.h:13
Abstract base for scalar functions of a spatial point.
Definition: ScalarSpatialFunction.h:23
static cudaStream_t defaultStream
Definition: DeviceTypeConfig.cu.h:62
cudaStream_t deviceStream_t
Definition: DeviceTypeConfig.cu.h:27
void throwException(bool condition, std::string msg)
Definition: Exceptions.cpp:56
dealii includes
Definition: AtomFieldDataSpherical.cpp:31
std::uint64_t size_type
Definition: TypeConfig.h:9