DFT-FE 1.3.0-pre
Density Functional Theory With Finite-Elements
Loading...
Searching...
No Matches
AtomicCenteredNonLocalOperatorKernelsDevice.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// @author Kartick Ramakrishnan
18//
19#ifndef DFTFE_ATOMICCENTEREDNONLOCALOPERATORDEVICEKERNELS_H
20#define DFTFE_ATOMICCENTEREDNONLOCALOPERATORDEVICEKERNELS_H
21
23#include <DeviceAPICalls.h>
25#include <DeviceTypeConfig.h>
27#include <MemoryStorage.h>
28namespace dftfe
29{
31 {
32 template <typename ValueType>
33 void
35 const dftfe::uInt numWfcs,
36 const dftfe::uInt numNonLocalCells,
37 const dftfe::uInt maxSingleAtomPseudoWfc,
38 const ValueType *sphericalFnTimesWfcParallelVec,
39 ValueType *sphericalFnTimesWfcAllCellsVec,
40 const dftfe::Int *indexMapPaddedToParallelVec);
41
42
43 template <typename ValueType>
44 void
46 const dftfe::uInt numWfcs,
47 const dftfe::uInt totalEntries,
48 const ValueType *sphericalFnTimesWfcParallelVec,
49 ValueType *sphericalFnTimesWfcDealiiParallelVec,
50 const dftfe::uInt *indexMapDealiiParallelNumbering,
51 const dftfe::uInt dimension = 1);
52
53 template <typename ValueType>
54 void
56 const dftfe::uInt numWfcs,
57 const dftfe::uInt totalEntriesPadded,
58 const ValueType *sphericalFnTimesWfcDealiiParallelVec,
59 ValueType *sphericalFnTimesWfcPaddedVec,
60 const dftfe::Int *indexMapDealiiParallelNumbering);
61
62 template <typename ValueType>
63 void
65 const dftfe::uInt numWfcs,
66 const dftfe::uInt totalEntriesPadded,
67 const ValueType *sphericalFnTimesWfcPaddedVec,
68 ValueType *sphericalFnTimesWfcDealiiParallelVec,
69 const dftfe::Int *indexMapDealiiParallelNumbering);
70
71 template <typename ValueType>
72 void
74 const dftfe::uInt numberCellsForAtom,
75 const dftfe::uInt numberNodesPerElement,
76 const dftfe::uInt numberWfc,
77 const dftfe::uInt numberCellsTraversed,
78 const dftfe::utils::MemoryStorage<ValueType,
80 &nonLocalContribution,
81 ValueType *TotalContribution,
84 &cellNodeIdMapNonLocalToLocal);
85 template <typename ValueType>
86 void
88 const dftfe::uInt totalNonLocalElements,
89 const dftfe::uInt offset,
90 const dftfe::uInt offset2,
91 const dftfe::uInt numberWfc,
92 const dftfe::uInt numberNodesPerElement,
95 &iElemNonLocalToElemIndexMap,
96 const dftfe::utils::MemoryStorage<ValueType,
98 &nonLocalContribution,
99 ValueType *TotalContribution);
100
101 template <typename ValueType>
102 void
104 const dftfe::uInt maxSingleAtomContribution,
105 const dftfe::uInt numWfcs,
106 const dftfe::uInt totalAtomsInCurrentProcessor,
107 const double *scalingVector,
108 ValueType *sphericalFnTimesWfcPadded);
109
110 template <typename ValueType>
111 void
113 const dftfe::uInt numberWaveFunctions,
114 const dftfe::uInt totalNonlocalElems,
115 const dftfe::uInt maxSingleAtomContribution,
116 const dftfe::uInt totalNonlocalEntries,
117 const dftfe::utils::MemoryStorage<ValueType,
119 &sphericalFnTimesVectorAllCellsDevice,
122 &mapSphericalFnTimesVectorAllCellsReductionDevice,
124 &sphericalFnTimesWavefunctionMatrix,
125 dftfe::uInt offsetSrc = 0,
126 dftfe::uInt offsetDest = 0);
127
128
129 } // namespace AtomicCenteredNonLocalOperatorKernelsDevice
130
131
132
133} // namespace dftfe
134
135#endif // DFTFE_ATOMICCENTEREDNONLOCALOPERATORDEVICEKERNELS_H
Definition MemoryStorage.h:33
Definition AtomicCenteredNonLocalOperatorKernelsDevice.h:31
void addNonLocalContribution(const dftfe::uInt numberCellsForAtom, const dftfe::uInt numberNodesPerElement, const dftfe::uInt numberWfc, const dftfe::uInt numberCellsTraversed, const dftfe::utils::MemoryStorage< ValueType, dftfe::utils::MemorySpace::DEVICE > &nonLocalContribution, ValueType *TotalContribution, const dftfe::utils::MemoryStorage< dftfe::uInt, dftfe::utils::MemorySpace::DEVICE > &cellNodeIdMapNonLocalToLocal)
void sqrtAlphaScalingWaveFunctionEntries(const dftfe::uInt maxSingleAtomContribution, const dftfe::uInt numWfcs, const dftfe::uInt totalAtomsInCurrentProcessor, const double *scalingVector, ValueType *sphericalFnTimesWfcPadded)
void copyFromParallelNonLocalVecToAllCellsVec(const dftfe::uInt numWfcs, const dftfe::uInt numNonLocalCells, const dftfe::uInt maxSingleAtomPseudoWfc, const ValueType *sphericalFnTimesWfcParallelVec, ValueType *sphericalFnTimesWfcAllCellsVec, const dftfe::Int *indexMapPaddedToParallelVec)
void assembleAtomLevelContributionsFromCellLevel(const dftfe::uInt numberWaveFunctions, const dftfe::uInt totalNonlocalElems, const dftfe::uInt maxSingleAtomContribution, const dftfe::uInt totalNonlocalEntries, const dftfe::utils::MemoryStorage< ValueType, dftfe::utils::MemorySpace::DEVICE > &sphericalFnTimesVectorAllCellsDevice, const dftfe::utils::MemoryStorage< dftfe::uInt, dftfe::utils::MemorySpace::DEVICE > &mapSphericalFnTimesVectorAllCellsReductionDevice, dftfe::utils::MemoryStorage< ValueType, dftfe::utils::MemorySpace::DEVICE > &sphericalFnTimesWavefunctionMatrix, dftfe::uInt offsetSrc=0, dftfe::uInt offsetDest=0)
void copyToDealiiParallelNonLocalVec(const dftfe::uInt numWfcs, const dftfe::uInt totalEntries, const ValueType *sphericalFnTimesWfcParallelVec, ValueType *sphericalFnTimesWfcDealiiParallelVec, const dftfe::uInt *indexMapDealiiParallelNumbering, const dftfe::uInt dimension=1)
void copyFromDealiiParallelNonLocalVecToPaddedVector(const dftfe::uInt numWfcs, const dftfe::uInt totalEntriesPadded, const ValueType *sphericalFnTimesWfcDealiiParallelVec, ValueType *sphericalFnTimesWfcPaddedVec, const dftfe::Int *indexMapDealiiParallelNumbering)
void copyToDealiiParallelNonLocalVecFromPaddedVector(const dftfe::uInt numWfcs, const dftfe::uInt totalEntriesPadded, const ValueType *sphericalFnTimesWfcPaddedVec, ValueType *sphericalFnTimesWfcDealiiParallelVec, const dftfe::Int *indexMapDealiiParallelNumbering)
@ DEVICE
Definition MemorySpaceType.h:36
Definition pseudoPotentialToDftfeConverter.cc:34
std::uint32_t uInt
Definition TypeConfig.h:10
std::int32_t Int
Definition TypeConfig.h:11