Proto  3.2
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Proto::MBPointInterpOp Class Reference

Mapped Multiblock Block Boundary Interpolation Operator. More...

#include <Proto_MBPointInterpOp.H>

Public Member Functions

template<typename MAP , MemType MEM>
 MBPointInterpOp (MBDataPoint a_dst, Point a_ghost, const MBLevelMap< MAP, MEM > &a_map, const MBInterpLayout &a_interpLayout, unsigned int a_order)
 Constructor. More...
 
 MBPointInterpOp (MBDataPoint a_dst, std::vector< MBDataPoint > a_srcs, std::vector< double > a_coefs)
 
template<typename T , unsigned int C, MemType MEM>
void apply (MBLevelBoxData< T, C, MEM > &a_dst, MBLevelBoxData< T, C, MEM > &a_src)
 Apply. More...
 
unsigned int size () const
 Size. More...
 
const MBDataPointtarget () const
 Coefficients. More...
 
const std::vector< MBDataPoint > & sources () const
 Sources. More...
 
const std::vector< double > & coefs () const
 
Box span () const
 
void print () const
 
template<typename MAP , MemType MEM>
void writeLevelFootprint (const MBLevelMap< MAP, MEM > &map, std::string filename) const
 
void writeFootprint (std::string filename) const
 

Private Member Functions

void computeExponents ()
 
void validateMatrixDimensions () const
 
template<typename MAP , MemType MEM>
double computeSourceDataRadius (const MBLevelMap< MAP, MEM > &map, Array< double, DIM > &xCenter) const
 
template<typename MAP , MemType MEM>
std::unordered_map< BlockIndex, std::vector< BoxData< double > > > computeMoments (const MBLevelMap< MAP, MEM > &map) const
 
void computeCoefficients (std::unordered_map< BlockIndex, std::vector< BoxData< double >>> &momentData)
 

Private Attributes

MBDataPoint m_dst
 
std::vector< MBDataPointm_srcs
 
std::vector< Pointm_exponents
 
std::vector< double > m_coefs
 
int m_order
 

Detailed Description

Mapped Multiblock Block Boundary Interpolation Operator.

MBPointInterpOp interpolates to exactly one point in a MBLevelBoxData. This object is used by MBInterpOp which executes the interpolation across the entire MBLevelBoxData

Constructor & Destructor Documentation

◆ MBPointInterpOp() [1/2]

template<typename MAP , MemType MEM>
Proto::MBPointInterpOp::MBPointInterpOp ( MBDataPoint  a_dst,
Point  a_ghost,
const MBLevelMap< MAP, MEM > &  a_map,
const MBInterpLayout a_interpLayout,
unsigned int  a_order 
)
inline

Constructor.

Creates a PointInterpOp to the destination point dst which Which defines a specific block boundary location in an MBLevelBoxData defined on the specified map with the specified number of ghost cells. The operator itself is generated using a list of relative Points which correspond to a traditional Stencil operation on a Cartesion coordinate system. The order specifies the intended order of accuracy of the interpolation.

TODO: order can probably be inferred from the footprint or vice versa

◆ MBPointInterpOp() [2/2]

Proto::MBPointInterpOp::MBPointInterpOp ( MBDataPoint  a_dst,
std::vector< MBDataPoint a_srcs,
std::vector< double >  a_coefs 
)
inline

Member Function Documentation

◆ apply()

template<typename T , unsigned int C, MemType MEM>
void Proto::MBPointInterpOp::apply ( MBLevelBoxData< T, C, MEM > &  a_dst,
MBLevelBoxData< T, C, MEM > &  a_src 
)
inline

Apply.

computes the interpolation

◆ size()

unsigned int Proto::MBPointInterpOp::size ( ) const
inline

Size.

Returns the number of coeffcients used in the interpolation

◆ target()

const MBDataPoint& Proto::MBPointInterpOp::target ( ) const
inline

Coefficients.

Returns the coefficients of the interpolating polynomial for a specified component in a specified data set.

Mostly used for debugging. Target Returns the MBDataPoint corresponding to the point of interpolation

References m_dst.

◆ sources()

const std::vector<MBDataPoint>& Proto::MBPointInterpOp::sources ( ) const
inline

Sources.

Returns the list of locations used for input data to the interpolation as a list of MBDataPoint objects. The order of the returnd points corresponds to the order of the coefficients in the operator matrix (outpout of SMatrix)

References m_srcs.

◆ coefs()

const std::vector<double>& Proto::MBPointInterpOp::coefs ( ) const
inline

◆ span()

Box Proto::MBPointInterpOp::span ( ) const
inline

Referenced by coefs().

◆ print()

void Proto::MBPointInterpOp::print ( ) const
inline

Referenced by coefs().

◆ writeLevelFootprint()

template<typename MAP , MemType MEM>
void Proto::MBPointInterpOp::writeLevelFootprint ( const MBLevelMap< MAP, MEM > &  map,
std::string  filename 
) const
inline

Referenced by coefs().

◆ writeFootprint()

void Proto::MBPointInterpOp::writeFootprint ( std::string  filename) const
inline

Referenced by coefs().

◆ computeExponents()

void Proto::MBPointInterpOp::computeExponents ( )
inlineprivate

Referenced by coefs().

◆ validateMatrixDimensions()

void Proto::MBPointInterpOp::validateMatrixDimensions ( ) const
inlineprivate

Referenced by coefs().

◆ computeSourceDataRadius()

template<typename MAP , MemType MEM>
double Proto::MBPointInterpOp::computeSourceDataRadius ( const MBLevelMap< MAP, MEM > &  map,
Array< double, DIM > &  xCenter 
) const
private

Referenced by coefs().

◆ computeMoments()

template<typename MAP , MemType MEM>
std::unordered_map< BlockIndex, std::vector< BoxData< double > > > Proto::MBPointInterpOp::computeMoments ( const MBLevelMap< MAP, MEM > &  map) const
private

Referenced by coefs().

◆ computeCoefficients()

void Proto::MBPointInterpOp::computeCoefficients ( std::unordered_map< BlockIndex, std::vector< BoxData< double >>> &  momentData)
private

Referenced by coefs().

Member Data Documentation

◆ m_dst

MBDataPoint Proto::MBPointInterpOp::m_dst
private

Referenced by target().

◆ m_srcs

std::vector<MBDataPoint> Proto::MBPointInterpOp::m_srcs
private

Referenced by sources().

◆ m_exponents

std::vector<Point> Proto::MBPointInterpOp::m_exponents
private

◆ m_coefs

std::vector<double> Proto::MBPointInterpOp::m_coefs
private

Referenced by coefs().

◆ m_order

int Proto::MBPointInterpOp::m_order
private

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