SpECTRE  v2024.04.12
intrp::protocols::ComputeTargetPoints Struct Reference

A protocol for the type alias compute_target_points found in an InterpolationTargetTag. More...

#include <ComputeTargetPoints.hpp>

Classes

struct  test
 

Detailed Description

A protocol for the type alias compute_target_points found in an InterpolationTargetTag.

Details

A struct conforming to the ComputeTargetPoints protocol must have

  • a type alias is_sequential that is either std::true_type or std::false_type which indicates if interpolations depend on previous interpolations' results
  • a type alias frame that denotes the frame the target points are computed in
  • a function points with signature matching the one in the example that will compute the points in the given frame.

A struct that conforms to this protocol can optionally have any of these members as well:

  • a type alias simple_tags that list simple tags to be added to the DataBox of the InterpolationTarget
  • a type alias compute_tags that list compute tags to be added to the DataBox of the InterpolationTarget
  • a type alias const_global_cache_tags with tags to be put in the GlobalCache
  • a function initialize with signature matching the one in the example that is run during the Initialization phase of the InterpolationTarget and can initialize any of the simple_tags added.

Here is an example of a class that conforms to this protocols:

struct ExampleComputeTargetPoints
: tt::ConformsTo<intrp::protocols::ComputeTargetPoints> {
// This is not required by the protocol, but these tags will also be added to
// the global cache
using const_global_cache_tags = tmpl::list<FakeCacheTag>;
using is_sequential = std::true_type;
using frame = ::Frame::Grid;
// These are not required by the protocol, but these tags will be added to the
// InterpolationTarget DataBox.
using simple_tags = tmpl::list<FakeSimpleTag>;
using compute_tags = tmpl::list<FakeComputeTag>;
// This is not required by the protocol, but this function can be specified
// and will be run during the Initialization phase of the InterpolationTarget
// parallel component
template <typename DbTags, typename Metavariables>
static void initialize(
const gsl::not_null<db::DataBox<DbTags>*> /*box*/,
// Initialize FakeSimpleTag here
}
template <typename Metavariables, typename DbTags, typename TemporalId>
const db::DataBox<DbTags>& /*box*/,
const tmpl::type_<Metavariables>& /*meta*/,
const TemporalId& /*temporal_id*/) {
// This function will compute points on a given surface that we are
// interpolating onto
}
};
A Charm++ chare that caches global data once per Charm++ node.
Definition: GlobalCache.hpp:221
Definition: ContractFirstNIndices.hpp:16
Require a pointer to not be a nullptr
Definition: Gsl.hpp:183
Definition: IndexType.hpp:45
Indicate a class conforms to the Protocol.
Definition: ProtocolHelpers.hpp:22

The documentation for this struct was generated from the following file: