SpECTRE  v2024.05.11
Spectral::Swsh::CollocationMetadata< Representation > Class Template Reference

A wrapper class for the spherical harmonic library collocation data. More...

#include <SwshCollocation.hpp>

Classes

class  CollocationConstIterator
 

Public Member Functions

 CollocationMetadata (size_t l_max)
 Generates the libsharp collocation information and stores it in geom_info_. More...
 
 ~CollocationMetadata ()=default
 default constructor required for iterator use
 
 CollocationMetadata (const CollocationMetadata &)=default
 
 CollocationMetadata (CollocationMetadata &&)=default
 
CollocationMetadataoperator= (CollocationMetadata &)=default
 
CollocationMetadataoperator= (CollocationMetadata &&)=default
 
sharp_geom_info * get_sharp_geom_info () const
 retrieve the sharp_geom_info* stored. This should largely be used only for passing to other libsharp functions. Otherwise, access elements through iterator or access functions.
 
double theta (size_t offset) const
 Retrieve the \(\theta\) value for a given index in a libsharp-compatible array.
 
double phi (size_t offset) const
 Retrieve the \(\phi\) value for a given index in a libsharp-compatible array.
 
constexpr size_t l_max () const
 
constexpr size_t size () const
 Compute the number of entries the libsharp-compatible data structure should have.
 
CollocationMetadata< Representation >::CollocationConstIterator begin () const
 Get a bidirectional iterator to the start of the grid. operator* for that iterator gives a LibsharpCollocationPoint with members offset, theta, and phi
 
CollocationMetadata< Representation >::CollocationConstIterator cbegin () const
 Get a bidirectional iterator to the start of the grid. operator* for that iterator gives a LibsharpCollocationPoint with members offset, theta, and phi
 
CollocationMetadata< Representation >::CollocationConstIterator end () const
 Get a bidirectional iterator to the end of the grid. operator* for that iterator gives a LibsharpCollocationPoint with members offset, theta, and phi
 
CollocationMetadata< Representation >::CollocationConstIterator cend () const
 Get a bidirectional iterator to the end of the grid. operator* for that iterator gives a LibsharpCollocationPoint with members offset, theta, and phi
 

Static Public Attributes

static constexpr ComplexRepresentation complex_representation
 The representation of the block of complex values, which sets the stride inside the libsharp type. More...
 

Detailed Description

template<ComplexRepresentation Representation>
class Spectral::Swsh::CollocationMetadata< Representation >

A wrapper class for the spherical harmonic library collocation data.

Details

The currently chosen library for spin-weighted spherical harmonic transforms is libsharp. The CollocationMetadata class stores the libsharp sharp_geom_info object, which contains data about

  1. The angular collocation points used in spin-weighted spherical harmonic transforms
  2. The memory representation of double-type values at those collocation points
Template Parameters
Representationthe ComplexRepresentation, either ComplexRepresentation::Interleaved or ComplexRepresentation::RealsThenImags compatible with the generated CollocationMetadata - this is necessary because the stored libsharp type contains memory stride information.

Constructor & Destructor Documentation

◆ CollocationMetadata()

template<ComplexRepresentation Representation>
Spectral::Swsh::CollocationMetadata< Representation >::CollocationMetadata ( size_t  l_max)
explicit

Generates the libsharp collocation information and stores it in geom_info_.

Note
If you will potentially use the same l_max collocation set more than once, it is probably better to use the precomputed_spherical_harmonic_collocation function

Member Data Documentation

◆ complex_representation

template<ComplexRepresentation Representation>
constexpr ComplexRepresentation Spectral::Swsh::CollocationMetadata< Representation >::complex_representation
staticconstexpr
Initial value:
=
Representation

The representation of the block of complex values, which sets the stride inside the libsharp type.


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