DFT-FE 1.1.0-pre
Density Functional Theory With Finite-Elements
Loading...
Searching...
No Matches
MultiVectorLinearSolverProblem.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
19#ifndef DFTFE_MULTIVECTORLINEARSOLVERPROBLEM_H
20#define DFTFE_MULTIVECTORLINEARSOLVERPROBLEM_H
21
22#include "headers.h"
23
24namespace dftfe
25{
26 /*
27 * @brief This class provides an interface for the MultivectorSolverClass
28 */
29 template <dftfe::utils::MemorySpace memorySpace>
31 {
32 public:
33 /**
34 * @brief Compute right hand side vector for the problem Ax = rhs.
35 *
36 * @param rhs vector for the right hand side values
37 */
38
43 unsigned int blockSizeInput) = 0;
44
45 /**
46 * @brief Compute A matrix multipled by x.
47 *
48 */
49 virtual void
52 unsigned int blockSize) = 0;
53
54 /**
55 * @brief Apply the constraints to the solution vector.
56 *
57 */
58 virtual void
60
61 /**
62 * @brief Jacobi preconditioning function.
63 *
64 */
65 virtual void
69 const double omega) const = 0;
70
71 /**
72 * @brief Apply square-root of the Jacobi preconditioner function.
73 *
74 */
75 virtual void
79 const double omega) const = 0;
80 };
81
82} // end of namespace dftfe
83
84#endif // DFTFE_MULTIVECTORLINEARSOLVERPROBLEM_H
Definition MultiVectorLinearSolverProblem.h:31
virtual void precondition_Jacobi(dftfe::linearAlgebra::MultiVector< double, memorySpace > &dst, const dftfe::linearAlgebra::MultiVector< double, memorySpace > &src, const double omega) const =0
Jacobi preconditioning function.
virtual void distributeX()=0
Apply the constraints to the solution vector.
virtual void vmult(dftfe::linearAlgebra::MultiVector< double, memorySpace > &Ax, dftfe::linearAlgebra::MultiVector< double, memorySpace > &x, unsigned int blockSize)=0
Compute A matrix multipled by x.
virtual dftfe::linearAlgebra::MultiVector< double, memorySpace > & computeRhs(dftfe::linearAlgebra::MultiVector< double, memorySpace > &NDBCVec, dftfe::linearAlgebra::MultiVector< double, memorySpace > &outputVec, unsigned int blockSizeInput)=0
Compute right hand side vector for the problem Ax = rhs.
virtual void precondition_JacobiSqrt(dftfe::linearAlgebra::MultiVector< double, memorySpace > &dst, const dftfe::linearAlgebra::MultiVector< double, memorySpace > &src, const double omega) const =0
Apply square-root of the Jacobi preconditioner function.
An class template to encapsulate a MultiVector. A MultiVector is a collection of vectors belonging t...
Definition MultiVector.h:127
Definition pseudoPotentialToDftfeConverter.cc:34