DFT-EFE
 
Loading...
Searching...
No Matches
AtomSevereFunction.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 dftefeAtomSevereFunction_h
27#define dftefeAtomSevereFunction_h
28
31
32namespace dftefe
33{
34 namespace atoms
35 {
37 {
38 enum class PSP
39 {
40 vLocal
41 };
42
43 enum class Atomic
44 {
45 density,
55 };
56 };
57
58 template <utils::MemorySpace memorySpace>
59 class AtomSevereFunction : public AtomSuperpositionFunction<memorySpace>,
61 {
62 public:
63 template <typename FuncType>
65 std::shared_ptr<const AtomSphericalDataContainer>
66 atomSphericalDataContainer,
67 const std::vector<std::string> & atomSymbol,
68 const std::vector<utils::Point> & atomCoordinates,
69 const std::vector<double> & atomCharges,
70 double smearedChargeRadius,
71 FuncType type,
72 double constant = 1.0,
73 linearAlgebra::LinAlgOpContext<memorySpace> *linAlgOpContext = nullptr);
74
75 double
76 operator()(const utils::Point &point) const override;
77
78 std::vector<double>
79 operator()(const std::vector<utils::Point> &points) const override;
80
81 protected:
82 void
83 evalHost(size_type numPoints, const double *t, double *q) const override;
84
85#ifdef DFTEFE_WITH_DEVICE
86 void
87 evalDevice(size_type numPoints,
88 const double *t,
89 double * q) const override;
90#endif
91
92 private:
94 double d_constant;
97 std::shared_ptr<utils::ScalarSpatialFunctionReal> d_b;
98 std::shared_ptr<utils::ScalarSpatialFunctionReal> d_vext;
99 std::shared_ptr<utils::ScalarSpatialFunctionReal> d_rho;
100 };
101
102 } // namespace atoms
103} // namespace dftefe
104
106
107#endif // dftefeAtomSevereFunction_h
Definition: AtomSevereFunction.h:61
std::shared_ptr< utils::ScalarSpatialFunctionReal > d_vext
Definition: AtomSevereFunction.h:98
AtomSuperpositionFuncType d_atomSupType
Definition: AtomSevereFunction.h:93
AtomSevereFuncType::Atomic d_atomicType
Definition: AtomSevereFunction.h:96
std::shared_ptr< utils::ScalarSpatialFunctionReal > d_rho
Definition: AtomSevereFunction.h:99
double operator()(const utils::Point &point) const override
Definition: AtomSevereFunction.t.cpp:172
std::shared_ptr< utils::ScalarSpatialFunctionReal > d_b
Definition: AtomSevereFunction.h:97
double d_constant
Definition: AtomSevereFunction.h:94
void evalHost(size_type numPoints, const double *t, double *q) const override
Definition: AtomSevereFunction.t.cpp:199
bool d_isComposite
Definition: AtomSevereFunction.h:95
Definition: AtomSuperpositionFunction.h:55
Definition: LinAlgOpContext.h:52
Definition: PointImpl.h:13
Abstract base for scalar functions of a spatial point.
Definition: ScalarSpatialFunction.h:23
AtomSuperpositionFuncType
Definition: AtomSuperpositionFunction.h:46
dealii includes
Definition: AtomFieldDataSpherical.cpp:31
std::uint64_t size_type
Definition: TypeConfig.h:9
Definition: AtomSevereFunction.h:37
Atomic
Definition: AtomSevereFunction.h:44
PSP
Definition: AtomSevereFunction.h:39