numerics
Loading...
Searching...
No Matches
num::CrankNicolsonADI Struct Reference

#include <adi.hpp>

Public Member Functions

 CrankNicolsonADI ()=default
 
 CrankNicolsonADI (int N_, double dt_, double h_)
 
void sweep (CVector &psi, bool x_axis, double tau) const
 

Public Attributes

int N = 0
 
double dt = 0.0
 
double h = 0.0
 

Detailed Description

Definition at line 36 of file adi.hpp.

Constructor & Destructor Documentation

◆ CrankNicolsonADI() [1/2]

num::CrankNicolsonADI::CrankNicolsonADI ( )
default

◆ CrankNicolsonADI() [2/2]

num::CrankNicolsonADI::CrankNicolsonADI ( int  N_,
double  dt_,
double  h_ 
)
inline

Pre-factor both tridiagonals.

Parameters
N_Interior grid points per axis
dt_Full timestep
h_Grid spacing

Definition at line 47 of file adi.hpp.

References dt, num::ComplexTriDiag::factor(), h, num::ipow(), and N.

Member Function Documentation

◆ sweep()

void num::CrankNicolsonADI::sweep ( CVector psi,
bool  x_axis,
double  tau 
) const
inline

Apply one CN sweep along x (col fibers, x_axis=true) or y (row fibers). Selects the half-step tridiagonal for tau < 0.75*dt, full-step otherwise.

Definition at line 66 of file adi.hpp.

References num::col_fiber_sweep(), dt, h, num::ipow(), N, and num::row_fiber_sweep().

Member Data Documentation

◆ dt

double num::CrankNicolsonADI::dt = 0.0

Definition at line 38 of file adi.hpp.

Referenced by CrankNicolsonADI(), and sweep().

◆ h

double num::CrankNicolsonADI::h = 0.0

Definition at line 39 of file adi.hpp.

Referenced by CrankNicolsonADI(), and sweep().

◆ N

int num::CrankNicolsonADI::N = 0

Definition at line 37 of file adi.hpp.

Referenced by CrankNicolsonADI(), and sweep().


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