Arcane  v3.14.10.0
Documentation développeur
Chargement...
Recherche...
Aucune correspondance
VectorExpressionT.h
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/* VectorExpressionT.h (C) 2014 */
9/* */
10/* Virtual Vector to perform arithmetic operations. */
11/*---------------------------------------------------------------------------*/
12#ifndef ARCANE_VECTOR_EXPRESSION_H
13#define ARCANE_VECTOR_EXPRESSION_H
14/*---------------------------------------------------------------------------*/
15/*---------------------------------------------------------------------------*/
16
17//#include "arcane/ArcaneTypes.h"
18
19#include "fake.h"
20#include "IndexedSpace.h"
21
22/*---------------------------------------------------------------------------*/
23/*---------------------------------------------------------------------------*/
24
25ARCANE_BEGIN_NAMESPACE
26
27/*---------------------------------------------------------------------------*/
28/*---------------------------------------------------------------------------*/
29
30
35template <class V>
37{
38 public:
39
40 operator V&() { return *static_cast< V*>(this); }
41 operator V const&() const { return *static_cast<const V*>(this); }
42 /* ICC does not work with : */
43 /* operator V&() { return static_cast<V&>(*this); } */
44
45 Real operator[](int i) const {
46 return static_cast<V const&>(*this)[i]; }
47
48 const IndexedSpace& domain() const
49 { return static_cast<V const&>(*this).domain(); }
50
51 private:
52};
53
54
55
56/*---------------------------------------------------------------------------*/
57/*---------------------------------------------------------------------------*/
58
59ARCANE_END_NAMESPACE
60
61/*---------------------------------------------------------------------------*/
62/*---------------------------------------------------------------------------*/
63
64#endif // ARCANE_VECTOR_EXPRESSION_H
Indexed set/space to define matrix and vector support.
Lecteur des fichiers de maillage via la bibliothèque LIMA.
Definition Lima.cc:120
Class to inherite to perform matrix computations.