7#ifndef REAL_TIME_TRANSPORT_COMPUTE_PROPAGATOR_H
8#define REAL_TIME_TRANSPORT_COMPUTE_PROPAGATOR_H
10#include <SciCore/IDECheb.h>
12#include "BlockMatrices/BlockDiagonalCheb.h"
15namespace RealTimeTransport
18template <
typename MemoryKernelT>
19SciCore::ChebAdaptive<SciCore::Matrix> computePropagatorBlock(
const MemoryKernelT& memoryKernel,
int blockIndex)
21 using namespace SciCore;
24 Real tMax = memoryKernel.tMax();
26 Real epsAbs = safety * memoryKernel.errorGoal();
28 int nMinCheb = 3 * 16;
30 return computePropagatorIde(
31 memoryKernel.LInfty()(blockIndex), memoryKernel.K().block(blockIndex), t0, tMax, epsAbs, epsRel, nMinCheb);
34template <
typename MemoryKernelT>
35BlockDiagonalCheb computePropagatorTemplate(
const MemoryKernelT& memoryKernel,
int block)
37 using namespace SciCore;
39 std::vector<ChebAdaptive<Matrix>> blocks;
41 int numBlocks = memoryKernel.model()->blockDimensions().size();
42 blocks.reserve(numBlocks);
47 for (
int i = 0; i < numBlocks; ++i)
49 blocks.emplace_back(computePropagatorBlock(memoryKernel, i));
55 for (
int i = 0; i < numBlocks; ++i)
59 blocks.emplace_back(computePropagatorBlock(memoryKernel, i));
63 blocks.emplace_back(ChebAdaptive<Matrix>(
66 memoryKernel.model()->blockDimensions()[i], memoryKernel.model()->blockDimensions()[i]);
68 0.0, memoryKernel.tMax(), memoryKernel.errorGoal(), 0.0, 0.0));
73 return BlockDiagonalCheb(std::move(blocks));
77SciCore::Cheb<SciCore::Matrix> computePropagatorMinusOneBlock(
78 const SciCore::Matrix& minusILInfty,
79 const SciCore::ChebAdaptive<SciCore::Matrix>& minusIK,
80 SciCore::Real errorGoal,
86 SciCore::Real errorGoal,
This class represents a parameter dependent block diagonal matrix.
Definition BlockDiagonalCheb.h:54
Represents a block diagonal matrix.
Definition BlockDiagonalMatrix.h:33