version 0.4.1
nonlinearsolverlogger.hh
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2021-2024 The Ikarus Developers mueller@ibb.uni-stuttgart.de
2// SPDX-License-Identifier: LGPL-3.0-or-later
3
9#pragma once
10#include "observer.hh"
11#include "observermessages.hh"
12
13namespace Ikarus {
20class NonLinearSolverLogger : public IObserver<NonLinearSolverMessages>
21{
22public:
29
36 void updateImpl(NonLinearSolverMessages message, double val) final;
37
44 void updateImpl(NonLinearSolverMessages message, int intVal) final;
45
46private:
47 int iters_{0};
48 double dNorm_{0};
49 double rNorm_{0};
50 double lambda_{0};
51};
52} // namespace Ikarus
Enums for observer messages.
Implementation of the observer design pattern.
NonLinearSolverMessages
Enum class defining non-linear solver-related messages.
Definition: observermessages.hh:32
Definition: simpleassemblers.hh:22
Implementation of an observer for logging non-linear solvers.This class inherits from the IObserver c...
Definition: nonlinearsolverlogger.hh:21
void updateImpl(NonLinearSolverMessages message) final
Handles the update when a NonLinearSolverMessages is received.
void updateImpl(NonLinearSolverMessages message, double val) final
Handles the update when a NonLinearSolverMessages with a double value is received.
void updateImpl(NonLinearSolverMessages message, int intVal) final
Handles the update when a NonLinearSolverMessages with an integer value is received.
Generic observer interface for the Observer design pattern. See for a description of the design patt...
Definition: observer.hh:26