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<unsigned int, unsigned int> cellRange,
38 const std::pair<unsigned int, unsigned int> vecRange,
39 const unsigned int 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<unsigned int, unsigned int> cellRange,
56 const std::pair<unsigned int, unsigned int> vecRange,
57 const unsigned int nQuadsPerCell,
58 double * onesVec,
59 double * partialOccupVecPrime,
60 NumberType * wfcQuadPointData,
61 NumberType * wfcPrimeQuadPointData,
62 double *rhoResponseHamCellsWfcContributions,
63 double *rhoResponseFermiEnergyCellsWfcContributions,
64 double *rhoResponseHam,
65 double *rhoResponseFermiEnergy);
66
67 template <typename NumberType>
68 void
70 const dftfe::linearAlgebra::BLASWrapper<dftfe::utils::MemorySpace::DEVICE>
71 & BLASWrapperPtr,
72 const std::pair<unsigned int, unsigned int> cellRange,
73 const std::pair<unsigned int, unsigned int> vecRange,
74 const unsigned int nQuadsPerCell,
75 double * partialOccupVec,
76 double * kcoord,
77 NumberType * wfcQuadPointData,
78 NumberType * gradWfcQuadPointData,
79 double * kineticEnergyCellsWfcContributions,
80 double * kineticEnergyDensity,
81 const MPI_Comm &mpiCommDomain);
82
83} // namespace dftfe
84#endif
85#endif
Definition pseudoPotentialToDftfeConverter.cc:34
void computeRhoGradRhoFromInterpolatedValues(std::shared_ptr< dftfe::linearAlgebra::BLASWrapper< dftfe::utils::MemorySpace::HOST > > &BLASWrapperPtr, const std::pair< unsigned int, unsigned int > cellRange, const std::pair< unsigned int, unsigned int > vecRange, const unsigned int nQuadsPerCell, double *partialOccupVec, NumberType *wfcQuadPointData, NumberType *gradWfcQuadPointData, double *rhoCellsWfcContributions, double *gradRhoCellsWfcContributions, double *rho, double *gradRho, const bool isEvaluateGradRho)
void computeRhoResponseFromInterpolatedValues(std::shared_ptr< dftfe::linearAlgebra::BLASWrapper< dftfe::utils::MemorySpace::HOST > > &BLASWrapperPtr, const std::pair< unsigned int, unsigned int > cellRange, const std::pair< unsigned int, unsigned int > vecRange, const unsigned int nQuadsPerCell, double *onesVec, double *partialOccupPrimeVec, NumberType *wfcQuadPointData, NumberType *wfcPrimeQuadPointData, double *rhoResponseHamCellsWfcContributions, double *rhoResponseFermiEnergyCellsWfcContributions, double *rhoResponseHam, double *rhoResponseFermiEnergy)
@ gradRho
Definition mixingClass.h:34
@ rho
Definition mixingClass.h:33
void computeKineticEnergyDensityFromInterpolatedValues(const dftfe::linearAlgebra::BLASWrapper< dftfe::utils::MemorySpace::HOST > &BLASWrapperPtr, const std::pair< unsigned int, unsigned int > cellRange, const std::pair< unsigned int, unsigned int > vecRange, const unsigned int nQuadsPerCell, double *partialOccupVec, double *kcoord, NumberType *wfcQuadPointData, NumberType *gradWfcQuadPointData, double *kineticCellsWfcContributions, double *kineticEnergyDensity, const MPI_Comm &mpiCommDomain)