Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

templates for local polynomial rules #768

Merged
merged 1 commit into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions SparseGrids/tsgDConstructGridGlobal.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,21 @@ std::vector<double> listToNodes(std::forward_list<NodeData> const &node_list, si
ix = MultiIndexManipulations::indexesToNodes(t.point, rule, ix);
return result;
}
/*!
* \internal
* \ingroup TasmanianRefinement
* \brief Using MultiIndexManipulations::indexesToNodes() convert the \b node_list to actual points according to the rule.
*
* \endinternal
*/
template<typename callable_method>
std::vector<double> listToLocalNodes(std::forward_list<NodeData> const &node_list, size_t num_dimensions, callable_method rule){
std::vector<double> result(Utils::size_mult(std::distance(node_list.begin(), node_list.end()), num_dimensions));
auto ix = result.begin();
for(auto const &t : node_list)
ix = std::transform(t.point.begin(), t.point.end(), ix, rule);
return result;
}

/*!
* \internal
Expand Down
Loading
Loading