Class mgrid::FDBase
#include <fdbase.hpp>
Inherited by the following classes: mgrid::FDArray, mgrid::FDVecArray
Public Functions
| Type | Name |
|---|---|
| FDBase () = default |
|
| FDBase (const FDBase &) = default |
|
| FDBase (FDBase &&) = default |
|
| FDBase & | operator= (const FDBase &) = default |
| FDBase & | operator= (FDBase &&) = default |
| double | spacing (int n) const Get the grid spacing in a given direction. |
| const Axis & | x_axis () const The x grid axis (points, spacing, periodicity). |
| const Axis & | z_axis () const The z grid axis (points, spacing, periodicity). |
| virtual | ~FDBase () = default |
Protected Attributes
| Type | Name |
|---|---|
| double | aspect_ = {0.0} |
| double | hx_ = {0.0} |
| double | hz_ = {0.0} |
| int | nx_ = {0} |
| int | nz_ = {0} |
| Axis | xAxis_ = {} |
| double | xfactor_ = {0.0} |
| double | xxfactor_ = {0.0} |
| double | xzfactor_ = {0.0} |
| Axis | zAxis_ = {} |
| double | zfactor_ = {0.0} |
| double | zzfactor_ = {0.0} |
Protected Functions
| Type | Name |
|---|---|
| void | calculate_geometry (double aspect, int nx, int nz, AxisKind kx=AxisKind::bounded, AxisKind kz=AxisKind::bounded) Compute and cache grid spacings and finite-difference factors. |
Detailed Description
Geometry base for the grid array types: holds spacings and the pre-computed denominators used by the finite-difference stencils.
Public Functions Documentation
function FDBase [1/3]
mgrid::FDBase::FDBase () = default
function FDBase [2/3]
mgrid::FDBase::FDBase (
const FDBase &
) = default
function FDBase [3/3]
mgrid::FDBase::FDBase (
FDBase &&
) = default
function operator=
FDBase & mgrid::FDBase::operator= (
const FDBase &
) = default
function operator=
FDBase & mgrid::FDBase::operator= (
FDBase &&
) = default
function spacing
Get the grid spacing in a given direction.
inline double mgrid::FDBase::spacing (
int n
) const
Parameters:
nDirection: 0 for x, 1 for z.
Returns:
The grid spacing in that direction.
function x_axis
The x grid axis (points, spacing, periodicity).
inline const Axis & mgrid::FDBase::x_axis () const
Returns:
const reference to the cached x-direction Axis.
function z_axis
The z grid axis (points, spacing, periodicity).
inline const Axis & mgrid::FDBase::z_axis () const
Returns:
const reference to the cached z-direction Axis.
function ~FDBase
virtual mgrid::FDBase::~FDBase () = default
Protected Attributes Documentation
variable aspect_
double mgrid::FDBase::aspect_;
variable hx_
double mgrid::FDBase::hx_;
variable hz_
double mgrid::FDBase::hz_;
variable nx_
int mgrid::FDBase::nx_;
variable nz_
int mgrid::FDBase::nz_;
variable xAxis_
Axis mgrid::FDBase::xAxis_;
variable xfactor_
double mgrid::FDBase::xfactor_;
variable xxfactor_
double mgrid::FDBase::xxfactor_;
variable xzfactor_
double mgrid::FDBase::xzfactor_;
variable zAxis_
Axis mgrid::FDBase::zAxis_;
variable zfactor_
double mgrid::FDBase::zfactor_;
variable zzfactor_
double mgrid::FDBase::zzfactor_;
Protected Functions Documentation
function calculate_geometry
Compute and cache grid spacings and finite-difference factors.
void mgrid::FDBase::calculate_geometry (
double aspect,
int nx,
int nz,
AxisKind kx=AxisKind::bounded,
AxisKind kz=AxisKind::bounded
)
Parameters:
aspectThe aspect ratio (horizontal extent / vertical extent).nxNumber of grid points in the x direction.nzNumber of grid points in the z direction.kxKind of the x axis;periodicusesnx(notnx - 1) as the spacing denominator and marksx_axis()periodic. Defaults tobounded.kzKind of the z axis;periodicusesnz(notnz - 1) as the spacing denominator and marksz_axis()periodic. Defaults tobounded.
The documentation for this class was generated from the following file include/multigrid/fdbase.hpp