Interpolator.hpp
1 // Distributed under the MIT License.
2 // See LICENSE.txt for details.
3 
4 #pragma once
5 
7 #include "NumericalAlgorithms/Interpolation/InitializeInterpolator.hpp"
9 #include "Parallel/Invoke.hpp"
10 #include "Utilities/TMPL.hpp"
11 
12 namespace intrp {
13 
14 /// \brief ParallelComponent responsible for collecting data from
15 /// `Element`s and interpolating it onto `InterpolationTarget`s.
16 ///
17 /// For requirements on Metavariables, see InterpolationTarget
18 template <class Metavariables>
19 struct Interpolator {
20  using chare_type = Parallel::Algorithms::Group;
21  using const_global_cache_tag_list = tmpl::list<>;
23  using action_list = tmpl::list<>;
24  using initial_databox =
25  db::compute_databox_type<typename Actions::InitializeInterpolator::
26  template return_tag_list<Metavariables>>;
27  using options = tmpl::list<>;
28  static void initialize(
29  Parallel::CProxy_ConstGlobalCache<Metavariables>& global_cache);
30  static void execute_next_phase(typename Metavariables::Phase /*next_phase*/,
31  const Parallel::CProxy_ConstGlobalCache<
32  Metavariables>& /*global_cache*/){};
33 };
34 
35 template <class Metavariables>
37  Parallel::CProxy_ConstGlobalCache<Metavariables>& global_cache) {
38  auto& my_proxy = Parallel::get_parallel_component<Interpolator>(
39  *(global_cache.ckLocalBranch()));
40  Parallel::simple_action<Actions::InitializeInterpolator>(my_proxy);
41 }
42 
43 } // namespace intrp
Definition: AddTemporalIdsToInterpolationTarget.hpp:17
ParallelComponent responsible for collecting data from Elements and interpolating it onto Interpolati...
Definition: Interpolator.hpp:19
Defines classes and functions used for manipulating DataBox&#39;s.
Wraps the template metaprogramming library used (brigand)
typename DataBox_detail::compute_dbox_type< get_items< TagList >, get_compute_items< TagList > >::type compute_databox_type
Returns the type of the DataBox that would be constructed from the TagList of tags.
Definition: DataBox.hpp:1827
Definition: SolvePoissonProblem.hpp:38
Defines class template ConstGlobalCache.