Arcane  v3.14.10.0
Documentation utilisateur
Chargement...
Recherche...
Aucune correspondance
MeshBlockBuildInfo.cc
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2022 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/* Informations pour la création d'un bloc. */
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
21/*---------------------------------------------------------------------------*/
22/*---------------------------------------------------------------------------*/
23
24ARCANE_BEGIN_NAMESPACE
25MATERIALS_BEGIN_NAMESPACE
26
27/*---------------------------------------------------------------------------*/
28/*---------------------------------------------------------------------------*/
29
30/*---------------------------------------------------------------------------*/
31/*---------------------------------------------------------------------------*/
32
33MeshBlockBuildInfo::
34MeshBlockBuildInfo(const String& name,const CellGroup& cells)
35: m_name(name)
36, m_cells(cells)
37{
38}
39
40/*---------------------------------------------------------------------------*/
41/*---------------------------------------------------------------------------*/
42
43MeshBlockBuildInfo::
44~MeshBlockBuildInfo()
45{
46}
47
48/*---------------------------------------------------------------------------*/
49/*---------------------------------------------------------------------------*/
50
53{
54 if (m_environments.contains(env))
55 throw ArgumentException(A_FUNCINFO,
56 String::format("environment {0} already in block {1}",
57 env->name(),this->name()));
58 m_environments.add(env);
59}
60
61/*---------------------------------------------------------------------------*/
62/*---------------------------------------------------------------------------*/
63
64MATERIALS_END_NAMESPACE
65ARCANE_END_NAMESPACE
66
67/*---------------------------------------------------------------------------*/
68/*---------------------------------------------------------------------------*/
virtual String name() const =0
Nom du composant.
void addEnvironment(IMeshEnvironment *env)
Ajoute le milieu env au bloc.
Exception lorsqu'un argument est invalide.
Chaîne de caractères unicode.