SymmTensorI.H
Go to the documentation of this file.
1/*---------------------------------------------------------------------------*\
2 ========= |
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4 \\ / O peration |
5 \\ / A nd | www.openfoam.com
6 \\/ M anipulation |
7-------------------------------------------------------------------------------
8 Copyright (C) 2011-2016 OpenFOAM Foundation
9 Copyright (C) 2019-2022 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
12 This file is part of OpenFOAM.
13
14 OpenFOAM is free software: you can redistribute it and/or modify it
15 under the terms of the GNU General Public License as published by
16 the Free Software Foundation, either version 3 of the License, or
17 (at your option) any later version.
18
19 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22 for more details.
23
24 You should have received a copy of the GNU General Public License
25 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26
27\*---------------------------------------------------------------------------*/
28
29#include "Tensor.H"
30
31// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
32
33template<class Cmpt>
35:
36 SymmTensor::vsType(Zero)
37{}
38
39
40template<class Cmpt>
41template<class Cmpt2>
43(
44 const VectorSpace<SymmTensor<Cmpt2>, Cmpt2, 6>& vs
45)
46:
48{}
49
50
51template<class Cmpt>
53{
54 this->v_[XX] = st.ii(); this->v_[XY] = Zero; this->v_[XZ] = Zero;
55 this->v_[YY] = st.ii(); this->v_[YZ] = Zero;
56 this->v_[ZZ] = st.ii();
57}
58
59
60template<class Cmpt>
62(
63 const Vector<Cmpt>& x,
64 const Vector<Cmpt>& y,
65 const Vector<Cmpt>& z,
66 const bool transposed /* ignored */
67)
68{
69 this->rows(x, y, z);
70}
71
72
73template<class Cmpt>
75(
76 const Cmpt txx, const Cmpt txy, const Cmpt txz,
77 const Cmpt tyy, const Cmpt tyz,
78 const Cmpt tzz
79)
80{
81 this->v_[XX] = txx; this->v_[XY] = txy; this->v_[XZ] = txz;
82 this->v_[YY] = tyy; this->v_[YZ] = tyz;
83 this->v_[ZZ] = tzz;
84}
85
86
87template<class Cmpt>
89:
91{}
92
93
94// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
95
96template<class Cmpt>
97inline const Cmpt& Foam::SymmTensor<Cmpt>::xx() const
98{
99 return this->v_[XX];
101
102template<class Cmpt>
103inline const Cmpt& Foam::SymmTensor<Cmpt>::xy() const
104{
105 return this->v_[XY];
107
108template<class Cmpt>
109inline const Cmpt& Foam::SymmTensor<Cmpt>::xz() const
110{
111 return this->v_[XZ];
112}
113
114template<class Cmpt>
115inline const Cmpt& Foam::SymmTensor<Cmpt>::yx() const
116{
117 return this->v_[XY];
118}
119
120template<class Cmpt>
121inline const Cmpt& Foam::SymmTensor<Cmpt>::yy() const
122{
123 return this->v_[YY];
124}
125
126template<class Cmpt>
127inline const Cmpt& Foam::SymmTensor<Cmpt>::yz() const
128{
129 return this->v_[YZ];
132template<class Cmpt>
133inline const Cmpt& Foam::SymmTensor<Cmpt>::zx() const
135 return this->v_[XZ];
138template<class Cmpt>
139inline const Cmpt& Foam::SymmTensor<Cmpt>::zy() const
141 return this->v_[YZ];
144template<class Cmpt>
145inline const Cmpt& Foam::SymmTensor<Cmpt>::zz() const
147 return this->v_[ZZ];
149
150
151template<class Cmpt>
153{
154 return this->v_[XX];
155}
156
157template<class Cmpt>
159{
160 return this->v_[XY];
161}
162
163template<class Cmpt>
165{
166 return this->v_[XZ];
167}
168
169template<class Cmpt>
171{
172 return this->v_[XY];
173}
174
175template<class Cmpt>
177{
178 return this->v_[YY];
179}
180
181template<class Cmpt>
183{
184 return this->v_[YZ];
185}
186
187template<class Cmpt>
189{
190 return this->v_[XZ];
191}
192
193template<class Cmpt>
195{
196 return this->v_[YZ];
197}
198
199template<class Cmpt>
201{
202 return this->v_[ZZ];
203}
205
206template<class Cmpt>
208{
209 return Vector<Cmpt>(this->v_[XX], this->v_[XY], this->v_[XZ]);
211
212
213template<class Cmpt>
215{
216 return Vector<Cmpt>(this->v_[XY], this->v_[YY], this->v_[YZ]);
217}
218
219
220template<class Cmpt>
222{
223 return Vector<Cmpt>(this->v_[XZ], this->v_[YZ], this->v_[ZZ]);
225
226
227template<class Cmpt>
228template<Foam::direction Idx>
231 if (Idx == 0) return x();
232 else if (Idx == 1) return y();
233 else if (Idx == 2) return z();
234
235 static_assert(Idx < 3, "Invalid row access");
236 return Zero;
237}
238
240template<class Cmpt>
242{
243 switch (r)
244 {
245 case 0: return x(); break;
246 case 1: return y(); break;
247 case 2: return z(); break;
248 default:
250 << "Invalid row access " << r << abort(FatalError);
251 }
252
253 return Zero;
254}
255
256
257template<class Cmpt>
258template<Foam::direction Idx>
260{
261 if (Idx == 0)
262 {
263 this->v_[XX] = v.x(); this->v_[XY] = v.y(); this->v_[XZ] = v.z();
264 }
265 else if (Idx == 1)
266 {
267 this->v_[XY] = v.x(); this->v_[YY] = v.y(); this->v_[YZ] = v.z();
268 }
269 else if (Idx == 2)
270 {
271 this->v_[XZ] = v.x(); this->v_[YZ] = v.y(); this->v_[ZZ] = v.z();
272 }
273
274 static_assert(Idx < 3, "Invalid row access");
275}
276
277
278template<class Cmpt>
280(
281 const Vector<Cmpt>& x,
282 const Vector<Cmpt>& y,
283 const Vector<Cmpt>& z
284)
285{
286 this->v_[XX] = x.x(); this->v_[XY] = x.y(); this->v_[XZ] = x.z();
287 this->v_[YY] = y.y(); this->v_[YZ] = y.z();
288 this->v_[ZZ] = z.z();
289}
290
291
292template<class Cmpt>
294(
295 const direction r,
296 const Vector<Cmpt>& v
297)
298{
299 switch (r)
300 {
301 case 0: row<0>(v); break;
302 case 1: row<1>(v); break;
303 case 2: row<2>(v); break;
304 default:
306 << "Invalid row access " << r << abort(FatalError);
307 }
308}
309
310
311template<class Cmpt>
313{
314 return Vector<Cmpt>(this->v_[XX], this->v_[YY], this->v_[ZZ]);
315}
316
317
318template<class Cmpt>
320{
321 this->v_[XX] = v.x(); this->v_[YY] = v.y(); this->v_[ZZ] = v.z();
322}
323
324
325template<class Cmpt>
327{
328 return *this;
329}
330
331
332// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
333
334template<class Cmpt>
336{
337 this->v_[XX] = st.ii(); this->v_[XY] = Zero; this->v_[XZ] = Zero;
338 this->v_[YY] = st.ii(); this->v_[YZ] = Zero;
339 this->v_[ZZ] = st.ii();
340}
341
342
343// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
344
345namespace Foam
346{
347
348// * * * * * * * * * * * * * * * Global Functions * * * * * * * * * * * * * //
349
350//- Return the trace of a SymmTensor
351template<class Cmpt>
352inline Cmpt tr(const SymmTensor<Cmpt>& st)
353{
354 return st.xx() + st.yy() + st.zz();
355}
356
357
358//- Return the spherical part of a SymmTensor
359template<class Cmpt>
361{
363 (
364 (1.0/3.0)*tr(st)
365 );
366}
367
368
369//- Return the symmetric part of a SymmTensor, i.e. itself
370template<class Cmpt>
371inline const SymmTensor<Cmpt>& symm(const SymmTensor<Cmpt>& st)
372{
373 return st;
374}
375
376
377//- Return twice the symmetric part of a SymmTensor
378template<class Cmpt>
380{
381 return 2*st;
382}
383
384
385//- Return the deviatoric part of a SymmTensor
386template<class Cmpt>
388{
389 return st - sph(st);
390}
391
392
393//- Return the two-third deviatoric part of a SymmTensor
394template<class Cmpt>
396{
397 return st - 2*sph(st);
398}
399
400
401//- Return the determinant of a SymmTensor
402template<class Cmpt>
403inline Cmpt det(const SymmTensor<Cmpt>& st)
404{
405 return
406 (
407 st.xx()*st.yy()*st.zz() + st.xy()*st.yz()*st.xz()
408 + st.xz()*st.xy()*st.yz() - st.xx()*st.yz()*st.yz()
409 - st.xy()*st.xy()*st.zz() - st.xz()*st.yy()*st.xz()
410 );
411}
412
413
414//- Return the cofactor of a SymmTensor as a SymmTensor
415template<class Cmpt>
417{
418 return SymmTensor<Cmpt>
419 (
420 st.yy()*st.zz() - st.yz()*st.yz(),
421 st.xz()*st.yz() - st.xy()*st.zz(),
422 st.xy()*st.yz() - st.xz()*st.yy(),
423
424 st.xx()*st.zz() - st.xz()*st.xz(),
425 st.xy()*st.xz() - st.xx()*st.yz(),
426
427 st.xx()*st.yy() - st.xy()*st.xy()
428 );
429}
430
431
432//- Return the inverse of a SymmTensor by using the given determinant
433template<class Cmpt>
434inline SymmTensor<Cmpt> inv(const SymmTensor<Cmpt>& st, const Cmpt detst)
435{
436 #ifdef FULLDEBUG
437 if (mag(detst) < VSMALL)
438 {
440 << "SymmTensor is not invertible due to the zero determinant:"
441 << "det(symmTensor) = " << mag(detst)
442 << abort(FatalError);
443 }
444 #endif
445
446 return cof(st).T()/detst;
447}
448
449
450//- Return the inverse of a SymmTensor
451template<class Cmpt>
453{
454 return inv(st, det(st));
455}
456
457
458//- Return the 1st invariant of a SymmTensor
459template<class Cmpt>
460inline Cmpt invariantI(const SymmTensor<Cmpt>& st)
461{
462 return tr(st);
463}
464
465
466//- Return the 2nd invariant of a SymmTensor
467template<class Cmpt>
468inline Cmpt invariantII(const SymmTensor<Cmpt>& st)
469{
470 return
471 (
472 st.xx()*st.yy() + st.yy()*st.zz() + st.xx()*st.zz()
473 - st.xy()*st.xy() - st.yz()*st.yz() - st.xz()*st.xz()
474 );
475}
476
477
478//- Return the 3rd invariant of a SymmTensor
479template<class Cmpt>
480inline Cmpt invariantIII(const SymmTensor<Cmpt>& st)
481{
482 return det(st);
483}
484
485
486//- Return the inner-product of a SymmTensor with itself
487template<class Cmpt>
488inline SymmTensor<Cmpt>
490{
491 return SymmTensor<Cmpt>
492 (
493 st.xx()*st.xx() + st.xy()*st.xy() + st.xz()*st.xz(),
494 st.xx()*st.xy() + st.xy()*st.yy() + st.xz()*st.yz(),
495 st.xx()*st.xz() + st.xy()*st.yz() + st.xz()*st.zz(),
496
497 st.xy()*st.xy() + st.yy()*st.yy() + st.yz()*st.yz(),
498 st.xy()*st.xz() + st.yy()*st.yz() + st.yz()*st.zz(),
499
500 st.xz()*st.xz() + st.yz()*st.yz() + st.zz()*st.zz()
501 );
502}
503
504
505//- Return the square of Frobenius norm of a SymmTensor as a Cmpt
506template<class Cmpt>
507inline Cmpt magSqr(const SymmTensor<Cmpt>& st)
508{
509 return Cmpt
510 (
511 mag(st.xx()*st.xx()) + 2*mag(st.xy()*st.xy()) + 2*mag(st.xz()*st.xz())
512 + mag(st.yy()*st.yy()) + 2*mag(st.yz()*st.yz())
513 + mag(st.zz()*st.zz())
514 );
515}
516
517
518//- Return the square of a Vector as a SymmTensor
519template<class Cmpt>
521{
522 return SymmTensor<Cmpt>
523 (
524 v.x()*v.x(), v.x()*v.y(), v.x()*v.z(),
525 v.y()*v.y(), v.y()*v.z(),
526 v.z()*v.z()
527 );
528}
529
530
531// * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * //
532
533//- Sum of a SphericalTensor and a SymmTensor
534template<class Cmpt>
535inline SymmTensor<Cmpt>
537{
538 return SymmTensor<Cmpt>
539 (
540 spt1.ii() + st2.xx(), st2.xy(), st2.xz(),
541 spt1.ii() + st2.yy(), st2.yz(),
542 spt1.ii() + st2.zz()
543 );
544}
545
546
547//- Sum of a SymmTensor and a SphericalTensor
548template<class Cmpt>
549inline SymmTensor<Cmpt>
551{
552 return SymmTensor<Cmpt>
553 (
554 st1.xx() + spt2.ii(), st1.xy(), st1.xz(),
555 st1.yy() + spt2.ii(), st1.yz(),
556 st1.zz() + spt2.ii()
557 );
558}
559
560
561//- Subtract a SymmTensor from a SphericalTensor
562template<class Cmpt>
563inline SymmTensor<Cmpt>
565{
566 return SymmTensor<Cmpt>
567 (
568 spt1.ii() - st2.xx(), -st2.xy(), -st2.xz(),
569 spt1.ii() - st2.yy(), -st2.yz(),
570 spt1.ii() - st2.zz()
571 );
572}
573
574
575//- Subtract a SphericalTensor from a SymmTensor
576template<class Cmpt>
577inline SymmTensor<Cmpt>
579{
580 return SymmTensor<Cmpt>
581 (
582 st1.xx() - spt2.ii(), st1.xy(), st1.xz(),
583 st1.yy() - spt2.ii(), st1.yz(),
584 st1.zz() - spt2.ii()
585 );
586}
587
588
589//- Return the Hodge dual of a SymmTensor as a Vector
590template<class Cmpt>
592{
593 return Vector<Cmpt>(st.yz(), -st.xz(), st.xy());
594}
595
596
597//- Division of a SymmTensor by a Cmpt
598template<class Cmpt>
599inline SymmTensor<Cmpt>
600operator/(const SymmTensor<Cmpt>& st, const Cmpt s)
601{
602 return SymmTensor<Cmpt>
603 (
604 st.xx()/s, st.xy()/s, st.xz()/s,
605 st.yy()/s, st.yz()/s,
606 st.zz()/s
607 );
608}
609
610
611//- Inner-product of a SymmTensor and a SymmTensor
612template<class Cmpt>
613inline Tensor<Cmpt>
615{
616 return Tensor<Cmpt>
617 (
618 st1.xx()*st2.xx() + st1.xy()*st2.xy() + st1.xz()*st2.xz(),
619 st1.xx()*st2.xy() + st1.xy()*st2.yy() + st1.xz()*st2.yz(),
620 st1.xx()*st2.xz() + st1.xy()*st2.yz() + st1.xz()*st2.zz(),
621
622 st1.xy()*st2.xx() + st1.yy()*st2.xy() + st1.yz()*st2.xz(),
623 st1.xy()*st2.xy() + st1.yy()*st2.yy() + st1.yz()*st2.yz(),
624 st1.xy()*st2.xz() + st1.yy()*st2.yz() + st1.yz()*st2.zz(),
625
626 st1.xz()*st2.xx() + st1.yz()*st2.xy() + st1.zz()*st2.xz(),
627 st1.xz()*st2.xy() + st1.yz()*st2.yy() + st1.zz()*st2.yz(),
628 st1.xz()*st2.xz() + st1.yz()*st2.yz() + st1.zz()*st2.zz()
629 );
630}
631
632
633//- Inner-product of a SphericalTensor and a SymmTensor
634template<class Cmpt>
635inline SymmTensor<Cmpt>
637{
638 return SymmTensor<Cmpt>
639 (
640 spt1.ii()*st2.xx(), spt1.ii()*st2.xy(), spt1.ii()*st2.xz(),
641 spt1.ii()*st2.yy(), spt1.ii()*st2.yz(),
642 spt1.ii()*st2.zz()
643 );
644}
645
646
647//- Inner-product of a SymmTensor and a SphericalTensor
648template<class Cmpt>
649inline SymmTensor<Cmpt>
651{
652 return SymmTensor<Cmpt>
653 (
654 st1.xx()*spt2.ii(), st1.xy()*spt2.ii(), st1.xz()*spt2.ii(),
655 st1.yy()*spt2.ii(), st1.yz()*spt2.ii(),
656 st1.zz()*spt2.ii()
657 );
658}
659
660
661//- Inner-product of a SymmTensor and a Vector
662template<class Cmpt>
663inline Vector<Cmpt>
665{
666 return Vector<Cmpt>
667 (
668 st.xx()*v.x() + st.xy()*v.y() + st.xz()*v.z(),
669 st.xy()*v.x() + st.yy()*v.y() + st.yz()*v.z(),
670 st.xz()*v.x() + st.yz()*v.y() + st.zz()*v.z()
671 );
672}
673
674
675//- Inner-product of a Vector and a SymmTensor
676template<class Cmpt>
677inline Vector<Cmpt>
679{
680 return Vector<Cmpt>
681 (
682 v.x()*st.xx() + v.y()*st.xy() + v.z()*st.xz(),
683 v.x()*st.xy() + v.y()*st.yy() + v.z()*st.yz(),
684 v.x()*st.xz() + v.y()*st.yz() + v.z()*st.zz()
685 );
686}
687
688
689//- Double-inner-product of a SymmTensor and a SymmTensor
690template<class Cmpt>
691inline Cmpt
693{
694 return
695 (
696 st1.xx()*st2.xx() + 2*st1.xy()*st2.xy() + 2*st1.xz()*st2.xz()
697 + st1.yy()*st2.yy() + 2*st1.yz()*st2.yz()
698 + st1.zz()*st2.zz()
699 );
700}
701
702
703//- Double-inner-product of a SphericalTensor and a SymmTensor
704template<class Cmpt>
705inline Cmpt
707{
708 return (spt1.ii()*st2.xx() + spt1.ii()*st2.yy() + spt1.ii()*st2.zz());
709}
710
711
712//- Double-inner-product of a SymmTensor and a SphericalTensor
713template<class Cmpt>
714inline Cmpt
716{
717 return (st1.xx()*spt2.ii() + st1.yy()*spt2.ii() + st1.zz()*spt2.ii());
718}
719
720
721// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
722
723template<class Cmpt>
724class outerProduct<SymmTensor<Cmpt>, Cmpt>
725{
726public:
727
729};
730
731template<class Cmpt>
732class outerProduct<Cmpt, SymmTensor<Cmpt>>
733{
734public:
735
737};
738
739template<class Cmpt>
741{
742public:
743
745};
746
747template<class Cmpt>
748class innerProduct<SymmTensor<Cmpt>, Vector<Cmpt>>
749{
750public:
751
753};
754
755template<class Cmpt>
756class innerProduct<Vector<Cmpt>, SymmTensor<Cmpt>>
757{
758public:
759
761};
762
763
764template<class Cmpt>
766{
767public:
768
770};
771
772template<class Cmpt>
774{
775public:
776
778};
779
780template<class Cmpt>
782{
783public:
784
786};
787
788template<class Cmpt>
790{
791public:
792
794};
795
796
797// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
798
799} // End namespace Foam
800
801// ************************************************************************* //
scalar y
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:64
A templated (3 x 3) diagonal tensor of objects of <T>, effectively containing 1 element,...
const Cmpt & ii() const
A templated (3 x 3) symmetric tensor of objects of <T>, effectively containing 6 elements,...
Definition: SymmTensor.H:57
const Cmpt & xx() const
Definition: SymmTensorI.H:97
const Cmpt & yx() const
Definition: SymmTensorI.H:115
void rows(const Vector< Cmpt > &x, const Vector< Cmpt > &y, const Vector< Cmpt > &z)
Set row values.
Definition: SymmTensorI.H:280
const Cmpt & yz() const
Definition: SymmTensorI.H:127
Vector< Cmpt > row() const
Extract vector for given row: compile-time check of index.
Vector< Cmpt > z() const
Extract vector for row 2.
Definition: SymmTensorI.H:221
const Cmpt & xz() const
Definition: SymmTensorI.H:109
const Cmpt & zz() const
Definition: SymmTensorI.H:145
const Cmpt & xy() const
Definition: SymmTensorI.H:103
const Cmpt & zx() const
Definition: SymmTensorI.H:133
const Cmpt & zy() const
Definition: SymmTensorI.H:139
const Cmpt & yy() const
Definition: SymmTensorI.H:121
Vector< Cmpt > y() const
Extract vector for row 1.
Definition: SymmTensorI.H:214
Vector< Cmpt > diag() const
Extract the diagonal as a vector.
Definition: SymmTensorI.H:312
SymmTensor & operator=(const SymmTensor &)=default
Copy assignment.
SymmTensor()=default
Default construct.
Vector< Cmpt > x() const
Extract vector for row 0.
Definition: SymmTensorI.H:207
const SymmTensor< Cmpt > & T() const
Return non-Hermitian transpose.
Definition: SymmTensorI.H:326
A templated (3 x 3) tensor of objects of <T> derived from MatrixSpace.
Definition: Tensor.H:64
Templated vector space.
Definition: VectorSpace.H:79
Templated 3D Vector derived from VectorSpace adding construction from 3 components,...
Definition: Vector.H:65
const Cmpt & z() const
Access to the vector z component.
Definition: VectorI.H:85
const Cmpt & y() const
Access to the vector y component.
Definition: VectorI.H:79
const Cmpt & x() const
Access to the vector x component.
Definition: VectorI.H:73
dimensioned< Type > T() const
Return transpose.
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
Definition: zero.H:63
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:453
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
Namespace for OpenFOAM.
tmp< faMatrix< Type > > operator-(const faMatrix< Type > &)
Unary negation.
dimensionedSymmTensor dev2(const dimensionedSymmTensor &dt)
dimensionedSymmTensor dev(const dimensionedSymmTensor &dt)
dimensionedScalar det(const dimensionedSphericalTensor &dt)
dimensionedSymmTensor symm(const dimensionedSymmTensor &dt)
dimensionedScalar tr(const dimensionedSphericalTensor &dt)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
tmp< faMatrix< Type > > operator+(const faMatrix< Type > &, const faMatrix< Type > &)
Cmpt invariantII(const SymmTensor< Cmpt > &st)
Return the 2nd invariant of a SymmTensor.
Definition: SymmTensorI.H:468
dimensionedSymmTensor twoSymm(const dimensionedSymmTensor &dt)
tmp< faMatrix< Type > > operator*(const areaScalarField::Internal &, const faMatrix< Type > &)
Cmpt invariantIII(const SymmTensor< Cmpt > &st)
Return the 3rd invariant of a SymmTensor.
Definition: SymmTensorI.H:480
tmp< GeometricField< Type, fvPatchField, volMesh > > operator&(const fvMatrix< Type > &, const DimensionedField< Type, volMesh > &)
dimensionedScalar operator/(const scalar s1, const dimensionedScalar &ds2)
dimensionedSymmTensor cof(const dimensionedSymmTensor &dt)
Cmpt invariantI(const SymmTensor< Cmpt > &st)
Return the 1st invariant of a SymmTensor.
Definition: SymmTensorI.H:460
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
errorManip< error > abort(error &err)
Definition: errorManip.H:144
SphericalTensor< Cmpt > sph(const DiagTensor< Cmpt > &dt)
Return the spherical part of a DiagTensor as a SphericalTensor.
Definition: DiagTensorI.H:130
uint8_t direction
Definition: direction.H:56
static constexpr const zero Zero
Global zero (0)
Definition: zero.H:131
error FatalError
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
dimensionedSymmTensor innerSqr(const dimensionedSymmTensor &dt)
dimensioned< typename scalarProduct< Type1, Type2 >::type > operator&&(const dimensioned< Type1 > &, const dimensioned< Type2 > &)
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)