DFT-FE 1.3.0-pre
Density Functional Theory With Finite-Elements
Loading...
Searching...
No Matches
FEBasisOperationsKernelsInternal.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#ifndef dftfeFEBasisOperationsKernelsInternal_h
18#define dftfeFEBasisOperationsKernelsInternal_h
19
20#include <TypeConfig.h>
21#include <BLASWrapper.h>
22#ifdef DFTFE_WITH_DEVICE
23# include <DeviceAPICalls.h>
24# include <DeviceTypeConfig.h>
27#endif // DFTFE_WITH_DEVICE
28
29namespace dftfe
30{
31 namespace basis
32 {
34 {
35 /**
36 * @brief rehsape gradient data from [iCell * 3 * d_nQuadsPerCell * d_nVectors + iQuad * 3 * d_nVectors + iDim * d_nVectors + iVec] to [iCell * 3 * d_nQuadsPerCell * d_nVectors + iDim *
37 * d_nQuadsPerCell * d_nVectors + iQuad * d_nVectors + iVec].
38 * @param[in] numVecs number of vectors.
39 * @param[in] numQuads number of quadrature points per cell.
40 * @param[in] nDims number of dimensions of vector.
41 * @param[in] numCells number of locally owned cells.
42 * @param[in] copyFromVec source data pointer.
43 * @param[out] copyToVec destination data pointer.
44 */
45 template <typename ValueType>
46 void
48 const dftfe::uInt numQuads,
49 const dftfe::uInt nDims,
50 const dftfe::uInt numCells,
51 const ValueType *copyFromVec,
52 ValueType *copyToVec);
53
54 template <typename ValueType>
55 void
57 const dftfe::uInt numQuads,
58 const dftfe::uInt nDims,
59 const dftfe::uInt numCells,
60 const ValueType *copyFromVec,
61 ValueType *copyToVec);
62
63 /**
64 * @brief rehsape gradient data to [iCell * 3 * d_nQuadsPerCell * d_nVectors + iQuad * 3 * d_nVectors + iDim * d_nVectors + iVec] from [iCell * 3 * d_nQuadsPerCell * d_nVectors + iDim *
65 * d_nQuadsPerCell * d_nVectors + iQuad * d_nVectors + iVec].
66 * @param[in] numVecs number of vectors.
67 * @param[in] numQuads number of quadrature points per cell.
68 * @param[in] numCells number of locally owned cells.
69 * @param[in] copyFromVec source data pointer.
70 * @param[out] copyToVec destination data pointer.
71 */
72 template <typename ValueType>
73 void
75 const dftfe::uInt numQuads,
76 const dftfe::uInt nDims,
77 const dftfe::uInt numCells,
78 const ValueType *copyFromVec,
79 ValueType *copyToVec);
80
81 template <typename ValueType>
82 void
84 const dftfe::uInt numQuads,
85 const dftfe::uInt nDims,
86 const dftfe::uInt numCells,
87 const ValueType *copyFromVec,
88 ValueType *copyToVec);
89
90 template <typename ValueType>
91 void
93 const dftfe::uInt numberOfElements,
94 const dftfe::uInt nDoFsPerCell,
95 const dftfe::uInt nQuadsPerCell,
96 const ValueType *inverseJacobiansEntries,
97 const ValueType *gradientDataBlockCoeff,
98 ValueType *gradientData,
99 const dftfe::uInt *cellIndices);
100
101 template <typename ValueType>
102 void
104 const dftfe::uInt numberOfElements,
105 const dftfe::uInt nDoFsPerCell,
106 const dftfe::uInt nQuadsPerCell,
107 const ValueType *inverseJacobiansEntries,
108 const ValueType *gradientDataBlockCoeff,
109 ValueType *gradientData,
110 const dftfe::uInt *cellIndices);
111
112 } // namespace FEBasisOperationsKernelsInternal
113 } // namespace basis
114} // namespace dftfe
115
116#endif // dftfeFEBasisOperationsKernelsInternal_h
Definition FEBasisOperationsKernelsInternal.h:34
void reshapeToNonAffineLayoutDevice(const dftfe::uInt numVecs, const dftfe::uInt numQuads, const dftfe::uInt nDims, const dftfe::uInt numCells, const ValueType *copyFromVec, ValueType *copyToVec)
rehsape gradient data to [iCell * 3 * d_nQuadsPerCell * d_nVectors + iQuad * 3 * d_nVectors + iDim * ...
void reshapeToNonAffineLayoutHost(const dftfe::uInt numVecs, const dftfe::uInt numQuads, const dftfe::uInt nDims, const dftfe::uInt numCells, const ValueType *copyFromVec, ValueType *copyToVec)
void scaleQuadratureDataWithDiagonalJacobianDevice(const dftfe::uInt numberOfElements, const dftfe::uInt nDoFsPerCell, const dftfe::uInt nQuadsPerCell, const ValueType *inverseJacobiansEntries, const ValueType *gradientDataBlockCoeff, ValueType *gradientData, const dftfe::uInt *cellIndices)
void reshapeFromNonAffineLayoutDevice(const dftfe::uInt numVecs, const dftfe::uInt numQuads, const dftfe::uInt nDims, const dftfe::uInt numCells, const ValueType *copyFromVec, ValueType *copyToVec)
rehsape gradient data from [iCell * 3 * d_nQuadsPerCell * d_nVectors + iQuad * 3 * d_nVectors + iDim ...
void reshapeFromNonAffineLayoutHost(const dftfe::uInt numVecs, const dftfe::uInt numQuads, const dftfe::uInt nDims, const dftfe::uInt numCells, const ValueType *copyFromVec, ValueType *copyToVec)
void scaleQuadratureDataWithDiagonalJacobianHost(const dftfe::uInt numberOfElements, const dftfe::uInt nDoFsPerCell, const dftfe::uInt nQuadsPerCell, const ValueType *inverseJacobiansEntries, const ValueType *gradientDataBlockCoeff, ValueType *gradientData, const dftfe::uInt *cellIndices)
Definition FEBasisOperations.h:30
Definition pseudoPotentialToDftfeConverter.cc:34
std::uint32_t uInt
Definition TypeConfig.h:10