Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
IVerifierService.h
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2026 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
4// See the top-level COPYRIGHT file for details.
5// SPDX-License-Identifier: Apache-2.0
6//-----------------------------------------------------------------------------
7/*---------------------------------------------------------------------------*/
8/* IVerifierService.h (C) 2000-2025 */
9/* */
10/* Interface of the data verification service between two executions. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_CORE_IVERIFIERSERVICE_H
13#define ARCANE_CORE_IVERIFIERSERVICE_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
28/*!
29 * \ingroup StandardService
30 * \brief Interface of the data verification service
31 * between two executions.
32 */
34{
35 public:
36
37 /*!
38 * \brief Comparison mode
39 */
40 enum class eCompareMode
41 {
42 //! Compare all values
44 /*!
45 * \brief Compares only the hashes of the values.
46 *
47 * This mode only allows detecting if two values are different
48 * without knowing this difference. However, it is faster
49 * than the \a Values mode and allows limiting the size of the comparison
50 * files.
51 */
53 };
54
55 public:
56
57 //! Frees resources
58 virtual ~IVerifierService() = default;
59
60 public:
61
62 //! Writes the reference file
63 virtual void writeReferenceFile() = 0;
64
65 /*!
66 * \brief Performs the verification from the reference file.
67 *
68 * \param parallel_sequential if true, indicates that the result
69 * of a parallel execution is compared with that of a sequential execution. This
70 * option is inactive if the execution is sequential.
71 *
72 * \param compare_ghost if true, indicates that the results are also compared
73 * on ghost entities. It is generally normal for the results to be
74 * different on ghost entities, because it is not necessary that
75 * all variables are synchronized. This is why it is better
76 * generally not to perform verification on ghost entities. This
77 * option is inactive if the execution is sequential.
78 */
79 virtual void doVerifFromReferenceFile(bool parallel_sequential, bool compare_ghost) = 0;
80
81 public:
82
83 //! Sets the name of the file containing the reference values
84 virtual void setFileName(const String& file_name) = 0;
85 //! Name of the file containing the reference values
86 virtual String fileName() const = 0;
87
88 public:
89
90 //! Name of the file containing the results
91 virtual void setResultFileName(const String& file_name) = 0;
92 virtual String resultfileName() const = 0;
93
94 //! Desired comparison type
95 virtual void setCompareMode(eCompareMode v) = 0;
96 virtual eCompareMode compareMode() const = 0;
97
98 public:
99
100 //! Sets the name of the subdirectory containing the reference values
101 virtual void setSubDir(const String& sub_dir) = 0;
102 //! Name of the file containing the reference values
103 virtual String subDir() const = 0;
104
105 public:
106
107 //! Method to use for calculating the difference between two values
109 virtual eVariableComparerComputeDifferenceMethod computeDifferenceMethod() const = 0;
110};
111
112/*---------------------------------------------------------------------------*/
113/*---------------------------------------------------------------------------*/
114
115} // End namespace Arcane
116
117/*---------------------------------------------------------------------------*/
118/*---------------------------------------------------------------------------*/
119
120#endif
Declarations of Arcane's general types.
Interface of the data verification service between two executions.
virtual void setResultFileName(const String &file_name)=0
Name of the file containing the results.
virtual void writeReferenceFile()=0
Writes the reference file.
@ HashOnly
Compares only the hashes of the values.
virtual void setSubDir(const String &sub_dir)=0
Sets the name of the subdirectory containing the reference values.
virtual String subDir() const =0
Name of the file containing the reference values.
virtual ~IVerifierService()=default
Frees resources.
virtual void doVerifFromReferenceFile(bool parallel_sequential, bool compare_ghost)=0
Performs the verification from the reference file.
virtual void setComputeDifferenceMethod(eVariableComparerComputeDifferenceMethod v)=0
Method to use for calculating the difference between two values.
virtual void setFileName(const String &file_name)=0
Sets the name of the file containing the reference values.
virtual void setCompareMode(eCompareMode v)=0
Desired comparison type.
virtual String fileName() const =0
Name of the file containing the reference values.
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
eVariableComparerComputeDifferenceMethod
Method used to calculate the difference between two values v1 and v2.