DFT-EFE
 
Loading...
Searching...
No Matches
OrthonormalizationFunctions.h
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright (c) 2021. *
3 * The Regents of the University of Michigan and DFT-EFE developers. *
4 * *
5 * This file is part of the DFT-EFE code. *
6 * *
7 * DFT-EFE is free software: you can redistribute it and/or modify *
8 * it under the terms of the Lesser GNU General Public License as *
9 * published by the Free Software Foundation, either version 3 of *
10 * the License, or (at your option) any later version. *
11 * *
12 * DFT-EFE is distributed in the hope that it will be useful, but *
13 * WITHOUT ANY WARRANTY; without even the implied warranty *
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
15 * See the Lesser GNU General Public License for more details. *
16 * *
17 * You should have received a copy of the GNU Lesser General Public *
18 * License at the top level of DFT-EFE distribution. If not, see *
19 * <https://www.gnu.org/licenses/>. *
20 ******************************************************************************/
21
22/*
23 * @author Avirup Sircar
24 */
25
26#ifndef dftefeOrthonormalizationFunctions_h
27#define dftefeOrthonormalizationFunctions_h
28
29#include <utils/TypeConfig.h>
31#include <string>
39
40namespace dftefe
41{
42 namespace linearAlgebra
43 {
44 template <typename ValueTypeOperator,
45 typename ValueTypeOperand,
46 utils::MemorySpace memorySpace>
48 {
49 public:
50 using ValueType =
53 using OpContext =
55
57 const size_type eigenVectorBatchSize,
58 const ElpaScalapackManager &elpaScala,
59 std::shared_ptr<const utils::mpi::MPIPatternP2P<memorySpace>>
60 mpiPatternP2P,
61 std::shared_ptr<LinAlgOpContext<memorySpace>> linAlgOpContext,
62 const bool useScalpack = true);
63
69
73 const OpContext &B = IdentityOperatorContext<ValueTypeOperator,
74 ValueTypeOperand,
75 memorySpace>());
79 size_type maxPass,
80 RealType shiftTolerance,
81 RealType identityTolerance,
82 const OpContext &B = IdentityOperatorContext<ValueTypeOperator,
83 ValueTypeOperand,
84 memorySpace>());
85
89 size_type maxPass,
90 RealType shiftTolerance,
91 RealType identityTolerance,
93 const OpContext &B = IdentityOperatorContext<ValueTypeOperator,
94 ValueTypeOperand,
95 memorySpace>());
96
100 MultiVector<ValueType, memorySpace> & orthogonalizedX,
101 const OpContext &B = IdentityOperatorContext<ValueTypeOperator,
102 ValueTypeOperand,
103 memorySpace>());
104
105 private:
106 void
109 const OpContext & Op,
110 const bool &useBatched = true);
111
112 void
114 const std::shared_ptr<const ProcessGrid> & processGrid,
115 ScaLAPACKMatrix<ValueType> &overlapMatPar,
116 const OpContext & Op);
117
118 std::shared_ptr<MultiVector<ValueType, memorySpace>> d_XinBatchSmall,
120
122
124 const bool d_useELPA;
125 const bool d_useScalapack;
126
127 }; // end of class OrthonormalizationFunctions
128 } // end of namespace linearAlgebra
129} // end of namespace dftefe
131#endif
Manager class for ELPA and ScaLAPACK.
Definition: ElpaScalapackManager.h:43
Abstract class to encapsulate the action of a discrete operator on vectors, matrices,...
Definition: IdentityOperatorContext.h:53
Definition: LinAlgOpContext.h:38
An class template to encapsulate a MultiVector. A MultiVector is a collection of vectors belonging t...
Definition: MultiVector.h:134
Abstract class to encapsulate the action of a discrete operator on vectors, matrices,...
Definition: OperatorContext.h:51
Definition: OrthonormalizationFunctions.h:48
std::shared_ptr< MultiVector< ValueType, memorySpace > > d_XoutBatchSmall
Definition: OrthonormalizationFunctions.h:119
blasLapack::real_type< ValueType > RealType
Definition: OrthonormalizationFunctions.h:52
blasLapack::scalar_type< ValueTypeOperator, ValueTypeOperand > ValueType
Definition: OrthonormalizationFunctions.h:51
std::shared_ptr< MultiVector< ValueType, memorySpace > > d_XoutBatch
Definition: OrthonormalizationFunctions.h:119
size_type d_batchSizeSmall
Definition: OrthonormalizationFunctions.h:121
OrthonormalizationError ModifiedGramSchmidt(MultiVector< ValueTypeOperand, memorySpace > &X, MultiVector< ValueType, memorySpace > &orthogonalizedX, const OpContext &B=IdentityOperatorContext< ValueTypeOperator, ValueTypeOperand, memorySpace >())
Definition: OrthonormalizationFunctions.t.cpp:1085
std::shared_ptr< MultiVector< ValueType, memorySpace > > d_XinBatchSmall
Definition: OrthonormalizationFunctions.h:118
OrthonormalizationError MultipassCGS(MultiVector< ValueTypeOperand, memorySpace > &X, size_type maxPass, RealType shiftTolerance, RealType identityTolerance, const OpContext &B=IdentityOperatorContext< ValueTypeOperator, ValueTypeOperand, memorySpace >())
Definition: OrthonormalizationFunctions.t.cpp:441
OrthonormalizationError CholeskyGramSchmidt(MultiVector< ValueTypeOperand, memorySpace > &X, const OpContext &B=IdentityOperatorContext< ValueTypeOperator, ValueTypeOperand, memorySpace >())
Definition: OrthonormalizationFunctions.t.cpp:153
const ElpaScalapackManager * d_elpaScala
Definition: OrthonormalizationFunctions.h:123
std::shared_ptr< MultiVector< ValueType, memorySpace > > d_XinBatch
Definition: OrthonormalizationFunctions.h:119
~OrthonormalizationFunctions()=default
Default Destructor.
const bool d_useELPA
Definition: OrthonormalizationFunctions.h:124
const bool d_useScalapack
Definition: OrthonormalizationFunctions.h:125
OrthonormalizationError MultipassLowdin(MultiVector< ValueTypeOperand, memorySpace > &X, size_type maxPass, RealType shiftTolerance, RealType identityTolerance, MultiVector< ValueType, memorySpace > &orthogonalizedX, const OpContext &B=IdentityOperatorContext< ValueTypeOperator, ValueTypeOperand, memorySpace >())
Definition: OrthonormalizationFunctions.t.cpp:785
void computeXTransOpX(MultiVector< ValueTypeOperand, memorySpace > &X, utils::MemoryStorage< ValueType, memorySpace > &S, const OpContext &Op, const bool &useBatched=true)
Definition: OrthonormalizationFunctions.t.cpp:1187
size_type d_eigenVecBatchSize
Definition: OrthonormalizationFunctions.h:121
Scalapack wrapper adapted from dealii library and extended implementation to complex datatype.
Definition: ScalapackWrapper.h:43
Definition: MemoryStorage.h:38
A class template to store the communication pattern (i.e., which entries/nodes to receive from which ...
Definition: MPIPatternP2P.h:197
typeInternal::real_type< ValueType > real_type
Definition: BlasLapackTypedef.h:177
typeInternal::scalar_type< ValueType1, ValueType2 > scalar_type
Definition: BlasLapackTypedef.h:183
MemorySpace
Definition: MemorySpaceType.h:37
dealii includes
Definition: AtomFieldDataSpherical.cpp:31
unsigned int size_type
Definition: TypeConfig.h:8
Definition: LinearAlgebraTypes.h:154