Arcane  4.1.12.0
User documentation
Loading...
Searching...
No Matches
MeshBlockBuildInfo.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/* MeshBlockBuildInfo.cc (C) 2000-2016 */
9/* */
10/* Information for creating a block. */
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13
14#include "arcane/utils/ArgumentException.h"
15#include "arcane/materials/MeshBlockBuildInfo.h"
16#include "arcane/materials/IMeshEnvironment.h"
17
18/*---------------------------------------------------------------------------*/
19/*---------------------------------------------------------------------------*/
20
21namespace Arcane::Materials
22{
23
24/*---------------------------------------------------------------------------*/
25/*---------------------------------------------------------------------------*/
26
29: m_name(name)
30, m_cells(cells)
31{
32}
33
34/*---------------------------------------------------------------------------*/
35/*---------------------------------------------------------------------------*/
36
37MeshBlockBuildInfo::
38~MeshBlockBuildInfo()
39{
40}
41
42/*---------------------------------------------------------------------------*/
43/*---------------------------------------------------------------------------*/
44
47{
48 if (m_environments.contains(env))
49 throw ArgumentException(A_FUNCINFO,
50 String::format("environment {0} already in block {1}",
51 env->name(), this->name()));
52 m_environments.add(env);
53}
54
55/*---------------------------------------------------------------------------*/
56/*---------------------------------------------------------------------------*/
57
58} // namespace Arcane::Materials
59
60/*---------------------------------------------------------------------------*/
61/*---------------------------------------------------------------------------*/
virtual String name() const =0
Component name.
const CellGroup & cells() const
List of block entities.
MeshBlockBuildInfo(const String &name, const CellGroup &cells)
Creates the information for a block named name on the cells cells.
const String & name() const
Block name.
void addEnvironment(IMeshEnvironment *env)
Brief: Adds the environment env to the block.
ItemGroupT< Cell > CellGroup
Group of cells.
Definition ItemTypes.h:184
Always enables tracing in Arcane parts concerning materials.