SpECTRE  v2024.03.19
intrp::Irregular< Dim > Class Template Reference

Interpolates a Variables onto an arbitrary set of points. More...

#include <IrregularInterpolant.hpp>

Public Member Functions

 Irregular (const Mesh< Dim > &source_mesh, const tnsr::I< DataVector, Dim, Frame::ElementLogical > &target_points)
 
void pup (PUP::er &p)
 Serialization for Charm++.
 
void interpolate (gsl::not_null< gsl::span< double > * > result, const gsl::span< const double > &input) const
 Interpolate multiple variables on the grid to the target points.
 
template<typename TagsList >
void interpolate (const gsl::not_null< Variables< TagsList > * > result, const Variables< TagsList > &vars) const
 
template<typename TagsList >
void interpolate (gsl::not_null< Variables< TagsList > * > result, const Variables< TagsList > &vars) const
 Performs the interpolation on a Variables with grid points corresponding to the Mesh<Dim> specified in the constructor. The result is a Variables whose internal DataVector goes over the list of target_points that were specified in the constructor. More...
 
template<typename TagsList >
Variables< TagsList > interpolate (const Variables< TagsList > &vars) const
 Performs the interpolation on a Variables with grid points corresponding to the Mesh<Dim> specified in the constructor. The result is a Variables whose internal DataVector goes over the list of target_points that were specified in the constructor. More...
 
void interpolate (gsl::not_null< DataVector * > result, const DataVector &input) const
 Interpolate a DataVector onto the target points. More...
 
DataVector interpolate (const DataVector &input) const
 Interpolate a DataVector onto the target points. More...
 

Friends

bool operator== (const Irregular &lhs, const Irregular &rhs)
 

Detailed Description

template<size_t Dim>
class intrp::Irregular< Dim >

Interpolates a Variables onto an arbitrary set of points.

Details

If the source_mesh uses Spectral::Basis::FiniteDifference, linear interpolation is done in each dimension; otherwise it uses the barycentric interpolation provided by Spectral::interpolation_matrix in each dimension.

Member Function Documentation

◆ interpolate() [1/4]

template<size_t Dim>
DataVector intrp::Irregular< Dim >::interpolate ( const DataVector input) const

Interpolate a DataVector onto the target points.

Note
When interpolating multiple tensors, the Variables interface is more efficient. However, this DataVector interface is useful for applications where only some components of a Tensor or Variables need to be interpolated.

◆ interpolate() [2/4]

template<size_t Dim>
template<typename TagsList >
Variables< TagsList > intrp::Irregular< Dim >::interpolate ( const Variables< TagsList > &  vars) const

Performs the interpolation on a Variables with grid points corresponding to the Mesh<Dim> specified in the constructor. The result is a Variables whose internal DataVector goes over the list of target_points that were specified in the constructor.

Note
for the void function, result will be resized to the proper size.

◆ interpolate() [3/4]

template<size_t Dim>
void intrp::Irregular< Dim >::interpolate ( gsl::not_null< DataVector * >  result,
const DataVector input 
) const

Interpolate a DataVector onto the target points.

Note
When interpolating multiple tensors, the Variables interface is more efficient. However, this DataVector interface is useful for applications where only some components of a Tensor or Variables need to be interpolated.

◆ interpolate() [4/4]

template<size_t Dim>
template<typename TagsList >
void intrp::Irregular< Dim >::interpolate ( gsl::not_null< Variables< TagsList > * >  result,
const Variables< TagsList > &  vars 
) const

Performs the interpolation on a Variables with grid points corresponding to the Mesh<Dim> specified in the constructor. The result is a Variables whose internal DataVector goes over the list of target_points that were specified in the constructor.

Note
for the void function, result will be resized to the proper size.

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