Peano
Loading...
Searching...
No Matches
SolverStatistics.h
Go to the documentation of this file.
1// This file is part of the Peano's multigrid extension. For conditions of
2// distribution and use, please see the copyright notice at
3// www.peano-framework.org
4#pragma once
5
6
7#include <string>
8
9#include "tarch/la/Vector.h"
10#include "tarch/logging/Log.h"
12
14
15
16namespace mghype {
17 namespace matrixfree {
18 namespace solvers {
19 class SolverStatistics;
20 }
21 }
22}
23
24
26 public:
31 SolverStatistics(double tolerance = 0.0);
32
34
49 double residual,
51 );
52
53 /*
54 *
55 * @todo This name is not good. We should argue over a cycle
56 * residual or something similar. But in any case, it is not
57 * a good name.
58 */
60 double residual
61 );
62
64 double deltaU,
66 );
67
70 );
71
73
75 std::array<double, 2> getGlobalPrecondResidualNorms() const;
76
77 std::string toString() const;
78
79 void merge( const SolverStatistics& statistics );
80
81 std::string reportPrecondNorms() const;
82
89
97 protected:
98
100
104 const double _tolerance;
105
109 double _minH;
110
114 double _maxH;
115
119
123
127
131
134};
135
void synchroniseGlobalResidualAndSolutionUpdate()
Synchronise the global stats between MPI ranks.
void clearGlobalResidualAndSolutionUpdate()
Clear the global mesh stats.
void updateGlobalSolutionUpdates(double deltaU, const tarch::la::Vector< Dimensions, double > &h)
std::array< double, 2 > getGlobalPrecondResidualNorms() const
void updateMinMaxMeshSize(const tarch::la::Vector< Dimensions, double > &h)
void merge(const SolverStatistics &statistics)
void updateGlobalResidual(double residual, const tarch::la::Vector< Dimensions, double > &h)
Update the global residual.
Log Device.
Definition Log.h:517
This file is part of the multigrid project within Peano 4.
Definition __init__.py:1
This file is part of the multigrid project within Peano 4.
Definition __init__.py:1
Simple vector class.
Definition Vector.h:159