version 0.4.4
defaultfunctions.hh
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2021-2025 The Ikarus Developers ikarus@ibb.uni-stuttgart.de
2// SPDX-License-Identifier: LGPL-3.0-or-later
3
9#pragma once
11
12#include <type_traits>
13
14namespace Ikarus::utils {
28{
29 template <typename A, typename B>
30 constexpr auto operator()(A&& a, B&& b) const {
31 return a / b;
32 }
33};
34
41{
42} inline constexpr syncFERequirements;
43
49{
50};
51
65{
66 template <typename A, typename B = SyncFERequirements>
67 constexpr void operator()(A&& a, B&& b = {}) const {
68 if constexpr (not std::is_same_v<B, SyncFERequirements>) {
69 using Ikarus::operator+=;
70 a += b;
71 }
72 }
73};
74
75} // namespace Ikarus::utils
Helper for the autodiff library.
Definition: algorithms.hh:17
struct Ikarus::utils::SyncFERequirements syncFERequirements
Default functor for solving operations.
Definition: defaultfunctions.hh:28
constexpr auto operator()(A &&a, B &&b) const
Definition: defaultfunctions.hh:30
A helper struct that tells the update function of the nonlinear solver to sync the global solution ba...
Definition: defaultfunctions.hh:41
Default struct used to represent that no inhomogeneous Dirichlet BCs are present.
Definition: defaultfunctions.hh:49
Default functor for updating operations.
Definition: defaultfunctions.hh:65
constexpr void operator()(A &&a, B &&b={}) const
Definition: defaultfunctions.hh:67