DFT-EFE
 
Loading...
Searching...
No Matches
SphericalDataMixed.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 dftefeSphericalDataMixed_h
27#define dftefeSphericalDataMixed_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:
49 const std::vector<int> qNumbers,
50 const std::vector<double> radialPoints,
51 const std::vector<double> radialValues,
53 double leftValue,
55 double rightValue,
56 const utils::ScalarSpatialFunctionReal &funcAfterRadialGrid,
57 const SphericalHarmonicFunctions & sphericalHarmonicFunc,
58 const double polarAngleTolerance = SphericalDataDefaults::POL_ANG_TOL,
60
62
63 void
65 double leftValue,
67 double rightValue);
68
69 std::vector<double>
70 getValue(const std::vector<utils::Point> &point,
71 const utils::Point & origin) override;
72
73 std::vector<double>
74 getGradientValue(const std::vector<utils::Point> &point,
75 const utils::Point & origin) override;
76
77 std::vector<double>
78 getHessianValue(const std::vector<utils::Point> &point,
79 const utils::Point & origin) override;
80
81 double
82 getValue(const utils::Point &point, const utils::Point &origin) override;
83
84 std::vector<double>
85 getGradientValue(const utils::Point &point,
86 const utils::Point &origin) override;
87
88 std::vector<double>
89 getHessianValue(const utils::Point &point,
90 const utils::Point &origin) override;
91
92 std::vector<double>
93 getRadialValue(const std::vector<double> &r) override;
94
95 std::vector<double>
96 getAngularValue(const std::vector<double> &r,
97 const std::vector<double> &theta,
98 const std::vector<double> &phi) override;
99
100 std::vector<double>
101 getRadialDerivative(const std::vector<double> &r) override;
102
103 std::vector<std::vector<double>>
104 getAngularDerivative(const std::vector<double> &r,
105 const std::vector<double> &theta,
106 const std::vector<double> &phi) override;
107
108 std::vector<int>
109 getQNumbers() const override;
110
111 double
112 getCutoff() const override;
113
114 double
115 getSmoothness() const override;
116
117 void
118 getValue(const size_type numPoints,
119 const double * points,
120 const double * origin,
121 double * out) override
122 {
124 false, "getValue not implemented for SphericalDataMixed.");
125 }
126
127 void
129 const double * points,
130 const double * origin,
131 double * out) override
132 {
134 false, "getGradientValue not implemented for SphericalDataMixed.");
135 }
136
137 void
138 getHessianValue(const size_type numPoints,
139 const double * points,
140 const double * origin,
141 double * out) override
142 {
144 false, "getHessianValue not implemented for SphericalDataMixed.");
145 }
146
147#ifdef DFTEFE_WITH_DEVICE
148 void
149 getValueDevice(
150 const size_type numPoints,
151 const double * points,
152 const double * origin,
153 double * out,
154 utils::deviceStream_t streamId = utils::defaultStream) override;
155
156 void
157 getGradientValueDevice(
158 const size_type numPoints,
159 const double * points,
160 const double * origin,
161 double * out,
163 {
165 "getGradientValueDevice not implemented for "
166 "SphericalDataMixed.");
167 }
168
169 void
170 getHessianValueDevice(
171 const size_type numPoints,
172 const double * points,
173 const double * origin,
174 double * out,
176 {
178 "getHessianValueDevice not implemented for "
179 "SphericalDataMixed.");
180 }
181#endif
182
183 private:
184 std::vector<int> d_qNumbers;
185 std::vector<double> d_radialPoints;
186 std::vector<double> d_radialValues;
187 std::shared_ptr<const utils::Spline> d_spline;
192
195 };
196
197 } // end of namespace atoms
198} // end of namespace dftefe
199#endif // dftefeSphericalDataMixed_h
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: SphericalDataMixed.h:46
void getGradientValue(const size_type numPoints, const double *points, const double *origin, double *out) override
Definition: SphericalDataMixed.h:128
std::vector< double > getGradientValue(const std::vector< utils::Point > &point, const utils::Point &origin) override
Definition: SphericalDataMixed.cpp:138
std::vector< int > d_qNumbers
Definition: SphericalDataMixed.h:184
std::vector< double > d_radialValues
Definition: SphericalDataMixed.h:186
std::vector< double > getAngularValue(const std::vector< double > &r, const std::vector< double > &theta, const std::vector< double > &phi) override
Definition: SphericalDataMixed.cpp:216
std::shared_ptr< const utils::Spline > d_spline
Definition: SphericalDataMixed.h:187
std::vector< double > d_radialPoints
Definition: SphericalDataMixed.h:185
double d_polarAngleTolerance
Definition: SphericalDataMixed.h:188
void getHessianValue(const size_type numPoints, const double *points, const double *origin, double *out) override
Definition: SphericalDataMixed.h:138
double getSmoothness() const override
Definition: SphericalDataMixed.cpp:267
std::vector< int > getQNumbers() const override
Definition: SphericalDataMixed.cpp:253
void initSpline(utils::Spline::bd_type left, double leftValue, utils::Spline::bd_type right, double rightValue)
Definition: SphericalDataMixed.cpp:98
std::vector< double > getRadialDerivative(const std::vector< double > &r) override
Definition: SphericalDataMixed.cpp:228
double getCutoff() const override
Definition: SphericalDataMixed.cpp:259
std::vector< double > getValue(const std::vector< utils::Point > &point, const utils::Point &origin) override
Definition: SphericalDataMixed.cpp:116
double d_cutoffTolerance
Definition: SphericalDataMixed.h:189
const SphericalHarmonicFunctions & d_sphericalHarmonicFunc
Definition: SphericalDataMixed.h:193
const utils::ScalarSpatialFunctionReal & d_funcAfterRadialGrid
Definition: SphericalDataMixed.h:194
std::vector< double > getHessianValue(const std::vector< utils::Point > &point, const utils::Point &origin) override
Definition: SphericalDataMixed.cpp:149
double d_radiusTolerance
Definition: SphericalDataMixed.h:190
size_type d_dim
Definition: SphericalDataMixed.h:191
void getValue(const size_type numPoints, const double *points, const double *origin, double *out) override
Definition: SphericalDataMixed.h:118
std::vector< std::vector< double > > getAngularDerivative(const std::vector< double > &r, const std::vector< double > &theta, const std::vector< double > &phi) override
Definition: SphericalDataMixed.cpp:238
std::vector< double > getRadialValue(const std::vector< double > &r) override
Definition: SphericalDataMixed.cpp:206
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
bd_type
Definition: Spline.h:111
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