DFT-FE 1.1.0-pre
Density Functional Theory With Finite-Elements
Loading...
Searching...
No Matches
nonlinearSolverFunction.h
Go to the documentation of this file.
1// ---------------------------------------------------------------------
2//
3// Copyright (c) 2017-2018 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// @authors Bikash Kanungo, Vishal Subramanian
19//
20
21#ifndef DFTFE_NONLINEARSOLVERFUNCTION_H
22#define DFTFE_NONLINEARSOLVERFUNCTION_H
23
24#include <headers.h>
25
26namespace dftfe
27{
29 {
30 public:
31 virtual ~nonlinearSolverFunction() = default;
32 virtual void
33 setInitialGuess(const std::vector<distributedCPUVec<double>> &x) = 0;
34
35 virtual std::vector<distributedCPUVec<double>>
36 getInitialGuess() const = 0;
37
38 virtual void
40 std::vector<distributedCPUVec<double>> & force,
41 std::vector<double> & loss) = 0;
42
43 virtual void
44 setSolution(const std::vector<distributedCPUVec<double>> &x) = 0;
45 }; // end of class nonlinearSolverFunction
46} // end of namespace dftfe
47
48#endif // DFTFE_NONLINEARSOLVERFUNCTION_H
Definition nonlinearSolverFunction.h:29
virtual ~nonlinearSolverFunction()=default
virtual void getForceVector(const std::vector< distributedCPUVec< double > > &x, std::vector< distributedCPUVec< double > > &force, std::vector< double > &loss)=0
virtual void setInitialGuess(const std::vector< distributedCPUVec< double > > &x)=0
virtual std::vector< distributedCPUVec< double > > getInitialGuess() const =0
virtual void setSolution(const std::vector< distributedCPUVec< double > > &x)=0
Definition forceWfcContractions.h:32
Definition pseudoPotentialToDftfeConverter.cc:34
dealii::LinearAlgebra::distributed::Vector< elem_type, dealii::MemorySpace::Host > distributedCPUVec
Definition headers.h:92