MCPcopy Create free account
hub / github.com/NGSolve/ngsolve / LInfNorm

Function LInfNorm

fem/newtonCF.cpp:33–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31namespace {
32
33template <typename T> auto LInfNorm(const T &array) -> auto {
34 using number_t = remove_reference_t<remove_cv_t<decltype(*(array.Data()))>>;
35 number_t s = 0;
36 for (const number_t item : array) {
37 if (isnan(item))
38 return numeric_limits<number_t>::quiet_NaN();
39 s = abs(item) > s ? abs(item) : s;
40 }
41 return s;
42}
43
44bool has_vs_embedding(const ProxyFunction *proxy) {
45 return proxy->Evaluator()->GetVSEmbedding().has_value();

Callers 3

convergedFunction · 0.85
EvaluateMethod · 0.85
EvaluateMethod · 0.85

Calls 2

absFunction · 0.50
DataMethod · 0.45

Tested by

no test coverage detected