OPAL (Object Oriented Parallel Accelerator Library)  2021.1.99
OPAL
Public Types | Public Member Functions | Private Member Functions | Static Private Attributes | List of all members
AmrLagrangeInterpolater< Level > Class Template Reference

#include <AmrLagrangeInterpolater.h>

Inheritance diagram for AmrLagrangeInterpolater< Level >:
Inheritance graph
[legend]
Collaboration diagram for AmrLagrangeInterpolater< Level >:
Collaboration graph
[legend]

Public Types

enum  Order { LINEAR = 1 , QUADRATIC }
 
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 Types inherited from AmrInterpolater< Level >
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

 AmrLagrangeInterpolater (Order order)
 
void stencil (const AmrIntVect_t &iv, const basefab_t &fab, umap_t &map, const scalar_t &scale, Level *mglevel)
 
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)
 
void fine (const AmrIntVect_t &iv, umap_t &map, const scalar_t &scale, lo_t dir, lo_t shift, Level *mglevel)
 
- Public Member Functions inherited from AmrInterpolater< Level >
 AmrInterpolater (lo_t nPoints)
 
const lo_tgetNumberOfPoints () const
 
virtual void fine (const AmrIntVect_t &, umap_t &, const scalar_t &, lo_t, lo_t, const basefab_t &, Level *)
 

Private Member Functions

void fineLinear_m (const AmrIntVect_t &iv, umap_t &map, const scalar_t &scale, lo_t dir, lo_t shift, Level *mglevel)
 
void fineQuadratic_m (const AmrIntVect_t &iv, umap_t &map, const scalar_t &scale, lo_t dir, lo_t shift, Level *mglevel)
 
void crseLinear_m (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)
 
void crseQuadratic_m (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)
 

Static Private Attributes

static const scalar_t lookup1a_ms [2] = {0.25, -0.25}
 
static const scalar_t lookup2a_ms [2] = {0.75, 1.25}
 
static const scalar_t lookup1b_ms [2] = {-0.25, 0.25}
 
static const scalar_t lookup2b_ms [2] = {1.25, 0.75}
 

Additional Inherited Members

- Protected Attributes inherited from AmrInterpolater< Level >
const lo_t nPoints_m
 Number of points used for interpolation. More...
 

Detailed Description

template<class Level>
class AmrLagrangeInterpolater< Level >

Definition at line 35 of file AmrLagrangeInterpolater.h.

Member Typedef Documentation

◆ AmrIntVect_t

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

Definition at line 44 of file AmrLagrangeInterpolater.h.

◆ basefab_t

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

Definition at line 43 of file AmrLagrangeInterpolater.h.

◆ go_t

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

Definition at line 39 of file AmrLagrangeInterpolater.h.

◆ lo_t

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

Definition at line 40 of file AmrLagrangeInterpolater.h.

◆ scalar_t

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

Definition at line 41 of file AmrLagrangeInterpolater.h.

◆ umap_t

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

Definition at line 42 of file AmrLagrangeInterpolater.h.

Member Enumeration Documentation

◆ Order

template<class Level >
enum AmrLagrangeInterpolater::Order
Enumerator
LINEAR 
QUADRATIC 

Definition at line 46 of file AmrLagrangeInterpolater.h.

Constructor & Destructor Documentation

◆ AmrLagrangeInterpolater()

template<class Level >
AmrLagrangeInterpolater< Level >::AmrLagrangeInterpolater ( Order  order)

Definition at line 89 of file AmrLagrangeInterpolater.hpp.

Member Function Documentation

◆ coarse()

template<class Level >
void AmrLagrangeInterpolater< 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 
)
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.
rfabcontains 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

Implements AmrInterpolater< Level >.

Definition at line 107 of file AmrLagrangeInterpolater.hpp.

References LINEAR, and QUADRATIC.

◆ crseLinear_m()

template<class Level >
void AmrLagrangeInterpolater< Level >::crseLinear_m ( 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 
)
private

First oder interpolation on coarse cell interface side

Parameters
ivis the coarse cell at the interface (center cell of Laplacian)
mapwith global matrix indices of coarse level cells and values 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

Definition at line 197 of file AmrLagrangeInterpolater.hpp.

References begin(), and end().

Here is the call graph for this function:

◆ crseQuadratic_m()

template<class Level >
void AmrLagrangeInterpolater< Level >::crseQuadratic_m ( 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 
)
private

Second order interpolation on coarse cell interface side

Parameters
ivis the coarse cell at the interface (center cell of Laplacian)
mapwith global matrix indices of coarse level cells and values 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

Definition at line 387 of file AmrLagrangeInterpolater.hpp.

References begin(), and end().

Here is the call graph for this function:

◆ fine()

template<class Level >
void AmrLagrangeInterpolater< Level >::fine ( const AmrIntVect_t ,
umap_t ,
const scalar_t ,
lo_t  ,
lo_t  ,
Level *   
)
virtual

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 from AmrInterpolater< Level >.

Definition at line 132 of file AmrLagrangeInterpolater.hpp.

References LINEAR, and QUADRATIC.

◆ fineLinear_m()

template<class Level >
void AmrLagrangeInterpolater< Level >::fineLinear_m ( const AmrIntVect_t iv,
umap_t map,
const scalar_t scale,
lo_t  dir,
lo_t  shift,
Level *  mglevel 
)
private

First order interpolation on fine cell interface 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

Definition at line 156 of file AmrLagrangeInterpolater.hpp.

◆ fineQuadratic_m()

template<class Level >
void AmrLagrangeInterpolater< Level >::fineQuadratic_m ( const AmrIntVect_t iv,
umap_t map,
const scalar_t scale,
lo_t  dir,
lo_t  shift,
Level *  mglevel 
)
private

Second order interpolation on fine cell interface 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 values 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

Definition at line 178 of file AmrLagrangeInterpolater.hpp.

◆ stencil()

template<class Level >
void AmrLagrangeInterpolater< Level >::stencil ( const AmrIntVect_t iv,
const basefab_t fab,
umap_t map,
const scalar_t scale,
Level *  mglevel 
)
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
fabcells
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

Implements AmrInterpolater< Level >.

Definition at line 95 of file AmrLagrangeInterpolater.hpp.

Member Data Documentation

◆ lookup1a_ms

template<class Level >
const AmrLagrangeInterpolater< Level >::scalar_t AmrLagrangeInterpolater< Level >::lookup1a_ms = {0.25, -0.25}
staticprivate

Definition at line 193 of file AmrLagrangeInterpolater.h.

◆ lookup1b_ms

template<class Level >
const AmrLagrangeInterpolater< Level >::scalar_t AmrLagrangeInterpolater< Level >::lookup1b_ms = {-0.25, 0.25}
staticprivate

Definition at line 195 of file AmrLagrangeInterpolater.h.

◆ lookup2a_ms

template<class Level >
const AmrLagrangeInterpolater< Level >::scalar_t AmrLagrangeInterpolater< Level >::lookup2a_ms = {0.75, 1.25}
staticprivate

Definition at line 194 of file AmrLagrangeInterpolater.h.

◆ lookup2b_ms

template<class Level >
const AmrLagrangeInterpolater< Level >::scalar_t AmrLagrangeInterpolater< Level >::lookup2b_ms = {1.25, 0.75}
staticprivate

Definition at line 196 of file AmrLagrangeInterpolater.h.


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