DFT-FE 1.1.0-pre
Density Functional Theory With Finite-Elements
Loading...
Searching...
No Matches
densityCalculatorDeviceKernels.h
Go to the documentation of this file.
1// ---------------------------------------------------------------------
2//
3// Copyright (c) 2017-2025 The Regents of the University of Michigan and DFT-FE
4// authors.
5//
6// This file is part of the DFT-FE code.
7//
8// The DFT-FE code is free software; you can use it, redistribute
9// it, and/or modify it under the terms of the GNU Lesser General
10// Public License as published by the Free Software Foundation; either
11// version 2.1 of the License, or (at your option) any later version.
12// The full text of the license can be found in the file LICENSE at
13// the top level of the DFT-FE distribution.
14//
15// ---------------------------------------------------------------------
16//
17
18#ifndef densityCalculatorDeviceKernels_H_
19#define densityCalculatorDeviceKernels_H_
20#if defined(DFTFE_WITH_DEVICE)
21
22# include <BLASWrapper.h>
23# include <DataTypeOverloads.h>
24# include <DeviceAPICalls.h>
26# include <DeviceTypeConfig.h>
28# include <memory>
29namespace dftfe
30{
31 template <typename NumberType>
32 void
34 std::shared_ptr<
35 dftfe::linearAlgebra::BLASWrapper<dftfe::utils::MemorySpace::DEVICE>>
36 &BLASWrapperPtr,
37 const std::pair<dftfe::uInt, dftfe::uInt> cellRange,
38 const std::pair<dftfe::uInt, dftfe::uInt> vecRange,
39 const dftfe::uInt nQuadsPerCell,
40 double *partialOccupVec,
41 NumberType *wfcQuadPointData,
42 NumberType *gradWfcQuadPointData,
43 double *rhoCellsWfcContributions,
44 double *gradRhoCellsWfcContributions,
45 double *rho,
46 double *gradRho,
47 const bool isEvaluateGradRho);
48
49 template <typename NumberType>
50 void
52 std::shared_ptr<
53 dftfe::linearAlgebra::BLASWrapper<dftfe::utils::MemorySpace::DEVICE>>
54 &BLASWrapperPtr,
55 const std::pair<dftfe::uInt, dftfe::uInt> cellRange,
56 const std::pair<dftfe::uInt, dftfe::uInt> vecRange,
57 const dftfe::uInt nQuadsPerCell,
58 double *partialOccupVec,
59 double *kCoord,
60 NumberType *wfcQuadPointData,
61 NumberType *gradWfcQuadPointData,
62 double *kineticEnergyDensityCellsWfcContributions,
63 double *tau);
64
65 template <typename NumberType>
66 void
68 std::shared_ptr<
69 dftfe::linearAlgebra::BLASWrapper<dftfe::utils::MemorySpace::DEVICE>>
70 &BLASWrapperPtr,
71 const std::pair<dftfe::uInt, dftfe::uInt> cellRange,
72 const std::pair<dftfe::uInt, dftfe::uInt> vecRange,
73 const dftfe::uInt nQuadsPerCell,
74 double *onesVec,
75 double *partialOccupVecPrime,
76 NumberType *wfcQuadPointData,
77 NumberType *wfcPrimeQuadPointData,
78 double *rhoResponseHamCellsWfcContributions,
79 double *rhoResponseFermiEnergyCellsWfcContributions,
80 double *rhoResponseHam,
81 double *rhoResponseFermiEnergy);
82
83 template <typename NumberType>
84 void
86 const dftfe::linearAlgebra::BLASWrapper<dftfe::utils::MemorySpace::DEVICE>
87 &BLASWrapperPtr,
88 const std::pair<dftfe::uInt, dftfe::uInt> cellRange,
89 const std::pair<dftfe::uInt, dftfe::uInt> vecRange,
90 const dftfe::uInt nQuadsPerCell,
91 double *partialOccupVec,
92 double *kcoord,
93 NumberType *wfcQuadPointData,
94 NumberType *gradWfcQuadPointData,
95 double *kineticEnergyCellsWfcContributions,
96 double *kineticEnergyDensity,
97 const MPI_Comm &mpiCommDomain);
98
99} // namespace dftfe
100#endif
101#endif
Definition pseudoPotentialToDftfeConverter.cc:34
@ tau
Definition mixingClass.h:38
@ gradRho
Definition mixingClass.h:34
@ rho
Definition mixingClass.h:33
void computeRhoGradRhoFromInterpolatedValues(std::shared_ptr< dftfe::linearAlgebra::BLASWrapper< dftfe::utils::MemorySpace::HOST > > &BLASWrapperPtr, const std::pair< dftfe::uInt, dftfe::uInt > cellRange, const std::pair< dftfe::uInt, dftfe::uInt > vecRange, const dftfe::uInt nQuadsPerCell, double *partialOccupVec, NumberType *wfcQuadPointData, NumberType *gradWfcQuadPointData, double *rhoCellsWfcContributions, double *gradRhoCellsWfcContributions, double *rho, double *gradRho, const bool isEvaluateGradRho)
std::uint32_t uInt
Definition TypeConfig.h:10
void computeRhoResponseFromInterpolatedValues(std::shared_ptr< dftfe::linearAlgebra::BLASWrapper< dftfe::utils::MemorySpace::HOST > > &BLASWrapperPtr, const std::pair< dftfe::uInt, dftfe::uInt > cellRange, const std::pair< dftfe::uInt, dftfe::uInt > vecRange, const dftfe::uInt nQuadsPerCell, double *onesVec, double *partialOccupPrimeVec, NumberType *wfcQuadPointData, NumberType *wfcPrimeQuadPointData, double *rhoResponseHamCellsWfcContributions, double *rhoResponseFermiEnergyCellsWfcContributions, double *rhoResponseHam, double *rhoResponseFermiEnergy)
void computeTauFromInterpolatedValues(std::shared_ptr< dftfe::linearAlgebra::BLASWrapper< dftfe::utils::MemorySpace::HOST > > &BLASWrapperPtr, const std::pair< dftfe::uInt, dftfe::uInt > cellRange, const std::pair< dftfe::uInt, dftfe::uInt > vecRange, const dftfe::uInt nQuadsPerCell, double *partialOccupVec, double *kCoord, NumberType *wfcQuadPointData, NumberType *gradWfcQuadPointData, double *kineticEnergyDensityCellsWfcContributions, double *tau)
void computeKineticEnergyDensityFromInterpolatedValues(const dftfe::linearAlgebra::BLASWrapper< dftfe::utils::MemorySpace::HOST > &BLASWrapperPtr, const std::pair< dftfe::uInt, dftfe::uInt > cellRange, const std::pair< dftfe::uInt, dftfe::uInt > vecRange, const dftfe::uInt nQuadsPerCell, double *partialOccupVec, double *kcoord, NumberType *wfcQuadPointData, NumberType *gradWfcQuadPointData, double *kineticCellsWfcContributions, double *kineticEnergyDensity, const MPI_Comm &mpiCommDomain)