Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
SimpleTableInternal.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/* SimpleTableInternal.h (C) 2000-2025 */
9/* */
10/* File containing the SimpleTableInternal structure describing a table */
11/* of simple values. */
12/*---------------------------------------------------------------------------*/
13#ifndef ARCANE_CORE_SIMPLETABLEINTERNAL_H
14#define ARCANE_CORE_SIMPLETABLEINTERNAL_H
15/*---------------------------------------------------------------------------*/
16/*---------------------------------------------------------------------------*/
17
18#include "arcane/utils/Array.h"
19#include "arcane/utils/Array2.h"
20
21#include "arcane/core/IParallelMng.h"
23
24/*---------------------------------------------------------------------------*/
25/*---------------------------------------------------------------------------*/
26
27namespace Arcane
28{
29
30/*---------------------------------------------------------------------------*/
31/*---------------------------------------------------------------------------*/
32
33/**
34 * @brief Structure representing a simple table.
35 *
36 * A simple table looks like this:
37 *
38 * TableName | C1 | C2 | C3
39 * L1 |Val1|Val2|Val3
40 * L2 |Val4|Val5|Val6
41 *
42 * A table name, a list of row names,
43 * a list of column names, and a 2D list
44 * of values (Real for now).
45 *
46 */
47struct ARCANE_CORE_EXPORT SimpleTableInternal
48{
49 SimpleTableInternal(IParallelMng* parallel_mng)
50 : m_parallel_mng(parallel_mng)
51 , m_values()
52 , m_row_names()
53 , m_column_names()
54 , m_table_name("")
55 , m_row_sizes()
56 , m_column_sizes()
57 , m_last_row(-1)
58 , m_last_column(-1)
59 {
60 }
61 ~SimpleTableInternal() = default;
62
63 void clear()
64 {
65 m_values.clear();
66 m_row_names.clear();
67 m_column_names.clear();
68 m_table_name = "";
69 m_row_sizes.clear();
70 m_column_sizes.clear();
71 m_last_row = -1;
72 m_last_column = -1;
73 }
74 IParallelMng* m_parallel_mng;
75
76 UniqueArray2<Real> m_values;
77
78 UniqueArray<String> m_row_names;
79 UniqueArray<String> m_column_names;
80
81 String m_table_name;
82
83 // Row/column sizes
84 // (and not the number of elements, we count the "gaps" between elements here,
85 // but without the final gap).
86 // Ex. : {{"1", "2", "0", "3", "0", "0"},
87 // {"4", "5", "6", "0", "7", "8"},
88 // {"0", "0", "0", "0", "0", "0"}}
89
90 // m_row_sizes[0] = 4
91 // m_row_sizes[1] = 6
92 // m_row_sizes[2] = 0
93 // m_row_sizes.size() = 3
94
95 // m_column_sizes[3] = 1
96 // m_column_sizes[0; 1; 2; 4; 5] = 2
97 // m_column_sizes.size() = 6
98 UniqueArray<Integer> m_row_sizes;
99 UniqueArray<Integer> m_column_sizes;
100
101 // Position of the last added element.
102 Integer m_last_row;
103 Integer m_last_column;
104};
105
106/*---------------------------------------------------------------------------*/
107/*---------------------------------------------------------------------------*/
108
109} // End namespace Arcane
110
111/*---------------------------------------------------------------------------*/
112/*---------------------------------------------------------------------------*/
113
114#endif
Declarations of types on entities.
Interface of the parallelism manager for a subdomain.
2D data vector with value semantics (STL style).
1D data vector with value semantics (STL style).
-- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature --
Int32 Integer
Type representing an integer.