SpECTRE  v2024.04.12
SetNumberOfGridPointsImpls Namespace Reference

Implementations of set_number_of_grid_points. More...

Classes

struct  SetNumberOfGridPointsImpl
 Default implementation is not defined. More...
 
struct  SetNumberOfGridPointsImpl< blaze::DynamicVector< T, TF, Tag > >
 
struct  SetNumberOfGridPointsImpl< blaze::StaticVector< T, N, TF, AF, PF, Tag > >
 
struct  SetNumberOfGridPointsImpl< double >
 
struct  SetNumberOfGridPointsImpl< SpinWeighted< SpinWeightedType, Spin > >
 
struct  SetNumberOfGridPointsImpl< std::array< T, N > >
 
struct  SetNumberOfGridPointsImpl< std::complex< double > >
 
struct  SetNumberOfGridPointsImpl< std::vector< T > >
 
struct  SetNumberOfGridPointsImpl< Tensor< T, Structure... > >
 
struct  SetNumberOfGridPointsImpl< tuples::TaggedTuple< Tags... > >
 
struct  SetNumberOfGridPointsImpl< Variables< TagList > >
 

Detailed Description

Implementations of set_number_of_grid_points.

Specializations may be trivial, meaning the object is similar to a double and doesn't actually represent grid data. The only requirement for trivial specializations is defining is_trivial as true.

Non-trivial specializations must define is_trivial to false, and must define a static apply function with the signature shown in the below example. Non-trivial specializations must also be accompanied by a specialization of the MakeWithValueImpls::NumberOfPoints struct. The apply function will only be called if the current size is incorrect, so implementations should not check the current size.

template <>
TriviallyResizable> {
static constexpr bool is_trivial = true;
};
template <>
static constexpr bool is_trivial = false;
static void apply(const gsl::not_null<Resizable*> result, const size_t size) {
result->size = size;
result->resized = true;
}
};
Require a pointer to not be a nullptr
Definition: Gsl.hpp:183
auto apply(F &&f, const ObservationBox< ComputeTagsList, DataBoxType > &observation_box, Args &&... args)
Apply the function object f using its nested argument_tags list of tags.
Definition: ObservationBox.hpp:238
Default implementation is not defined.
Definition: SetNumberOfGridPoints.hpp:36