OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
Public Types | Public Member Functions | Protected Attributes | List of all members
AmrInterpolater< Level > Class Template Referenceabstract

< Abstract base class for all coarse to fine cell interpolaters More...

#include <AmrInterpolater.h>

Inheritance diagram for AmrInterpolater< Level >:
Inheritance graph
[legend]

Public Types

typedef Level::go_t go_t
 
typedef Level::lo_t lo_t
 
typedef Level::scalar_t scalar_t
 
typedef Level::umap_t umap_t
 
typedef Level::basefab_t basefab_t
 
typedef amr::AmrIntVect_t AmrIntVect_t
 

Public Member Functions

 AmrInterpolater (lo_t nPoints)
 
const lo_tgetNumberOfPoints () const
 
virtual void stencil (const AmrIntVect_t &iv, const basefab_t &fab, umap_t &map, const scalar_t &scale, Level *mglevel)=0
 
virtual void coarse (const AmrIntVect_t &iv, umap_t &map, const scalar_t &scale, lo_t dir, lo_t shift, const basefab_t &rfab, const AmrIntVect_t &riv, Level *mglevel)=0
 
virtual void fine (const AmrIntVect_t &iv, umap_t &map, const scalar_t &scale, lo_t dir, lo_t shift, const basefab_t &fab, Level *mglevel)
 
virtual void fine (const AmrIntVect_t &iv, umap_t &map, const scalar_t &scale, lo_t dir, lo_t shift, Level *mglevel)
 

Protected Attributes

const lo_t nPoints_m
 Number of points used for interpolation. More...
 

Detailed Description

template<class Level>
class AmrInterpolater< Level >

< Abstract base class for all coarse to fine cell interpolaters

Definition at line 8 of file AmrInterpolater.h.

Member Typedef Documentation

template<class Level>
typedef amr::AmrIntVect_t AmrInterpolater< Level >::AmrIntVect_t

Definition at line 16 of file AmrInterpolater.h.

template<class Level>
typedef Level::basefab_t AmrInterpolater< Level >::basefab_t

Definition at line 15 of file AmrInterpolater.h.

template<class Level>
typedef Level::go_t AmrInterpolater< Level >::go_t

Definition at line 11 of file AmrInterpolater.h.

template<class Level>
typedef Level::lo_t AmrInterpolater< Level >::lo_t

Definition at line 12 of file AmrInterpolater.h.

template<class Level>
typedef Level::scalar_t AmrInterpolater< Level >::scalar_t

Definition at line 13 of file AmrInterpolater.h.

template<class Level>
typedef Level::umap_t AmrInterpolater< Level >::umap_t

Definition at line 14 of file AmrInterpolater.h.

Constructor & Destructor Documentation

template<class Level>
AmrInterpolater< Level >::AmrInterpolater ( lo_t  nPoints)
inline
Parameters
nPointsis the number of interpolation points used

Definition at line 23 of file AmrInterpolater.h.

Member Function Documentation

template<class Level>
virtual void AmrInterpolater< Level >::coarse ( const AmrIntVect_t iv,
umap_t map,
const scalar_t scale,
lo_t  dir,
lo_t  shift,
const basefab_t rfab,
const AmrIntVect_t riv,
Level *  mglevel 
)
pure virtual

Coarse-Fine-Interface Get stencil of coarse side

Parameters
ivis the coarse cell at the interface (center cell of Laplacian)
mapwith global matrix indices of coarse level cells and matrix entries of coarse level cells (coefficients)
scaleof matrix values
dirdirection of interface (0 "horizontal", 1 "vertical", 2 "longitudinal")
shiftis either -1 or 1. If the refined coarse cell is on the left / lower / front side, shift is equal to -1, otherwise the interface is on the right / upper / back side and the value is 1.
bacontains all coarse cells that got refined
rivis the fine cell at the interface
mglevelused to get the global indices and refinement ratio among levels, and boundary values at physical domain, e.g. Dirichlet, open BC

Implemented in AmrLagrangeInterpolater< Level >, AmrTrilinearInterpolater< Level >, and AmrPCInterpolater< Level >.

template<class Level>
virtual void AmrInterpolater< Level >::fine ( const AmrIntVect_t iv,
umap_t map,
const scalar_t scale,
lo_t  dir,
lo_t  shift,
const basefab_t fab,
Level *  mglevel 
)
inlinevirtual

Coarse-Fine-Interface Get stencil of fine side

Parameters
ivis the fine ghost cell at the interface (on coarse cell that is not refined)
mapwith global matrix indices of fine level cells and matrix entries of fine level cells (coefficients)
scaleof matrix values
dirdirection of interface (0 "horizontal", 1 "vertical", 2 "longitudinal")
shiftis either -1 or 1. If the refined coarse cell is on the left / lower / front side, shift is equal to -1, otherwise the interface is on the right / upper / back side and the value is 1.
bacontains all coarse cells that got refined
mglevelused to get the global indices and refinement ratio among levels, and boundary avlues at physical domain, e.g. Dirichlet, open BC

Reimplemented in AmrTrilinearInterpolater< Level >, and AmrPCInterpolater< Level >.

Definition at line 86 of file AmrInterpolater.h.

template<class Level>
virtual void AmrInterpolater< Level >::fine ( const AmrIntVect_t iv,
umap_t map,
const scalar_t scale,
lo_t  dir,
lo_t  shift,
Level *  mglevel 
)
inlinevirtual

Coarse-Fine-Interface Get stencil of fine side

Parameters
ivis the fine ghost cell at the interface (on coarse cell that is not refined)
mapwith global matrix indices of fine level cells and matrix entries of fine level cells (coefficients)
scaleof matrix values
dirdirection of interface (0 "horizontal", 1 "vertical", 2 "longitudinal")
shiftis either -1 or 1. If the refined coarse cell is on the left / lower / front side, shift is equal to -1, otherwise the interface is on the right / upper / back side and the value is 1.
mglevelused to get the global indices and refinement ratio among levels, and boundary avlues at physical domain, e.g. Dirichlet, open BC

Reimplemented in AmrLagrangeInterpolater< Level >.

Definition at line 108 of file AmrInterpolater.h.

template<class Level>
const lo_t& AmrInterpolater< Level >::getNumberOfPoints ( ) const
inline

Number of cell points used for interpolation.

Definition at line 28 of file AmrInterpolater.h.

References AmrInterpolater< Level >::nPoints_m.

template<class Level>
virtual void AmrInterpolater< Level >::stencil ( const AmrIntVect_t iv,
const basefab_t fab,
umap_t map,
const scalar_t scale,
Level *  mglevel 
)
pure virtual

Get the stencil to interpolate a value from coarse to fine level

Parameters
ivis the fine cell where we want to have the interpolated value
mapwith global matrix indices of coarse level cells and matrix entries of coarse level cells (coefficients)
scaleto apply to matrix values
mglevelused to get the global indices and refinement ratio among levels, and boundary values at physical domain, e.g. Dirichlet, open BC

Implemented in AmrLagrangeInterpolater< Level >, AmrTrilinearInterpolater< Level >, and AmrPCInterpolater< Level >.

Member Data Documentation

template<class Level>
const lo_t AmrInterpolater< Level >::nPoints_m
protected

Number of points used for interpolation.

Definition at line 113 of file AmrInterpolater.h.

Referenced by AmrInterpolater< Level >::getNumberOfPoints().


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