DFT-EFE
 
Loading...
Searching...
No Matches
MatrixFreeDevice.h
Go to the documentation of this file.
1// ---------------------------------------------------------------------
2//
3// Copyright (c) 2017-2022 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
23#ifndef matrixFreeDevice_H_
24#define matrixFreeDevice_H_
25#include <cstdint>
26#include <stdexcept>
27#include <utils/TypeConfig.h>
28
29namespace dftefe
30{
31 // List of operators
33 {
36 LDA = 2,
37 GGA = 3,
38 Count = 4
39 };
40
49 template <typename T,
50 dftefe::operatorList operatorID,
51 std::uint32_t nDofsPerDim,
52 std::uint32_t nQuadPointsPerDim,
53 std::uint32_t batchSize>
55 {
56 static void
57 init(T *constMemDataHost, std::size_t constMemDataSize);
58
59 static void
61 T * src,
62 T * jacobianFactor,
63 dftefe::uInt *map,
64 T * shapeBuffer,
65 dftefe::uInt nCells,
66 dftefe::uInt nBatch);
67
68 static void
70 T * src,
71 T * jacobianFactor,
72 dftefe::uInt *map,
73 T * shapeBuffer,
74 T coeffHelmholtz,
75 dftefe::uInt nCells,
76 dftefe::uInt nBatch);
77
78 static void
80 const dftefe::uInt *constrainingNodeBuckets,
81 const dftefe::uInt *constrainingNodeOffset,
82 const dftefe::uInt *constrainedNodeBuckets,
83 const dftefe::uInt *constrainedNodeOffset,
84 const T * weightMatrixList,
85 const dftefe::uInt *weightMatrixOffset,
86 const T * inhomogenityList,
87 const dftefe::uInt *ghostMap,
88 const dftefe::uInt inhomogenityListSize,
89 const dftefe::uInt nBatch,
90 const dftefe::uInt nOwnedDofs,
91 const dftefe::uInt nGhostDofs);
92
93 static void
95 T * src,
96 const dftefe::uInt *constrainingNodeBuckets,
97 const dftefe::uInt *constrainingNodeOffset,
98 const dftefe::uInt *constrainedNodeBuckets,
99 const dftefe::uInt *constrainedNodeOffset,
100 const T * weightMatrixList,
101 const dftefe::uInt *weightMatrixOffset,
102 const dftefe::uInt *ghostMap,
103 const dftefe::uInt inhomogenityListSize,
104 const dftefe::uInt nBatch,
105 const dftefe::uInt nOwnedDofs,
106 const dftefe::uInt nGhostDofs);
107 };
108
109} // namespace dftefe
110#endif // matrixFreeDevice_H_
dealii includes
Definition: AtomFieldDataSpherical.cpp:31
std::uint64_t uInt
Definition: TypeConfig.h:11
operatorList
Definition: MatrixFreeDevice.h:33
@ Count
Definition: MatrixFreeDevice.h:38
@ GGA
Definition: MatrixFreeDevice.h:37
@ Helmholtz
Definition: MatrixFreeDevice.h:35
@ LDA
Definition: MatrixFreeDevice.h:36
@ Laplace
Definition: MatrixFreeDevice.h:34
MatrixFreeDevice class template. template parameter nDofsPerDim is the finite element polynomial orde...
Definition: MatrixFreeDevice.h:55
static void init(T *constMemDataHost, std::size_t constMemDataSize)
static void computeLaplaceX(T *dst, T *src, T *jacobianFactor, dftefe::uInt *map, T *shapeBuffer, dftefe::uInt nCells, dftefe::uInt nBatch)
static void constraintsDistribute(T *src, const dftefe::uInt *constrainingNodeBuckets, const dftefe::uInt *constrainingNodeOffset, const dftefe::uInt *constrainedNodeBuckets, const dftefe::uInt *constrainedNodeOffset, const T *weightMatrixList, const dftefe::uInt *weightMatrixOffset, const T *inhomogenityList, const dftefe::uInt *ghostMap, const dftefe::uInt inhomogenityListSize, const dftefe::uInt nBatch, const dftefe::uInt nOwnedDofs, const dftefe::uInt nGhostDofs)
static void computeHelmholtzX(T *dst, T *src, T *jacobianFactor, dftefe::uInt *map, T *shapeBuffer, T coeffHelmholtz, dftefe::uInt nCells, dftefe::uInt nBatch)
static void constraintsDistributeTranspose(T *dst, T *src, const dftefe::uInt *constrainingNodeBuckets, const dftefe::uInt *constrainingNodeOffset, const dftefe::uInt *constrainedNodeBuckets, const dftefe::uInt *constrainedNodeOffset, const T *weightMatrixList, const dftefe::uInt *weightMatrixOffset, const dftefe::uInt *ghostMap, const dftefe::uInt inhomogenityListSize, const dftefe::uInt nBatch, const dftefe::uInt nOwnedDofs, const dftefe::uInt nGhostDofs)