v0.15.5
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Static Private Member Functions | Static Private Attributes | List of all members
LieGroups::SO3 Struct Reference

SO3. More...

#include "src/ftensor/src/Lie.hpp"

Collaboration diagram for LieGroups::SO3:
[legend]

Public Member Functions

 SO3 ()=delete
 
 ~SO3 ()=delete
 

Static Public Member Functions

template<typename T >
static auto getVee (T &&w1, T &&w2, T &&w3)
 
template<typename T >
static auto getHat (T &&w1, T &&w2, T &&w3)
 
template<typename A >
static auto getVee (A &&t_w_hat)
 
template<typename A >
static auto getHat (A &&t_w_vee)
 
template<typename A , typename B >
static auto exp (A &&t_w_vee, B &&theta)
 
template<typename A , typename B >
static auto Jl (A &&t_w_vee, B &&theta)
 
template<typename A , typename B >
static auto Jr (A &&t_w_vee, B &&theta)
 
template<typename A , typename B , typename C >
static auto action (A &&t_w_vee, B &&theta, C &&t_A)
 
template<typename A , typename B >
static auto dActionJl (A &&t_w_vee, B &&t_A)
 
template<typename A , typename B >
static auto dActionJr (A &&t_w_vee, B &&t_A)
 
template<typename A , typename B >
static auto diffJl (A &&t_w_vee, B &&theta)
 
template<typename A , typename B >
static auto diffJr (A &&t_w_vee, B &&theta)
 
template<typename A , typename B >
static auto diffExp (A &&t_w_vee, B &&theta)
 
template<typename A , typename B >
static auto diffDiffExp (A &&t_w_vee, B &&theta)
 
template<typename T1 , typename T2 , typename T3 >
static auto materialSpin (T1 &&t_w_vee, T2 theta, T3 &&t_delta_w_vee)
 
template<typename T1 , typename T2 , typename T3 >
static auto materialSpinHat (T1 &&t_w_vee, T2 theta, T3 &&t_delta_w_vee)
 
template<typename T1 , typename T2 , typename T3 >
static auto deltaR (T1 &&t_w_vee, T2 theta, T3 &&t_A_hat)
 

Static Private Member Functions

static FTENSOR_INDEX (dim, i)
 
static FTENSOR_INDEX (dim, j)
 
static FTENSOR_INDEX (dim, k)
 
static FTENSOR_INDEX (dim, l)
 
static FTENSOR_INDEX (dim, m)
 
static FTENSOR_INDEX (dim, n)
 
template<typename T >
static auto getVeeImpl (const FTensor::Tensor2< T, dim, dim > &t_w_hat)
 
template<typename T >
static auto getHatImpl (const FTensor::Tensor1< T, dim > &t_w_vee)
 
template<typename T1 , typename T2 , typename T3 >
static auto genericFormImpl (const FTensor::Tensor1< T1, dim > &t_w_vee, const T2 alpha, const T3 beta)
 
template<typename T1 , typename T2 >
static auto expImpl (const FTensor::Tensor1< T1, dim > &t_w_vee, const T2 theta)
 
template<typename T1 , typename T2 >
static auto diffExpImpl (const FTensor::Tensor1< T1, dim > &t_w_vee, const T2 theta)
 
template<typename T1 , typename T2 >
static auto diffDiffExpImpl (const FTensor::Tensor1< T1, dim > &t_w_vee, const T2 theta)
 
template<typename T1 , typename T2 >
static auto JlImpl (const FTensor::Tensor1< T1, dim > &t_w_vee, const T2 &theta)
 
template<typename T1 , typename T2 >
static auto JrImpl (const FTensor::Tensor1< T1, dim > &t_w_vee, const T2 theta)
 
template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 >
static auto genericDiffFormImpl (const FTensor::Tensor1< T1, dim > &t_w_vee, const T2 alpha, const T3 diff_alpha, const T4 beta, const T5 diff_beta)
 
template<typename T1 , typename T2 >
static auto diffJlImpl (const FTensor::Tensor1< T1, dim > &t_w_vee, const T2 theta)
 
template<typename T1 , typename T2 , typename T3 >
static auto actionImpl (const FTensor::Tensor1< T1, dim > &t_w_vee, const T2 theta, const FTensor::Tensor2_symmetric< T3, dim > &t_A)
 
template<typename T1 , typename T2 , typename T3 >
static auto materialSpinImpl (const FTensor::Tensor1< T1, dim > &t_w_vee, const T2 theta, const FTensor::Tensor1< T3, dim > &t_delta_w_vee)
 
template<typename T1 , typename T2 , typename T3 >
static auto materialSpinHatImpl (const FTensor::Tensor1< T1, dim > &t_w_vee, const T2 theta, const FTensor::Tensor1< T3, dim > &t_delta_w_vee)
 
template<typename T1 , typename T2 , typename T3 >
static auto deltaRImpl (const FTensor::Tensor1< T1, dim > &t_w_vee, const T2 theta, const FTensor::Tensor2< T3, dim, dim > &t_A_hat)
 
template<typename T1 , typename T2 , typename T3 >
static auto deltaRImpl (const FTensor::Tensor1< T1, dim > &t_w_vee, const T2 theta, const FTensor::Tensor1< T3, dim > &t_delta_w_vee)
 

Static Private Attributes

static constexpr int dim = 3
 

Detailed Description

SO3.

Note that: theta == norm(t_w_vee), and t_w_hat is the skew-symmetric matrix corresponding to t_w_vee.

Definition at line 35 of file Lie.hpp.

Constructor & Destructor Documentation

◆ SO3()

LieGroups::SO3::SO3 ( )
delete

◆ ~SO3()

LieGroups::SO3::~SO3 ( )
delete

Member Function Documentation

◆ action()

template<typename A , typename B , typename C >
static auto LieGroups::SO3::action ( A &&  t_w_vee,
B &&  theta,
C &&  t_A 
)
inlinestatic

Definition at line 78 of file Lie.hpp.

78 {
79 return actionImpl(std::forward<A>(t_w_vee), std::forward<B>(theta),
80 std::forward<C>(t_A));
81 }
static auto actionImpl(const FTensor::Tensor1< T1, dim > &t_w_vee, const T2 theta, const FTensor::Tensor2_symmetric< T3, dim > &t_A)
Definition Lie.hpp:424

◆ actionImpl()

template<typename T1 , typename T2 , typename T3 >
static auto LieGroups::SO3::actionImpl ( const FTensor::Tensor1< T1, dim > &  t_w_vee,
const T2  theta,
const FTensor::Tensor2_symmetric< T3, dim > &  t_A 
)
inlinestaticprivate

Definition at line 424 of file Lie.hpp.

425 {
426 using D = typename TensorTypeExtractor<T3>::Type;
428 t_B(i, j) = exp(t_w_vee, theta)(i, k) * t_A(k, j);
429 return t_B;
430 }
FTensor::Index< 'i', SPACE_DIM > i
double D
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k
static auto exp(A &&t_w_vee, B &&theta)
Definition Lie.hpp:63
std::remove_cv_t< std::remove_reference_t< std::remove_pointer_t< std::remove_cv_t< std::remove_reference_t< T > > > > > Type
Definition Lie.hpp:17

◆ dActionJl()

template<typename A , typename B >
static auto LieGroups::SO3::dActionJl ( A &&  t_w_vee,
B &&  t_A 
)
inlinestatic

Definition at line 84 of file Lie.hpp.

84 {
85 return dActionJlImpl(std::forward<A>(t_w_vee), std::forward<B>(t_A));
86 }

◆ dActionJr()

template<typename A , typename B >
static auto LieGroups::SO3::dActionJr ( A &&  t_w_vee,
B &&  t_A 
)
inlinestatic

Definition at line 89 of file Lie.hpp.

89 {
90 return dActionJrImpl(std::forward<A>(t_w_vee), std::forward<B>(t_A));
91 }

◆ deltaR()

template<typename T1 , typename T2 , typename T3 >
static auto LieGroups::SO3::deltaR ( T1 &&  t_w_vee,
T2  theta,
T3 &&  t_A_hat 
)
inlinestatic

Definition at line 130 of file Lie.hpp.

130 {
131 return deltaRImpl(std::forward<T1>(t_w_vee), theta,
132 std::forward<T3>(t_A_hat));
133 }
static auto deltaRImpl(const FTensor::Tensor1< T1, dim > &t_w_vee, const T2 theta, const FTensor::Tensor2< T3, dim, dim > &t_A_hat)
Definition Lie.hpp:453

◆ deltaRImpl() [1/2]

template<typename T1 , typename T2 , typename T3 >
static auto LieGroups::SO3::deltaRImpl ( const FTensor::Tensor1< T1, dim > &  t_w_vee,
const T2  theta,
const FTensor::Tensor1< T3, dim > &  t_delta_w_vee 
)
inlinestaticprivate

Definition at line 466 of file Lie.hpp.

468 {
469 auto t_A_hat = materialSpinHatImpl(t_w_vee, theta, t_delta_w_vee);
470 return deltaRImpl(t_w_vee, theta, t_A_hat);
471 }
static auto materialSpinHatImpl(const FTensor::Tensor1< T1, dim > &t_w_vee, const T2 theta, const FTensor::Tensor1< T3, dim > &t_delta_w_vee)
Definition Lie.hpp:445

◆ deltaRImpl() [2/2]

template<typename T1 , typename T2 , typename T3 >
static auto LieGroups::SO3::deltaRImpl ( const FTensor::Tensor1< T1, dim > &  t_w_vee,
const T2  theta,
const FTensor::Tensor2< T3, dim, dim > &  t_A_hat 
)
inlinestaticprivate

Definition at line 453 of file Lie.hpp.

455 {
456 using D = typename TensorTypeExtractor<T1>::Type;
458 auto t_R = exp(t_w_vee, theta);
459 t_delta_R(i, j) = t_R(i, k) * t_A_hat(k, j);
460 return t_delta_R;
461 }

◆ diffDiffExp()

template<typename A , typename B >
static auto LieGroups::SO3::diffDiffExp ( A &&  t_w_vee,
B &&  theta 
)
inlinestatic

Definition at line 109 of file Lie.hpp.

109 {
110 return diffDiffExpImpl(std::forward<A>(t_w_vee), std::forward<B>(theta));
111 }
static auto diffDiffExpImpl(const FTensor::Tensor1< T1, dim > &t_w_vee, const T2 theta)
Definition Lie.hpp:238

◆ diffDiffExpImpl()

template<typename T1 , typename T2 >
static auto LieGroups::SO3::diffDiffExpImpl ( const FTensor::Tensor1< T1, dim > &  t_w_vee,
const T2  theta 
)
inlinestaticprivate

Definition at line 238 of file Lie.hpp.

239 {
240
241 auto get_tensor = [&t_w_vee](auto a, auto diff_a, auto diff_diff_a, auto b,
242 auto diff_b, auto diff_diff_b) {
243 FTENSOR_INDEX(3, i);
244 FTENSOR_INDEX(3, j);
245 FTENSOR_INDEX(3, k);
246 FTENSOR_INDEX(3, l);
247 FTENSOR_INDEX(3, m);
248
249 constexpr auto t_kd = FTensor::Kronecker_Delta<double>();
250
251 using D = typename TensorTypeExtractor<T1>::Type;
252 FTensor::Tensor4<D, 3, 3, 3, 3> t_diff_diff_exp;
253
254 auto t_hat = getHat(t_w_vee);
255 t_diff_diff_exp(i, j, k, m) =
256
257 diff_a * FTensor::levi_civita<int>(i, j, k) * t_w_vee(m)
258
259 +
260
261 diff_a * (
262
263 t_hat(i, j) * t_kd(k, m) +
264 FTensor::levi_civita<int>(i, j, m) * t_w_vee(k)
265
266 )
267
268 +
269
270 diff_diff_a * t_hat(i, j) * t_w_vee(k) * t_w_vee(m)
271
272 +
273
274 b * (FTensor::levi_civita<int>(i, l, m) *
275 FTensor::levi_civita<int>(l, j, k) +
276 FTensor::levi_civita<int>(i, l, k) *
277 FTensor::levi_civita<int>(l, j, m))
278
279 +
280
281 diff_b * ((t_hat(i, l) * FTensor::levi_civita<int>(l, j, k) +
282 FTensor::levi_civita<int>(i, l, k) * t_hat(l, j)) *
283 t_w_vee(m))
284
285 +
286
287 diff_b *
288 (
289
290 t_hat(i, l) * t_hat(l, j) * t_kd(k, m)
291
292 +
293
294 FTensor::levi_civita<int>(i, l, m) * t_hat(l, j) * t_w_vee(k)
295
296 +
297
298 t_hat(i, l) * FTensor::levi_civita<int>(l, j, m) * t_w_vee(k)
299
300 )
301
302 +
303
304 diff_diff_b * t_hat(i, l) * t_hat(l, j) * t_w_vee(k) * t_w_vee(m);
305
306 return t_diff_diff_exp;
307 };
308
309 if (fabs(theta) < std::numeric_limits<T2>::epsilon()) {
310 return get_tensor(1., -1. / 3., 1. / 15, 1. / 2, -1. / 12, 1. / 90);
311 }
312
313 const auto ss = sin(theta);
314 const auto a = ss / theta;
315
316 const auto theta2 = theta * theta;
317 const auto cc = cos(theta);
318 const auto diff_a = (theta * cc - ss) / (theta2 * theta);
319 const auto diff_diff_a =
320 (3. * ss - 3. * theta * cc - theta2 * ss) / (theta2 * theta2 * theta);
321
322 const auto ss_2 = sin(theta / 2.);
323 const auto cc_2 = cos(theta / 2.);
324 const auto b = 2. * ss_2 * ss_2 / theta2;
325 const auto diff_b = (-2 + 2 * cc + theta * ss) / (theta2 * theta2);
326 const auto diff_diff_b = (theta2 * cc - 5. * theta * ss - 8. * cc + 8.) /
327 (theta2 * theta2 * theta2);
328
329 return get_tensor(a, diff_a, diff_diff_a, b, diff_b, diff_diff_b);
330 }
#define FTENSOR_INDEX(DIM, I)
constexpr double a
Kronecker Delta class.
constexpr auto t_kd
FTensor::Index< 'l', 3 > l
FTensor::Index< 'm', 3 > m
static auto getHat(T &&w1, T &&w2, T &&w3)
Definition Lie.hpp:48

◆ diffExp()

template<typename A , typename B >
static auto LieGroups::SO3::diffExp ( A &&  t_w_vee,
B &&  theta 
)
inlinestatic
Examples
mofem/users_modules/eshelbian_plasticity/src/impl/EshelbianOperators.cpp.

Definition at line 104 of file Lie.hpp.

104 {
105 return diffExpImpl(std::forward<A>(t_w_vee), std::forward<B>(theta));
106 }
static auto diffExpImpl(const FTensor::Tensor1< T1, dim > &t_w_vee, const T2 theta)
Definition Lie.hpp:186

◆ diffExpImpl()

template<typename T1 , typename T2 >
static auto LieGroups::SO3::diffExpImpl ( const FTensor::Tensor1< T1, dim > &  t_w_vee,
const T2  theta 
)
inlinestaticprivate

Definition at line 186 of file Lie.hpp.

187 {
188
189 auto get_tensor = [&t_w_vee](auto a, auto diff_a, auto b, auto diff_b) {
190 FTENSOR_INDEX(3, i);
191 FTENSOR_INDEX(3, j);
192 FTENSOR_INDEX(3, k);
193 FTENSOR_INDEX(3, l);
194
195 using D = typename TensorTypeExtractor<T1>::Type;
197 auto t_hat = getHat(t_w_vee);
198 t_diff_exp(i, j, k) =
199
200 a * FTensor::levi_civita<int>(i, j, k)
201
202 +
203
204 diff_a * t_hat(i, j) * t_w_vee(k)
205
206 +
207
208 b * (t_hat(i, l) * FTensor::levi_civita<int>(l, j, k) +
209 FTensor::levi_civita<int>(i, l, k) * t_hat(l, j))
210
211 +
212
213 diff_b * t_hat(i, l) * t_hat(l, j) * t_w_vee(k);
214
215 return t_diff_exp;
216 };
217
218 if (fabs(theta) < std::numeric_limits<T2>::epsilon()) {
219 return get_tensor(1., -1. / 3., 1. / 2., -1. / 12);
220 }
221
222 const auto ss = sin(theta);
223 const auto a = ss / theta;
224
225 const auto theta2 = theta * theta;
226 const auto cc = cos(theta);
227 const auto diff_a = (theta * cc - ss) / (theta2 * theta);
228
229 const auto ss_2 = sin(theta / 2.);
230 // const auto cc_2 = cos(theta / 2.);
231 const auto b = 2. * ss_2 * ss_2 / theta2;
232 const auto diff_b = (-2 + 2 * cc + theta * ss) / (theta2 * theta2);
233
234 return get_tensor(a, diff_a, b, diff_b);
235 }

◆ diffJl()

template<typename A , typename B >
static auto LieGroups::SO3::diffJl ( A &&  t_w_vee,
B &&  theta 
)
inlinestatic

Definition at line 94 of file Lie.hpp.

94 {
95 return diffJlImpl(std::forward<A>(t_w_vee), std::forward<B>(theta));
96 }
static auto diffJlImpl(const FTensor::Tensor1< T1, dim > &t_w_vee, const T2 theta)
Definition Lie.hpp:394

◆ diffJlImpl()

template<typename T1 , typename T2 >
static auto LieGroups::SO3::diffJlImpl ( const FTensor::Tensor1< T1, dim > &  t_w_vee,
const T2  theta 
)
inlinestaticprivate

Definition at line 394 of file Lie.hpp.

395 {
396 if (fabs(theta) < std::numeric_limits<T2>::epsilon()) {
397 // Taylor:
398 // a = 1/2 - theta^2/24 + ...
399 // diff_a = -1/12 + theta^2/180 + ...
400 // b = 1/6 - theta^2/120 + ...
401 // diff_b = -1/60 + theta^2/1260 + ...
402 return genericDiffFormImpl(t_w_vee, 0.5, -1. / 12., 1. / 6., -1. / 60.);
403 }
404
405 const auto s = sin(theta);
406 const auto c = cos(theta);
407
408 const auto theta2 = theta * theta;
409 const auto theta4 = theta2 * theta2;
410 const auto theta5 = theta4 * theta;
411
412 // Jl = I + a * hat + b * hat^2
413 const auto a = (1. - c) / theta2;
414 const auto diff_a = (theta * s + 2. * c - 2.) / theta4;
415
416 const auto b = (theta - s) / (theta2 * theta);
417 const auto diff_b = (3. * s - theta * c - 2. * theta) / theta5;
418
419 return genericDiffFormImpl(t_w_vee, a, diff_a, b, diff_b);
420 }
const double c
speed of light (cm/ns)
static auto genericDiffFormImpl(const FTensor::Tensor1< T1, dim > &t_w_vee, const T2 alpha, const T3 diff_alpha, const T4 beta, const T5 diff_beta)
Definition Lie.hpp:361

◆ diffJr()

template<typename A , typename B >
static auto LieGroups::SO3::diffJr ( A &&  t_w_vee,
B &&  theta 
)
inlinestatic

Definition at line 99 of file Lie.hpp.

99 {
100 return diffJrImpl(std::forward<A>(t_w_vee), std::forward<B>(theta));
101 }

◆ exp()

template<typename A , typename B >
static auto LieGroups::SO3::exp ( A &&  t_w_vee,
B &&  theta 
)
inlinestatic
Examples
mofem/users_modules/eshelbian_plasticity/src/impl/EshelbianOperators.cpp.

Definition at line 63 of file Lie.hpp.

63 {
64 return expImpl(std::forward<A>(t_w_vee), std::forward<B>(theta));
65 }
static auto expImpl(const FTensor::Tensor1< T1, dim > &t_w_vee, const T2 theta)
Definition Lie.hpp:173

◆ expImpl()

template<typename T1 , typename T2 >
static auto LieGroups::SO3::expImpl ( const FTensor::Tensor1< T1, dim > &  t_w_vee,
const T2  theta 
)
inlinestaticprivate

Definition at line 173 of file Lie.hpp.

174 {
175 if (fabs(theta) < std::numeric_limits<T2>::epsilon()) {
176 return genericFormImpl(t_w_vee, 1, 0.5);
177 }
178 const auto s = sin(theta);
179 const auto s_half = sin(theta / 2);
180 const auto a = s / theta;
181 const auto b = 2 * (s_half / theta) * (s_half / theta);
182 return genericFormImpl(t_w_vee, a, b);
183 }
static auto genericFormImpl(const FTensor::Tensor1< T1, dim > &t_w_vee, const T2 alpha, const T3 beta)
Definition Lie.hpp:162

◆ FTENSOR_INDEX() [1/6]

static LieGroups::SO3::FTENSOR_INDEX ( dim  ,
i   
)
inlinestaticprivate

◆ FTENSOR_INDEX() [2/6]

static LieGroups::SO3::FTENSOR_INDEX ( dim  ,
j   
)
inlinestaticprivate

◆ FTENSOR_INDEX() [3/6]

static LieGroups::SO3::FTENSOR_INDEX ( dim  ,
k   
)
inlinestaticprivate

◆ FTENSOR_INDEX() [4/6]

static LieGroups::SO3::FTENSOR_INDEX ( dim  ,
l   
)
inlinestaticprivate

◆ FTENSOR_INDEX() [5/6]

static LieGroups::SO3::FTENSOR_INDEX ( dim  ,
m   
)
inlinestaticprivate

◆ FTENSOR_INDEX() [6/6]

static LieGroups::SO3::FTENSOR_INDEX ( dim  ,
n   
)
inlinestaticprivate

◆ genericDiffFormImpl()

template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 >
static auto LieGroups::SO3::genericDiffFormImpl ( const FTensor::Tensor1< T1, dim > &  t_w_vee,
const T2  alpha,
const T3  diff_alpha,
const T4  beta,
const T5  diff_beta 
)
inlinestaticprivate

Definition at line 361 of file Lie.hpp.

362 {
363 FTENSOR_INDEX(3, i);
364 FTENSOR_INDEX(3, j);
365 FTENSOR_INDEX(3, k);
366 FTENSOR_INDEX(3, l);
367
368 using D = typename TensorTypeExtractor<T1>::Type;
370
371 auto t_hat = getHat(t_w_vee);
372
373 t_diff_X(i, j, k) =
374
375 alpha * FTensor::levi_civita<int>(i, j, k)
376
377 +
378
379 diff_alpha * t_hat(i, j) * t_w_vee(k)
380
381 +
382
383 beta * (t_hat(i, l) * FTensor::levi_civita<int>(l, j, k) +
384 FTensor::levi_civita<int>(i, l, k) * t_hat(l, j))
385
386 +
387
388 diff_beta * t_hat(i, l) * t_hat(l, j) * t_w_vee(k);
389
390 return t_diff_X;
391 }

◆ genericFormImpl()

template<typename T1 , typename T2 , typename T3 >
static auto LieGroups::SO3::genericFormImpl ( const FTensor::Tensor1< T1, dim > &  t_w_vee,
const T2  alpha,
const T3  beta 
)
inlinestaticprivate

Definition at line 162 of file Lie.hpp.

163 {
164 using D = typename TensorTypeExtractor<T1>::Type;
166 auto t_hat = getHat(t_w_vee);
167 t_X(i, j) = FTensor::Kronecker_Delta<int>()(i, j) + alpha * t_hat(i, j) +
168 beta * (t_hat(i, k) * t_hat(k, j));
169 return t_X;
170 }

◆ getHat() [1/2]

template<typename A >
static auto LieGroups::SO3::getHat ( A &&  t_w_vee)
inlinestatic

Definition at line 58 of file Lie.hpp.

58 {
59 return getHatImpl(std::forward<A>(t_w_vee));
60 }
static auto getHatImpl(const FTensor::Tensor1< T, dim > &t_w_vee)
Definition Lie.hpp:154

◆ getHat() [2/2]

template<typename T >
static auto LieGroups::SO3::getHat ( T &&  w1,
T &&  w2,
T &&  w3 
)
inlinestatic

Definition at line 48 of file Lie.hpp.

48 {
49 auto t_w_vee =
50 getVee(std::forward<T>(w1), std::forward<T>(w2), std::forward<T>(w3));
51 return getHatImpl(t_w_vee);
52 }
static auto getVee(T &&w1, T &&w2, T &&w3)
Definition Lie.hpp:40

◆ getHatImpl()

template<typename T >
static auto LieGroups::SO3::getHatImpl ( const FTensor::Tensor1< T, dim > &  t_w_vee)
inlinestaticprivate

Definition at line 154 of file Lie.hpp.

154 {
155 using D = typename TensorTypeExtractor<T>::Type;
157 t_w_hat(i, j) = levi_civita(i, j, k) * t_w_vee(k);
158 return t_w_hat;
159 }
constexpr std::enable_if<(Dim0<=2 &&Dim1<=2), Tensor2_Expr< Levi_Civita< T >, T, Dim0, Dim1, i, j > >::type levi_civita(const Index< i, Dim0 > &, const Index< j, Dim1 > &)
levi_civita functions to make for easy adhoc use

◆ getVee() [1/2]

template<typename A >
static auto LieGroups::SO3::getVee ( A &&  t_w_hat)
inlinestatic

Definition at line 54 of file Lie.hpp.

54 {
55 return getVeeImpl(std::forward<A>(t_w_hat));
56 }
static auto getVeeImpl(const FTensor::Tensor2< T, dim, dim > &t_w_hat)
Definition Lie.hpp:146

◆ getVee() [2/2]

template<typename T >
static auto LieGroups::SO3::getVee ( T &&  w1,
T &&  w2,
T &&  w3 
)
inlinestatic

Definition at line 40 of file Lie.hpp.

40 {
42
43 std::forward<T>(w1), std::forward<T>(w2), std::forward<T>(w3)
44
45 );
46 }

◆ getVeeImpl()

template<typename T >
static auto LieGroups::SO3::getVeeImpl ( const FTensor::Tensor2< T, dim, dim > &  t_w_hat)
inlinestaticprivate

Definition at line 146 of file Lie.hpp.

146 {
147 using D = typename TensorTypeExtractor<T>::Type;
149 t_w_vee(k) = (levi_civita(i, j, k) * t_w_hat(i, j)) / 2;
150 return t_w_vee;
151 }

◆ Jl()

template<typename A , typename B >
static auto LieGroups::SO3::Jl ( A &&  t_w_vee,
B &&  theta 
)
inlinestatic

Definition at line 68 of file Lie.hpp.

68 {
69 return JlImpl(std::forward<A>(t_w_vee), std::forward<B>(theta));
70 }
static auto JlImpl(const FTensor::Tensor1< T1, dim > &t_w_vee, const T2 &theta)
Definition Lie.hpp:333

◆ JlImpl()

template<typename T1 , typename T2 >
static auto LieGroups::SO3::JlImpl ( const FTensor::Tensor1< T1, dim > &  t_w_vee,
const T2 &  theta 
)
inlinestaticprivate

Definition at line 333 of file Lie.hpp.

334 {
335 if (fabs(theta) < std::numeric_limits<T2>::epsilon()) {
336 return genericFormImpl(t_w_vee, 0.5, 1. / 6.);
337 }
338 const auto s = sin(theta);
339 const auto s_half = sin(theta / 2);
340 const auto a = 2 * (s_half / theta) * (s_half / theta);
341 const auto b = ((theta - s) / theta) / theta / theta;
342 return genericFormImpl(t_w_vee, a, b);
343 }

◆ Jr()

template<typename A , typename B >
static auto LieGroups::SO3::Jr ( A &&  t_w_vee,
B &&  theta 
)
inlinestatic

Definition at line 73 of file Lie.hpp.

73 {
74 return JrImpl(std::forward<A>(t_w_vee), std::forward<B>(theta));
75 }
static auto JrImpl(const FTensor::Tensor1< T1, dim > &t_w_vee, const T2 theta)
Definition Lie.hpp:346

◆ JrImpl()

template<typename T1 , typename T2 >
static auto LieGroups::SO3::JrImpl ( const FTensor::Tensor1< T1, dim > &  t_w_vee,
const T2  theta 
)
inlinestaticprivate

Definition at line 346 of file Lie.hpp.

347 {
348 if (fabs(theta) < std::numeric_limits<T2>::epsilon()) {
349 return genericFormImpl(t_w_vee, -0.5, 1. / 6.);
350 }
351 const auto s = sin(theta);
352 const auto s_half = sin(theta / 2);
353 const auto a = 2 * (s_half / theta) * (s_half / theta);
354 const auto b = ((theta - s) / theta) / theta / theta;
355 return genericFormImpl(t_w_vee, -a, b);
356 }

◆ materialSpin()

template<typename T1 , typename T2 , typename T3 >
static auto LieGroups::SO3::materialSpin ( T1 &&  t_w_vee,
T2  theta,
T3 &&  t_delta_w_vee 
)
inlinestatic

Definition at line 115 of file Lie.hpp.

115 {
116 return materialSpinImpl(std::forward<T1>(t_w_vee), theta,
117 std::forward<T3>(t_delta_w_vee));
118 }
static auto materialSpinImpl(const FTensor::Tensor1< T1, dim > &t_w_vee, const T2 theta, const FTensor::Tensor1< T3, dim > &t_delta_w_vee)
Definition Lie.hpp:434

◆ materialSpinHat()

template<typename T1 , typename T2 , typename T3 >
static auto LieGroups::SO3::materialSpinHat ( T1 &&  t_w_vee,
T2  theta,
T3 &&  t_delta_w_vee 
)
inlinestatic

Definition at line 122 of file Lie.hpp.

123 {
124 return materialSpinHatImpl(std::forward<T1>(t_w_vee), theta,
125 std::forward<T3>(t_delta_w_vee));
126 }

◆ materialSpinHatImpl()

template<typename T1 , typename T2 , typename T3 >
static auto LieGroups::SO3::materialSpinHatImpl ( const FTensor::Tensor1< T1, dim > &  t_w_vee,
const T2  theta,
const FTensor::Tensor1< T3, dim > &  t_delta_w_vee 
)
inlinestaticprivate

Definition at line 445 of file Lie.hpp.

446 {
447 auto t_a = materialSpinImpl(t_w_vee, theta, t_delta_w_vee);
448 return getHat(t_a);
449 }

◆ materialSpinImpl()

template<typename T1 , typename T2 , typename T3 >
static auto LieGroups::SO3::materialSpinImpl ( const FTensor::Tensor1< T1, dim > &  t_w_vee,
const T2  theta,
const FTensor::Tensor1< T3, dim > &  t_delta_w_vee 
)
inlinestaticprivate

Definition at line 434 of file Lie.hpp.

435 {
436 using D = typename TensorTypeExtractor<T1>::Type;
438 auto t_Jr = Jr(t_w_vee, theta);
439 t_a(i) = t_Jr(i, j) * t_delta_w_vee(j);
440 return t_a;
441 }
static auto Jr(A &&t_w_vee, B &&theta)
Definition Lie.hpp:73

Member Data Documentation

◆ dim

constexpr int LieGroups::SO3::dim = 3
inlinestaticconstexprprivate

Definition at line 137 of file Lie.hpp.


The documentation for this struct was generated from the following file: