12#ifndef ARCANE_CORE_VARIABLEDIFF_H
13#define ARCANE_CORE_VARIABLEDIFF_H
17#include "arcane/utils/Array.h"
19#include "arcane/core/VariableDataTypeTraits.h"
20#include "arcane/core/Item.h"
37template <
typename DataType>
43 static constexpr bool IsNumeric = std::is_same_v<typename VarDataTypeTraits::IsNumeric, TrueType>;
56 DiffInfo(
const DataType& current,
const DataType& ref,
const DataType& diff,
61 , m_sub_index(sub_index)
62 , m_is_own(item.
isOwn())
66 DiffInfo(
const DataType& current,
const DataType& ref,
const DataType& diff,
71 , m_sub_index(sub_index)
74 , m_unique_id(NULL_ITEM_UNIQUE_ID)
79 DataType m_current = {};
82 Integer m_sub_index = NULL_ITEM_ID;
83 bool m_is_own =
false;
84 Int32 m_local_id = NULL_ITEM_LOCAL_ID;
85 Int64 m_unique_id = NULL_ITEM_UNIQUE_ID;
89 bool operator<(
const DiffInfo& t2)
const
91 return VarDataTypeTraits::normeMax(m_diff) > VarDataTypeTraits::normeMax(t2.m_diff);
99 ARCANE_DEPRECATED_REASON(
"Y2023: This method is internal to Arcane")
105 ARCANE_DEPRECATED_REASON(
"Y2023: This method is internal to Arcane")
112 void _sortAndDump(IVariable* var, IParallelMng* pm,
const VariableComparerArgs& compare_args)
115 dump(var, pm, compare_args);
118 void dump(IVariable* var, IParallelMng* pm,
const VariableComparerArgs& compare_args)
120 DiffPrinter::dump(m_diffs_info, var, pm, compare_args);
124 DiffPrinter::sort(m_diffs_info);
133 ARCANE_CORE_EXPORT
static void
Modifiable view of an array of type T.
Constant view of an array of type T.
Interface of the parallelism manager for a subdomain.
Base class for a mesh element.
constexpr Int32 localId() const
Local identifier of the entity in the processor subdomain.
ItemUniqueId uniqueId() const
Unique identifier across all domains.
constexpr bool isOwn() const
true if the entity belongs to the subdomain
1D data vector with value semantics (STL style).
Arguments for VariableComparer methods.
Template class for information about a variable type.
Base class for value comparisons between two variables.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
std::int64_t Int64
Signed integer type of 64 bits.
Int32 Integer
Type representing an integer.
std::int32_t Int32
Signed integer type of 32 bits.
Structure equivalent to the boolean value true.
Structure equivalent to the boolean value true.