Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
LEFEBVREJP email
radix
Commits
519b3e7a
Commit
519b3e7a
authored
Jun 10, 2019
by
Keith Bledsoe
Browse files
Adding clenshaw-curtis and multiple gauss quadrature types
parent
22a731dc
Changes
1
Hide whitespace changes
Inline
Side-by-side
radixsparsegrids/sparsegrids.cc
View file @
519b3e7a
...
...
@@ -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"
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment