TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
TRUSTTabFT.h
1/****************************************************************************
2* Copyright (c) 2022, CEA
3* All rights reserved.
4*
5* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
6* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
8* 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
9*
10* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
11* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
12* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13*
14*****************************************************************************/
15
16#ifndef TRUSTTabFT_included
17#define TRUSTTabFT_included
18
19#include <TRUSTTab.h>
20
21// Pour Front-Tracking !!
22
23template<typename _TYPE_>
24class TRUSTTabFT : public TRUSTTab<_TYPE_>
25{
26public:
27
29
30 TRUSTTabFT(const TRUSTTabFT&) = default;
31
32 TRUSTTabFT(int i, int j)
33 {
35 }
36
41
43 {
45 return *this;
46 }
47
49 {
51 return *this;
52 }
53
54 TRUSTTabFT& operator=(const double x)
55 {
57 return *this;
58 }
59};
60
61using IntTabFT = TRUSTTabFT<int>;
62using DoubleTabFT = TRUSTTabFT<double>;
63
64template<typename _TYPE_>
65class TRUSTArrayFT : public TRUSTArray<_TYPE_>
66{
67public:
69 inline TRUSTArrayFT(const TRUSTArrayFT& x);
70
75
77 {
79 return *this;
80 }
81
82 // pour double seulement
84
85 // pour int seulement
88};
89
90using ArrOfIntFT = TRUSTArrayFT<int>;
91using ArrOfDoubleFT = TRUSTArrayFT<double>;
92
93/// \cond DO_NOT_DOCUMENT
94template<>
95inline TRUSTArrayFT<int>::TRUSTArrayFT(const TRUSTArrayFT<int>& x) = default;
96
97template<>
99{
101}
102
103// pour double seulement
104template<>
105inline TRUSTArrayFT<int>::TRUSTArrayFT(const TRUSTArray<int>& x) = delete;
106
107template<>
109{
111}
112
113// pour int seulement
114template<>
116
117template<>
119{
121 return *this;
122}
123
124template<>
126
127template<>
129{
131 return *this;
132}
133/// \endcond
134#endif /* TRUSTTabFT_included */
TRUSTArrayFT & operator=(_TYPE_ i)
Definition TRUSTTabFT.h:76
TRUSTArrayFT(const TRUSTArray< _TYPE_ > &x)
TRUSTArrayFT(const TRUSTArrayFT &x)
TRUSTArrayFT & operator=(const TRUSTArrayFT &x)
TRUSTArrayFT(int n)
Definition TRUSTTabFT.h:71
TRUSTArrayFT & operator=(const TRUSTArray< _TYPE_ > &x)
Represents a an array of int/int64/double/... values.
Definition TRUSTArray.h:81
void resize_array(_SIZE_ new_size, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT)
TRUSTArray & operator=(const TRUSTArray &)
friend class TRUSTArray
Definition TRUSTArray.h:108
TRUSTTabFT(int i, int j)
Definition TRUSTTabFT.h:32
TRUSTTabFT & operator=(const double x)
Definition TRUSTTabFT.h:54
TRUSTTabFT(const TRUSTTabFT &)=default
TRUSTTabFT & operator=(const TRUSTTabFT &x)
Definition TRUSTTabFT.h:48
TRUSTTabFT(const TRUSTTab< _TYPE_ > &x)
Definition TRUSTTabFT.h:37
TRUSTTabFT & operator=(const TRUSTTab< _TYPE_ > &x)
Definition TRUSTTabFT.h:42
friend class TRUSTTab
Definition TRUSTTab.h:112
void resize(_SIZE_ n, RESIZE_OPTIONS opt=RESIZE_OPTIONS::COPY_INIT)
Definition TRUSTTab.tpp:469
TRUSTTab & operator=(const TRUSTTab &)
Definition TRUSTTab.tpp:578