Arcane  v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
CartesianGridDimension.cc
1// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
2//-----------------------------------------------------------------------------
3// Copyright 2000-2023 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/* CartesianMeshDimension.cc (C) 2000-2023 */
9/* */
10/* Informations sur les dimensions d'un maillage cartésien. */
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13
14#include "arcane/core/CartesianGridDimension.h"
15
16#include "arcane/utils/Math.h"
17
18#include <iostream>
19#include <array>
20
21/*---------------------------------------------------------------------------*/
22/*---------------------------------------------------------------------------*/
23
24namespace Arcane
25{
26
27/*---------------------------------------------------------------------------*/
28/*---------------------------------------------------------------------------*/
29
30CartesianGridDimension::
31CartesianGridDimension(Int64 nb_cell_x, Int64 nb_cell_y, Int64 nb_cell_z)
32: m_nb_cell{ math::max(nb_cell_x, 0), math::max(nb_cell_y, 0), math::max(nb_cell_z, 0) }
33{
34 _init();
35}
36
37/*---------------------------------------------------------------------------*/
38/*---------------------------------------------------------------------------*/
39
40CartesianGridDimension::
41CartesianGridDimension(Int64 nb_cell_x, Int64 nb_cell_y)
43{
44}
45
46/*---------------------------------------------------------------------------*/
47/*---------------------------------------------------------------------------*/
48
49CartesianGridDimension::
50CartesianGridDimension(const Int64x2& dims)
52{
53}
54
55/*---------------------------------------------------------------------------*/
56/*---------------------------------------------------------------------------*/
57
58CartesianGridDimension::
59CartesianGridDimension(const Int64x3& dims)
61{
62}
63
64/*---------------------------------------------------------------------------*/
65/*---------------------------------------------------------------------------*/
66
67CartesianGridDimension::
68CartesianGridDimension(const Int32x2& dims)
70{
71}
72
73/*---------------------------------------------------------------------------*/
74/*---------------------------------------------------------------------------*/
75
76CartesianGridDimension::
77CartesianGridDimension(const Int32x3& dims)
79{
80}
81
82/*---------------------------------------------------------------------------*/
83/*---------------------------------------------------------------------------*/
84
85void CartesianGridDimension::
86_init()
87{
88 const bool is_dim3 = (m_nb_cell.z > 0);
89 const bool is_dim2_or_3 = is_dim3 || (m_nb_cell.y > 0);
90
91 m_nb_face.x = m_nb_cell.x + 1;
92 m_nb_node.x = m_nb_cell.x + 1;
93 if (is_dim2_or_3) {
94 m_nb_face.y = m_nb_cell.y + 1;
95 m_nb_node.y = m_nb_cell.y + 1;
96 }
97 if (is_dim3) {
98 m_nb_face.z = m_nb_cell.z + 1;
99 m_nb_node.z = m_nb_cell.z + 1;
100 }
101
105
106 m_nb_cell_xy = m_nb_cell.x * m_nb_cell.y;
107 m_total_nb_cell = m_nb_cell_xy;
108 if (is_dim3)
109 m_total_nb_cell *= m_nb_cell.z;
110}
111
112/*---------------------------------------------------------------------------*/
113/*---------------------------------------------------------------------------*/
114
115} // namespace Arcane
116
117/*---------------------------------------------------------------------------*/
118/*---------------------------------------------------------------------------*/
Informations sur les dimensions d'une grille cartésienne.
Int64x3 m_nb_node
Nombre de noeuds dans chaque direction.
Int64x3 m_nb_cell
Nombre de mailles dans chaque direction.
Int64x3 m_nb_face_oriented
Nombre total de faces dans une orientation donnée.
Int64x3 m_nb_face
Nombre de faces dans chaque direction.
Lecteur des fichiers de maillage via la bibliothèque LIMA.
Definition Lima.cc:120
Classe gérant un vecteur de dimension 2 de type T.
Definition Vector2.h:36
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-