version 0.4
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 {
20 class NonLinearSolverLogger : public IObserver<NonLinearSolverMessages> {
21 public:
28
35 void updateImpl(NonLinearSolverMessages message, double val) final;
36
43 void updateImpl(NonLinearSolverMessages message, int intVal) final;
44
45 private:
46 int iters{0};
47 double dNorm{0};
48 double rNorm{0};
49 double lambda{0};
50 };
51} // namespace Ikarus
Enums for observer messages.
Implementation of the observer design pattern.
NonLinearSolverMessages
Enum class defining non-linear solver-related messages.
Definition: observermessages.hh:22
Definition: simpleassemblers.hh:21
Implementation of an observer for logging non-linear solvers.This class inherits from the IObserver c...
Definition: nonlinearsolverlogger.hh:20
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:25