-
Notifications
You must be signed in to change notification settings - Fork 0
/
AbstractBFDef.hh
66 lines (57 loc) · 1.57 KB
/
AbstractBFDef.hh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#ifndef ABSTRACTBFDEF_HH
#define ABSTRACTBFDEF_HH
/*!
* \file AbstractBFDef.hh
* \brief Definition of the AbstractBFDef class
*/
#include <iostream>
#include "Basis.hh"
/*!
* \brief Abstract basis function definition
*
* Class AbstractBF acts as a parent class for basis function definitions,
* specifying the interface that concrete basis function definition classes
* should conform to.
*/
struct AbstractBFDef
{
//! Destructor
virtual ~AbstractBFDef() {}
/*!
* \brief Expand this basis function definition
*
* Expand this definition, adding basis function for position \a pos
* to basis \a basis.
* \param ipos Position identifier
* \param pos Position on which the functions are centered
* \param basis The basis to which the functions are added
*/
virtual void expand(int ipos, const Eigen::Vector3d& pos,
Basis& basis) const = 0;
/*!
* \brief Print a basis function definition
*
* Print a textual representation of this basis function definition
* on output stream \a os.
* \param os The output stream to write to
* \return The updated output stream
*/
virtual std::ostream& print(std::ostream& os) const = 0;
};
namespace
{
/*!
* \brief Print a basis function definition
*
* Print a textual representation of basis function definition \a bf on
* output stream \a os.
* \param os The output stream to write to
* \param bf The basis function to print
* \return The updated output stream
*/
inline std::ostream& operator<<(std::ostream& os, const AbstractBFDef& bf)
{
return bf.print(os);
}
} // namespace
#endif // ABSTRACTBFDEF_HH