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 >
static auto right_jacobian (A &&t_w_vee)
 
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 89 of file Lie.hpp.

89 {
90 return actionImpl(std::forward<A>(t_w_vee), std::forward<B>(theta),
91 std::forward<C>(t_A));
92 }
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:471

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

472 {
473 using D = typename TensorTypeExtractor<T3>::Type;
475 t_B(i, j) = exp(t_w_vee, theta)(i, k) * t_A(k, j);
476 return t_B;
477 }
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 146 of file Lie.hpp.

146 {
147 return deltaRImpl(std::forward<T1>(t_w_vee), theta,
148 std::forward<T3>(t_A_hat));
149 }
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:519

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

534 {
535 auto t_A_hat = materialSpinHatImpl(t_w_vee, theta, t_delta_w_vee);
536 return deltaRImpl(t_w_vee, theta, t_A_hat);
537 }
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:511

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

521 {
522 using D = typename TensorTypeExtractor<T1>::Type;
524 auto t_R = exp(t_w_vee, theta);
525 t_delta_R(i, j) = t_R(i, k) * t_A_hat(k, j);
526 return t_delta_R;
527 }

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

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

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

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

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

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

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

◆ diffJl()

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

Definition at line 95 of file Lie.hpp.

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

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

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

◆ diffJr()

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

Definition at line 100 of file Lie.hpp.

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

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

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

◆ 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:189

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

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

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

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

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

179 {
180 using D = typename TensorTypeExtractor<T1>::Type;
182 auto t_hat = getHat(t_w_vee);
183 t_X(i, j) = FTensor::Kronecker_Delta<int>()(i, j) + alpha * t_hat(i, j) +
184 beta * (t_hat(i, k) * t_hat(k, j));
185 return t_X;
186 }

◆ 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:170

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

170 {
171 using D = typename TensorTypeExtractor<T>::Type;
173 t_w_hat(i, j) = levi_civita(i, j, k) * t_w_vee(k);
174 return t_w_hat;
175 }
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:162

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

162 {
163 using D = typename TensorTypeExtractor<T>::Type;
165 t_w_vee(k) = (levi_civita(i, j, k) * t_w_hat(i, j)) / 2;
166 return t_w_vee;
167 }

◆ 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:348

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

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

◆ 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:361

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

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

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

131 {
132 return materialSpinImpl(std::forward<T1>(t_w_vee), theta,
133 std::forward<T3>(t_delta_w_vee));
134 }
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:500

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

139 {
140 return materialSpinHatImpl(std::forward<T1>(t_w_vee), theta,
141 std::forward<T3>(t_delta_w_vee));
142 }

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

512 {
513 auto t_a = materialSpinImpl(t_w_vee, theta, t_delta_w_vee);
514 return getHat(t_a);
515 }

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

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

◆ right_jacobian()

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

Definition at line 83 of file Lie.hpp.

83 {
84 const auto theta = t_w_vee.l2();
85 return Jr(std::forward<A>(t_w_vee), theta);
86 }

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

116 {
117 return spatialSpinImpl(std::forward<T1>(t_w_vee), theta,
118 std::forward<T3>(t_delta_w_vee));
119 }
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:481

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

124 {
125 return spatialSpinHatImpl(std::forward<T1>(t_w_vee), theta,
126 std::forward<T3>(t_delta_w_vee));
127 }
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:492

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

493 {
494 auto t_w = spatialSpinImpl(t_w_vee, theta, t_delta_w_vee);
495 return getHat(t_w);
496 }

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

482 {
483 using D = typename TensorTypeExtractor<T1>::Type;
485 auto t_Jl = Jl(t_w_vee, theta);
486 t_w(i) = t_Jl(i, j) * t_delta_w_vee(j);
487 return t_w;
488 }
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 153 of file Lie.hpp.


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