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-2020 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
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 
31 template<class Cmpt>
33 :
35 {}
36 
37 
38 template<class Cmpt>
40 (
41  const VectorSpace<Tensor2D<Cmpt>, Cmpt, 4>& vs
42 )
43 :
45 {}
46 
47 
48 template<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 
56 template<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 
64 template<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 
76 template<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 
88 template<class Cmpt>
90 :
91  Tensor2D::vsType(is)
92 {}
93 
94 
95 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
96 
97 template<class Cmpt>
98 inline const Cmpt& Foam::Tensor2D<Cmpt>::xx() const
99 {
100  return this->v_[XX];
101 }
102 
103 template<class Cmpt>
104 inline const Cmpt& Foam::Tensor2D<Cmpt>::xy() const
105 {
106  return this->v_[XY];
107 }
108 
109 template<class Cmpt>
110 inline const Cmpt& Foam::Tensor2D<Cmpt>::yx() const
111 {
112  return this->v_[YX];
113 }
114 
115 template<class Cmpt>
116 inline const Cmpt& Foam::Tensor2D<Cmpt>::yy() const
117 {
118  return this->v_[YY];
119 }
120 
121 
122 template<class Cmpt>
124 {
125  return this->v_[XX];
126 }
127 
128 template<class Cmpt>
130 {
131  return this->v_[XY];
132 }
133 
134 template<class Cmpt>
136 {
137  return this->v_[YX];
138 }
139 
140 template<class Cmpt>
142 {
143  return this->v_[YY];
144 }
145 
146 
147 template<class Cmpt>
149 {
150  return Vector2D<Cmpt>(this->v_[XX], this->v_[XY]);
151 }
152 
153 template<class Cmpt>
155 {
156  return Vector2D<Cmpt>(this->v_[YX], this->v_[YY]);
157 }
158 
159 
160 template<class Cmpt>
162 {
163  return Vector2D<Cmpt>(this->v_[XX], this->v_[YX]);
164 }
165 
166 template<class Cmpt>
168 {
169  return Vector2D<Cmpt>(this->v_[XY], this->v_[YY]);
170 }
171 
172 
173 template<class Cmpt>
174 template<Foam::direction Col>
176 {
177  if (Col == 0) return cx();
178  else if (Col == 1) return cy();
179 
180  static_assert(Col < 2, "Invalid column access");
181  return Zero;
182 }
183 
184 
185 template<class Cmpt>
187 {
188  switch (c)
189  {
190  case 0: return cx(); break;
191  case 1: return cy(); break;
192  }
193 
195  << "Invalid column access " << c << abort(FatalError);
196 
197  return Zero;
198 }
199 
200 
201 template<class Cmpt>
202 template<Foam::direction Row>
204 {
205  if (Row == 0) return x();
206  else if (Row == 1) return y();
207 
208  static_assert(Row < 2, "Invalid row access");
209  return Zero;
210 }
211 
212 
213 template<class Cmpt>
215 {
216  switch (r)
217  {
218  case 0: return x(); break;
219  case 1: return y(); break;
220  }
221 
223  << "Invalid row access " << r << abort(FatalError);
224 
225  return Zero;
226 }
227 
228 
229 template<class Cmpt>
230 template<Foam::direction Col>
232 {
233  if (Col == 0)
234  {
235  this->v_[XX] = v.x();
236  this->v_[YX] = v.y();
237  }
238  else if (Col == 1)
239  {
240  this->v_[XY] = v.x();
241  this->v_[YY] = v.y();
242  }
243 
244  static_assert(Col < 2, "Invalid column access");
245 }
246 
247 
248 template<class Cmpt>
249 template<Foam::direction Row>
251 {
252  if (Row == 0)
253  {
254  this->v_[XX] = v.x(); this->v_[XY] = v.y();
255  }
256  else if (Row == 1)
257  {
258  this->v_[YX] = v.x(); this->v_[YY] = v.y();
259  }
260 
261  static_assert(Row < 2, "Invalid row access");
262 }
263 
264 
265 template<class Cmpt>
266 inline void Foam::Tensor2D<Cmpt>::cols
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 
277 template<class Cmpt>
278 inline void Foam::Tensor2D<Cmpt>::rows
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 
289 template<class Cmpt>
290 inline void Foam::Tensor2D<Cmpt>::col
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  break;
304  }
305 }
306 
307 
308 template<class Cmpt>
309 inline void Foam::Tensor2D<Cmpt>::row
310 (
311  const direction r,
312  const Vector2D<Cmpt>& v
313 )
314 {
315  switch (r)
316  {
317  case 0: row<0>(v); break;
318  case 1: row<1>(v); break;
319  default:
321  << "Invalid row access " << r << abort(FatalError);
322  break;
323  }
324 }
325 
326 
327 template<class Cmpt>
329 {
330  return Vector2D<Cmpt>(this->v_[XX], this->v_[YY]);
331 }
332 
333 
334 template<class Cmpt>
336 {
337  this->v_[XX] = v.x(); this->v_[YY] = v.y();
338 }
339 
340 
341 // * * * * * * * * * * * * * * * Member Operations * * * * * * * * * * * * * //
342 
343 template<class Cmpt>
345 {
346  return Tensor2D<Cmpt>
347  (
348  xx(), yx(),
349  xy(), yy()
350  );
351 }
352 
353 
354 template<class Cmpt>
357 {
358  const Tensor2D<Cmpt>& t1 = *this;
359 
360  return Tensor2D<Cmpt>
361  (
362  t1.xx()*t2.xx() + t1.xy()*t2.yx(),
363  t1.xx()*t2.xy() + t1.xy()*t2.yy(),
364 
365  t1.yx()*t2.xx() + t1.yy()*t2.yx(),
366  t1.yx()*t2.xy() + t1.yy()*t2.yy()
367  );
368 }
369 
370 
371 template<class Cmpt>
374 {
375  const Tensor2D<Cmpt>& t1 = *this;
376 
377  return Tensor2D<Cmpt>
378  (
379  t1.xx()*t2.xx(), t1.xy()*t2.xy(),
380  t1.yx()*t2.yx(), t1.yy()*t2.yy()
381  );
382 }
383 
384 
385 // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
386 
387 template<class Cmpt>
389 {
390  this->v_[XX] = st.xx(); this->v_[XY] = st.xy();
391  this->v_[YX] = st.xy(); this->v_[YY] = st.yy();
392 }
393 
394 
395 template<class Cmpt>
397 {
398  this->v_[XX] = st.ii(); this->v_[XY] = Zero;
399  this->v_[YX] = Zero; this->v_[YY] = st.ii();
400 }
401 
402 
403 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
404 
405 namespace Foam
406 {
407 
408 // * * * * * * * * * * * * * * * Global Functions * * * * * * * * * * * * * //
409 
410 //- Return the trace of a Tensor2D
411 template<class Cmpt>
412 inline Cmpt tr(const Tensor2D<Cmpt>& t)
413 {
414  return t.xx() + t.yy();
415 }
416 
417 
418 //- Return the spherical part of a Tensor2D
419 template<class Cmpt>
421 {
423  (
424  0.5*tr(t)
425  );
426 }
427 
428 
429 //- Return the symmetric part of a Tensor2D
430 template<class Cmpt>
432 {
433  return SymmTensor2D<Cmpt>
434  (
435  t.xx(), 0.5*(t.xy() + t.yx()),
436  t.yy()
437  );
438 }
439 
440 
441 //- Return the twice the symmetric part of a Tensor2D
442 template<class Cmpt>
444 {
445  return SymmTensor2D<Cmpt>
446  (
447  t.xx() + t.xx(), t.xy() + t.yx(),
448  t.yy() + t.yy()
449  );
450 }
451 
452 
453 //- Return the skew-symmetric part of a Tensor2D
454 template<class Cmpt>
456 {
457  return Tensor2D<Cmpt>
458  (
459  Zero, 0.5*(t.xy() - t.yx()),
460  0.5*(t.yx() - t.xy()), Zero
461  );
462 }
463 
464 
465 //- Return the deviatoric part of a Tensor2D
466 template<class Cmpt>
468 {
469  return t - sph(t);
470 }
471 
472 
473 //- Return the two-third deviatoric part of a Tensor2D
474 template<class Cmpt>
476 {
477  return t - 2*sph(t);
478 }
479 
480 
481 //- Return the determinant of a Tensor2D
482 template<class Cmpt>
483 inline Cmpt det(const Tensor2D<Cmpt>& t)
484 {
485  return t.xx()*t.yy() - t.xy()*t.yx();
486 }
487 
488 
489 //- Return the cofactor Tensor2D of a Tensor2D
490 template<class Cmpt>
492 {
493  return Tensor2D<Cmpt>
494  (
495  t.yy(), -t.yx(),
496  -t.xy(), t.xx()
497  );
498 }
499 
500 
501 //- Return the inverse of a Tensor2D using a given determinant
502 template<class Cmpt>
503 inline Tensor2D<Cmpt> inv(const Tensor2D<Cmpt>& t, const Cmpt dett)
504 {
505  #ifdef FULLDEBUG
506  if (mag(dett) < SMALL)
507  {
509  << "Tensor2D is not invertible due to the zero determinant:"
510  << "det(Tensor2D) = " << mag(dett)
511  << abort(FatalError);
512  }
513  #endif
514 
515  return cof(t).T()/dett;
516 }
517 
518 
519 //- Return the inverse of a Tensor2D
520 template<class Cmpt>
522 {
523  return inv(t, det(t));
524 }
525 
526 
527 //- Return the 1st invariant of a Tensor2D
528 template<class Cmpt>
529 inline Cmpt invariantI(const Tensor2D<Cmpt>& t)
530 {
531  return tr(t);
532 }
533 
534 
535 //- Return the 2nd invariant of a Tensor2D
536 template<class Cmpt>
537 inline Cmpt invariantII(const Tensor2D<Cmpt>& t)
538 {
539  return det(t);
540 }
541 
542 
543 // * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * //
544 
545 //- Sum of a SphericalTensor2D and a Tensor2D
546 template<class Cmpt>
547 inline Tensor2D<Cmpt>
549 {
550  return Tensor2D<Cmpt>
551  (
552  st1.ii() + t2.xx(), t2.xy(),
553  t2.yx(), st1.ii() + t2.yy()
554  );
555 }
556 
557 
558 //- Sum of a Tensor2D and a SphericalTensor2D
559 template<class Cmpt>
560 inline Tensor2D<Cmpt>
562 {
563  return Tensor2D<Cmpt>
564  (
565  t1.xx() + st2.ii(), t1.xy(),
566  t1.yx(), t1.yy() + st2.ii()
567  );
568 }
569 
570 
571 //- Sum of a SymmTensor2D and a Tensor2D
572 template<class Cmpt>
573 inline Tensor2D<Cmpt>
575 {
576  return Tensor2D<Cmpt>
577  (
578  st1.xx() + t2.xx(), st1.xy() + t2.xy(),
579  st1.xy() + t2.yx(), st1.yy() + t2.yy()
580  );
581 }
582 
583 
584 //- Sum of a Tensor2D and a SymmTensor2D
585 template<class Cmpt>
586 inline Tensor2D<Cmpt>
588 {
589  return Tensor2D<Cmpt>
590  (
591  t1.xx() + st2.xx(), t1.xy() + st2.xy(),
592  t1.yx() + st2.xy(), t1.yy() + st2.yy()
593  );
594 }
595 
596 
597 //- Subtract a Tensor2D from a SphericalTensor2D
598 template<class Cmpt>
599 inline Tensor2D<Cmpt>
601 {
602  return Tensor2D<Cmpt>
603  (
604  st1.ii() - t2.xx(), -t2.xy(),
605  -t2.yx(), st1.ii() - t2.yy()
606  );
607 }
608 
609 
610 //- Subtract a SphericalTensor2D from a Tensor2D
611 template<class Cmpt>
612 inline Tensor2D<Cmpt>
614 {
615  return Tensor2D<Cmpt>
616  (
617  t1.xx() - st2.ii(), t1.xy(),
618  t1.yx(), t1.yy() - st2.ii()
619  );
620 }
621 
622 
623 //- Subtract a Tensor2D from a SymmTensor2D
624 template<class Cmpt>
625 inline Tensor2D<Cmpt>
627 {
628  return Tensor2D<Cmpt>
629  (
630  st1.xx() - t2.xx(), st1.xy() - t2.xy(),
631  st1.xy() - t2.yx(), st1.yy() - t2.yy()
632  );
633 }
634 
635 
636 //- Subtract a SymmTensor2D from a Tensor2D
637 template<class Cmpt>
638 inline Tensor2D<Cmpt>
640 {
641  return Tensor2D<Cmpt>
642  (
643  t1.xx() - st2.xx(), t1.xy() - st2.xy(),
644  t1.yx() - st2.xy(), t1.yy() - st2.yy()
645  );
646 }
647 
648 
649 //- Division of a Tensor2D by a Cmpt
650 template<class Cmpt>
651 inline Tensor2D<Cmpt>
652 operator/(const Tensor2D<Cmpt>& t, const Cmpt s)
653 {
654  #ifdef FULLDEBUG
655  if (mag(s) < VSMALL)
656  {
658  << "Tensor2D = " << t
659  << " is not divisible due to a zero value in Cmpt:"
660  << "Cmpt = " << s
661  << abort(FatalError);
662  }
663  #endif
664 
665  return Tensor2D<Cmpt>
666  (
667  t.xx()/s, t.xy()/s,
668  t.yx()/s, t.yy()/s
669  );
670 }
671 
672 
673 //- Inner-product of a Tensor2D and a Tensor2D
674 template<class Cmpt>
675 inline typename innerProduct<Tensor2D<Cmpt>, Tensor2D<Cmpt>>::type
677 {
678  return t1.inner(t2);
679 }
680 
681 
682 //- Inner-product of a SphericalTensor2D and Tensor2D
683 template<class Cmpt>
684 inline Tensor2D<Cmpt>
686 {
687  return Tensor2D<Cmpt>
688  (
689  st1.ii()*t2.xx(),
690  st1.ii()*t2.xy(),
691  st1.ii()*t2.yx(),
692  st1.ii()*t2.yy()
693  );
694 }
695 
696 
697 //- Inner-product of a Tensor2D and a SphericalTensor2D
698 template<class Cmpt>
699 inline Tensor2D<Cmpt>
701 {
702  return Tensor2D<Cmpt>
703  (
704  t1.xx()*st2.ii(),
705  t1.xy()*st2.ii(),
706 
707  t1.yx()*st2.ii(),
708  t1.yy()*st2.ii()
709  );
710 }
711 
712 
713 //- Inner-product of a SymmTensor2D and Tensor2D
714 template<class Cmpt>
715 inline Tensor2D<Cmpt>
717 {
718  return Tensor2D<Cmpt>
719  (
720  st1.xx()*t2.xx() + st1.xy()*t2.yx(),
721  st1.xx()*t2.xy() + st1.xy()*t2.yy(),
722 
723  st1.xy()*t2.xx() + st1.yy()*t2.yx(),
724  st1.xy()*t2.xy() + st1.yy()*t2.yy()
725  );
726 }
727 
728 
729 //- Inner-product of a Tensor2D and a SymmTensor2D
730 template<class Cmpt>
731 inline Tensor2D<Cmpt>
733 {
734  return Tensor2D<Cmpt>
735  (
736  t1.xx()*st2.xx() + t1.xy()*st2.xy(),
737  t1.xx()*st2.xy() + t1.xy()*st2.yy(),
738 
739  t1.yx()*st2.xx() + t1.yy()*st2.xy(),
740  t1.yx()*st2.xy() + t1.yy()*st2.yy()
741  );
742 }
743 
744 
745 
746 //- Inner-product of a Tensor2D and a Vector2D
747 template<class Cmpt>
748 inline typename innerProduct<Tensor2D<Cmpt>, Vector2D<Cmpt>>::type
750 {
751  return Vector2D<Cmpt>
752  (
753  t.xx()*v.x() + t.xy()*v.y(),
754  t.yx()*v.x() + t.yy()*v.y()
755  );
756 }
757 
758 
759 //- Inner-product of a Vector2D and a Tensor2D
760 template<class Cmpt>
761 inline typename innerProduct<Vector2D<Cmpt>, Tensor2D<Cmpt>>::type
763 {
764  return Vector2D<Cmpt>
765  (
766  v.x()*t.xx() + v.y()*t.yx(),
767  v.x()*t.xy() + v.y()*t.yy()
768  );
769 }
770 
771 
772 //- Double-inner-product of a SphericalTensor2D and a Tensor2D
773 template<class Cmpt>
774 inline Cmpt
776 {
777  return (st1.ii()*t2.xx() + st1.ii()*t2.yy());
778 }
779 
780 
781 //- Double-inner-product of a Tensor2D and a SphericalTensor2D
782 template<class Cmpt>
783 inline Cmpt
785 {
786  return (t1.xx()*st2.ii() + t1.yy()*st2.ii());
787 }
788 
789 
790 //- Double-inner-product of a SymmTensor2D and a Tensor2D
791 template<class Cmpt>
792 inline Cmpt
794 {
795  return
796  (
797  st1.xx()*t2.xx() + st1.xy()*t2.xy()
798  + st1.xy()*t2.yx() + st1.yy()*t2.yy()
799  );
800 }
801 
802 
803 //- Double-inner-product of a Tensor2D and a SymmTensor2D
804 template<class Cmpt>
805 inline Cmpt
807 {
808  return
809  (
810  t1.xx()*st2.xx() + t1.xy()*st2.xy()
811  + t1.yx()*st2.xy() + t1.yy()*st2.yy()
812  );
813 }
814 
815 
816 //- Outer-product of a Vector2D and a Vector2D
817 template<class Cmpt>
818 inline typename outerProduct<Vector2D<Cmpt>, Vector2D<Cmpt>>::type
820 {
821  return Tensor2D<Cmpt>
822  (
823  v1.x()*v2.x(), v1.x()*v2.y(),
824  v1.y()*v2.x(), v1.y()*v2.y()
825  );
826 }
827 
828 
829 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
830 
831 template<class Cmpt>
833 {
834 public:
835 
837 };
838 
839 template<class Cmpt>
841 {
842 public:
843 
845 };
846 
847 
848 template<class Cmpt>
849 class innerProduct<Tensor2D<Cmpt>, Tensor2D<Cmpt>>
850 {
851 public:
852 
854 };
855 
856 template<class Cmpt>
858 {
859 public:
860 
862 };
863 
864 template<class Cmpt>
866 {
867 public:
868 
870 };
871 
872 template<class Cmpt>
873 class innerProduct<Tensor2D<Cmpt>, Vector2D<Cmpt>>
874 {
875 public:
876 
878 };
879 
880 template<class Cmpt>
881 class innerProduct<Vector2D<Cmpt>, Tensor2D<Cmpt>>
882 {
883 public:
884 
886 };
887 
888 
889 template<class Cmpt>
890 class outerProduct<Vector2D<Cmpt>, Vector2D<Cmpt>>
891 {
892 public:
893 
895 };
896 
897 
898 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
899 
900 } // End namespace Foam
901 
902 // ************************************************************************* //
Foam::Tensor2D::cx
Vector2D< Cmpt > cx() const
Extract vector for column 0.
Definition: Tensor2DI.H:161
Foam::outerProduct< Vector2D< Cmpt >, Vector2D< Cmpt > >::type
Tensor2D< Cmpt > type
Definition: Tensor2DI.H:894
Foam::symm
dimensionedSymmTensor symm(const dimensionedSymmTensor &dt)
Definition: dimensionedSymmTensor.C:84
Foam::Tensor2D::operator=
Tensor2D & operator=(const Tensor2D &)=default
Copy assignment.
Foam::Tensor2D::cy
Vector2D< Cmpt > cy() const
Extract vector for column 1.
Definition: Tensor2DI.H:167
Foam::Tensor2D::Tensor2D
Tensor2D()=default
Default construct.
s
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))
Definition: gmvOutputSpray.H:25
Foam::skew
dimensionedTensor skew(const dimensionedTensor &dt)
Definition: dimensionedTensor.C:138
Foam::Tensor2D::cols
void cols(const Vector2D< Cmpt > &x, const Vector2D< Cmpt > &y)
Set column values.
Definition: Tensor2DI.H:267
Foam::operator&
tmp< GeometricField< Type, fvPatchField, volMesh > > operator&(const fvMatrix< Type > &, const DimensionedField< Type, volMesh > &)
Foam::invariantI
Cmpt invariantI(const SymmTensor< Cmpt > &st)
Return the 1st invariant of a SymmTensor.
Definition: SymmTensorI.H:342
Foam::Tensor2D::inner
Tensor2D< Cmpt > inner(const Tensor2D< Cmpt > &t2) const
Inner-product of this with another Tensor2D.
Definition: Tensor2DI.H:356
Foam::Zero
static constexpr const zero Zero
Global zero (0)
Definition: zero.H:131
Foam::Tensor2D::row
Vector2D< Cmpt > row() const
Extract vector for given row.
Foam::innerProduct
Definition: products.H:141
Foam::Tensor2D::yy
const Cmpt & yy() const
Definition: Tensor2DI.H:116
Foam::SymmTensor2D
A templated (2 x 2) symmetric tensor of objects of <T>, effectively containing 3 elements,...
Definition: SymmTensor2D.H:58
Foam::operator-
tmp< faMatrix< Type > > operator-(const faMatrix< Type > &)
Foam::innerProduct< Tensor2D< Cmpt >, SphericalTensor2D< Cmpt > >::type
Tensor2D< Cmpt > type
Definition: Tensor2DI.H:869
Foam::SphericalTensor2D::ii
const Cmpt & ii() const
Definition: SphericalTensor2DI.H:67
Foam::Tensor2D::xy
const Cmpt & xy() const
Definition: Tensor2DI.H:104
Foam::Vector2D
Templated 2D Vector derived from VectorSpace adding construction from 2 components,...
Definition: Vector2D.H:55
Foam::dev2
dimensionedSymmTensor dev2(const dimensionedSymmTensor &dt)
Definition: dimensionedSymmTensor.C:117
Foam::dimensioned::T
dimensioned< Type > T() const
Return transpose.
Definition: dimensionedSphericalTensor.C:38
Foam::Tensor2D
A templated (2 x 2) tensor of objects of <T> derived from VectorSpace.
Definition: Tensor2D.H:59
Foam::innerProduct< Tensor2D< Cmpt >, Tensor2D< Cmpt > >::type
Tensor2D< Cmpt > type
Definition: Tensor2DI.H:853
Foam::VectorSpace
Templated vector space.
Definition: VectorSpace.H:56
Foam::typeOfSum
Definition: products.H:97
Foam::innerProduct< Vector2D< Cmpt >, Tensor2D< Cmpt > >::type
Vector2D< Cmpt > type
Definition: Tensor2DI.H:885
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:61
Foam::inv
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
Definition: dimensionedSphericalTensor.C:73
Foam::typeOfSum< Tensor2D< Cmpt >, SphericalTensor2D< Cmpt > >::type
Tensor2D< Cmpt > type
Definition: Tensor2DI.H:844
Foam::typeOfSum< SphericalTensor2D< Cmpt >, Tensor2D< Cmpt > >::type
Tensor2D< Cmpt > type
Definition: Tensor2DI.H:836
Foam::sph
SphericalTensor< Cmpt > sph(const DiagTensor< Cmpt > &dt)
Return the spherical part of a DiagTensor as a SphericalTensor.
Definition: DiagTensorI.H:130
Foam::VectorSpace< Tensor2D< Cmpt >, Cmpt, 4 >::vsType
VectorSpace< Tensor2D< Cmpt >, Cmpt, Ncmpts > vsType
VectorSpace type.
Definition: VectorSpace.H:86
Foam::operator&&
dimensioned< typename scalarProduct< Type1, Type2 >::type > operator&&(const dimensioned< Type1 > &, const dimensioned< Type2 > &)
Foam::FatalError
error FatalError
Foam::Tensor2D::diag
Vector2D< Cmpt > diag() const
Extract the diagonal as a vector.
Definition: Tensor2DI.H:328
Foam::innerProduct< Tensor2D< Cmpt >, Vector2D< Cmpt > >::type
Vector2D< Cmpt > type
Definition: Tensor2DI.H:877
Foam::invariantII
Cmpt invariantII(const SymmTensor< Cmpt > &st)
Return the 2nd invariant of a SymmTensor.
Definition: SymmTensorI.H:350
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::abort
errorManip< error > abort(error &err)
Definition: errorManip.H:144
Foam::cof
dimensionedSymmTensor cof(const dimensionedSymmTensor &dt)
Definition: dimensionedSymmTensor.C:139
Foam::Tensor2D::x
Vector2D< Cmpt > x() const
Extract vector for row 0.
Definition: Tensor2DI.H:148
Foam::operator/
dimensionedScalar operator/(const scalar s1, const dimensionedScalar &ds2)
Definition: dimensionedScalar.C:68
Foam::Tensor2D::T
Tensor2D< Cmpt > T() const
Return non-Hermitian transpose.
Definition: Tensor2DI.H:344
FatalErrorInFunction
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:453
Foam::Tensor2D::y
Vector2D< Cmpt > y() const
Extract vector for row 1.
Definition: Tensor2DI.H:154
Foam::operator+
tmp< faMatrix< Type > > operator+(const faMatrix< Type > &, const faMatrix< Type > &)
Foam::mag
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
Foam::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:590
Foam::Tensor2D::schur
Tensor2D< Cmpt > schur(const Tensor2D< Cmpt > &t2) const
Schur-product of this with another Tensor2D.
Definition: Tensor2DI.H:373
Foam::operator*
tmp< faMatrix< Type > > operator*(const areaScalarField &, const faMatrix< Type > &)
Foam::direction
uint8_t direction
Definition: direction.H:52
x
x
Definition: LISASMDCalcMethod2.H:52
Foam::Tensor2D::xx
const Cmpt & xx() const
Definition: Tensor2DI.H:98
Foam::constant::universal::c
const dimensionedScalar c
Speed of light in a vacuum.
Foam::SymmTensor2D::xx
const Cmpt & xx() const
Definition: SymmTensor2DI.H:80
Foam::Tensor2D::col
Vector2D< Cmpt > col() const
Extract vector for given column.
Foam::Tensor2D::rows
void rows(const Vector2D< Cmpt > &x, const Vector2D< Cmpt > &y)
Set row values.
Definition: Tensor2DI.H:279
Foam::Tensor2D::yx
const Cmpt & yx() const
Definition: Tensor2DI.H:110
Foam::tr
dimensionedScalar tr(const dimensionedSphericalTensor &dt)
Definition: dimensionedSphericalTensor.C:51
Foam::det
dimensionedScalar det(const dimensionedSphericalTensor &dt)
Definition: dimensionedSphericalTensor.C:62
Foam::innerProduct< SphericalTensor2D< Cmpt >, Tensor2D< Cmpt > >::type
Tensor2D< Cmpt > type
Definition: Tensor2DI.H:861
Foam::SymmTensor2D::yy
const Cmpt & yy() const
Definition: SymmTensor2DI.H:98
Foam::Vector2D::y
const Cmpt & y() const
Access to the vector y component.
Definition: Vector2DI.H:73
Foam::twoSymm
dimensionedSymmTensor twoSymm(const dimensionedSymmTensor &dt)
Definition: dimensionedSymmTensor.C:95
Foam::outerProduct
Definition: products.H:106
Foam::Vector2D::x
const Cmpt & x() const
Access to the vector x component.
Definition: Vector2DI.H:66
Foam::SphericalTensor2D
A templated (2 x 2) diagonal tensor of objects of <T>, effectively containing 1 element,...
Definition: SphericalTensor2D.H:57
y
scalar y
Definition: LISASMDCalcMethod1.H:14
Foam::SymmTensor2D::xy
const Cmpt & xy() const
Definition: SymmTensor2DI.H:86
Foam::zero
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
Definition: zero.H:62
Foam::dev
dimensionedSymmTensor dev(const dimensionedSymmTensor &dt)
Definition: dimensionedSymmTensor.C:106