Tensor2DI.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) 2018-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// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
30
31template<class Cmpt>
33:
34 Tensor2D::vsType(Zero)
35{}
36
37
38template<class Cmpt>
40(
41 const VectorSpace<Tensor2D<Cmpt>, Cmpt, 4>& vs
42)
43:
44 Tensor2D::vsType(vs)
45{}
46
47
48template<class Cmpt>
50{
51 this->v_[XX] = st.xx(); this->v_[XY] = st.xy();
52 this->v_[YX] = st.xy(); this->v_[YY] = st.yy();
53}
54
55
56template<class Cmpt>
58{
59 this->v_[XX] = st.ii(); this->v_[XY] = Zero;
60 this->v_[YX] = Zero; this->v_[YY] = st.ii();
61}
62
63
64template<class Cmpt>
66(
67 const Vector2D<Cmpt>& x,
68 const Vector2D<Cmpt>& y
69)
70{
71 this->v_[XX] = x.x(); this->v_[XY] = x.y();
72 this->v_[YX] = y.x(); this->v_[YY] = y.y();
73}
74
75
76template<class Cmpt>
78(
79 const Cmpt txx, const Cmpt txy,
80 const Cmpt tyx, const Cmpt tyy
81)
82{
83 this->v_[XX] = txx; this->v_[XY] = txy;
84 this->v_[YX] = tyx; this->v_[YY] = tyy;
85}
86
87
88template<class Cmpt>
90:
91 Tensor2D::vsType(is)
92{}
93
94
95// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
96
97template<class Cmpt>
98inline const Cmpt& Foam::Tensor2D<Cmpt>::xx() const
99{
100 return this->v_[XX];
101}
102
103template<class Cmpt>
104inline const Cmpt& Foam::Tensor2D<Cmpt>::xy() const
105{
106 return this->v_[XY];
107}
108
109template<class Cmpt>
110inline const Cmpt& Foam::Tensor2D<Cmpt>::yx() const
111{
112 return this->v_[YX];
113}
114
115template<class Cmpt>
116inline const Cmpt& Foam::Tensor2D<Cmpt>::yy() const
117{
118 return this->v_[YY];
119}
120
121
122template<class Cmpt>
124{
125 return this->v_[XX];
126}
127
128template<class Cmpt>
130{
131 return this->v_[XY];
132}
133
134template<class Cmpt>
136{
137 return this->v_[YX];
138}
139
140template<class Cmpt>
142{
143 return this->v_[YY];
144}
145
146
147template<class Cmpt>
149{
150 return Vector2D<Cmpt>(this->v_[XX], this->v_[XY]);
151}
152
153template<class Cmpt>
155{
156 return Vector2D<Cmpt>(this->v_[YX], this->v_[YY]);
157}
158
159
160template<class Cmpt>
162{
163 return Vector2D<Cmpt>(this->v_[XX], this->v_[YX]);
164}
165
166template<class Cmpt>
168{
169 return Vector2D<Cmpt>(this->v_[XY], this->v_[YY]);
170}
171
172
173template<class Cmpt>
174template<Foam::direction Idx>
176{
177 if (Idx == 0) return cx();
178 else if (Idx == 1) return cy();
179
180 static_assert(Idx < 2, "Invalid column access");
181 return Zero;
182}
183
184
185template<class Cmpt>
187{
188 switch (c)
189 {
190 case 0: return cx(); break;
191 case 1: return cy(); break;
192 default:
194 << "Invalid column access " << c << abort(FatalError);
195 }
196
197 return Zero;
198}
199
200
201template<class Cmpt>
202template<Foam::direction Idx>
204{
205 if (Idx == 0) return x();
206 else if (Idx == 1) return y();
207
208 static_assert(Idx < 2, "Invalid row access");
209 return Zero;
210}
211
212
213template<class Cmpt>
215{
216 switch (r)
217 {
218 case 0: return x(); break;
219 case 1: return y(); break;
220 default:
222 << "Invalid row access " << r << abort(FatalError);
223 }
224
225 return Zero;
226}
227
228
229template<class Cmpt>
230template<Foam::direction Idx>
232{
233 if (Idx == 0)
234 {
235 this->v_[XX] = v.x();
236 this->v_[YX] = v.y();
237 }
238 else if (Idx == 1)
239 {
240 this->v_[XY] = v.x();
241 this->v_[YY] = v.y();
242 }
243
244 static_assert(Idx < 2, "Invalid column access");
245}
246
247
248template<class Cmpt>
249template<Foam::direction Idx>
251{
252 if (Idx == 0)
253 {
254 this->v_[XX] = v.x(); this->v_[XY] = v.y();
255 }
256 else if (Idx == 1)
257 {
258 this->v_[YX] = v.x(); this->v_[YY] = v.y();
259 }
260
261 static_assert(Idx < 2, "Invalid row access");
262}
263
264
265template<class Cmpt>
267(
268 const Vector2D<Cmpt>& x,
269 const Vector2D<Cmpt>& y
270)
271{
272 this->v_[XX] = x.x(); this->v_[XY] = y.x();
273 this->v_[YX] = x.y(); this->v_[YY] = y.y();
274}
275
276
277template<class Cmpt>
279(
280 const Vector2D<Cmpt>& x,
281 const Vector2D<Cmpt>& y
282)
283{
284 this->v_[XX] = x.x(); this->v_[XY] = x.y();
285 this->v_[YX] = y.x(); this->v_[YY] = y.y();
286}
287
288
289template<class Cmpt>
291(
292 const direction c,
293 const Vector2D<Cmpt>& v
294)
295{
296 switch (c)
297 {
298 case 0: col<0>(v); break;
299 case 1: col<1>(v); break;
300 default:
302 << "Invalid column access " << c << abort(FatalError);
303 }
304}
305
306
307template<class Cmpt>
309(
310 const direction r,
311 const Vector2D<Cmpt>& v
312)
313{
314 switch (r)
315 {
316 case 0: row<0>(v); break;
317 case 1: row<1>(v); break;
318 default:
320 << "Invalid row access " << r << abort(FatalError);
321 }
322}
323
324
325template<class Cmpt>
327{
328 return Vector2D<Cmpt>(this->v_[XX], this->v_[YY]);
329}
330
331
332template<class Cmpt>
334{
335 this->v_[XX] = v.x(); this->v_[YY] = v.y();
336}
337
338
339// * * * * * * * * * * * * * * * Member Operations * * * * * * * * * * * * * //
340
341template<class Cmpt>
343{
344 return Tensor2D<Cmpt>
345 (
346 xx(), yx(),
347 xy(), yy()
348 );
349}
350
351
352template<class Cmpt>
355{
356 const Tensor2D<Cmpt>& t1 = *this;
357
358 return Tensor2D<Cmpt>
359 (
360 t1.xx()*t2.xx() + t1.xy()*t2.yx(),
361 t1.xx()*t2.xy() + t1.xy()*t2.yy(),
362
363 t1.yx()*t2.xx() + t1.yy()*t2.yx(),
364 t1.yx()*t2.xy() + t1.yy()*t2.yy()
365 );
366}
367
368
369template<class Cmpt>
372{
373 const Tensor2D<Cmpt>& t1 = *this;
374
375 return Tensor2D<Cmpt>
376 (
377 t1.xx()*t2.xx(), t1.xy()*t2.xy(),
378 t1.yx()*t2.yx(), t1.yy()*t2.yy()
379 );
380}
381
382
383// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
384
385template<class Cmpt>
387{
388 this->v_[XX] = st.xx(); this->v_[XY] = st.xy();
389 this->v_[YX] = st.xy(); this->v_[YY] = st.yy();
390}
391
392
393template<class Cmpt>
395{
396 this->v_[XX] = st.ii(); this->v_[XY] = Zero;
397 this->v_[YX] = Zero; this->v_[YY] = st.ii();
398}
399
400
401// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
402
403namespace Foam
404{
405
406// * * * * * * * * * * * * * * * Global Functions * * * * * * * * * * * * * //
407
408//- Return the trace of a Tensor2D
409template<class Cmpt>
410inline Cmpt tr(const Tensor2D<Cmpt>& t)
411{
412 return t.xx() + t.yy();
413}
414
415
416//- Return the spherical part of a Tensor2D
417template<class Cmpt>
419{
421 (
422 0.5*tr(t)
423 );
424}
425
426
427//- Return the symmetric part of a Tensor2D
428template<class Cmpt>
430{
431 return SymmTensor2D<Cmpt>
432 (
433 t.xx(), 0.5*(t.xy() + t.yx()),
434 t.yy()
435 );
436}
437
438
439//- Return the twice the symmetric part of a Tensor2D
440template<class Cmpt>
442{
443 return SymmTensor2D<Cmpt>
444 (
445 t.xx() + t.xx(), t.xy() + t.yx(),
446 t.yy() + t.yy()
447 );
448}
449
450
451//- Return the skew-symmetric part of a Tensor2D
452template<class Cmpt>
454{
455 return Tensor2D<Cmpt>
456 (
457 Zero, 0.5*(t.xy() - t.yx()),
458 0.5*(t.yx() - t.xy()), Zero
459 );
460}
461
462
463//- Return the deviatoric part of a Tensor2D
464template<class Cmpt>
466{
467 return t - sph(t);
468}
469
470
471//- Return the two-third deviatoric part of a Tensor2D
472template<class Cmpt>
474{
475 return t - 2*sph(t);
476}
477
478
479//- Return the determinant of a Tensor2D
480template<class Cmpt>
481inline Cmpt det(const Tensor2D<Cmpt>& t)
482{
483 return t.xx()*t.yy() - t.xy()*t.yx();
484}
485
486
487//- Return the cofactor Tensor2D of a Tensor2D
488template<class Cmpt>
490{
491 return Tensor2D<Cmpt>
492 (
493 t.yy(), -t.yx(),
494 -t.xy(), t.xx()
495 );
496}
497
498
499//- Return the inverse of a Tensor2D using a given determinant
500template<class Cmpt>
501inline Tensor2D<Cmpt> inv(const Tensor2D<Cmpt>& t, const Cmpt dett)
502{
503 #ifdef FULLDEBUG
504 if (mag(dett) < SMALL)
505 {
507 << "Tensor2D is not invertible due to the zero determinant:"
508 << "det(Tensor2D) = " << mag(dett)
509 << abort(FatalError);
510 }
511 #endif
512
513 return cof(t).T()/dett;
514}
515
516
517//- Return the inverse of a Tensor2D
518template<class Cmpt>
520{
521 return inv(t, det(t));
522}
523
524
525//- Return the 1st invariant of a Tensor2D
526template<class Cmpt>
527inline Cmpt invariantI(const Tensor2D<Cmpt>& t)
528{
529 return tr(t);
530}
531
532
533//- Return the 2nd invariant of a Tensor2D
534template<class Cmpt>
535inline Cmpt invariantII(const Tensor2D<Cmpt>& t)
536{
537 return det(t);
538}
539
540
541// * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * //
542
543//- Sum of a SphericalTensor2D and a Tensor2D
544template<class Cmpt>
545inline Tensor2D<Cmpt>
547{
548 return Tensor2D<Cmpt>
549 (
550 st1.ii() + t2.xx(), t2.xy(),
551 t2.yx(), st1.ii() + t2.yy()
552 );
553}
554
555
556//- Sum of a Tensor2D and a SphericalTensor2D
557template<class Cmpt>
558inline Tensor2D<Cmpt>
560{
561 return Tensor2D<Cmpt>
562 (
563 t1.xx() + st2.ii(), t1.xy(),
564 t1.yx(), t1.yy() + st2.ii()
565 );
566}
567
568
569//- Sum of a SymmTensor2D and a Tensor2D
570template<class Cmpt>
571inline Tensor2D<Cmpt>
573{
574 return Tensor2D<Cmpt>
575 (
576 st1.xx() + t2.xx(), st1.xy() + t2.xy(),
577 st1.xy() + t2.yx(), st1.yy() + t2.yy()
578 );
579}
580
581
582//- Sum of a Tensor2D and a SymmTensor2D
583template<class Cmpt>
584inline Tensor2D<Cmpt>
586{
587 return Tensor2D<Cmpt>
588 (
589 t1.xx() + st2.xx(), t1.xy() + st2.xy(),
590 t1.yx() + st2.xy(), t1.yy() + st2.yy()
591 );
592}
593
594
595//- Subtract a Tensor2D from a SphericalTensor2D
596template<class Cmpt>
597inline Tensor2D<Cmpt>
599{
600 return Tensor2D<Cmpt>
601 (
602 st1.ii() - t2.xx(), -t2.xy(),
603 -t2.yx(), st1.ii() - t2.yy()
604 );
605}
606
607
608//- Subtract a SphericalTensor2D from a Tensor2D
609template<class Cmpt>
610inline Tensor2D<Cmpt>
612{
613 return Tensor2D<Cmpt>
614 (
615 t1.xx() - st2.ii(), t1.xy(),
616 t1.yx(), t1.yy() - st2.ii()
617 );
618}
619
620
621//- Subtract a Tensor2D from a SymmTensor2D
622template<class Cmpt>
623inline Tensor2D<Cmpt>
625{
626 return Tensor2D<Cmpt>
627 (
628 st1.xx() - t2.xx(), st1.xy() - t2.xy(),
629 st1.xy() - t2.yx(), st1.yy() - t2.yy()
630 );
631}
632
633
634//- Subtract a SymmTensor2D from a Tensor2D
635template<class Cmpt>
636inline Tensor2D<Cmpt>
638{
639 return Tensor2D<Cmpt>
640 (
641 t1.xx() - st2.xx(), t1.xy() - st2.xy(),
642 t1.yx() - st2.xy(), t1.yy() - st2.yy()
643 );
644}
645
646
647//- Division of a Tensor2D by a Cmpt
648template<class Cmpt>
649inline Tensor2D<Cmpt>
650operator/(const Tensor2D<Cmpt>& t, const Cmpt s)
651{
652 #ifdef FULLDEBUG
653 if (mag(s) < VSMALL)
654 {
656 << "Tensor2D = " << t
657 << " is not divisible due to a zero value in Cmpt:"
658 << "Cmpt = " << s
659 << abort(FatalError);
660 }
661 #endif
662
663 return Tensor2D<Cmpt>
664 (
665 t.xx()/s, t.xy()/s,
666 t.yx()/s, t.yy()/s
667 );
668}
669
670
671//- Inner-product of a Tensor2D and a Tensor2D
672template<class Cmpt>
673inline typename innerProduct<Tensor2D<Cmpt>, Tensor2D<Cmpt>>::type
675{
676 return t1.inner(t2);
677}
678
679
680//- Inner-product of a SphericalTensor2D and Tensor2D
681template<class Cmpt>
682inline Tensor2D<Cmpt>
684{
685 return Tensor2D<Cmpt>
686 (
687 st1.ii()*t2.xx(),
688 st1.ii()*t2.xy(),
689 st1.ii()*t2.yx(),
690 st1.ii()*t2.yy()
691 );
692}
693
694
695//- Inner-product of a Tensor2D and a SphericalTensor2D
696template<class Cmpt>
697inline Tensor2D<Cmpt>
699{
700 return Tensor2D<Cmpt>
701 (
702 t1.xx()*st2.ii(),
703 t1.xy()*st2.ii(),
704
705 t1.yx()*st2.ii(),
706 t1.yy()*st2.ii()
707 );
708}
709
710
711//- Inner-product of a SymmTensor2D and Tensor2D
712template<class Cmpt>
713inline Tensor2D<Cmpt>
715{
716 return Tensor2D<Cmpt>
717 (
718 st1.xx()*t2.xx() + st1.xy()*t2.yx(),
719 st1.xx()*t2.xy() + st1.xy()*t2.yy(),
720
721 st1.xy()*t2.xx() + st1.yy()*t2.yx(),
722 st1.xy()*t2.xy() + st1.yy()*t2.yy()
723 );
724}
725
726
727//- Inner-product of a Tensor2D and a SymmTensor2D
728template<class Cmpt>
729inline Tensor2D<Cmpt>
731{
732 return Tensor2D<Cmpt>
733 (
734 t1.xx()*st2.xx() + t1.xy()*st2.xy(),
735 t1.xx()*st2.xy() + t1.xy()*st2.yy(),
736
737 t1.yx()*st2.xx() + t1.yy()*st2.xy(),
738 t1.yx()*st2.xy() + t1.yy()*st2.yy()
739 );
740}
741
742
743
744//- Inner-product of a Tensor2D and a Vector2D
745template<class Cmpt>
746inline typename innerProduct<Tensor2D<Cmpt>, Vector2D<Cmpt>>::type
748{
749 return Vector2D<Cmpt>
750 (
751 t.xx()*v.x() + t.xy()*v.y(),
752 t.yx()*v.x() + t.yy()*v.y()
753 );
754}
755
756
757//- Inner-product of a Vector2D and a Tensor2D
758template<class Cmpt>
759inline typename innerProduct<Vector2D<Cmpt>, Tensor2D<Cmpt>>::type
761{
762 return Vector2D<Cmpt>
763 (
764 v.x()*t.xx() + v.y()*t.yx(),
765 v.x()*t.xy() + v.y()*t.yy()
766 );
767}
768
769
770//- Double-inner-product of a SphericalTensor2D and a Tensor2D
771template<class Cmpt>
772inline Cmpt
774{
775 return (st1.ii()*t2.xx() + st1.ii()*t2.yy());
776}
777
778
779//- Double-inner-product of a Tensor2D and a SphericalTensor2D
780template<class Cmpt>
781inline Cmpt
783{
784 return (t1.xx()*st2.ii() + t1.yy()*st2.ii());
785}
786
787
788//- Double-inner-product of a SymmTensor2D and a Tensor2D
789template<class Cmpt>
790inline Cmpt
792{
793 return
794 (
795 st1.xx()*t2.xx() + st1.xy()*t2.xy()
796 + st1.xy()*t2.yx() + st1.yy()*t2.yy()
797 );
798}
799
800
801//- Double-inner-product of a Tensor2D and a SymmTensor2D
802template<class Cmpt>
803inline Cmpt
805{
806 return
807 (
808 t1.xx()*st2.xx() + t1.xy()*st2.xy()
809 + t1.yx()*st2.xy() + t1.yy()*st2.yy()
810 );
811}
812
813
814//- Outer-product of a Vector2D and a Vector2D
815template<class Cmpt>
816inline typename outerProduct<Vector2D<Cmpt>, Vector2D<Cmpt>>::type
818{
819 return Tensor2D<Cmpt>
820 (
821 v1.x()*v2.x(), v1.x()*v2.y(),
822 v1.y()*v2.x(), v1.y()*v2.y()
823 );
824}
825
826
827// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
828
829template<class Cmpt>
831{
832public:
833
835};
836
837template<class Cmpt>
839{
840public:
841
843};
844
845
846template<class Cmpt>
847class innerProduct<Tensor2D<Cmpt>, Tensor2D<Cmpt>>
848{
849public:
850
852};
853
854template<class Cmpt>
856{
857public:
858
860};
861
862template<class Cmpt>
864{
865public:
866
868};
869
870template<class Cmpt>
871class innerProduct<Tensor2D<Cmpt>, Vector2D<Cmpt>>
872{
873public:
874
876};
877
878template<class Cmpt>
879class innerProduct<Vector2D<Cmpt>, Tensor2D<Cmpt>>
880{
881public:
882
884};
885
886
887template<class Cmpt>
888class outerProduct<Vector2D<Cmpt>, Vector2D<Cmpt>>
889{
890public:
891
893};
894
895
896// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
897
898} // End namespace Foam
899
900// ************************************************************************* //
scalar y
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:64
A templated (2 x 2) diagonal tensor of objects of <T>, effectively containing 1 element,...
const Cmpt & ii() const
A templated (2 x 2) symmetric tensor of objects of <T>, effectively containing 3 elements,...
Definition: SymmTensor2D.H:61
const Cmpt & xx() const
Definition: SymmTensor2DI.H:80
const Cmpt & xy() const
Definition: SymmTensor2DI.H:86
const Cmpt & yy() const
Definition: SymmTensor2DI.H:98
A templated (2 x 2) tensor of objects of <T> derived from VectorSpace.
Definition: Tensor2D.H:59
const Cmpt & xx() const
Definition: Tensor2DI.H:98
const Cmpt & yx() const
Definition: Tensor2DI.H:110
Vector2D< Cmpt > y() const
Extract vector for row 1.
Definition: Tensor2DI.H:154
Vector2D< Cmpt > cy() const
Extract vector for column 1.
Definition: Tensor2DI.H:167
void cols(const Vector2D< Cmpt > &x, const Vector2D< Cmpt > &y)
Set column values.
Definition: Tensor2DI.H:267
Tensor2D()=default
Default construct.
Vector2D< Cmpt > row() const
Extract vector for given row: compile-time check of index.
Tensor2D< Cmpt > schur(const Tensor2D< Cmpt > &t2) const
Schur-product of this with another Tensor2D.
Definition: Tensor2DI.H:371
Vector2D< Cmpt > x() const
Extract vector for row 0.
Definition: Tensor2DI.H:148
void rows(const Vector2D< Cmpt > &x, const Vector2D< Cmpt > &y)
Set row values.
Definition: Tensor2DI.H:279
Tensor2D & operator=(const Tensor2D &)=default
Copy assignment.
Vector2D< Cmpt > cx() const
Extract vector for column 0.
Definition: Tensor2DI.H:161
const Cmpt & xy() const
Definition: Tensor2DI.H:104
Tensor2D< Cmpt > T() const
Return non-Hermitian transpose.
Definition: Tensor2DI.H:342
const Cmpt & yy() const
Definition: Tensor2DI.H:116
Vector2D< Cmpt > diag() const
Extract the diagonal as a vector.
Definition: Tensor2DI.H:326
Vector2D< Cmpt > col() const
Extract vector for given column: compile-time check of index.
Tensor2D< Cmpt > inner(const Tensor2D< Cmpt > &t2) const
Inner-product of this with another Tensor2D.
Definition: Tensor2DI.H:354
Templated 2D Vector derived from VectorSpace adding construction from 2 components,...
Definition: Vector2D.H:58
const Cmpt & y() const
Access to the vector y component.
Definition: Vector2DI.H:73
const Cmpt & x() const
Access to the vector x component.
Definition: Vector2DI.H:66
Templated vector space.
Definition: VectorSpace.H:79
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)
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 > &)
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Definition: MSwindows.C:598
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)
dimensioned< typename scalarProduct< Type1, Type2 >::type > operator&&(const dimensioned< Type1 > &, const dimensioned< Type2 > &)
dimensionedTensor skew(const dimensionedTensor &dt)