forked from MRChemSoft/mrcpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathScalingBasis.h
69 lines (54 loc) · 2.33 KB
/
ScalingBasis.h
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
67
68
69
/*
* MRCPP, a numerical library based on multiresolution analysis and
* the multiwavelet basis which provide low-scaling algorithms as well as
* rigorous error control in numerical computations.
* Copyright (C) 2021 Stig Rune Jensen, Jonas Juselius, Luca Frediani and contributors.
*
* This file is part of MRCPP.
*
* MRCPP is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* MRCPP is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with MRCPP. If not, see <https://www.gnu.org/licenses/>.
*
* For information on the complete list of contributors to MRCPP, see:
* <https://mrcpp.readthedocs.io/>
*/
#pragma once
#include <vector>
#include "MRCPP/constants.h"
#include "functions/Polynomial.h"
namespace mrcpp {
class ScalingBasis {
public:
ScalingBasis(int k, int t);
virtual ~ScalingBasis() = default;
void evalf(const double *r, Eigen::MatrixXd &vals) const;
Polynomial &getFunc(int k) { return this->funcs[k]; }
const Polynomial &getFunc(int k) const { return this->funcs[k]; }
int getScalingType() const { return this->type; }
int getScalingOrder() const { return this->order; }
int getQuadratureOrder() const { return this->order + 1; }
const Eigen::MatrixXd &getQuadratureValues() const { return this->quadVals; }
const Eigen::MatrixXd &getCVMap(int operation) const;
bool operator==(const ScalingBasis &basis) const;
bool operator!=(const ScalingBasis &basis) const;
friend std::ostream &operator<<(std::ostream &o, const ScalingBasis &bas) { return bas.print(o); }
protected:
const int type;
const int order;
Eigen::MatrixXd quadVals; // function values at quadrature pts
Eigen::MatrixXd cvMap; // coef-value transformation matrix
Eigen::MatrixXd vcMap; // value-coef transformation matrix
std::vector<Polynomial> funcs;
std::ostream &print(std::ostream &o) const;
};
} // namespace mrcpp