Skip to content
Snippets Groups Projects
Commit d2c2da50 authored by jstark's avatar jstark
Browse files

Changed return types to auto to make them generic.

parent 004220bb
No related branches found
No related tags found
No related merge requests found
......@@ -18,7 +18,7 @@
* @return Forward finite difference for the property under index Field on the current node with index key.
*/
template <size_t Field, typename gridtype, typename keytype>
double FD_forward(gridtype & grid, keytype & key, size_t d)
auto FD_forward(gridtype & grid, keytype & key, size_t d)
{
return (grid.template get<Field> (key.move(d, 1)) - grid.template get<Field> (key)) / grid.getSpacing()[d];
}
......@@ -33,7 +33,7 @@ double FD_forward(gridtype & grid, keytype & key, size_t d)
* @return Backward finite difference for the property under index Field on the current node with index key.
*/
template <size_t Field, typename gridtype, typename keytype>
double FD_backward(gridtype & grid, keytype & key, size_t d)
auto FD_backward(gridtype & grid, keytype & key, size_t d)
{
return (grid.template get<Field> (key) - grid.template get<Field> (key.move(d, -1))) / grid.getSpacing()[d];
}
......@@ -50,7 +50,7 @@ double FD_backward(gridtype & grid, keytype & key, size_t d)
* @return Partial central finite difference for dimension d of Field on the current node with index key.
*/
template <size_t Field, typename gridtype, typename keytype>
double FD_central(gridtype & grid, keytype & key, size_t d)
auto FD_central(gridtype & grid, keytype & key, size_t d)
{
return (grid.template get<Field>(key.move(d, 1))
- grid.template get<Field>(key.move(d, -1)))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment