24#ifndef OPM_EVALUATION_FORMAT_HPP
25#define OPM_EVALUATION_FORMAT_HPP
29#include <fmt/format.h>
30#include <fmt/ranges.h>
32template<
class ValueT,
int numDerivs,
unsigned staticSize>
33struct fmt::formatter<
Opm::DenseAd::Evaluation<ValueT,numDerivs,staticSize>>
36 constexpr auto parse(fmt::format_parse_context& ctx)
38 auto it = ctx.begin();
39 spec = (it != ctx.end() && *it !=
'}') ?
"{:" :
"{";
40 while (it != ctx.end() && *it !=
'}')
46 template<
class FormatContext>
50 std::array<ValueT,numDerivs> tmp;
51 for (
int i = 0; i < numDerivs; ++i)
52 tmp[i] = e.derivative(i);
53 return fmt::format_to(ctx.out(),
"v: "+ spec +
" / d: [" + spec +
"]", e.value(), fmt::join(tmp,
", "));
Representation of an evaluation of a function and its derivatives w.r.t.
Represents a function evaluation and its derivatives w.r.t.
Definition: Evaluation.hpp:57
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:30