DFT-FE 1.3.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 const dftfe::uInt nCells,
41 double *partialOccupVec,
42 NumberType *wfcQuadPointData,
43 NumberType *gradWfcQuadPointData,
44 double *rhoCellsWfcContributions,
45 double *gradRhoCellsWfcContributions,
46 double *rho,
47 double *gradRho,
48 const bool isEvaluateGradRho,
49 const bool isNonCollin,
50 const bool hasSOC);
51
52 template <typename NumberType>
53 void
55 std::shared_ptr<
56 dftfe::linearAlgebra::BLASWrapper<dftfe::utils::MemorySpace::DEVICE>>
57 &BLASWrapperPtr,
58 const std::pair<dftfe::uInt, dftfe::uInt> cellRange,
59 const std::pair<dftfe::uInt, dftfe::uInt> vecRange,
60 const dftfe::uInt nQuadsPerCell,
61 double *partialOccupVec,
62 double *kCoord,
63 NumberType *wfcQuadPointData,
64 NumberType *gradWfcQuadPointData,
65 double *kineticEnergyDensityCellsWfcContributions,
66 double *tau,
67 const bool isNonCollin,
68 const bool hasSOC);
69
70 template <typename NumberType>
71 void
73 std::shared_ptr<
74 dftfe::linearAlgebra::BLASWrapper<dftfe::utils::MemorySpace::DEVICE>>
75 &BLASWrapperPtr,
76 const std::pair<dftfe::uInt, dftfe::uInt> cellRange,
77 const std::pair<dftfe::uInt, dftfe::uInt> vecRange,
78 const dftfe::uInt nQuadsPerCell,
79 double *onesVec,
80 double *partialOccupVecPrime,
81 NumberType *wfcQuadPointData,
82 NumberType *wfcPrimeQuadPointData,
83 double *rhoResponseHamCellsWfcContributions,
84 double *rhoResponseFermiEnergyCellsWfcContributions,
85 double *rhoResponseHam,
86 double *rhoResponseFermiEnergy);
87} // namespace dftfe
88#endif
89#endif
Definition pseudoPotentialToDftfeConverter.cc:34
@ tau
Definition mixingClass.h:43
@ gradRho
Definition mixingClass.h:34
@ rho
Definition mixingClass.h:33
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, const bool isNonCollin, const bool hasSOC)
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, const dftfe::uInt nCells, double *partialOccupVec, NumberType *wfcQuadPointData, NumberType *gradWfcQuadPointData, double *rhoCellsWfcContributions, double *gradRhoCellsWfcContributions, double *rho, double *gradRho, const bool isEvaluateGradRho, const bool isNonCollin, const bool hasSOC)