Arcane  v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
Real3.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/* Real3.cc (C) 2000-2023 */
9/* */
10/* Vecteur à 3 dimensions. */
11/*---------------------------------------------------------------------------*/
12/*---------------------------------------------------------------------------*/
13
14#include "arcane/utils/Real3.h"
15
16#include "arcane/utils/Iostream.h"
17#include "arcane/utils/Real3Proxy.h"
18
19/*---------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22namespace Arcane
23{
24
25/*---------------------------------------------------------------------------*/
26/*---------------------------------------------------------------------------*/
27
28std::istream& Real3::
29assign(std::istream& i)
30{
31 i >> x >> ws >> y >> ws >> z;
32 return i;
33}
34
35/*---------------------------------------------------------------------------*/
36/*---------------------------------------------------------------------------*/
37
38std::ostream& Real3::
39print(std::ostream& o) const
40{
41 o << x << ' ' << y << ' ' << z;
42 return o;
43}
44
45/*---------------------------------------------------------------------------*/
46/*---------------------------------------------------------------------------*/
47
48std::ostream& Real3::
49printXyz(std::ostream& o) const
50{
51 o << '(' << x << ',' << y << ',' << z << ')';
52 return o;
53}
54
55/*---------------------------------------------------------------------------*/
56/*---------------------------------------------------------------------------*/
57
58/*---------------------------------------------------------------------------*/
59/*---------------------------------------------------------------------------*/
60
61std::istream& Real3Proxy::
62assign(std::istream& i)
63{
64 // TODO marquer acces
65 return m_value.assign(i);
66}
67
68/*---------------------------------------------------------------------------*/
69/*---------------------------------------------------------------------------*/
70
71std::ostream& Real3Proxy::
72print(std::ostream& o) const
73{
74 return getValue().print(o);
75}
76
77/*---------------------------------------------------------------------------*/
78/*---------------------------------------------------------------------------*/
79
80std::ostream& Real3Proxy::
81printXyz(std::ostream& o) const
82{
83 return getValue().printXyz(o);
84}
85
86/*---------------------------------------------------------------------------*/
87/*---------------------------------------------------------------------------*/
88
89} // namespace Arcane
90
91/*---------------------------------------------------------------------------*/
92/*---------------------------------------------------------------------------*/
Real3Proxy & assign(Real ax, Real ay, Real az)
Affecte à l'instance le triplet (ax,ay,az)
Definition Real3Proxy.h:79
std::ostream & printXyz(std::ostream &o) const
Ecrit le triplet sur le flot o sous la forme (x,y,z)
Definition Real3.cc:81
std::ostream & print(std::ostream &o) const
Ecrit le triplet sur le flot o lisible par un assign()
Definition Real3.cc:72
std::ostream & print(std::ostream &o) const
Ecrit le triplet sur le flot o lisible par un assign()
Definition Real3.cc:39
constexpr ARCCORE_HOST_DEVICE Real3 & assign(Real ax, Real ay, Real az)
Affecte à l'instance le triplet (ax,ay,az)
Definition Real3.h:204
std::ostream & printXyz(std::ostream &o) const
Ecrit le triplet sur le flot o sous la forme (x,y,z)
Definition Real3.cc:49
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
Real y
deuxième composante du triplet
Definition Real3.h:36
Real z
troisième composante du triplet
Definition Real3.h:37
Real x
première composante du triplet
Definition Real3.h:35