Commit 02e4a782 authored by Sebastian Wolf's avatar Sebastian Wolf

Normalize Hermite in UQ

parent e8452bf5
......@@ -48,9 +48,9 @@ namespace xerus { namespace uq {
Tensor hermite_evaluation(const double _v, const size_t _basisSize) {
Tensor p({_basisSize});
for (unsigned i = 0; i < _basisSize; ++i) {
p[i] = boost::math::hermite(i, _v/std::sqrt(2))/std::pow(2.0, i/2.0);
p[i] = std::sqrt(1/(/*std::sqrt(2*M_PI)**/boost::math::factorial<double>(i)))*boost::math::hermite(i, _v/std::sqrt(2))/std::pow(2.0, i/2.0);
}
return p;
return p;
}
......@@ -72,7 +72,12 @@ namespace xerus { namespace uq {
while(m1TT.degree() > 1) {
m1TT.fix_mode(1, 0);
}
Tensor m1 = Tensor(m1TT);
double m1Factor = 1.0;
if(_basisType == PolynomBasis::Hermite) {
// m1Factor = 1/(std::sqrt(2*M_PI));
// m1Factor = 1.0/10.0;
}
Tensor m1 = m1Factor*Tensor(m1TT);
// M2
Tensor spacialCmp = _x.get_component(0);
......
......@@ -45,7 +45,7 @@ namespace xerus { namespace uq { namespace impl_uqRaAdf {
const size_t d;
const double targetResidual;
const size_t maxRank = 50;
const size_t maxRank = 75;
const double minRankEps = 1e-8;
const double epsDecay = 0.8;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment