Proto  3.2
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
Proto::AMROp< OPType, T, MEM > Class Template Reference

AMR-Scope Operator. More...

#include <Proto_AMROp.H>

Public Types

typedef OPType< T, MEM > BOP
 
typedef LevelOp< OPType, T, PeriodicBC, MEM > LOP
 
typedef AMRData< T, BOP::numState(), MEM, PR_CELLAMRStateData
 
typedef AMRData< T, BOP::numAux(), MEM, PR_CELLAMRAuxData
 
typedef LevelBoxData< T, BOP::numState(), MEM, PR_CELLLevelStateData
 
typedef LevelBoxData< T, BOP::numAux(), MEM, PR_CELLLevelAuxData
 
typedef BoxData< T, BOP::numState(), MEM > StateData
 
typedef BoxData< T, BOP::numAux(), MEM > AuxData
 

Public Member Functions

 AMROp ()
 Default Constructor. More...
 
 AMROp (AMRGrid &a_grid, T a_cdx)
 Non-Trivial Constructor. More...
 
 AMROp (AMRGrid &a_grid, Array< T, DIM > &a_cdx)
 
void define (AMRGrid &a_grid, T a_cdx)
 Lazy Constructor. More...
 
void define (AMRGrid &a_grid, Array< T, DIM > &a_cdx)
 
void operator() (AMRStateData &a_output, const AMRStateData &a_state, const AMRAuxData &a_aux, T a_scale=1.0)
 Apply. More...
 
void operator() (AMRStateData &a_output, AMRStateData &a_state, T a_scale=1.0)
 Apply. More...
 
void levelApply (LevelStateData &a_output, AMRStateData &a_state, AMRAuxData &a_aux, int a_level, T a_scale=1.0)
 Level Apply. More...
 
void levelApply (LevelStateData &a_output, AMRStateData &a_state, int a_level, T a_scale=1.0)
 Level Apply. More...
 
void reflux (LevelStateData &a_crseOut, LevelStateData &a_crseState, LevelStateData &a_fineState, int a_crseLevel, T a_scale) const
 Reflux. More...
 
InterpStencil< T > & interpStencil (int a_level)
 
void setDiagScale (T a_value, int a_gridFactor=0)
 
void setFluxScale (T a_value, int a_gridFactor=0)
 
Array< T, DIM > dx (int a_level) const
 
const LOPlevelOp (int a_level) const
 
const BOPboxOp (int a_level, const LevelIndex &a_index) const
 

Static Public Member Functions

static constexpr unsigned int numState ()
 
static constexpr unsigned int numAux ()
 
static Point ghost ()
 Ghost Region Size (State) More...
 
static Point auxGhost ()
 Ghost Region Size (Auxiliary) More...
 
static int order ()
 

Private Attributes

bool m_defined
 
AMRGrid m_grid
 
std::vector< Array< T, DIM > > m_dx
 
std::vector< std::shared_ptr< LOP > > m_levelOps
 
std::vector< std::shared_ptr< LevelFluxRegister< T, BOP::numState(), MEM > > > m_fluxRegisters
 
std::vector< InterpStencil< T > > m_interp
 

Detailed Description

template<template< typename, MemType > class OPType, typename T, MemType MEM>
class Proto::AMROp< OPType, T, MEM >

AMR-Scope Operator.

AMROp contains the necessary tools to apply a user-defined descendent of BoxOp on an AMR hierarchy.

Template Parameters
OpTypeA BoxOp class
TDatatype of the data holder (e.g. int, double, etc.)
MEMProto::MemType of the data holder

Member Typedef Documentation

◆ BOP

template<template< typename, MemType > class OPType, typename T , MemType MEM>
typedef OPType<T, MEM> Proto::AMROp< OPType, T, MEM >::BOP

◆ LOP

template<template< typename, MemType > class OPType, typename T , MemType MEM>
typedef LevelOp<OPType, T, PeriodicBC, MEM> Proto::AMROp< OPType, T, MEM >::LOP

◆ AMRStateData

template<template< typename, MemType > class OPType, typename T , MemType MEM>
typedef AMRData<T, BOP::numState(), MEM, PR_CELL> Proto::AMROp< OPType, T, MEM >::AMRStateData

◆ AMRAuxData

template<template< typename, MemType > class OPType, typename T , MemType MEM>
typedef AMRData<T, BOP::numAux(), MEM, PR_CELL> Proto::AMROp< OPType, T, MEM >::AMRAuxData

◆ LevelStateData

template<template< typename, MemType > class OPType, typename T , MemType MEM>
typedef LevelBoxData<T, BOP::numState(), MEM, PR_CELL> Proto::AMROp< OPType, T, MEM >::LevelStateData

◆ LevelAuxData

template<template< typename, MemType > class OPType, typename T , MemType MEM>
typedef LevelBoxData<T, BOP::numAux(), MEM, PR_CELL> Proto::AMROp< OPType, T, MEM >::LevelAuxData

◆ StateData

template<template< typename, MemType > class OPType, typename T , MemType MEM>
typedef BoxData<T, BOP::numState(), MEM> Proto::AMROp< OPType, T, MEM >::StateData

◆ AuxData

template<template< typename, MemType > class OPType, typename T , MemType MEM>
typedef BoxData<T, BOP::numAux(), MEM> Proto::AMROp< OPType, T, MEM >::AuxData

Constructor & Destructor Documentation

◆ AMROp() [1/3]

template<template< typename, MemType > class OPType, typename T , MemType MEM>
Proto::AMROp< OPType, T, MEM >::AMROp ( )
inline

Default Constructor.

Referenced by Proto::AMROp< OPType, T, MEM >::order().

◆ AMROp() [2/3]

template<template< typename, MemType > class OPType, typename T , MemType MEM>
Proto::AMROp< OPType, T, MEM >::AMROp ( AMRGrid a_grid,
a_cdx 
)
inline

Non-Trivial Constructor.

Parameters
gridAMR Grid
cdxCoarsest level grid spacing

◆ AMROp() [3/3]

template<template< typename, MemType > class OPType, typename T , MemType MEM>
Proto::AMROp< OPType, T, MEM >::AMROp ( AMRGrid a_grid,
Array< T, DIM > &  a_cdx 
)
inline

Member Function Documentation

◆ numState()

template<template< typename, MemType > class OPType, typename T , MemType MEM>
static constexpr unsigned int Proto::AMROp< OPType, T, MEM >::numState ( )
inlinestatic

◆ numAux()

template<template< typename, MemType > class OPType, typename T , MemType MEM>
static constexpr unsigned int Proto::AMROp< OPType, T, MEM >::numAux ( )
inlinestatic

◆ ghost()

template<template< typename, MemType > class OPType, typename T , MemType MEM>
static Point Proto::AMROp< OPType, T, MEM >::ghost ( )
inlinestatic

Ghost Region Size (State)

Amount of data needed in ghost regions of state variables to apply the operator

◆ auxGhost()

template<template< typename, MemType > class OPType, typename T , MemType MEM>
static Point Proto::AMROp< OPType, T, MEM >::auxGhost ( )
inlinestatic

Ghost Region Size (Auxiliary)

Amount of data needed in ghost regions of auxiliary variables to apply the operator

References Proto::AMROp< OPType, T, MEM >::numAux(), and Proto::Point::Zeros().

◆ order()

template<template< typename, MemType > class OPType, typename T , MemType MEM>
static int Proto::AMROp< OPType, T, MEM >::order ( )
inlinestatic

◆ define() [1/2]

template<template< typename, MemType > class OPType, typename T , MemType MEM>
void Proto::AMROp< OPType, T, MEM >::define ( AMRGrid a_grid,
a_cdx 
)
inline

Lazy Constructor.

Parameters
gridAMR Grid
cdxCoarsest level grid spacing

◆ define() [2/2]

template<template< typename, MemType > class OPType, typename T , MemType MEM>
void Proto::AMROp< OPType, T, MEM >::define ( AMRGrid a_grid,
Array< T, DIM > &  a_cdx 
)
inline

◆ operator()() [1/2]

template<template< typename, MemType > class OPType, typename T , MemType MEM>
void Proto::AMROp< OPType, T, MEM >::operator() ( AMRStateData a_output,
const AMRStateData a_state,
const AMRAuxData a_aux,
a_scale = 1.0 
)
inline

Apply.

Compute L(phi, rho) on all levels of the hierarchy including reflux corrections and boundary condition interpolation where necessary

Parameters
outputEvaluated operator (output)
stateState variables
auxAuxiliary variables

◆ operator()() [2/2]

template<template< typename, MemType > class OPType, typename T , MemType MEM>
void Proto::AMROp< OPType, T, MEM >::operator() ( AMRStateData a_output,
AMRStateData a_state,
a_scale = 1.0 
)
inline

Apply.

Compute L(phi) on all levels of the hierarchy including reflux corrections and boundary condition interpolation where necessary

Parameters
outputEvaluated operator (output)
stateState variables

◆ levelApply() [1/2]

template<template< typename, MemType > class OPType, typename T , MemType MEM>
void Proto::AMROp< OPType, T, MEM >::levelApply ( LevelStateData a_output,
AMRStateData a_state,
AMRAuxData a_aux,
int  a_level,
a_scale = 1.0 
)
inline

Level Apply.

Compute L(phi, rho) on a specified level of the hierarchy including reflux corrections and boundary condition interpolation.

Parameters
outputEvaluated operator (output)
stateState variables
auxAuxiliary variables
levelSpecified level of application

◆ levelApply() [2/2]

template<template< typename, MemType > class OPType, typename T , MemType MEM>
void Proto::AMROp< OPType, T, MEM >::levelApply ( LevelStateData a_output,
AMRStateData a_state,
int  a_level,
a_scale = 1.0 
)
inline

Level Apply.

Compute L(phi) on a specified level of the hierarchy including reflux corrections and boundary condition interpolation.

Parameters
outputEvaluated operator (output)
stateState variables
levelSpecified level of application

◆ reflux()

template<template< typename, MemType > class OPType, typename T , MemType MEM>
void Proto::AMROp< OPType, T, MEM >::reflux ( LevelStateData a_crseOut,
LevelStateData a_crseState,
LevelStateData a_fineState,
int  a_crseLevel,
a_scale 
) const
inline

Reflux.

Given state variable information on two levels l and l+1, compute and apply the appropriate reflux correction to a dataset on level l.

Parameters
crseOutThe coarse level dataset to which refluxing will be applied
crseStatecoarse level state data (level l)
fineStatefine level state data (level l+1)
crseLevelThe level on which refluxing is computed (level l)
scaleAn optional value which will scale the reflux correction

◆ interpStencil()

template<template< typename, MemType > class OPType, typename T , MemType MEM>
InterpStencil< T > & Proto::AMROp< OPType, T, MEM >::interpStencil ( int  a_level)
inline

◆ setDiagScale()

template<template< typename, MemType > class OPType, typename T , MemType MEM>
void Proto::AMROp< OPType, T, MEM >::setDiagScale ( a_value,
int  a_gridFactor = 0 
)
inline

◆ setFluxScale()

template<template< typename, MemType > class OPType, typename T , MemType MEM>
void Proto::AMROp< OPType, T, MEM >::setFluxScale ( a_value,
int  a_gridFactor = 0 
)
inline

◆ dx()

template<template< typename, MemType > class OPType, typename T , MemType MEM>
Array<T, DIM> Proto::AMROp< OPType, T, MEM >::dx ( int  a_level) const
inline

◆ levelOp()

template<template< typename, MemType > class OPType, typename T , MemType MEM>
const LOP& Proto::AMROp< OPType, T, MEM >::levelOp ( int  a_level) const
inline

◆ boxOp()

template<template< typename, MemType > class OPType, typename T , MemType MEM>
const BOP& Proto::AMROp< OPType, T, MEM >::boxOp ( int  a_level,
const LevelIndex a_index 
) const
inline

Member Data Documentation

◆ m_defined

template<template< typename, MemType > class OPType, typename T , MemType MEM>
bool Proto::AMROp< OPType, T, MEM >::m_defined
private

◆ m_grid

template<template< typename, MemType > class OPType, typename T , MemType MEM>
AMRGrid Proto::AMROp< OPType, T, MEM >::m_grid
private

◆ m_dx

template<template< typename, MemType > class OPType, typename T , MemType MEM>
std::vector<Array<T, DIM> > Proto::AMROp< OPType, T, MEM >::m_dx
private

◆ m_levelOps

template<template< typename, MemType > class OPType, typename T , MemType MEM>
std::vector<std::shared_ptr<LOP> > Proto::AMROp< OPType, T, MEM >::m_levelOps
private

◆ m_fluxRegisters

template<template< typename, MemType > class OPType, typename T , MemType MEM>
std::vector<std::shared_ptr<LevelFluxRegister<T, BOP::numState(), MEM> > > Proto::AMROp< OPType, T, MEM >::m_fluxRegisters
private

◆ m_interp

template<template< typename, MemType > class OPType, typename T , MemType MEM>
std::vector<InterpStencil<T> > Proto::AMROp< OPType, T, MEM >::m_interp
private

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