v0.16.0
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 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 spatialSpin (T1 &&t_w_vee, T2 theta, T3 &&t_delta_w_vee)
 
template<typename T1 , typename T2 , typename T3 >
static auto spatialSpinHat (T1 &&t_w_vee, T2 theta, T3 &&t_delta_w_vee)
 
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 >
static auto diffJrImpl (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 spatialSpinImpl (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 spatialSpinHatImpl (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 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 41 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 84 of file Lie.hpp.

84 {
85 return actionImpl(std::forward<A>(t_w_vee), std::forward<B>(theta),
86 std::forward<C>(t_A));
87 }
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:466

◆ 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 466 of file Lie.hpp.

467 {
468 using D = typename TensorTypeExtractor<T3>::Type;
470 t_B(i, j) = exp(t_w_vee, theta)(i, k) * t_A(k, j);
471 return t_B;
472 }
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:69
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

◆ 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 141 of file Lie.hpp.

141 {
142 return deltaRImpl(std::forward<T1>(t_w_vee), theta,
143 std::forward<T3>(t_A_hat));
144 }
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:514

◆ 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 527 of file Lie.hpp.

529 {
530 auto t_A_hat = materialSpinHatImpl(t_w_vee, theta, t_delta_w_vee);
531 return deltaRImpl(t_w_vee, theta, t_A_hat);
532 }
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:506

◆ 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 514 of file Lie.hpp.

516 {
517 using D = typename TensorTypeExtractor<T1>::Type;
519 auto t_R = exp(t_w_vee, theta);
520 t_delta_R(i, j) = t_R(i, k) * t_A_hat(k, j);
521 return t_delta_R;
522 }

◆ diffDiffExp()

template<typename A , typename B >
static auto LieGroups::SO3::diffDiffExp ( A &&  t_w_vee,
B &&  theta 
)
inlinestatic
Examples
/home/lk58p/mofem_install/vanilla_dev_release/mofem-cephas/mofem/users_modules/eshelbian_plasticity/src/impl/EshelbianOperators.cpp.

Definition at line 105 of file Lie.hpp.

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

◆ 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 249 of file Lie.hpp.

250 {
251
252 auto get_tensor = [&t_w_vee](auto a, auto diff_a, auto diff_diff_a, auto b,
253 auto diff_b, auto diff_diff_b) {
254 FTENSOR_INDEX(3, i);
255 FTENSOR_INDEX(3, j);
256 FTENSOR_INDEX(3, k);
257 FTENSOR_INDEX(3, l);
258 FTENSOR_INDEX(3, m);
259
260 constexpr auto t_kd = FTensor::Kronecker_Delta<double>();
261
262 using D = typename TensorTypeExtractor<T1>::Type;
263 FTensor::Tensor4<D, 3, 3, 3, 3> t_diff_diff_exp;
264
265 auto t_hat = getHat(t_w_vee);
266 t_diff_diff_exp(i, j, k, m) =
267
268 diff_a * FTensor::levi_civita<int>(i, j, k) * t_w_vee(m)
269
270 +
271
272 diff_a * (
273
274 t_hat(i, j) * t_kd(k, m) +
275 FTensor::levi_civita<int>(i, j, m) * t_w_vee(k)
276
277 )
278
279 +
280
281 diff_diff_a * t_hat(i, j) * t_w_vee(k) * t_w_vee(m)
282
283 +
284
285 b * (FTensor::levi_civita<int>(i, l, m) *
286 FTensor::levi_civita<int>(l, j, k) +
287 FTensor::levi_civita<int>(i, l, k) *
288 FTensor::levi_civita<int>(l, j, m))
289
290 +
291
292 diff_b * ((t_hat(i, l) * FTensor::levi_civita<int>(l, j, k) +
293 FTensor::levi_civita<int>(i, l, k) * t_hat(l, j)) *
294 t_w_vee(m))
295
296 +
297
298 diff_b *
299 (
300
301 t_hat(i, l) * t_hat(l, j) * t_kd(k, m)
302
303 +
304
305 FTensor::levi_civita<int>(i, l, m) * t_hat(l, j) * t_w_vee(k)
306
307 +
308
309 t_hat(i, l) * FTensor::levi_civita<int>(l, j, m) * t_w_vee(k)
310
311 )
312
313 +
314
315 diff_diff_b * t_hat(i, l) * t_hat(l, j) * t_w_vee(k) * t_w_vee(m);
316
317 return t_diff_diff_exp;
318 };
319
320 if (fabs(theta) < std::numeric_limits<T2>::epsilon()) {
321 return get_tensor(1., -1. / 3., 1. / 15, 1. / 2, -1. / 12, 1. / 90);
322 }
323
324 const auto ss = sin(theta);
325 const auto a = ss / theta;
326
327 const auto theta2 = theta * theta;
328 const auto cc = cos(theta);
329 const auto diff_a = (theta * cc - ss) / (theta2 * theta);
330 const auto diff_diff_a =
331 (3. * ss - 3. * theta * cc - theta2 * ss) / (theta2 * theta2 * theta);
332
333 const auto ss_2 = sin(theta / 2.);
334 const auto b = 2. * ss_2 * ss_2 / theta2;
335 const auto diff_b = (-2 + 2 * cc + theta * ss) / (theta2 * theta2);
336 const auto diff_diff_b = (theta2 * cc - 5. * theta * ss - 8. * cc + 8.) /
337 (theta2 * theta2 * theta2);
338
339 return get_tensor(a, diff_a, diff_diff_a, b, diff_b, diff_diff_b);
340 }
#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:54

◆ diffExp()

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

Definition at line 100 of file Lie.hpp.

100 {
101 return diffExpImpl(std::forward<A>(t_w_vee), std::forward<B>(theta));
102 }
static auto diffExpImpl(const FTensor::Tensor1< T1, dim > &t_w_vee, const T2 theta)
Definition Lie.hpp:197

◆ 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 197 of file Lie.hpp.

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

◆ diffJl()

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

Definition at line 90 of file Lie.hpp.

90 {
91 return diffJlImpl(std::forward<A>(t_w_vee), std::forward<B>(theta));
92 }
static auto diffJlImpl(const FTensor::Tensor1< T1, dim > &t_w_vee, const T2 theta)
Definition Lie.hpp:404

◆ 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 404 of file Lie.hpp.

405 {
406 if (fabs(theta) < std::numeric_limits<T2>::epsilon()) {
407 // Taylor:
408 // a = 1/2 - theta^2/24 + ...
409 // diff_a = -1/12 + theta^2/180 + ...
410 // b = 1/6 - theta^2/120 + ...
411 // diff_b = -1/60 + theta^2/1260 + ...
412 return genericDiffFormImpl(t_w_vee, 0.5, -1. / 12., 1. / 6., -1. / 60.);
413 }
414
415 const auto s = sin(theta);
416 const auto c = cos(theta);
417
418 const auto theta2 = theta * theta;
419 const auto theta4 = theta2 * theta2;
420 const auto theta5 = theta4 * theta;
421
422 // Jl = I + a * hat + b * hat^2
423 const auto a = (1. - c) / theta2;
424 const auto diff_a = (theta * s + 2. * c - 2.) / theta4;
425
426 const auto b = (theta - s) / (theta2 * theta);
427 const auto diff_b = (3. * s - theta * c - 2. * theta) / theta5;
428
429 return genericDiffFormImpl(t_w_vee, a, diff_a, b, diff_b);
430 }
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:371

◆ diffJr()

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

Definition at line 95 of file Lie.hpp.

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

◆ diffJrImpl()

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

Definition at line 433 of file Lie.hpp.

434 {
435 if (fabs(theta) < std::numeric_limits<T2>::epsilon()) {
436 // Taylor:
437 // alpha = -1/2 + theta^2/24 + ...
438 // diff_alpha = 1/12 - theta^2/180 + ...
439 // beta = 1/6 - theta^2/120 + ...
440 // diff_beta = -1/60 + theta^2/1260 + ...
441 return genericDiffFormImpl(t_w_vee, -0.5, 1. / 12., 1. / 6., -1. / 60.);
442 }
443
444 const auto s = sin(theta);
445 const auto c = cos(theta);
446
447 const auto theta2 = theta * theta;
448 const auto theta4 = theta2 * theta2;
449 const auto theta5 = theta4 * theta;
450
451 // Jr = I + alpha * hat + beta * hat^2
452 // with alpha = -(1 - cos(theta)) / theta^2
453 const auto alpha = -(1. - c) / theta2;
454 const auto diff_alpha = (2. - 2. * c - theta * s) / theta4;
455 // equivalent:
456 // const auto diff_alpha = -(theta * s + 2. * c - 2.) / theta4;
457
458 const auto beta = (theta - s) / (theta2 * theta);
459 const auto diff_beta = (3. * s - theta * c - 2. * theta) / theta5;
460
461 return genericDiffFormImpl(t_w_vee, alpha, diff_alpha, beta, diff_beta);
462 }

◆ exp()

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

Definition at line 69 of file Lie.hpp.

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

◆ 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 184 of file Lie.hpp.

185 {
186 if (fabs(theta) < std::numeric_limits<T2>::epsilon()) {
187 return genericFormImpl(t_w_vee, 1, 0.5);
188 }
189 const auto s = sin(theta);
190 const auto s_half = sin(theta / 2);
191 const auto a = s / theta;
192 const auto b = 2 * (s_half / theta) * (s_half / theta);
193 return genericFormImpl(t_w_vee, a, b);
194 }
static auto genericFormImpl(const FTensor::Tensor1< T1, dim > &t_w_vee, const T2 alpha, const T3 beta)
Definition Lie.hpp:173

◆ 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 371 of file Lie.hpp.

372 {
373 FTENSOR_INDEX(3, i);
374 FTENSOR_INDEX(3, j);
375 FTENSOR_INDEX(3, k);
376 FTENSOR_INDEX(3, l);
377
378 using D = typename TensorTypeExtractor<T1>::Type;
380
381 auto t_hat = getHat(t_w_vee);
382
383 t_diff_X(i, j, k) =
384
385 alpha * FTensor::levi_civita<int>(i, j, k)
386
387 +
388
389 diff_alpha * t_hat(i, j) * t_w_vee(k)
390
391 +
392
393 beta * (t_hat(i, l) * FTensor::levi_civita<int>(l, j, k) +
394 FTensor::levi_civita<int>(i, l, k) * t_hat(l, j))
395
396 +
397
398 diff_beta * t_hat(i, l) * t_hat(l, j) * t_w_vee(k);
399
400 return t_diff_X;
401 }

◆ 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 173 of file Lie.hpp.

174 {
175 using D = typename TensorTypeExtractor<T1>::Type;
177 auto t_hat = getHat(t_w_vee);
178 t_X(i, j) = FTensor::Kronecker_Delta<int>()(i, j) + alpha * t_hat(i, j) +
179 beta * (t_hat(i, k) * t_hat(k, j));
180 return t_X;
181 }

◆ getHat() [1/2]

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

Definition at line 64 of file Lie.hpp.

64 {
65 return getHatImpl(std::forward<A>(t_w_vee));
66 }
static auto getHatImpl(const FTensor::Tensor1< T, dim > &t_w_vee)
Definition Lie.hpp:165

◆ getHat() [2/2]

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

Definition at line 54 of file Lie.hpp.

54 {
55 auto t_w_vee =
56 getVee(std::forward<T>(w1), std::forward<T>(w2), std::forward<T>(w3));
57 return getHatImpl(t_w_vee);
58 }
static auto getVee(T &&w1, T &&w2, T &&w3)
Definition Lie.hpp:46

◆ getHatImpl()

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

Definition at line 165 of file Lie.hpp.

165 {
166 using D = typename TensorTypeExtractor<T>::Type;
168 t_w_hat(i, j) = levi_civita(i, j, k) * t_w_vee(k);
169 return t_w_hat;
170 }
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 60 of file Lie.hpp.

60 {
61 return getVeeImpl(std::forward<A>(t_w_hat));
62 }
static auto getVeeImpl(const FTensor::Tensor2< T, dim, dim > &t_w_hat)
Definition Lie.hpp:157

◆ getVee() [2/2]

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

Definition at line 46 of file Lie.hpp.

46 {
48
49 std::forward<T>(w1), std::forward<T>(w2), std::forward<T>(w3)
50
51 );
52 }

◆ getVeeImpl()

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

Definition at line 157 of file Lie.hpp.

157 {
158 using D = typename TensorTypeExtractor<T>::Type;
160 t_w_vee(k) = (levi_civita(i, j, k) * t_w_hat(i, j)) / 2;
161 return t_w_vee;
162 }

◆ Jl()

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

Definition at line 74 of file Lie.hpp.

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

◆ 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 343 of file Lie.hpp.

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

◆ Jr()

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

Definition at line 79 of file Lie.hpp.

79 {
80 return JrImpl(std::forward<A>(t_w_vee), std::forward<B>(theta));
81 }
static auto JrImpl(const FTensor::Tensor1< T1, dim > &t_w_vee, const T2 theta)
Definition Lie.hpp:356

◆ 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 356 of file Lie.hpp.

357 {
358 if (fabs(theta) < std::numeric_limits<T2>::epsilon()) {
359 return genericFormImpl(t_w_vee, -0.5, 1. / 6.);
360 }
361 const auto s = sin(theta);
362 const auto s_half = sin(theta / 2);
363 const auto a = 2 * (s_half / theta) * (s_half / theta);
364 const auto b = ((theta - s) / theta) / theta / theta;
365 return genericFormImpl(t_w_vee, -a, b);
366 }

◆ 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 126 of file Lie.hpp.

126 {
127 return materialSpinImpl(std::forward<T1>(t_w_vee), theta,
128 std::forward<T3>(t_delta_w_vee));
129 }
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:495

◆ 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 133 of file Lie.hpp.

134 {
135 return materialSpinHatImpl(std::forward<T1>(t_w_vee), theta,
136 std::forward<T3>(t_delta_w_vee));
137 }

◆ 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 506 of file Lie.hpp.

507 {
508 auto t_a = materialSpinImpl(t_w_vee, theta, t_delta_w_vee);
509 return getHat(t_a);
510 }

◆ 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 495 of file Lie.hpp.

496 {
497 using D = typename TensorTypeExtractor<T1>::Type;
499 auto t_Jr = Jr(t_w_vee, theta);
500 t_a(i) = t_Jr(i, j) * t_delta_w_vee(j);
501 return t_a;
502 }
static auto Jr(A &&t_w_vee, B &&theta)
Definition Lie.hpp:79

◆ spatialSpin()

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

Definition at line 111 of file Lie.hpp.

111 {
112 return spatialSpinImpl(std::forward<T1>(t_w_vee), theta,
113 std::forward<T3>(t_delta_w_vee));
114 }
static auto spatialSpinImpl(const FTensor::Tensor1< T1, dim > &t_w_vee, const T2 theta, const FTensor::Tensor1< T3, dim > &t_delta_w_vee)
Definition Lie.hpp:476

◆ spatialSpinHat()

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

Definition at line 118 of file Lie.hpp.

119 {
120 return spatialSpinHatImpl(std::forward<T1>(t_w_vee), theta,
121 std::forward<T3>(t_delta_w_vee));
122 }
static auto spatialSpinHatImpl(const FTensor::Tensor1< T1, dim > &t_w_vee, const T2 theta, const FTensor::Tensor1< T3, dim > &t_delta_w_vee)
Definition Lie.hpp:487

◆ spatialSpinHatImpl()

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

Definition at line 487 of file Lie.hpp.

488 {
489 auto t_w = spatialSpinImpl(t_w_vee, theta, t_delta_w_vee);
490 return getHat(t_w);
491 }

◆ spatialSpinImpl()

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

Definition at line 476 of file Lie.hpp.

477 {
478 using D = typename TensorTypeExtractor<T1>::Type;
480 auto t_Jl = Jl(t_w_vee, theta);
481 t_w(i) = t_Jl(i, j) * t_delta_w_vee(j);
482 return t_w;
483 }
static auto Jl(A &&t_w_vee, B &&theta)
Definition Lie.hpp:74

Member Data Documentation

◆ dim

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

Definition at line 148 of file Lie.hpp.


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