SPI
SLEPc PETSc Interface is used for rapid development and intuitive matrix operations similar to MatLab or NumPy style of operations
|
Class to contain various grid parameters. More...
#include <SPIgrid.hpp>
Public Member Functions | |
SPIgrid1D () | |
constructor with at no arguments More... | |
SPIgrid1D (SPIVec &y, std::string name="SPIgrid1D", gridtype _gridtype=FD) | |
constructor with at least one argument (set default values) More... | |
~SPIgrid1D () | |
destructor of saved SPIVec and SPIMat More... | |
void | print () |
saves grid to internal grid More... | |
void | set_grid (SPIVec &y) |
saves grid to internal grid More... | |
void | set_derivatives (PetscInt order=4) |
sets derivatives Dy and Dyy using saved grid More... | |
void | set_operators () |
sets zero and identity operators for grid More... | |
Data Fields | |
PetscInt | ny |
std::string | name |
name of grid More... | |
SPIVec | y |
grid More... | |
gridtype | ytype |
type of grid More... | |
SPIMat | Dy |
1st derivative operator with respect to y More... | |
SPIMat | Dyy |
2nd derivative operator with respect to y More... | |
SPIMat | S0 |
UltraSpherical helper matrix S_0 takes chebyshev coefficients and outputs C^(1) coefficients. More... | |
SPIMat | S1 |
UltraSpherical helper matrices S_1 takes C^(1) coefficients and outputs C^(2) coefficients. More... | |
SPIMat | S1S0That |
UltraSpherical helper matrix S1*S0*That for baseflow. More... | |
SPIMat | S0invS1inv |
[in] inverse of S0^-1 * S1^-1 More... | |
SPIMat | P |
row permutation matrix for UltraSpherical operators to shift rows from bottom to top to reduce LU factorization pivoting More... | |
SPIMat | T |
Chebyshev operator taking it from Chebyshev coefficients to physical space. More... | |
SPIMat | That |
Chebyshev operator taking it from physical space to Chebyshev coefficients. More... | |
SPIMat | FT |
Fourier Transform operator. More... | |
SPIMat | FTinv |
inverse Fourier Transform More... | |
SPIMat | Ihalf |
positive wavenumbers from FT More... | |
SPIMat | Ihalfn |
negative wavenumbers from FT More... | |
SPIMat | O |
zero matrix same size as derivative operators More... | |
SPIMat | I |
identity matrix same size as derivative operators More... | |
PetscBool | flag_set_grid =PETSC_FALSE |
flag if set_grid has been executed More... | |
PetscBool | flag_set_derivatives =PETSC_FALSE |
flag if set_derivatives has been executed More... | |
PetscBool | flag_set_operators =PETSC_FALSE |
flag if set_operators has been executed More... | |
Class to contain various grid parameters.
Definition at line 35 of file SPIgrid.hpp.
SPI::SPIgrid1D::SPIgrid1D | ( | ) |
constructor with at no arguments
Definition at line 448 of file SPIgrid.cpp.
constructor with at least one argument (set default values)
[in] | y | [in] grid to save |
[in] | name | [in] name of grid (default to SPIgrid1D) |
[in] | _ytype | [in] what type of grid (default finite difference FD) |
Definition at line 450 of file SPIgrid.cpp.
SPI::SPIgrid1D::~SPIgrid1D | ( | ) |
destructor of saved SPIVec and SPIMat
Definition at line 602 of file SPIgrid.cpp.
void SPI::SPIgrid1D::print | ( | ) |
saves grid to internal grid
Definition at line 468 of file SPIgrid.cpp.
void SPI::SPIgrid1D::set_derivatives | ( | PetscInt | order = 4 | ) |
sets derivatives Dy and Dyy using saved grid
[in] | order | [in] order of accuracy of finite difference derivative (default 4) |
Definition at line 503 of file SPIgrid.cpp.
void SPI::SPIgrid1D::set_grid | ( | SPIVec & | y | ) |
saves grid to internal grid
[in] | y | [in] grid to save |
Definition at line 493 of file SPIgrid.cpp.
void SPI::SPIgrid1D::set_operators | ( | ) |
sets zero and identity operators for grid
Definition at line 574 of file SPIgrid.cpp.
SPIMat SPI::SPIgrid1D::Dy |
1st derivative operator with respect to y
Definition at line 51 of file SPIgrid.hpp.
SPIMat SPI::SPIgrid1D::Dyy |
2nd derivative operator with respect to y
Definition at line 52 of file SPIgrid.hpp.
PetscBool SPI::SPIgrid1D::flag_set_derivatives =PETSC_FALSE |
flag if set_derivatives has been executed
Definition at line 68 of file SPIgrid.hpp.
PetscBool SPI::SPIgrid1D::flag_set_grid =PETSC_FALSE |
flag if set_grid has been executed
Definition at line 67 of file SPIgrid.hpp.
PetscBool SPI::SPIgrid1D::flag_set_operators =PETSC_FALSE |
flag if set_operators has been executed
Definition at line 69 of file SPIgrid.hpp.
SPIMat SPI::SPIgrid1D::FT |
Fourier Transform operator.
Definition at line 60 of file SPIgrid.hpp.
SPIMat SPI::SPIgrid1D::FTinv |
inverse Fourier Transform
Definition at line 61 of file SPIgrid.hpp.
SPIMat SPI::SPIgrid1D::I |
identity matrix same size as derivative operators
Definition at line 65 of file SPIgrid.hpp.
SPIMat SPI::SPIgrid1D::Ihalf |
positive wavenumbers from FT
Definition at line 62 of file SPIgrid.hpp.
SPIMat SPI::SPIgrid1D::Ihalfn |
negative wavenumbers from FT
Definition at line 63 of file SPIgrid.hpp.
std::string SPI::SPIgrid1D::name |
name of grid
Definition at line 45 of file SPIgrid.hpp.
PetscInt SPI::SPIgrid1D::ny |
Definition at line 39 of file SPIgrid.hpp.
SPIMat SPI::SPIgrid1D::O |
zero matrix same size as derivative operators
Definition at line 64 of file SPIgrid.hpp.
SPIMat SPI::SPIgrid1D::P |
row permutation matrix for UltraSpherical operators to shift rows from bottom to top to reduce LU factorization pivoting
Definition at line 57 of file SPIgrid.hpp.
SPIMat SPI::SPIgrid1D::S0 |
UltraSpherical helper matrix S_0 takes chebyshev coefficients and outputs C^(1) coefficients.
Definition at line 53 of file SPIgrid.hpp.
SPIMat SPI::SPIgrid1D::S0invS1inv |
[in] inverse of S0^-1 * S1^-1
Definition at line 56 of file SPIgrid.hpp.
SPIMat SPI::SPIgrid1D::S1 |
UltraSpherical helper matrices S_1 takes C^(1) coefficients and outputs C^(2) coefficients.
Definition at line 54 of file SPIgrid.hpp.
SPIMat SPI::SPIgrid1D::S1S0That |
UltraSpherical helper matrix S1*S0*That for baseflow.
Definition at line 55 of file SPIgrid.hpp.
SPIMat SPI::SPIgrid1D::T |
Chebyshev operator taking it from Chebyshev coefficients to physical space.
Definition at line 58 of file SPIgrid.hpp.
SPIMat SPI::SPIgrid1D::That |
Chebyshev operator taking it from physical space to Chebyshev coefficients.
Definition at line 59 of file SPIgrid.hpp.
SPIVec SPI::SPIgrid1D::y |
grid
Definition at line 47 of file SPIgrid.hpp.
gridtype SPI::SPIgrid1D::ytype |
type of grid
Definition at line 48 of file SPIgrid.hpp.