Arcane  v4.1.10.0
Documentation utilisateur
Chargement...
Recherche...
Aucune correspondance
GeomShapeMng.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/* GeomShapeMng.cc (C) 2000-2026 */
9/* */
10/* Classe gérant les GeomShape d'un maillage. */
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13
14#include "arcane/core/IMesh.h"
15
16#include "arcane/geometry/GeomShapeMng.h"
17
18/*---------------------------------------------------------------------------*/
19/*---------------------------------------------------------------------------*/
20
21namespace Arcane::geometric
22{
23/*---------------------------------------------------------------------------*/
24/*---------------------------------------------------------------------------*/
25
27GeomShapeMng(IMesh* mesh,const String& cell_shape_name)
28: m_name(cell_shape_name)
29, m_cell_shape_nodes(VariableBuildInfo(mesh,cell_shape_name,IVariable::PNoDump))
30, m_cell_shape_faces(VariableBuildInfo(mesh,cell_shape_name+"Face",IVariable::PNoDump))
31, m_cell_shape_centers(VariableBuildInfo(mesh,cell_shape_name+"Center",IVariable::PNoDump))
32{
33}
34
35/*---------------------------------------------------------------------------*/
36/*---------------------------------------------------------------------------*/
37
40: m_name("GenericElement")
41, m_cell_shape_nodes(VariableBuildInfo(mesh,"GenericElement",IVariable::PNoDump))
42, m_cell_shape_faces(VariableBuildInfo(mesh,"GenericElementFace",IVariable::PNoDump))
43, m_cell_shape_centers(VariableBuildInfo(mesh,"GenericElementCenter",IVariable::PNoDump))
44{
45}
46
47/*---------------------------------------------------------------------------*/
48/*---------------------------------------------------------------------------*/
49
51GeomShapeMng(const GeomShapeMng& rhs)
52: m_name(rhs.m_name)
53, m_cell_shape_nodes(rhs.m_cell_shape_nodes)
54, m_cell_shape_faces(rhs.m_cell_shape_faces)
55, m_cell_shape_centers(rhs.m_cell_shape_centers)
56{
57}
58
59/*---------------------------------------------------------------------------*/
60/*---------------------------------------------------------------------------*/
61
62/*---------------------------------------------------------------------------*/
63/*---------------------------------------------------------------------------*/
64
67{
68 IMesh* mesh = m_cell_shape_nodes.variable()->meshHandle().mesh();
69 //TODO: il faut utiliser le globalConnectivity() de IItemFamily
70 // mais pour l'instant celui-ci n'est pas correctement calculé
71 // lors de l'init.
72 if (mesh->dimension()==2){
73 // En 2D, on n'a pas des mailles contenant plus de noeuds que les quads
74 m_cell_shape_nodes.resize(4);
75 //TODO: Verifier si on a besoin de cela.
76 m_cell_shape_faces.resize(4);
77 }
78 else{
79 m_cell_shape_nodes.resize(ItemStaticInfo::MAX_CELL_NODE);
80 m_cell_shape_faces.resize(ItemStaticInfo::MAX_CELL_FACE);
81 }
82}
83
84/*---------------------------------------------------------------------------*/
85/*---------------------------------------------------------------------------*/
86
87} // namespace Arcane::geometric
88
89/*---------------------------------------------------------------------------*/
90/*---------------------------------------------------------------------------*/
91
Interface d'une variable.
Definition IVariable.h:39
static const Integer MAX_CELL_FACE
Nombre maximum de faces par maille.
static const Integer MAX_CELL_NODE
Nombre maximum de noeuds par maille.
Chaîne de caractères unicode.
Paramètres nécessaires à la construction d'une variable.
GeomShapeMng(IMesh *mesh, const String &name)
Initialise pour le maillage mesh avec le nom name.
void initialize()
Initialise l'instance.