DFT-FE 1.1.0-pre
Density Functional Theory With Finite-Elements
Loading...
Searching...
No Matches
operator.h
Go to the documentation of this file.
1//
2// -------------------------------------------------------------------------------------
3//
4// Copyright (c) 2017-2025 The Regents of the University of Michigan and DFT-FE
5// authors.
6//
7// This file is part of the DFT-FE code.
8//
9// The DFT-FE code is free software; you can use it, redistribute
10// it, and/or modify it under the terms of the GNU Lesser General
11// Public License as published by the Free Software Foundation; either
12// version 2.1 of the License, or (at your option) any later version.
13// The full text of the license can be found in the file LICENSE at
14// the top level of the DFT-FE distribution.
15//
16// --------------------------------------------------------------------------------------
17//
18// @author Phani Motamarri
19//
20#ifndef operatorDFTClass_h
21#define operatorDFTClass_h
22
24#include "headers.h"
25#include "process_grid.h"
26#include "scalapackWrapper.h"
27#include "elpaScalaManager.h"
28
29#include <vector>
30#if defined(DFTFE_WITH_DEVICE)
32#endif
33
34namespace dftfe
35{
36 /**
37 * @brief Base class for building the DFT operator and the action of operator on a vector
38 *
39 * @author Phani Motamarri, Sambit Das
40 */
41 template <dftfe::utils::MemorySpace memorySpace>
43 {
44 //
45 // methods
46 //
47 public:
48 /**
49 * @brief Destructor.
50 */
51 virtual ~operatorDFTClass(){};
52
53
56 const dftfe::uInt index) = 0;
57
59 memorySpace> &
61 const dftfe::uInt index) = 0;
62
63 virtual void
64 init(const std::vector<double> &kPointCoordinates,
65 const std::vector<double> &kPointWeights) = 0;
66
67 virtual void
69 const dftfe::uInt spinIndex) = 0;
70
71 virtual void
73
74
75 virtual void
77 const double scalarHX,
78 const double scalarY,
79 const double scalarX,
81 const bool onlyHPrimePartForFirstOrderDensityMatResponse = false) = 0;
82
83 virtual void
85 &src,
86 const double scalarHX,
87 const double scalarY,
88 const double scalarX,
90 &dst,
91 const bool onlyHPrimePartForFirstOrderDensityMatResponse = false) = 0;
92
93 virtual void
96 const double scalarHX,
97 const double scalarY,
98 const double scalarX,
100 const bool onlyHPrimePartForFirstOrderDensityMatResponse = false) = 0;
101
102 virtual void
105 const double scalarOX,
106 const double scalarY,
107 const double scalarX,
109 const bool useApproximateMatrixEntries = true) = 0;
110
111 virtual void
114 const double scalarOinvX,
115 const double scalarY,
116 const double scalarX,
118 &dst) = 0;
119
120 virtual void
123 &src,
124 const double scalarOinvX,
125 const double scalarY,
126 const double scalarX,
128 &dst) = 0;
129
130
131
132 virtual void
135 const double scalarHX,
136 const double scalarY,
137 const double scalarX,
139 const bool onlyHPrimePartForFirstOrderDensityMatResponse = false,
140 const bool skip1 = false,
141 const bool skip2 = false,
142 const bool skip3 = false) = 0;
143
144 virtual void
146 memorySpace> &src,
147 const double scalarHX,
148 const double scalarY,
149 const double scalarX,
151 memorySpace> &dst,
152 const bool onlyHPrimePartForFirstOrderDensityMatResponse = false,
153 const bool skip1 = false,
154 const bool skip2 = false,
155 const bool skip3 = false) = 0;
156
159
162
163 virtual const MPI_Comm &
165
168
171 };
172} // namespace dftfe
173#endif
Overloads dealii's distribute and distribute_local_to_global functions associated with constraints cl...
Definition constraintMatrixInfo.h:43
An class template to encapsulate a MultiVector. A MultiVector is a collection of vectors belonging t...
Definition MultiVector.h:127
Base class for building the DFT operator and the action of operator on a vector.
Definition operator.h:43
virtual void HX(dftfe::linearAlgebra::MultiVector< dataTypes::number, memorySpace > &src, const double scalarHX, const double scalarY, const double scalarX, dftfe::linearAlgebra::MultiVector< dataTypes::number, memorySpace > &dst, const bool onlyHPrimePartForFirstOrderDensityMatResponse=false)=0
virtual void overlapMatrixTimesX(dftfe::linearAlgebra::MultiVector< dataTypes::number, memorySpace > &src, const double scalarOX, const double scalarY, const double scalarX, dftfe::linearAlgebra::MultiVector< dataTypes::number, memorySpace > &dst, const bool useApproximateMatrixEntries=true)=0
virtual const dftfe::utils::MemoryStorage< double, memorySpace > & getSqrtMassVector()=0
virtual void reinitNumberWavefunctions(const dftfe::uInt numWfc)=0
virtual void overlapInverseMatrixTimesX(dftfe::linearAlgebra::MultiVector< dataTypes::numberFP32, memorySpace > &src, const double scalarOinvX, const double scalarY, const double scalarX, dftfe::linearAlgebra::MultiVector< dataTypes::numberFP32, memorySpace > &dst)=0
virtual void init(const std::vector< double > &kPointCoordinates, const std::vector< double > &kPointWeights)=0
virtual dftfe::linearAlgebra::MultiVector< dataTypes::numberFP32, memorySpace > & getScratchFEMultivectorSinglePrec(const dftfe::uInt numVectors, const dftfe::uInt index)=0
virtual void HXWithLowdinOrthonormalisedInput(dftfe::linearAlgebra::MultiVector< dataTypes::number, memorySpace > &src, const double scalarHX, const double scalarY, const double scalarX, dftfe::linearAlgebra::MultiVector< dataTypes::number, memorySpace > &dst, const bool onlyHPrimePartForFirstOrderDensityMatResponse=false)=0
virtual void HX(dftfe::linearAlgebra::MultiVector< dataTypes::numberFP32, memorySpace > &src, const double scalarHX, const double scalarY, const double scalarX, dftfe::linearAlgebra::MultiVector< dataTypes::numberFP32, memorySpace > &dst, const bool onlyHPrimePartForFirstOrderDensityMatResponse=false)=0
virtual void overlapInverseMatrixTimesX(dftfe::linearAlgebra::MultiVector< dataTypes::number, memorySpace > &src, const double scalarOinvX, const double scalarY, const double scalarX, dftfe::linearAlgebra::MultiVector< dataTypes::number, memorySpace > &dst)=0
virtual void HXCheby(dftfe::linearAlgebra::MultiVector< dataTypes::number, memorySpace > &src, const double scalarHX, const double scalarY, const double scalarX, dftfe::linearAlgebra::MultiVector< dataTypes::number, memorySpace > &dst, const bool onlyHPrimePartForFirstOrderDensityMatResponse=false, const bool skip1=false, const bool skip2=false, const bool skip3=false)=0
virtual ~operatorDFTClass()
Destructor.
Definition operator.h:51
virtual dftUtils::constraintMatrixInfo< memorySpace > * getOverloadedConstraintMatrix() const =0
virtual dftUtils::constraintMatrixInfo< dftfe::utils::MemorySpace::HOST > * getOverloadedConstraintMatrixHost() const =0
virtual dftfe::linearAlgebra::MultiVector< dataTypes::number, memorySpace > & getScratchFEMultivector(const dftfe::uInt numVectors, const dftfe::uInt index)=0
virtual void HXCheby(dftfe::linearAlgebra::MultiVector< dataTypes::numberFP32, memorySpace > &src, const double scalarHX, const double scalarY, const double scalarX, dftfe::linearAlgebra::MultiVector< dataTypes::numberFP32, memorySpace > &dst, const bool onlyHPrimePartForFirstOrderDensityMatResponse=false, const bool skip1=false, const bool skip2=false, const bool skip3=false)=0
virtual void reinitkPointSpinIndex(const dftfe::uInt kPointIndex, const dftfe::uInt spinIndex)=0
virtual const MPI_Comm & getMPICommunicatorDomain()=0
virtual const dftfe::utils::MemoryStorage< double, memorySpace > & getInverseSqrtMassVector()=0
Definition MemoryStorage.h:33
float numberFP32
Definition dftfeDataTypes.h:43
Definition pseudoPotentialToDftfeConverter.cc:34
std::uint32_t uInt
Definition TypeConfig.h:10