SPI
SLEPc PETSc Interface is used for rapid development and intuitive matrix operations similar to MatLab or NumPy style of operations
Public Member Functions | Data Fields
SPI::SPIgrid1D Struct Reference

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...
 

Detailed Description

Class to contain various grid parameters.

Definition at line 35 of file SPIgrid.hpp.

Constructor & Destructor Documentation

◆ SPIgrid1D() [1/2]

SPI::SPIgrid1D::SPIgrid1D ( )

constructor with at no arguments

Definition at line 448 of file SPIgrid.cpp.

◆ SPIgrid1D() [2/2]

SPI::SPIgrid1D::SPIgrid1D ( SPIVec y,
std::string  name = "SPIgrid1D",
gridtype  _ytype = FD 
)

constructor with at least one argument (set default values)

Parameters
[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.

◆ ~SPIgrid1D()

SPI::SPIgrid1D::~SPIgrid1D ( )

destructor of saved SPIVec and SPIMat

Definition at line 602 of file SPIgrid.cpp.

Member Function Documentation

◆ print()

void SPI::SPIgrid1D::print ( )

saves grid to internal grid

Definition at line 468 of file SPIgrid.cpp.

◆ set_derivatives()

void SPI::SPIgrid1D::set_derivatives ( PetscInt  order = 4)

sets derivatives Dy and Dyy using saved grid

Parameters
[in]order[in] order of accuracy of finite difference derivative (default 4)

Definition at line 503 of file SPIgrid.cpp.

◆ set_grid()

void SPI::SPIgrid1D::set_grid ( SPIVec y)

saves grid to internal grid

Parameters
[in]y[in] grid to save

Definition at line 493 of file SPIgrid.cpp.

◆ set_operators()

void SPI::SPIgrid1D::set_operators ( )

sets zero and identity operators for grid

Definition at line 574 of file SPIgrid.cpp.

Field Documentation

◆ Dy

SPIMat SPI::SPIgrid1D::Dy

1st derivative operator with respect to y

Definition at line 51 of file SPIgrid.hpp.

◆ Dyy

SPIMat SPI::SPIgrid1D::Dyy

2nd derivative operator with respect to y

Definition at line 52 of file SPIgrid.hpp.

◆ flag_set_derivatives

PetscBool SPI::SPIgrid1D::flag_set_derivatives =PETSC_FALSE

flag if set_derivatives has been executed

Definition at line 68 of file SPIgrid.hpp.

◆ flag_set_grid

PetscBool SPI::SPIgrid1D::flag_set_grid =PETSC_FALSE

flag if set_grid has been executed

Definition at line 67 of file SPIgrid.hpp.

◆ flag_set_operators

PetscBool SPI::SPIgrid1D::flag_set_operators =PETSC_FALSE

flag if set_operators has been executed

Definition at line 69 of file SPIgrid.hpp.

◆ FT

SPIMat SPI::SPIgrid1D::FT

Fourier Transform operator.

Definition at line 60 of file SPIgrid.hpp.

◆ FTinv

SPIMat SPI::SPIgrid1D::FTinv

inverse Fourier Transform

Definition at line 61 of file SPIgrid.hpp.

◆ I

SPIMat SPI::SPIgrid1D::I

identity matrix same size as derivative operators

Definition at line 65 of file SPIgrid.hpp.

◆ Ihalf

SPIMat SPI::SPIgrid1D::Ihalf

positive wavenumbers from FT

Definition at line 62 of file SPIgrid.hpp.

◆ Ihalfn

SPIMat SPI::SPIgrid1D::Ihalfn

negative wavenumbers from FT

Definition at line 63 of file SPIgrid.hpp.

◆ name

std::string SPI::SPIgrid1D::name

name of grid

Definition at line 45 of file SPIgrid.hpp.

◆ ny

PetscInt SPI::SPIgrid1D::ny

Definition at line 39 of file SPIgrid.hpp.

◆ O

SPIMat SPI::SPIgrid1D::O

zero matrix same size as derivative operators

Definition at line 64 of file SPIgrid.hpp.

◆ P

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.

◆ S0

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.

◆ S0invS1inv

SPIMat SPI::SPIgrid1D::S0invS1inv

[in] inverse of S0^-1 * S1^-1

Definition at line 56 of file SPIgrid.hpp.

◆ S1

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.

◆ S1S0That

SPIMat SPI::SPIgrid1D::S1S0That

UltraSpherical helper matrix S1*S0*That for baseflow.

Definition at line 55 of file SPIgrid.hpp.

◆ T

SPIMat SPI::SPIgrid1D::T

Chebyshev operator taking it from Chebyshev coefficients to physical space.

Definition at line 58 of file SPIgrid.hpp.

◆ That

SPIMat SPI::SPIgrid1D::That

Chebyshev operator taking it from physical space to Chebyshev coefficients.

Definition at line 59 of file SPIgrid.hpp.

◆ y

SPIVec SPI::SPIgrid1D::y

grid

Definition at line 47 of file SPIgrid.hpp.

◆ ytype

gridtype SPI::SPIgrid1D::ytype

type of grid

Definition at line 48 of file SPIgrid.hpp.


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