Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
ComponentItem.cc
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/* ComponentItem.cc (C) 2000-2024 */
9/* */
10/* Material and medium entities. */
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13
14#include "arcane/core/materials/ComponentItem.h"
15
16#include "arcane/utils/FatalErrorException.h"
17#include "arcane/utils/TraceInfo.h"
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane::Materials
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
28std::ostream&
29operator<<(std::ostream& o, const ComponentCell& mvi)
30{
32 o << x;
33 return o;
34}
35
36/*---------------------------------------------------------------------------*/
37/*---------------------------------------------------------------------------*/
38
39void ComponentCell::
40_badConversion(matimpl::ConstituentItemBase item_base, Int32 level, Int32 expected_level)
41{
42 ARCANE_FATAL("bad level for internal component cell level={0} expected={1} cid={2} component_id={3}",
43 level, expected_level, item_base.m_constituent_item_index, item_base.componentId());
44}
45
46/*---------------------------------------------------------------------------*/
47/*---------------------------------------------------------------------------*/
48
49} // End namespace Arcane::Materials
50
51/*---------------------------------------------------------------------------*/
52/*---------------------------------------------------------------------------*/
#define ARCANE_FATAL(...)
Macro throwing a FatalErrorException.
Index of a ConstituentItem in a variable.
friend std::ostream & operator<<(std::ostream &o, const ComponentCell &mvi)
Output operator.
__host__ __device__ Int32 level() const
Hierarchical level of the entity.
__host__ __device__ Int32 componentId() const
Component identifier.
Always enables tracing in Arcane parts concerning materials.
std::int32_t Int32
Signed integer type of 32 bits.