METHOD
WenoBase Class Referenceabstract

#include <weno.h>

Inheritance diagram for WenoBase:
Collaboration diagram for WenoBase:

Public Member Functions

 WenoBase (Data *data, int order)
 
virtual ~WenoBase ()
 
virtual double upwindX (double *arr, int var, int i, int j, int k)=0
 
virtual double upwindY (double *arr, int var, int i, int j, int k)=0
 
virtual double upwindZ (double *arr, int var, int i, int j, int k)=0
 
virtual double downwindX (double *arr, int var, int i, int j, int k)=0
 
virtual double downwindY (double *arr, int var, int i, int j, int k)=0
 
virtual double downwindZ (double *arr, int var, int i, int j, int k)=0
 
virtual void reconstructUpwind (double *arr, double *recon, int nvars, int dir)
 
virtual void reconstructDownwind (double *arr, double *recon, int nvars, int dir)
 
virtual void checkSufficientGhostZones ()
 

Public Attributes

Datadata
 
int order
 
int shift
 

Detailed Description

< Base class for Weno reconstructions

Provides the API for the all Weno routines. Users should only call reconstructUpwind() and reconstructDownwind().

Definition at line 20 of file weno.h.

Constructor & Destructor Documentation

◆ WenoBase()

WenoBase::WenoBase ( Data data,
int  order 
)
Parameters
[in]*dataPointer to Data class containing global simulation data
orderint specifying the order of the reconstruction

◆ ~WenoBase()

virtual WenoBase::~WenoBase ( )
inlinevirtual

Destructor.

Upwind reconstruction in x-dir

Definition at line 38 of file weno.h.

Member Function Documentation

◆ checkSufficientGhostZones()

virtual void WenoBase::checkSufficientGhostZones ( )
virtual
Weno reconstructions of higher order require a larger number of ghost cells, this method checks that there are a sufficient number.

◆ downwindX()

virtual double WenoBase::downwindX ( double *  arr,
int  var,
int  i,
int  j,
int  k 
)
pure virtual

Downwind reconstruction in y-dir.

Reconstruct a full size array for a single cell. Return the downwind reconstruction for this cell.
Parameters
[in]*arrPointer to the array to reconstruct a cell, Size is \(N \times N_x \times N_y \times N_z\), where \(N\) is anything.
varVariable number in the array to reconstruct
iCell number in the x-direction to reconstruct
jCell number in the y-direction to reconstruct
kCell number in the z-direction to reconstruct

Implemented in Weno11, Weno9, Weno7, Weno5, and Weno3.

◆ downwindY()

virtual double WenoBase::downwindY ( double *  arr,
int  var,
int  i,
int  j,
int  k 
)
pure virtual

Downwind reconstruction in z-dir.

Reconstruct a full size array for a single cell. Return the downwind reconstruction for this cell.
Parameters
[in]*arrPointer to the array to reconstruct a cell, Size is \(N \times N_x \times N_y \times N_z\), where \(N\) is anything.
varVariable number in the array to reconstruct
iCell number in the x-direction to reconstruct
jCell number in the y-direction to reconstruct
kCell number in the z-direction to reconstruct

Implemented in Weno11, Weno9, Weno7, Weno5, and Weno3.

◆ downwindZ()

virtual double WenoBase::downwindZ ( double *  arr,
int  var,
int  i,
int  j,
int  k 
)
pure virtual

Upwind reconstruction.

Reconstruct a full size array for a single cell. Return the downwind reconstruction for this cell.
Parameters
[in]*arrPointer to the array to reconstruct a cell, Size is \(N \times N_x \times N_y \times N_z\), where \(N\) is anything.
varVariable number in the array to reconstruct
iCell number in the x-direction to reconstruct
jCell number in the y-direction to reconstruct
kCell number in the z-direction to reconstruct

Implemented in Weno11, Weno9, Weno7, Weno5, and Weno3.

◆ reconstructDownwind()

virtual void WenoBase::reconstructDownwind ( double *  arr,
double *  recon,
int  nvars,
int  dir 
)
virtual

Check number of ghost cells.

Reconstruct a full size array for all cells in a given direction downwind.
Parameters
[in]*arrPointer to the array to reconstruct a cell, Size is \(nvars \times N_x \times N_y \times N_z\).
[out]*reconPointer to the array storing reconstructed values, Size is \(N \times N_x \times N_y \times N_z\).
nvarsNumber of variables in arr to reconstruct
dirDirection in which to reconstruct. (0, 1, 2) = (x, y, z).

◆ reconstructUpwind()

virtual void WenoBase::reconstructUpwind ( double *  arr,
double *  recon,
int  nvars,
int  dir 
)
virtual

Downwind reconstruction.

Reconstruct a full size array for all cells in a given direction upwind.
Parameters
[in]*arrPointer to the array to reconstruct a cell, Size is \(nvars \times N_x \times N_y \times N_z\).
[out]*reconPointer to the array storing reconstructed values, Size is \(N \times N_x \times N_y \times N_z\).
nvarsNumber of variables in arr to reconstruct
dirDirection in which to reconstruct. (0, 1, 2) = (x, y, z).

◆ upwindX()

virtual double WenoBase::upwindX ( double *  arr,
int  var,
int  i,
int  j,
int  k 
)
pure virtual

Upwind reconstruction in y-dir.

Reconstruct a full size array for a single cell. Return the upwind reconstruction for this cell.
Parameters
[in]*arrPointer to the array to reconstruct a cell, Size is \(N \times N_x \times N_y \times N_z\), where \(N\) is anything.
varVariable number in the array to reconstruct
iCell number in the x-direction to reconstruct
jCell number in the y-direction to reconstruct
kCell number in the z-direction to reconstruct

Implemented in Weno11, Weno9, Weno7, Weno5, and Weno3.

◆ upwindY()

virtual double WenoBase::upwindY ( double *  arr,
int  var,
int  i,
int  j,
int  k 
)
pure virtual

Upwind reconstruction in z-dir.

Reconstruct a full size array for a single cell. Return the upwind reconstruction for this cell.
Parameters
[in]*arrPointer to the array to reconstruct a cell, Size is \(N \times N_x \times N_y \times N_z\), where \(N\) is anything.
varVariable number in the array to reconstruct
iCell number in the x-direction to reconstruct
jCell number in the y-direction to reconstruct
kCell number in the z-direction to reconstruct

Implemented in Weno11, Weno9, Weno7, Weno5, and Weno3.

◆ upwindZ()

virtual double WenoBase::upwindZ ( double *  arr,
int  var,
int  i,
int  j,
int  k 
)
pure virtual

Downwind reconstruction in x-dir.

Reconstruct a full size array for a single cell. Return the upwind reconstruction for this cell.
Parameters
[in]*arrPointer to the array to reconstruct a cell, Size is \(N \times N_x \times N_y \times N_z\), where \(N\) is anything.
varVariable number in the array to reconstruct
iCell number in the x-direction to reconstruct
jCell number in the y-direction to reconstruct
kCell number in the z-direction to reconstruct

Implemented in Weno11, Weno9, Weno7, Weno5, and Weno3.

Member Data Documentation

◆ data

Data* WenoBase::data

Pointer to Data class containing global simulation data.

Definition at line 24 of file weno.h.

◆ order

int WenoBase::order

Order of reconstruction and number of buffers for this scheme (should be 1 more than data->Ng)

Definition at line 26 of file weno.h.

◆ shift

int WenoBase::shift

Shift = (order+1)/2.

Constructor

Definition at line 27 of file weno.h.


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