RealTimeTransport 1.0.0
Real-time simulation of quantum transport processes
Loading...
Searching...
No Matches
RealTimeTransport::BlockDiagonalCheb Class Reference

#include <RealTimeTransport/BlockMatrices/BlockDiagonalCheb.h>

This class represents a parameter dependent block diagonal matrix. The parameter is typically the time \( t \). The time dependence is represented through a Chebyshev interpolation.

Public Types

using Scalar = SciCore::Complex
 Type representing the matrix elements.
 
using MatrixType = Eigen::Matrix<Scalar, Eigen::Dynamic, Eigen::Dynamic>
 Type representing a matrix block at a specific time.
 

Public Member Functions

 BlockDiagonalCheb ()
 Constructs an empty interpolation object.
 
 BlockDiagonalCheb (BlockDiagonalCheb &&other) noexcept
 Move constructor.
 
 BlockDiagonalCheb (const BlockDiagonalCheb &other)
 Copy constructor.
 
BlockDiagonalCheboperator= (BlockDiagonalCheb &&other) noexcept
 Move assignment operator.
 
BlockDiagonalCheboperator= (const BlockDiagonalCheb &other)
 Copy assignment operator.
 
 BlockDiagonalCheb (const std::function< MatrixType(int, SciCore::Real)> &f, int nBlocks, SciCore::Real a, SciCore::Real b, SciCore::Real epsAbs, SciCore::Real epsRel, SciCore::Real hMin, bool *ok=nullptr)
 Creates a piecewise Chebyshev interpolation of the function \(f(t)\) with \(t\in[a,b]\).
 
 BlockDiagonalCheb (const std::function< MatrixType(int, SciCore::Real)> &f, int nBlocks, SciCore::Real a, SciCore::Real b, SciCore::Real epsAbs, SciCore::Real epsRel, SciCore::Real hMin, tf::Executor &executor, bool *ok=nullptr)
 Creates a piecewise Chebyshev interpolation of the function \(f(t)\) with \(t\in[a,b]\) in parallel.
 
bool operator== (const BlockDiagonalCheb &other) const
 Equality comparison operator.
 
bool operator!= (const BlockDiagonalCheb &other) const
 Inequality comparison operator.
 
int numBlocks () const noexcept
 Returns the number of matrix blocks.
 
SciCore::Real lowerLimit () const
 Lower limit of the interplation interval.
 
SciCore::Real upperLimit () const
 Upper limit of the interplation interval.
 
BlockDiagonalMatrix operator() (SciCore::Real t) const
 Returns the full interpolated matrix at time \( t \).
 
MatrixType operator() (int i, SciCore::Real t) const
 Returns block i of the interpolated matrix at time \( t \).
 
const SciCore::ChebAdaptive< MatrixType > & block (int i) const
 Returns the interpolation object for block i.
 
BlockDiagonalCheb diff () const
 Computes the derivative of the represented function and returns it as a new object.
 
BlockDiagonalCheb integrate () const
 Computes the integral of the represented function and returns it as a new object.
 

Constructor & Destructor Documentation

◆ BlockDiagonalCheb() [1/2]

RealTimeTransport::BlockDiagonalCheb::BlockDiagonalCheb ( const std::function< MatrixType(int, SciCore::Real)> & f,
int nBlocks,
SciCore::Real a,
SciCore::Real b,
SciCore::Real epsAbs,
SciCore::Real epsRel,
SciCore::Real hMin,
bool * ok = nullptr )
Parameters
fThe function for which the piecewise Chebyshev approximation is computed. The first parameter refers to the block index, the second to the time argument.
nBlocksThe number of blocks.
aLower interval point.
bUpper interval point.
epsAbsAbsolute error goal.
epsRelRelative error goal.
hMinThe minimum allowed interval length.
okSet to true if error goal was achieved, otherwise set to false.

◆ BlockDiagonalCheb() [2/2]

RealTimeTransport::BlockDiagonalCheb::BlockDiagonalCheb ( const std::function< MatrixType(int, SciCore::Real)> & f,
int nBlocks,
SciCore::Real a,
SciCore::Real b,
SciCore::Real epsAbs,
SciCore::Real epsRel,
SciCore::Real hMin,
tf::Executor & executor,
bool * ok = nullptr )
Parameters
fThe function for which the piecewise Chebyshev approximation is computed. The first parameter refers to the block index, the second to the time argument.
nBlocksThe number of blocks.
aLower interval point.
bUpper interval point.
epsAbsAbsolute error goal.
epsRelRelative error goal.
hMinThe minimum allowed interval length.
executorTaskflow executor managing the threads.
okSet to true if error goal was achieved, otherwise set to false.