Proto  3.2
Public Member Functions | Private Attributes | List of all members
Proto::MBMapOp< MEM > Class Template Reference

#include <Proto_MBMapOp.H>

Public Member Functions

 MBMapOp ()
 Trivial Constructor. More...
 
 MBMapOp (Array< double, DIM > a_dx, unsigned int a_block, unsigned int a_focalBlock=0)
 Constructor. More...
 
void define (Array< double, DIM > a_dx, unsigned int a_block, unsigned int a_focalBlock=0)
 Lazy Constructor. More...
 
virtual void init ()
 User Defined Initialization. More...
 
virtual void apply (BoxData< double, DIM, MEM > &a_X, BoxData< double, 1, MEM > &a_J)
 Compute Map. More...
 
virtual void apply (BoxData< double, DIM, MEM > &a_X, BoxData< double, 1, MEM > &a_J, FluxBoxData< double, DIM, MEM > &a_NT)
 Compute Map (With Metrics) More...
 
virtual Array< double, DIM > apply (const Array< double, DIM > &a_xi)
 Analytic Map. More...
 
virtual void inverse (BoxData< double, DIM, MEM > &a_XMap, const BoxData< double, DIM, MEM > &a_XCart)
 
virtual Array< double, DIM > inverse (const Array< double, DIM > &a_x)
 Analytic Inverse Map. More...
 
void _apply (BoxData< double, DIM, MEM > &a_X, BoxData< double, 1, MEM > &a_J)
 
void _apply (BoxData< double, DIM, MEM > &a_X, BoxData< double, 1, MEM > &a_J, FluxBoxData< double, DIM, MEM > &a_NT)
 
const Array< double, DIM > & dx () const
 Get Mapped Grid Spacing. More...
 
unsigned int block () const
 Get Block. More...
 
BoxData< double, DIM, MEM > X (const Box &a_box, const Array< double, DIM > &a_dx) const
 Get Mapped Coordinate Values. More...
 
void setFocalBlock (unsigned int a_block)
 
unsigned int focalBlock () const
 

Private Attributes

Array< double, DIM > m_dx
 Grid spacing in mapped space. More...
 
Stencil< double > m_c2c
 Cached corners-to-cells Stencil. More...
 
unsigned int m_block
 Block in which this map is applied. More...
 
unsigned int m_focalBlock
 Block on which this map is focused (often unused) More...
 

Constructor & Destructor Documentation

◆ MBMapOp() [1/2]

template<MemType MEM>
Proto::MBMapOp< MEM >::MBMapOp ( )
inline

Trivial Constructor.

References Proto::MBMapOp< MEM >::define().

◆ MBMapOp() [2/2]

template<MemType MEM>
Proto::MBMapOp< MEM >::MBMapOp ( Array< double, DIM >  a_dx,
unsigned int  a_block,
unsigned int  a_focalBlock = 0 
)
inline

Constructor.

Member Function Documentation

◆ define()

template<MemType MEM>
void Proto::MBMapOp< MEM >::define ( Array< double, DIM >  a_dx,
unsigned int  a_block,
unsigned int  a_focalBlock = 0 
)
inline

Lazy Constructor.

Referenced by Proto::MBMapOp< MEM >::MBMapOp().

◆ init()

template<MemType MEM>
virtual void Proto::MBMapOp< MEM >::init ( )
inlinevirtual

User Defined Initialization.

Users should override this function with any code they would like to run when the map is constructed.

Referenced by Proto::MBMapOp< MEM >::setFocalBlock().

◆ apply() [1/3]

template<MemType MEM>
void Proto::MBMapOp< MEM >::apply ( BoxData< double, DIM, MEM > &  a_X,
BoxData< double, 1, MEM > &  a_J 
)
inlinevirtual

Compute Map.

Users should override this function when defining their map if they do not want to explicitly define the metric tensor (NT). The domains of the coordinate and Jacobian quantities are assumed to be defined before they are input to this function. Note that the ghost values used to define the map during construction have absolutely no bearing on the valid domains for this function, so long as the relevant analytic functions are defined.

Parameters
a_XCoordinates at nodes [input/output]
a_JCell averaged jacobian [input/output]

Referenced by Proto::MBMapOp< MEM >::_apply().

◆ apply() [2/3]

template<MemType MEM>
void Proto::MBMapOp< MEM >::apply ( BoxData< double, DIM, MEM > &  a_X,
BoxData< double, 1, MEM > &  a_J,
FluxBoxData< double, DIM, MEM > &  a_NT 
)
inlinevirtual

Compute Map (With Metrics)

Users should override this function when defining their map if they want to explicitly define the metric tensor (NT). The domains of the coordinate and Jacobian quantities are assumed to be defined before they are input to this function. Note that the ghost values used to define the map during construction have absolutely no bearing on the valid domains for this function, so long as the relevant analytic functions are defined.

Parameters
a_XCoordinates at nodes [input/output]
a_JCell averaged jacobian [input/output]
a_NTFace averaged metric terms in each coordinate direction [output]

◆ apply() [3/3]

template<MemType MEM>
virtual Array<double, DIM> Proto::MBMapOp< MEM >::apply ( const Array< double, DIM > &  a_xi)
inlinevirtual

Analytic Map.

Users should override this function

References PROTO_ASSERT.

◆ inverse() [1/2]

template<MemType MEM>
virtual void Proto::MBMapOp< MEM >::inverse ( BoxData< double, DIM, MEM > &  a_XMap,
const BoxData< double, DIM, MEM > &  a_XCart 
)
inlinevirtual

References PROTO_ASSERT.

◆ inverse() [2/2]

template<MemType MEM>
virtual Array<double, DIM> Proto::MBMapOp< MEM >::inverse ( const Array< double, DIM > &  a_x)
inlinevirtual

Analytic Inverse Map.

Users should override this function if the inverse map is needed

References PROTO_ASSERT.

◆ _apply() [1/2]

template<MemType MEM>
void Proto::MBMapOp< MEM >::_apply ( BoxData< double, DIM, MEM > &  a_X,
BoxData< double, 1, MEM > &  a_J 
)
inline

◆ _apply() [2/2]

template<MemType MEM>
void Proto::MBMapOp< MEM >::_apply ( BoxData< double, DIM, MEM > &  a_X,
BoxData< double, 1, MEM > &  a_J,
FluxBoxData< double, DIM, MEM > &  a_NT 
)
inline

◆ dx()

template<MemType MEM>
const Array< double, DIM > & Proto::MBMapOp< MEM >::dx ( ) const
inline

Get Mapped Grid Spacing.

Referenced by Proto::MBMapOp< MEM >::_apply().

◆ block()

template<MemType MEM>
unsigned int Proto::MBMapOp< MEM >::block ( ) const
inline

Get Block.

Referenced by Proto::MBMapOp< MEM >::_apply().

◆ X()

template<MemType MEM>
BoxData< double, DIM, MEM > Proto::MBMapOp< MEM >::X ( const Box a_box,
const Array< double, DIM > &  a_dx 
) const
inline

Get Mapped Coordinate Values.

Given a node-centered box and grid spacing, generate the node centered mapped coordinates. This assumes that the origin corresponds to the point (0,0,...,0) and that the input box already accounts for node centering (e.g. Box::grow(PR_NODE) is assumed to already have been called.)

/param a_box A box that already accounts for node centering /param a_dx Grid spacing

Referenced by Proto::MBMapOp< MEM >::_apply().

◆ setFocalBlock()

template<MemType MEM>
void Proto::MBMapOp< MEM >::setFocalBlock ( unsigned int  a_block)
inline

◆ focalBlock()

template<MemType MEM>
unsigned int Proto::MBMapOp< MEM >::focalBlock ( ) const
inline

Member Data Documentation

◆ m_dx

template<MemType MEM>
Array<double, DIM> Proto::MBMapOp< MEM >::m_dx
private

Grid spacing in mapped space.

◆ m_c2c

template<MemType MEM>
Stencil<double> Proto::MBMapOp< MEM >::m_c2c
private

Cached corners-to-cells Stencil.

◆ m_block

template<MemType MEM>
unsigned int Proto::MBMapOp< MEM >::m_block
private

Block in which this map is applied.

◆ m_focalBlock

template<MemType MEM>
unsigned int Proto::MBMapOp< MEM >::m_focalBlock
private

Block on which this map is focused (often unused)

Referenced by Proto::MBMapOp< MEM >::focalBlock(), and Proto::MBMapOp< MEM >::setFocalBlock().


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