DFT-FE 1.1.0-pre
Density Functional Theory With Finite-Elements
Loading...
Searching...
No Matches
solveVselfInBinsDevice.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#if defined(DFTFE_WITH_DEVICE)
19# ifndef solveVselfInBinsDevice_H_
20# define solveVselfInBinsDevice_H_
21
22# include <constraintMatrixInfo.h>
23# include <headers.h>
24# include <BLASWrapper.h>
25namespace dftfe
26{
27 namespace poissonDevice
28 {
29 void
30 solveVselfInBins(
31 const dftfe::utils::MemoryStorage<double,
33 &cellGradNIGradNJIntergralDevice,
34 const std::shared_ptr<
35 dftfe::linearAlgebra::BLASWrapper<dftfe::utils::MemorySpace::DEVICE>>
36 & BLASWrapperPtr,
37 const dealii::MatrixFree<3, double> & matrixFreeData,
38 const unsigned int mfDofHandlerIndex,
39 const dealii::AffineConstraints<double> &hangingPeriodicConstraintMatrix,
40 const double * rhsFlattenedH,
41 const double * diagonalAH,
42 const double * inhomoIdsColoredVecFlattenedH,
43 const unsigned int localSize,
44 const unsigned int ghostSize,
45 const unsigned int numberBins,
46 const MPI_Comm & mpiCommParent,
47 const MPI_Comm & mpiCommDomain,
48 double * xH,
49 const int verbosity,
50 const unsigned int maxLinearSolverIterations,
51 const double absLinearSolverTolerance,
52 const bool isElectroFEOrderDifferentFromFEOrder = false);
53
54 void
55 cgSolver(
56 const std::shared_ptr<
57 dftfe::linearAlgebra::BLASWrapper<dftfe::utils::MemorySpace::DEVICE>>
58 &BLASWrapperPtr,
59 dftUtils::constraintMatrixInfo<dftfe::utils::MemorySpace::DEVICE>
60 & constraintsMatrixDataInfoDevice,
61 const double *bD,
62 const double *diagonalAD,
63 const dftfe::utils::MemoryStorage<double,
65 &poissonCellStiffnessMatricesD,
66 const dftfe::utils::MemoryStorage<double,
68 &inhomoIdsColoredVecFlattenedD,
69 const dftfe::utils::MemoryStorage<dealii::types::global_dof_index,
71 & cellLocalProcIndexIdMapD,
72 const unsigned int localSize,
73 const unsigned int ghostSize,
74 const unsigned int numberBins,
75 const unsigned int totalLocallyOwnedCells,
76 const unsigned int numberNodesPerElement,
77 const int debugLevel,
78 const unsigned int maxIter,
79 const double absTol,
80 const MPI_Comm & mpiCommParent,
81 const MPI_Comm & mpiCommDomain,
82 distributedDeviceVec<double> &x);
83 } // namespace poissonDevice
84} // namespace dftfe
85# endif
86#endif
Definition solveVselfInBinsDeviceKernels.h:10
@ DEVICE
Definition MemorySpaceType.h:36
Definition pseudoPotentialToDftfeConverter.cc:34