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-2019 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 :
60 {
61  this->v_[XX] = st.ii();
62  this->v_[YY] = st.ii();
63 }
64 
65 
66 template<class Cmpt>
68 (
69  const Vector2D<Cmpt>& x,
70  const Vector2D<Cmpt>& y
71 )
72 {
73  this->v_[XX] = x.x(); this->v_[XY] = x.y();
74  this->v_[YX] = y.x(); this->v_[YY] = y.y();
75 }
76 
77 
78 template<class Cmpt>
80 (
81  const Cmpt txx, const Cmpt txy,
82  const Cmpt tyx, const Cmpt tyy
83 )
84 {
85  this->v_[XX] = txx; this->v_[XY] = txy;
86  this->v_[YX] = tyx; this->v_[YY] = tyy;
87 }
88 
89 
90 template<class Cmpt>
92 :
93  Tensor2D::vsType(is)
94 {}
95 
96 
97 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
98 
99 template<class Cmpt>
100 inline const Cmpt& Foam::Tensor2D<Cmpt>::xx() const
101 {
102  return this->v_[XX];
103 }
104 
105 template<class Cmpt>
106 inline const Cmpt& Foam::Tensor2D<Cmpt>::xy() const
107 {
108  return this->v_[XY];
109 }
110 
111 template<class Cmpt>
112 inline const Cmpt& Foam::Tensor2D<Cmpt>::yx() const
113 {
114  return this->v_[YX];
115 }
116 
117 template<class Cmpt>
118 inline const Cmpt& Foam::Tensor2D<Cmpt>::yy() const
119 {
120  return this->v_[YY];
121 }
122 
123 
124 template<class Cmpt>
126 {
127  return this->v_[XX];
128 }
129 
130 template<class Cmpt>
132 {
133  return this->v_[XY];
134 }
135 
136 template<class Cmpt>
138 {
139  return this->v_[YX];
140 }
141 
142 template<class Cmpt>
144 {
145  return this->v_[YY];
146 }
147 
148 
149 template<class Cmpt>
151 {
152  return Vector2D<Cmpt>(this->v_[XX], this->v_[XY]);
153 }
154 
155 template<class Cmpt>
157 {
158  return Vector2D<Cmpt>(this->v_[YX], this->v_[YY]);
159 }
160 
161 
162 template<class Cmpt>
164 {
165  return Vector2D<Cmpt>(this->v_[XX], this->v_[YX]);
166 }
167 
168 template<class Cmpt>
170 {
171  return Vector2D<Cmpt>(this->v_[XY], this->v_[YY]);
172 }
173 
174 
175 template<class Cmpt>
176 template<Foam::direction Col>
178 {
179  if (Col == 0) return cx();
180  else if (Col == 1) return cy();
181 
182  static_assert(Col < 2, "Invalid column access");
183  return Zero;
184 }
185 
186 
187 template<class Cmpt>
189 {
190  switch (c)
191  {
192  case 0: return cx(); break;
193  case 1: return cy(); break;
194  }
195 
197  << "Invalid column access " << c << abort(FatalError);
198 
199  return Zero;
200 }
201 
202 
203 template<class Cmpt>
204 template<Foam::direction Row>
206 {
207  if (Row == 0) return x();
208  else if (Row == 1) return y();
209 
210  static_assert(Row < 2, "Invalid row access");
211  return Zero;
212 }
213 
214 
215 template<class Cmpt>
217 {
218  switch (r)
219  {
220  case 0: return x(); break;
221  case 1: return y(); break;
222  }
223 
225  << "Invalid row access " << r << abort(FatalError);
226 
227  return Zero;
228 }
229 
230 
231 template<class Cmpt>
232 template<Foam::direction Col>
234 {
235  if (Col == 0)
236  {
237  this->v_[XX] = v.x();
238  this->v_[YX] = v.y();
239  }
240  else if (Col == 1)
241  {
242  this->v_[XY] = v.x();
243  this->v_[YY] = v.y();
244  }
245 
246  static_assert(Col < 2, "Invalid column access");
247 }
248 
249 
250 template<class Cmpt>
251 template<Foam::direction Row>
253 {
254  if (Row == 0)
255  {
256  this->v_[XX] = v.x(); this->v_[XY] = v.y();
257  }
258  else if (Row == 1)
259  {
260  this->v_[YX] = v.x(); this->v_[YY] = v.y();
261  }
262 
263  static_assert(Row < 2, "Invalid row access");
264 }
265 
266 
267 template<class Cmpt>
268 inline void Foam::Tensor2D<Cmpt>::cols
269 (
270  const Vector2D<Cmpt>& x,
271  const Vector2D<Cmpt>& y
272 )
273 {
274  this->v_[XX] = x.x(); this->v_[XY] = y.x();
275  this->v_[YX] = x.y(); this->v_[YY] = y.y();
276 }
277 
278 
279 template<class Cmpt>
280 inline void Foam::Tensor2D<Cmpt>::rows
281 (
282  const Vector2D<Cmpt>& x,
283  const Vector2D<Cmpt>& y
284 )
285 {
286  this->v_[XX] = x.x(); this->v_[XY] = x.y();
287  this->v_[YX] = y.x(); this->v_[YY] = y.y();
288 }
289 
290 
291 template<class Cmpt>
292 inline void Foam::Tensor2D<Cmpt>::col
293 (
294  const direction c,
295  const Vector2D<Cmpt>& v
296 )
297 {
298  switch (c)
299  {
300  case 0: col<0>(v); break;
301  case 1: col<1>(v); break;
302  default:
304  << "Invalid column access " << c << abort(FatalError);
305  break;
306  }
307 }
308 
309 
310 template<class Cmpt>
311 inline void Foam::Tensor2D<Cmpt>::row
312 (
313  const direction r,
314  const Vector2D<Cmpt>& v
315 )
316 {
317  switch (r)
318  {
319  case 0: row<0>(v); break;
320  case 1: row<1>(v); break;
321  default:
323  << "Invalid row access " << r << abort(FatalError);
324  break;
325  }
326 }
327 
328 
329 template<class Cmpt>
331 {
332  return Vector2D<Cmpt>(this->v_[XX], this->v_[YY]);
333 }
334 
335 
336 template<class Cmpt>
338 {
339  this->v_[XX] = v.x(); this->v_[YY] = v.y();
340 }
341 
342 
343 // * * * * * * * * * * * * * * * Member Operations * * * * * * * * * * * * * //
344 
345 template<class Cmpt>
347 {
348  return Tensor2D<Cmpt>
349  (
350  xx(), yx(),
351  xy(), yy()
352  );
353 }
354 
355 
356 template<class Cmpt>
359 {
360  const Tensor2D<Cmpt>& t1 = *this;
361 
362  return Tensor2D<Cmpt>
363  (
364  t1.xx()*t2.xx() + t1.xy()*t2.yx(),
365  t1.xx()*t2.xy() + t1.xy()*t2.yy(),
366 
367  t1.yx()*t2.xx() + t1.yy()*t2.yx(),
368  t1.yx()*t2.xy() + t1.yy()*t2.yy()
369  );
370 }
371 
372 
373 template<class Cmpt>
376 {
377  const Tensor2D<Cmpt>& t1 = *this;
378 
379  return Tensor2D<Cmpt>
380  (
381  t1.xx()*t2.xx(), t1.xy()*t2.xy(),
382  t1.yx()*t2.yx(), t1.yy()*t2.yy()
383  );
384 }
385 
386 
387 // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
388 
389 template<class Cmpt>
391 {
392  this->v_[XX] = st.xx(); this->v_[XY] = st.xy();
393  this->v_[YX] = st.xy(); this->v_[YY] = st.yy();
394 }
395 
396 
397 template<class Cmpt>
399 {
400  this->v_[XX] = st.ii(); this->v_[XY] = 0;
401  this->v_[YX] = 0; this->v_[YY] = st.ii();
402 }
403 
404 
405 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
406 
407 namespace Foam
408 {
409 
410 // * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * //
411 
412 //- Inner-product between two tensors
413 template<class Cmpt>
416 {
417  return t1.inner(t2);
418 }
419 
420 
421 //- Inner-product between a tensor and a vector
422 template<class Cmpt>
423 inline typename innerProduct<Tensor2D<Cmpt>, Vector2D<Cmpt>>::type
425 {
426  return Vector2D<Cmpt>
427  (
428  t.xx()*v.x() + t.xy()*v.y(),
429  t.yx()*v.x() + t.yy()*v.y()
430  );
431 }
432 
433 //- Inner-product between a vector and a tensor
434 template<class Cmpt>
435 inline typename innerProduct<Vector2D<Cmpt>, Tensor2D<Cmpt>>::type
437 {
438  return Vector2D<Cmpt>
439  (
440  v.x()*t.xx() + v.y()*t.yx(),
441  v.x()*t.xy() + v.y()*t.yy()
442  );
443 }
444 
445 //- Outer-product between two vectors
446 template<class Cmpt>
447 inline typename outerProduct<Vector2D<Cmpt>, Vector2D<Cmpt>>::type
449 {
450  return Tensor2D<Cmpt>
451  (
452  v1.x()*v2.x(), v1.x()*v2.y(),
453  v1.y()*v2.x(), v1.y()*v2.y()
454  );
455 }
456 
457 
458 //- Return the trace of a tensor
459 template<class Cmpt>
460 inline Cmpt tr(const Tensor2D<Cmpt>& t)
461 {
462  return t.xx() + t.yy();
463 }
464 
465 
466 //- Return the spherical part of a tensor
467 template<class Cmpt>
469 {
470  return 0.5*tr(t);
471 }
472 
473 
474 //- Return the symmetric part of a tensor
475 template<class Cmpt>
477 {
478  return SymmTensor2D<Cmpt>
479  (
480  t.xx(), 0.5*(t.xy() + t.yx()),
481  t.yy()
482  );
483 }
484 
485 //- Return the twice the symmetric part of a tensor
486 template<class Cmpt>
488 {
489  return SymmTensor2D<Cmpt>
490  (
491  t.xx() + t.xx(), t.xy() + t.yx(),
492  t.yy() + t.yy()
493  );
494 }
495 
496 //- Return the skew-symmetric part of a tensor
497 template<class Cmpt>
499 {
500  return Tensor2D<Cmpt>
501  (
502  0.0, 0.5*(t.xy() - t.yx()),
503  0.5*(t.yx() - t.xy()), 0.0
504  );
505 }
506 
507 
508 //- Return the deviatoric part of a tensor
509 template<class Cmpt>
511 {
513 }
514 
515 
516 //- Return the deviatoric part of a tensor
517 template<class Cmpt>
519 {
521 }
522 
523 
524 //- Return the determinant of a tensor
525 template<class Cmpt>
526 inline Cmpt det(const Tensor2D<Cmpt>& t)
527 {
528  return(t.xx()*t.yy() - t.xy()*t.yx());
529 }
530 
531 
532 //- Return the cofactor tensor of a tensor
533 template<class Cmpt>
535 {
536  return Tensor2D<Cmpt>
537  (
538  t.yy(), -t.xy(),
539  -t.yx(), t.xx()
540  );
541 }
542 
543 
544 //- Return the inverse of a tensor given the determinant
545 template<class Cmpt>
546 inline Tensor2D<Cmpt> inv(const Tensor2D<Cmpt>& t, const Cmpt dett)
547 {
548  return cof(t)/dett;
549 }
550 
551 
552 //- Return the inverse of a tensor
553 template<class Cmpt>
555 {
556  return inv(t, det(t));
557 }
558 
559 
560 //- Return the 1st invariant of a tensor
561 template<class Cmpt>
562 inline Cmpt invariantI(const Tensor2D<Cmpt>& t)
563 {
564  return tr(t);
565 }
566 
567 
568 //- Return the 2nd invariant of a tensor
569 template<class Cmpt>
570 inline Cmpt invariantII(const Tensor2D<Cmpt>& t)
571 {
572  return
573  (
574  0.5*sqr(tr(t))
575  - 0.5*
576  (
577  t.xx()*t.xx() + t.xy()*t.xy()
578  + t.yx()*t.yx() + t.yy()*t.yy()
579  )
580  );
581 }
582 
583 
584 //- Return the 3rd invariant of a tensor
585 template<class Cmpt>
586 inline Cmpt invariantIII(const Tensor2D<Cmpt>& t)
587 {
588  return det(t);
589 }
590 
591 
592 // * * * * * * * * * Mixed Tensor SphericalTensor Operators * * * * * * * * //
593 
594 template<class Cmpt>
595 inline Tensor2D<Cmpt>
597 {
598  return Tensor2D<Cmpt>
599  (
600  st1.ii() + t2.xx(), t2.xy(),
601  t2.yx(), st1.ii() + t2.yy()
602  );
603 }
604 
605 
606 template<class Cmpt>
607 inline Tensor2D<Cmpt>
609 {
610  return Tensor2D<Cmpt>
611  (
612  t1.xx() + st2.ii(), t1.xy(),
613  t1.yx(), t1.yy() + st2.ii()
614  );
615 }
616 
617 
618 template<class Cmpt>
619 inline Tensor2D<Cmpt>
621 {
622  return Tensor2D<Cmpt>
623  (
624  st1.ii() - t2.xx(), -t2.xy(),
625  -t2.yx(), st1.ii() - t2.yy()
626  );
627 }
628 
629 
630 template<class Cmpt>
631 inline Tensor2D<Cmpt>
633 {
634  return Tensor2D<Cmpt>
635  (
636  t1.xx() - st2.ii(), t1.xy(),
637  t1.yx(), t1.yy() - st2.ii()
638  );
639 }
640 
641 
642 //- Inner-product between a spherical tensor and a tensor
643 template<class Cmpt>
644 inline Tensor2D<Cmpt>
646 {
647  return Tensor2D<Cmpt>
648  (
649  st1.ii()*t2.xx(),
650  st1.ii()*t2.xy(),
651  st1.ii()*t2.yx(),
652  st1.ii()*t2.yy()
653  );
654 }
655 
656 
657 //- Inner-product between a tensor and a spherical tensor
658 template<class Cmpt>
659 inline Tensor2D<Cmpt>
661 {
662  return Tensor2D<Cmpt>
663  (
664  t1.xx()*st2.ii(),
665  t1.xy()*st2.ii(),
666 
667  t1.yx()*st2.ii(),
668  t1.yy()*st2.ii()
669  );
670 }
671 
672 
673 //- Double-dot-product between a spherical tensor and a tensor
674 template<class Cmpt>
675 inline Cmpt
677 {
678  return(st1.ii()*t2.xx() + st1.ii()*t2.yy());
679 }
680 
681 
682 //- Double-dot-product between a tensor and a spherical tensor
683 template<class Cmpt>
684 inline Cmpt
686 {
687  return(t1.xx()*st2.ii() + t1.yy()*st2.ii());
688 }
689 
690 
691 // * * * * * * * * * * Mixed Tensor SymmTensor Operators * * * * * * * * * * //
692 
693 template<class Cmpt>
694 inline Tensor2D<Cmpt>
696 {
697  return Tensor2D<Cmpt>
698  (
699  st1.xx() + t2.xx(), st1.xy() + t2.xy(),
700  st1.xy() + t2.yx(), st1.yy() + t2.yy()
701  );
702 }
703 
704 
705 template<class Cmpt>
706 inline Tensor2D<Cmpt>
708 {
709  return Tensor2D<Cmpt>
710  (
711  t1.xx() + st2.xx(), t1.xy() + st2.xy(),
712  t1.yx() + st2.xy(), t1.yy() + st2.yy()
713  );
714 }
715 
716 
717 template<class Cmpt>
718 inline Tensor2D<Cmpt>
720 {
721  return Tensor2D<Cmpt>
722  (
723  st1.xx() - t2.xx(), st1.xy() - t2.xy(),
724  st1.xy() - t2.yx(), st1.yy() - t2.yy()
725  );
726 }
727 
728 
729 template<class Cmpt>
730 inline Tensor2D<Cmpt>
732 {
733  return Tensor2D<Cmpt>
734  (
735  t1.xx() - st2.xx(), t1.xy() - st2.xy(),
736  t1.yx() - st2.xy(), t1.yy() - st2.yy()
737  );
738 }
739 
740 
741 //- Inner-product between a spherical tensor and a tensor
742 template<class Cmpt>
743 inline Tensor2D<Cmpt>
745 {
746  return Tensor2D<Cmpt>
747  (
748  st1.xx()*t2.xx() + st1.xy()*t2.yx(),
749  st1.xx()*t2.xy() + st1.xy()*t2.yy(),
750 
751  st1.xy()*t2.xx() + st1.yy()*t2.yx(),
752  st1.xy()*t2.xy() + st1.yy()*t2.yy()
753  );
754 }
755 
756 
757 //- Inner-product between a tensor and a spherical tensor
758 template<class Cmpt>
759 inline Tensor2D<Cmpt>
761 {
762  return Tensor2D<Cmpt>
763  (
764  t1.xx()*st2.xx() + t1.xy()*st2.xy(),
765  t1.xx()*st2.xy() + t1.xy()*st2.yy(),
766 
767  t1.yx()*st2.xx() + t1.yy()*st2.xy(),
768  t1.yx()*st2.xy() + t1.yy()*st2.yy()
769  );
770 }
771 
772 
773 //- Double-dot-product between a spherical tensor and a tensor
774 template<class Cmpt>
775 inline Cmpt
777 {
778  return
779  (
780  st1.xx()*t2.xx() + st1.xy()*t2.xy()
781  + st1.xy()*t2.yx() + st1.yy()*t2.yy()
782  );
783 }
784 
785 
786 //- Double-dot-product between a tensor and a spherical tensor
787 template<class Cmpt>
788 inline Cmpt
790 {
791  return
792  (
793  t1.xx()*st2.xx() + t1.xy()*st2.xy()
794  + t1.yx()*st2.xy() + t1.yy()*st2.yy()
795  );
796 }
797 
798 
799 template<class Cmpt>
801 {
802 public:
803 
805 };
806 
807 template<class Cmpt>
809 {
810 public:
811 
813 };
814 
815 
816 template<class Cmpt>
817 class innerProduct<Tensor2D<Cmpt>, Tensor2D<Cmpt>>
818 {
819 public:
820 
822 };
823 
824 template<class Cmpt>
826 {
827 public:
828 
830 };
831 
832 template<class Cmpt>
834 {
835 public:
836 
838 };
839 
840 template<class Cmpt>
841 class innerProduct<Tensor2D<Cmpt>, Vector2D<Cmpt>>
842 {
843 public:
844 
846 };
847 
848 template<class Cmpt>
849 class innerProduct<Vector2D<Cmpt>, Tensor2D<Cmpt>>
850 {
851 public:
852 
854 };
855 
856 
857 template<class Cmpt>
858 class outerProduct<Vector2D<Cmpt>, Vector2D<Cmpt>>
859 {
860 public:
861 
863 };
864 
865 
866 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
867 
868 } // End namespace Foam
869 
870 // ************************************************************************* //
Foam::Tensor2D::cx
Vector2D< Cmpt > cx() const
Extract vector for column 0.
Definition: Tensor2DI.H:163
Foam::outerProduct< Vector2D< Cmpt >, Vector2D< Cmpt > >::type
Tensor2D< Cmpt > type
Definition: Tensor2DI.H:862
Foam::symm
dimensionedSymmTensor symm(const dimensionedSymmTensor &dt)
Definition: dimensionedSymmTensor.C:84
Foam::Tensor2D::cy
Vector2D< Cmpt > cy() const
Extract vector for column 1.
Definition: Tensor2DI.H:169
Foam::Tensor2D::Tensor2D
Tensor2D()=default
Construct null.
Foam::invariantIII
Cmpt invariantIII(const SymmTensor< Cmpt > &st)
Return the 3rd invariant of a symmetric tensor.
Definition: SymmTensorI.H:431
Foam::skew
dimensionedTensor skew(const dimensionedTensor &dt)
Definition: dimensionedTensor.C:137
Foam::Tensor2D::cols
void cols(const Vector2D< Cmpt > &x, const Vector2D< Cmpt > &y)
Set column values.
Definition: Tensor2DI.H:269
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 symmetric tensor.
Definition: SymmTensorI.H:411
Foam::Tensor2D::inner
Tensor2D< Cmpt > inner(const Tensor2D< Cmpt > &t2) const
Inner-product of this with another Tensor2D.
Definition: Tensor2DI.H:358
Foam::Zero
static constexpr const zero Zero
Global zero.
Definition: zero.H:128
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:118
Foam::SymmTensor2D
Templated 2D symmetric tensor derived from VectorSpace adding construction from 4 components,...
Definition: SymmTensor2D.H:57
Foam::operator-
tmp< faMatrix< Type > > operator-(const faMatrix< Type > &)
Foam::innerProduct< Tensor2D< Cmpt >, SphericalTensor2D< Cmpt > >::type
Tensor2D< Cmpt > type
Definition: Tensor2DI.H:837
Foam::SphericalTensor2D::ii
const Cmpt & ii() const
Definition: SphericalTensor2DI.H:71
Foam::Tensor2D::xy
const Cmpt & xy() const
Definition: Tensor2DI.H:106
Foam::Tensor2D::XX
Definition: Tensor2D.H:82
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::VectorSpace< Tensor2D< Cmpt >, Cmpt, 4 >::v_
Cmpt v_[Ncmpts]
The components of this vector space.
Definition: VectorSpace.H:83
Foam::Tensor2D
Templated 2D tensor derived from VectorSpace adding construction from 4 components,...
Definition: Tensor2D.H:59
Foam::innerProduct< Tensor2D< Cmpt >, Tensor2D< Cmpt > >::type
Tensor2D< Cmpt > type
Definition: Tensor2DI.H:821
Foam::VectorSpace
Templated vector space.
Definition: VectorSpace.H:56
Foam::Tensor2D::YY
Definition: Tensor2D.H:82
Foam::typeOfSum
Definition: products.H:97
Foam::innerProduct< Vector2D< Cmpt >, Tensor2D< Cmpt > >::type
Vector2D< Cmpt > type
Definition: Tensor2DI.H:853
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:812
Foam::typeOfSum< SphericalTensor2D< Cmpt >, Tensor2D< Cmpt > >::type
Tensor2D< Cmpt > type
Definition: Tensor2DI.H:804
Foam::sph
SphericalTensor< Cmpt > sph(const DiagTensor< Cmpt > &dt)
Return the spherical part of a diagonal tensor.
Definition: DiagTensorI.H:290
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:330
Foam::innerProduct< Tensor2D< Cmpt >, Vector2D< Cmpt > >::type
Vector2D< Cmpt > type
Definition: Tensor2DI.H:845
Foam::invariantII
Cmpt invariantII(const SymmTensor< Cmpt > &st)
Return the 2nd invariant of a symmetric tensor.
Definition: SymmTensorI.H:419
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::abort
errorManip< error > abort(error &err)
Definition: errorManip.H:137
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:150
Foam::Tensor2D::T
Tensor2D< Cmpt > T() const
Return transpose.
Definition: Tensor2DI.H:346
FatalErrorInFunction
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:355
Foam::sqr
dimensionedSymmTensor sqr(const dimensionedVector &dv)
Definition: dimensionedSymmTensor.C:51
Foam::Tensor2D::y
Vector2D< Cmpt > y() const
Extract vector for row 1.
Definition: Tensor2DI.H:156
Foam::operator+
tmp< faMatrix< Type > > operator+(const faMatrix< Type > &, const faMatrix< Type > &)
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:375
Foam::operator*
tmp< faMatrix< Type > > operator*(const areaScalarField &, const faMatrix< Type > &)
Foam::direction
uint8_t direction
Definition: direction.H:47
x
x
Definition: LISASMDCalcMethod2.H:52
Foam::Tensor2D::operator=
void operator=(const SymmTensor2D< Cmpt > &)
Copy assign from SymmTensor2D.
Definition: Tensor2DI.H:390
Foam::Tensor2D::xx
const Cmpt & xx() const
Definition: Tensor2DI.H:100
Foam::constant::universal::c
const dimensionedScalar c
Speed of light in a vacuum.
Foam::SymmTensor2D::xx
const Cmpt & xx() const
Definition: SymmTensor2DI.H:85
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:281
Foam::Tensor2D::yx
const Cmpt & yx() const
Definition: Tensor2DI.H:112
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:829
Foam::SymmTensor2D::yy
const Cmpt & yy() const
Definition: SymmTensor2DI.H:97
Foam::Vector2D::y
const Cmpt & y() const
Access to the vector y component.
Definition: Vector2DI.H:78
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:71
Foam::SphericalTensor2D
Templated 2D sphericalTensor derived from VectorSpace adding construction from 1 component,...
Definition: SphericalTensor2D.H:55
y
scalar y
Definition: LISASMDCalcMethod1.H:14
Foam::SymmTensor2D::xy
const Cmpt & xy() const
Definition: SymmTensor2DI.H:91
Foam::zero
A class representing the concept of 0 (zero), which can be used to avoid manipulating objects that ar...
Definition: zero.H:61
Foam::dev
dimensionedSymmTensor dev(const dimensionedSymmTensor &dt)
Definition: dimensionedSymmTensor.C:106