"src/TNL/gitlab@mmg-gitlab.fjfi.cvut.cz:tnl/tnl-dev.git" did not exist on "9b72926e8f6bd72fa5dea6da6f068941806169a3"
Newer
Older
/***************************************************************************
tnlGridEntity_impl.h - description
-------------------
begin : Nov 20, 2015
copyright : (C) 2015 by Tomas Oberhuber
email : tomas.oberhuber@fjfi.cvut.cz
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef TNLGRIDENTITY_IMPL_H
#define TNLGRIDENTITY_IMPL_H
#include "tnlGridEntity.h"
template< typename Grid,
int EntityDimensions >
tnlGridEntity< Grid, EntityDimensions >::
tnlGridEntity()
: coordinates( 0 ),
orientation( 0 ),
basis( 0 )
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
{
}
template< typename Grid,
int EntityDimensions >
tnlGridEntity< Grid, EntityDimensions >::
tnlGridEntity( const CoordinatesType& coordinates,
const EntityOrientationType& orientation,
const EntityBasisType& basis )
: coordinates( coordinates ),
orientation( orientation ),
basis( basis )
{
}
template< typename Grid,
int EntityDimensions >
const typename tnlGridEntity< Grid, EntityDimensions >::CoordinatesType&
tnlGridEntity< Grid, EntityDimensions >::
getCoordinates() const
{
return this->coordinates;
}
template< typename Grid,
int EntityDimensions >
typename tnlGridEntity< Grid, EntityDimensions >::CoordinatesType&
tnlGridEntity< Grid, EntityDimensions >::
getCoordinates()
{
return this->coordinates;
}
template< typename Grid,
int EntityDimensions >
const typename tnlGridEntity< Grid, EntityDimensions >::EntityOrientationType&
tnlGridEntity< Grid, EntityDimensions >::
getOrientation() const
{
return this->orientation;
}
template< typename Grid,
int EntityDimensions >
void
tnlGridEntity< Grid, EntityDimensions >::
setOrientation( const EntityOrientationType& orientation )
{
this->orientation = orientation;
this->basis = EntityBasisType( 1 ) - tnlAbs( orientation );
}
template< typename Grid,
int EntityDimensions >
const typename tnlGridEntity< Grid, EntityDimensions >::EntityBasisType&
tnlGridEntity< Grid, EntityDimensions >::
getBasis() const
{
return this->basis;
this->orientation = EntityOrientationType( 1 ) - tnlAbs( basis );
}
template< typename Grid,
int EntityDimensions >
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
setBasis( const EntityBasisType& basis )
{
this->basis = basis;
}
/****
* Specialization for cells
*/
template< int Dimensions,
typename Real,
typename Device,
typename Index >
tnlGridEntity< tnlGrid< Dimensions, Real, Device, Index >, Dimensions >::
tnlGridEntity()
: coordinates( 0 ),
orientation( 0 ),
basis( 1 )
{
}
template< int Dimensions,
typename Real,
typename Device,
typename Index >
tnlGridEntity< tnlGrid< Dimensions, Real, Device, Index >, Dimensions >::
tnlGridEntity( const CoordinatesType& coordinates )
: coordinates( coordinates )
{
}
template< int Dimensions,
typename Real,
typename Device,
typename Index >
const typename tnlGridEntity< tnlGrid< Dimensions, Real, Device, Index >, Dimensions >::CoordinatesType&
tnlGridEntity< tnlGrid< Dimensions, Real, Device, Index >, Dimensions >::
getCoordinates() const
{
return this->coordinates;
}
template< int Dimensions,
typename Real,
typename Device,
typename Index >
typename tnlGridEntity< tnlGrid< Dimensions, Real, Device, Index >, Dimensions >::CoordinatesType&
tnlGridEntity< tnlGrid< Dimensions, Real, Device, Index >, Dimensions >::
getCoordinates()
{
return this->coordinates;
}
template< int Dimensions,
typename Real,
typename Device,
typename Index >
const typename tnlGridEntity< tnlGrid< Dimensions, Real, Device, Index >, Dimensions >::EntityOrientationType&
tnlGridEntity< tnlGrid< Dimensions, Real, Device, Index >, Dimensions >::
getOrientation() const
{
return this->orientation;
}
template< int Dimensions,
typename Real,
typename Device,
typename Index >
const typename tnlGridEntity< tnlGrid< Dimensions, Real, Device, Index >, Dimensions >::EntityBasisType&
tnlGridEntity< tnlGrid< Dimensions, Real, Device, Index >, Dimensions >::
getBasis() const
/****
* Specialization for vertices
*/
template< int Dimensions,
typename Real,
typename Device,
typename Index >
tnlGridEntity< tnlGrid< Dimensions, Real, Device, Index >, 0 >::
tnlGridEntity()
: coordinates( 0 ),
orientation( 1 ),
basis( 0 )
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
template< int Dimensions,
typename Real,
typename Device,
typename Index >
tnlGridEntity< tnlGrid< Dimensions, Real, Device, Index >, 0 >::
tnlGridEntity( const CoordinatesType& coordinates )
: coordinates( coordinates )
{
}
template< int Dimensions,
typename Real,
typename Device,
typename Index >
const typename tnlGridEntity< tnlGrid< Dimensions, Real, Device, Index >, 0 >::CoordinatesType&
tnlGridEntity< tnlGrid< Dimensions, Real, Device, Index >, 0 >::
getCoordinates() const
{
return this->coordinates;
}
template< int Dimensions,
typename Real,
typename Device,
typename Index >
typename tnlGridEntity< tnlGrid< Dimensions, Real, Device, Index >, 0 >::CoordinatesType&
tnlGridEntity< tnlGrid< Dimensions, Real, Device, Index >, 0 >::
getCoordinates()
{
return this->coordinates;
}
template< int Dimensions,
typename Real,
typename Device,
typename Index >
const typename tnlGridEntity< tnlGrid< Dimensions, Real, Device, Index >, 0 >::EntityOrientationType&
tnlGridEntity< tnlGrid< Dimensions, Real, Device, Index >, 0 >::
getOrientation() const
{
return this->orientation;
}
template< int Dimensions,
typename Real,
typename Device,
typename Index >
const typename tnlGridEntity< tnlGrid< Dimensions, Real, Device, Index >, 0 >::EntityBasisType&
tnlGridEntity< tnlGrid< Dimensions, Real, Device, Index >, 0 >::
getBasis() const
{
return this->basis;
}