Commit 519b3e7a authored by Keith Bledsoe's avatar Keith Bledsoe
Browse files

Adding clenshaw-curtis and multiple gauss quadrature types

parent 22a731dc
......@@ -40,6 +40,48 @@ SparseGrids::SparseGrids(const int input_dimension,
std::fill(mA.begin(), mA.end(), 0.0);
std::fill(mB.begin(), mB.end(), 1.0);
}
else if (type_1d_rule == "gauss-legendre-odd")
{
rule = TasGrid::rule_gausslegendreodd;
std::fill(mA.begin(), mA.end(), -1.0);
std::fill(mB.begin(), mB.end(), 1.0);
}
else if (type_1d_rule == "gauss-patterson")
{
rule = TasGrid::rule_gausspatterson;
std::fill(mA.begin(), mA.end(), -1.0);
std::fill(mB.begin(), mB.end(), 1.0);
}
else if (type_1d_rule == "gauss-chebyshev1")
{
rule = TasGrid::rule_gausschebyshev1;
std::fill(mA.begin(), mA.end(), -1.0);
std::fill(mB.begin(), mB.end(), 1.0);
}
else if (type_1d_rule == "gauss-chebyshev2")
{
rule = TasGrid::rule_gausschebyshev2;
std::fill(mA.begin(), mA.end(), -1.0);
std::fill(mB.begin(), mB.end(), 1.0);
}
else if (type_1d_rule == "gauss-chebyshev1-odd")
{
rule = TasGrid::rule_gausschebyshev1odd;
std::fill(mA.begin(), mA.end(), -1.0);
std::fill(mB.begin(), mB.end(), 1.0);
}
else if (type_1d_rule == "gauss-chebyshev2-odd")
{
rule = TasGrid::rule_gausschebyshev2odd;
std::fill(mA.begin(), mA.end(), -1.0);
std::fill(mB.begin(), mB.end(), 1.0);
}
else if (type_1d_rule == "clenshaw-curtis")
{
rule = TasGrid::rule_clenshawcurtis;
std::fill(mA.begin(), mA.end(), -1.0);
std::fill(mB.begin(), mB.end(), 1.0);
}
else
{
radix_insist(false, type_1d_rule+" is not supported");
......
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