DP3
IterativeDiagonalSolver.h
Go to the documentation of this file.
1 // Copyright (C) 2020 ASTRON (Netherlands Institute for Radio Astronomy)
2 // SPDX-License-Identifier: GPL-3.0-or-later
3 
4 #ifndef DDECAL_ITERATIVE_DIAGONAL_SOLVER_H
5 #define DDECAL_ITERATIVE_DIAGONAL_SOLVER_H
6 
7 #include "SolverBase.h"
8 #include "SolveData.h"
9 
10 namespace dp3 {
11 namespace ddecal {
12 
13 template <typename VisMatrix>
14 class IterativeDiagonalSolver final : public SolverBase {
15  public:
18  std::vector<std::vector<DComplex>>& solutions,
19  double time) override;
20 
21  size_t NSolutionPolarizations() const override { return 2; }
22 
23  bool SupportsDdSolutionIntervals() const override { return true; }
24 
25  private:
26  void PerformIteration(size_t ch_block, const ChannelBlockData& cb_data,
27  std::vector<VisMatrix>& v_residual,
28  const std::vector<DComplex>& solutions,
29  SolutionTensor& next_solutions);
30 
31  void SolveDirection(size_t ch_block, const ChannelBlockData& cb_data,
32  const std::vector<VisMatrix>& v_residual,
33  size_t direction, const std::vector<DComplex>& solutions,
34  SolutionTensor& next_solutions);
35 };
36 
37 extern template class IterativeDiagonalSolver<aocommon::MC2x2F>;
38 extern template class IterativeDiagonalSolver<aocommon::MC2x2FDiag>;
39 
40 } // namespace ddecal
41 } // namespace dp3
42 
43 #endif // DDECAL_BDA_ITERATIVE_DIAGONAL_SOLVER_H
Definition: IterativeDiagonalSolver.h:14
bool SupportsDdSolutionIntervals() const override
Definition: IterativeDiagonalSolver.h:23
size_t NSolutionPolarizations() const override
Definition: IterativeDiagonalSolver.h:21
SolveResult Solve(const SolveData< VisMatrix > &data, std::vector< std::vector< DComplex >> &solutions, double time) override
typename SolveData< VisMatrix >::ChannelBlockData ChannelBlockData
Definition: IterativeDiagonalSolver.h:16
Definition: SolveData.h:29
Definition: SolverBase.h:24
xt::xtensor< std::complex< double >, 4 > SolutionTensor
Definition: Solutions.h:19
This file has generic helper routines for testing steps.
Definition: AntennaConfig.h:53
Definition: SolverBase.h:61