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