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-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 #include "Tensor.H"
30 
31 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
32 
33 template<class Cmpt>
35 :
37 {}
38 
39 
40 template<class Cmpt>
41 template<class Cmpt2>
43 (
44  const VectorSpace<SymmTensor<Cmpt2>, Cmpt2, 6>& vs
45 )
46 :
48 {}
49 
50 
51 template<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 
60 template<class Cmpt>
62 (
63  const Cmpt txx, const Cmpt txy, const Cmpt txz,
64  const Cmpt tyy, const Cmpt tyz,
65  const Cmpt tzz
66 )
67 {
68  this->v_[XX] = txx; this->v_[XY] = txy; this->v_[XZ] = txz;
69  this->v_[YY] = tyy; this->v_[YZ] = tyz;
70  this->v_[ZZ] = tzz;
71 }
72 
73 
74 template<class Cmpt>
76 :
77  SymmTensor::vsType(is)
78 {}
79 
80 
81 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
82 
83 template<class Cmpt>
84 inline const Cmpt& Foam::SymmTensor<Cmpt>::xx() const
85 {
86  return this->v_[XX];
87 }
88 
89 template<class Cmpt>
90 inline const Cmpt& Foam::SymmTensor<Cmpt>::xy() const
91 {
92  return this->v_[XY];
93 }
94 
95 template<class Cmpt>
96 inline const Cmpt& Foam::SymmTensor<Cmpt>::xz() const
97 {
98  return this->v_[XZ];
99 }
100 
101 template<class Cmpt>
102 inline const Cmpt& Foam::SymmTensor<Cmpt>::yx() const
103 {
104  return this->v_[XY];
105 }
106 
107 template<class Cmpt>
108 inline const Cmpt& Foam::SymmTensor<Cmpt>::yy() const
109 {
110  return this->v_[YY];
111 }
112 
113 template<class Cmpt>
114 inline const Cmpt& Foam::SymmTensor<Cmpt>::yz() const
115 {
116  return this->v_[YZ];
117 }
118 
119 template<class Cmpt>
120 inline const Cmpt& Foam::SymmTensor<Cmpt>::zx() const
121 {
122  return this->v_[XZ];
123 }
124 
125 template<class Cmpt>
126 inline const Cmpt& Foam::SymmTensor<Cmpt>::zy() const
127 {
128  return this->v_[YZ];
129 }
130 
131 template<class Cmpt>
132 inline const Cmpt& Foam::SymmTensor<Cmpt>::zz() const
133 {
134  return this->v_[ZZ];
135 }
136 
137 
138 template<class Cmpt>
140 {
141  return this->v_[XX];
142 }
143 
144 template<class Cmpt>
146 {
147  return this->v_[XY];
148 }
149 
150 template<class Cmpt>
152 {
153  return this->v_[XZ];
154 }
155 
156 template<class Cmpt>
158 {
159  return this->v_[XY];
160 }
161 
162 template<class Cmpt>
164 {
165  return this->v_[YY];
166 }
167 
168 template<class Cmpt>
170 {
171  return this->v_[YZ];
172 }
173 
174 template<class Cmpt>
176 {
177  return this->v_[XZ];
178 }
179 
180 template<class Cmpt>
182 {
183  return this->v_[YZ];
184 }
185 
186 template<class Cmpt>
188 {
189  return this->v_[ZZ];
190 }
191 
192 
193 template<class Cmpt>
195 {
196  return Vector<Cmpt>(this->v_[XX], this->v_[YY], this->v_[ZZ]);
197 }
198 
199 
200 template<class Cmpt>
202 {
203  this->v_[XX] = v.x(); this->v_[YY] = v.y(); this->v_[ZZ] = v.z();
204 }
205 
206 
207 template<class Cmpt>
209 {
210  return *this;
211 }
212 
213 
214 // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
215 
216 template<class Cmpt>
218 {
219  this->v_[XX] = st.ii(); this->v_[XY] = Zero; this->v_[XZ] = Zero;
220  this->v_[YY] = st.ii(); this->v_[YZ] = Zero;
221  this->v_[ZZ] = st.ii();
222 }
223 
224 
225 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
226 
227 namespace Foam
228 {
229 
230 // * * * * * * * * * * * * * * * Global Functions * * * * * * * * * * * * * //
231 
232 //- Return the trace of a SymmTensor
233 template<class Cmpt>
234 inline Cmpt tr(const SymmTensor<Cmpt>& st)
235 {
236  return st.xx() + st.yy() + st.zz();
237 }
238 
239 
240 //- Return the spherical part of a SymmTensor
241 template<class Cmpt>
243 {
244  return SphericalTensor<Cmpt>
245  (
246  (1.0/3.0)*tr(st)
247  );
248 }
249 
250 
251 //- Return the symmetric part of a SymmTensor, i.e. itself
252 template<class Cmpt>
253 inline const SymmTensor<Cmpt>& symm(const SymmTensor<Cmpt>& st)
254 {
255  return st;
256 }
257 
258 
259 //- Return twice the symmetric part of a SymmTensor
260 template<class Cmpt>
262 {
263  return 2*st;
264 }
265 
266 
267 //- Return the deviatoric part of a SymmTensor
268 template<class Cmpt>
270 {
271  return st - sph(st);
272 }
273 
274 
275 //- Return the two-third deviatoric part of a SymmTensor
276 template<class Cmpt>
278 {
279  return st - 2*sph(st);
280 }
281 
282 
283 //- Return the determinant of a SymmTensor
284 template<class Cmpt>
285 inline Cmpt det(const SymmTensor<Cmpt>& st)
286 {
287  return
288  (
289  st.xx()*st.yy()*st.zz() + st.xy()*st.yz()*st.xz()
290  + st.xz()*st.xy()*st.yz() - st.xx()*st.yz()*st.yz()
291  - st.xy()*st.xy()*st.zz() - st.xz()*st.yy()*st.xz()
292  );
293 }
294 
295 
296 //- Return the cofactor of a SymmTensor as a SymmTensor
297 template<class Cmpt>
299 {
300  return SymmTensor<Cmpt>
301  (
302  st.yy()*st.zz() - st.yz()*st.yz(),
303  st.xz()*st.yz() - st.xy()*st.zz(),
304  st.xy()*st.yz() - st.xz()*st.yy(),
305 
306  st.xx()*st.zz() - st.xz()*st.xz(),
307  st.xy()*st.xz() - st.xx()*st.yz(),
308 
309  st.xx()*st.yy() - st.xy()*st.xy()
310  );
311 }
312 
313 
314 //- Return the inverse of a SymmTensor by using the given determinant
315 template<class Cmpt>
316 inline SymmTensor<Cmpt> inv(const SymmTensor<Cmpt>& st, const Cmpt detst)
317 {
318  #ifdef FULLDEBUG
319  if (mag(detst) < VSMALL)
320  {
322  << "SymmTensor is not invertible due to the zero determinant:"
323  << "det(symmTensor) = " << mag(detst)
324  << abort(FatalError);
325  }
326  #endif
327 
328  return cof(st).T()/detst;
329 }
330 
331 
332 //- Return the inverse of a SymmTensor
333 template<class Cmpt>
335 {
336  return inv(st, det(st));
337 }
338 
339 
340 //- Return the 1st invariant of a SymmTensor
341 template<class Cmpt>
342 inline Cmpt invariantI(const SymmTensor<Cmpt>& st)
343 {
344  return tr(st);
345 }
346 
347 
348 //- Return the 2nd invariant of a SymmTensor
349 template<class Cmpt>
350 inline Cmpt invariantII(const SymmTensor<Cmpt>& st)
351 {
352  return
353  (
354  st.xx()*st.yy() + st.yy()*st.zz() + st.xx()*st.zz()
355  - st.xy()*st.xy() - st.yz()*st.yz() - st.xz()*st.xz()
356  );
357 }
358 
359 
360 //- Return the 3rd invariant of a SymmTensor
361 template<class Cmpt>
362 inline Cmpt invariantIII(const SymmTensor<Cmpt>& st)
363 {
364  return det(st);
365 }
366 
367 
368 //- Return the inner-product of a SymmTensor with itself
369 template<class Cmpt>
370 inline SymmTensor<Cmpt>
372 {
373  return SymmTensor<Cmpt>
374  (
375  st.xx()*st.xx() + st.xy()*st.xy() + st.xz()*st.xz(),
376  st.xx()*st.xy() + st.xy()*st.yy() + st.xz()*st.yz(),
377  st.xx()*st.xz() + st.xy()*st.yz() + st.xz()*st.zz(),
378 
379  st.xy()*st.xy() + st.yy()*st.yy() + st.yz()*st.yz(),
380  st.xy()*st.xz() + st.yy()*st.yz() + st.yz()*st.zz(),
381 
382  st.xz()*st.xz() + st.yz()*st.yz() + st.zz()*st.zz()
383  );
384 }
385 
386 
387 //- Return the square of Frobenius norm of a SymmTensor as a Cmpt
388 template<class Cmpt>
389 inline Cmpt magSqr(const SymmTensor<Cmpt>& st)
390 {
391  return Cmpt
392  (
393  mag(st.xx()*st.xx()) + 2*mag(st.xy()*st.xy()) + 2*mag(st.xz()*st.xz())
394  + mag(st.yy()*st.yy()) + 2*mag(st.yz()*st.yz())
395  + mag(st.zz()*st.zz())
396  );
397 }
398 
399 
400 //- Return the square of a Vector as a SymmTensor
401 template<class Cmpt>
403 {
404  return SymmTensor<Cmpt>
405  (
406  v.x()*v.x(), v.x()*v.y(), v.x()*v.z(),
407  v.y()*v.y(), v.y()*v.z(),
408  v.z()*v.z()
409  );
410 }
411 
412 
413 // * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * //
414 
415 //- Sum of a SphericalTensor and a SymmTensor
416 template<class Cmpt>
417 inline SymmTensor<Cmpt>
419 {
420  return SymmTensor<Cmpt>
421  (
422  spt1.ii() + st2.xx(), st2.xy(), st2.xz(),
423  spt1.ii() + st2.yy(), st2.yz(),
424  spt1.ii() + st2.zz()
425  );
426 }
427 
428 
429 //- Sum of a SymmTensor and a SphericalTensor
430 template<class Cmpt>
431 inline SymmTensor<Cmpt>
433 {
434  return SymmTensor<Cmpt>
435  (
436  st1.xx() + spt2.ii(), st1.xy(), st1.xz(),
437  st1.yy() + spt2.ii(), st1.yz(),
438  st1.zz() + spt2.ii()
439  );
440 }
441 
442 
443 //- Subtract a SymmTensor from a SphericalTensor
444 template<class Cmpt>
445 inline SymmTensor<Cmpt>
447 {
448  return SymmTensor<Cmpt>
449  (
450  spt1.ii() - st2.xx(), -st2.xy(), -st2.xz(),
451  spt1.ii() - st2.yy(), -st2.yz(),
452  spt1.ii() - st2.zz()
453  );
454 }
455 
456 
457 //- Subtract a SphericalTensor from a SymmTensor
458 template<class Cmpt>
459 inline SymmTensor<Cmpt>
461 {
462  return SymmTensor<Cmpt>
463  (
464  st1.xx() - spt2.ii(), st1.xy(), st1.xz(),
465  st1.yy() - spt2.ii(), st1.yz(),
466  st1.zz() - spt2.ii()
467  );
468 }
469 
470 
471 //- Return the Hodge dual of a SymmTensor as a Vector
472 template<class Cmpt>
474 {
475  return Vector<Cmpt>(st.yz(), -st.xz(), st.xy());
476 }
477 
478 
479 //- Division of a SymmTensor by a Cmpt
480 template<class Cmpt>
481 inline SymmTensor<Cmpt>
482 operator/(const SymmTensor<Cmpt>& st, const Cmpt s)
483 {
484  return SymmTensor<Cmpt>
485  (
486  st.xx()/s, st.xy()/s, st.xz()/s,
487  st.yy()/s, st.yz()/s,
488  st.zz()/s
489  );
490 }
491 
492 
493 //- Inner-product of a SymmTensor and a SymmTensor
494 template<class Cmpt>
495 inline Tensor<Cmpt>
497 {
498  return Tensor<Cmpt>
499  (
500  st1.xx()*st2.xx() + st1.xy()*st2.xy() + st1.xz()*st2.xz(),
501  st1.xx()*st2.xy() + st1.xy()*st2.yy() + st1.xz()*st2.yz(),
502  st1.xx()*st2.xz() + st1.xy()*st2.yz() + st1.xz()*st2.zz(),
503 
504  st1.xy()*st2.xx() + st1.yy()*st2.xy() + st1.yz()*st2.xz(),
505  st1.xy()*st2.xy() + st1.yy()*st2.yy() + st1.yz()*st2.yz(),
506  st1.xy()*st2.xz() + st1.yy()*st2.yz() + st1.yz()*st2.zz(),
507 
508  st1.xz()*st2.xx() + st1.yz()*st2.xy() + st1.zz()*st2.xz(),
509  st1.xz()*st2.xy() + st1.yz()*st2.yy() + st1.zz()*st2.yz(),
510  st1.xz()*st2.xz() + st1.yz()*st2.yz() + st1.zz()*st2.zz()
511  );
512 }
513 
514 
515 //- Inner-product of a SphericalTensor and a SymmTensor
516 template<class Cmpt>
517 inline SymmTensor<Cmpt>
519 {
520  return SymmTensor<Cmpt>
521  (
522  spt1.ii()*st2.xx(), spt1.ii()*st2.xy(), spt1.ii()*st2.xz(),
523  spt1.ii()*st2.yy(), spt1.ii()*st2.yz(),
524  spt1.ii()*st2.zz()
525  );
526 }
527 
528 
529 //- Inner-product of a SymmTensor and a SphericalTensor
530 template<class Cmpt>
531 inline SymmTensor<Cmpt>
533 {
534  return SymmTensor<Cmpt>
535  (
536  st1.xx()*spt2.ii(), st1.xy()*spt2.ii(), st1.xz()*spt2.ii(),
537  st1.yy()*spt2.ii(), st1.yz()*spt2.ii(),
538  st1.zz()*spt2.ii()
539  );
540 }
541 
542 
543 //- Inner-product of a SymmTensor and a Vector
544 template<class Cmpt>
545 inline Vector<Cmpt>
547 {
548  return Vector<Cmpt>
549  (
550  st.xx()*v.x() + st.xy()*v.y() + st.xz()*v.z(),
551  st.xy()*v.x() + st.yy()*v.y() + st.yz()*v.z(),
552  st.xz()*v.x() + st.yz()*v.y() + st.zz()*v.z()
553  );
554 }
555 
556 
557 //- Inner-product of a Vector and a SymmTensor
558 template<class Cmpt>
559 inline Vector<Cmpt>
561 {
562  return Vector<Cmpt>
563  (
564  v.x()*st.xx() + v.y()*st.xy() + v.z()*st.xz(),
565  v.x()*st.xy() + v.y()*st.yy() + v.z()*st.yz(),
566  v.x()*st.xz() + v.y()*st.yz() + v.z()*st.zz()
567  );
568 }
569 
570 
571 //- Double-inner-product of a SymmTensor and a SymmTensor
572 template<class Cmpt>
573 inline Cmpt
575 {
576  return
577  (
578  st1.xx()*st2.xx() + 2*st1.xy()*st2.xy() + 2*st1.xz()*st2.xz()
579  + st1.yy()*st2.yy() + 2*st1.yz()*st2.yz()
580  + st1.zz()*st2.zz()
581  );
582 }
583 
584 
585 //- Double-inner-product of a SphericalTensor and a SymmTensor
586 template<class Cmpt>
587 inline Cmpt
589 {
590  return (spt1.ii()*st2.xx() + spt1.ii()*st2.yy() + spt1.ii()*st2.zz());
591 }
592 
593 
594 //- Double-inner-product of a SymmTensor and a SphericalTensor
595 template<class Cmpt>
596 inline Cmpt
598 {
599  return (st1.xx()*spt2.ii() + st1.yy()*spt2.ii() + st1.zz()*spt2.ii());
600 }
601 
602 
603 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
604 
605 template<class Cmpt>
606 class outerProduct<SymmTensor<Cmpt>, Cmpt>
607 {
608 public:
609 
611 };
612 
613 template<class Cmpt>
614 class outerProduct<Cmpt, SymmTensor<Cmpt>>
615 {
616 public:
617 
619 };
620 
621 template<class Cmpt>
622 class innerProduct<SymmTensor<Cmpt>, SymmTensor<Cmpt>>
623 {
624 public:
625 
627 };
628 
629 template<class Cmpt>
630 class innerProduct<SymmTensor<Cmpt>, Vector<Cmpt>>
631 {
632 public:
633 
635 };
636 
637 template<class Cmpt>
638 class innerProduct<Vector<Cmpt>, SymmTensor<Cmpt>>
639 {
640 public:
641 
643 };
644 
645 
646 template<class Cmpt>
648 {
649 public:
650 
652 };
653 
654 template<class Cmpt>
656 {
657 public:
658 
660 };
661 
662 template<class Cmpt>
664 {
665 public:
666 
668 };
669 
670 template<class Cmpt>
672 {
673 public:
674 
676 };
677 
678 
679 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
680 
681 } // End namespace Foam
682 
683 // ************************************************************************* //
Foam::Tensor
A templated (3 x 3) tensor of objects of <T> derived from MatrixSpace.
Definition: complexI.H:275
Foam::Vector::x
const Cmpt & x() const
Access to the vector x component.
Definition: VectorI.H:73
Foam::symm
dimensionedSymmTensor symm(const dimensionedSymmTensor &dt)
Definition: dimensionedSymmTensor.C:84
Foam::SymmTensor
A templated (3 x 3) symmetric tensor of objects of <T>, effectively containing 6 elements,...
Definition: SymmTensor.H:58
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::invariantIII
Cmpt invariantIII(const SymmTensor< Cmpt > &st)
Return the 3rd invariant of a SymmTensor.
Definition: SymmTensorI.H:362
Foam::SymmTensor::yz
const Cmpt & yz() const
Definition: SymmTensorI.H:114
Foam::SymmTensor::T
const SymmTensor< Cmpt > & T() const
Return non-Hermitian transpose.
Definition: SymmTensorI.H:208
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::SymmTensor::xz
const Cmpt & xz() const
Definition: SymmTensorI.H:96
Foam::Zero
static constexpr const zero Zero
Global zero (0)
Definition: zero.H:131
Foam::innerProduct
Definition: products.H:141
Foam::typeOfSum< SphericalTensor< Cmpt >, SymmTensor< Cmpt > >::type
SymmTensor< Cmpt > type
Definition: SymmTensorI.H:651
Foam::operator-
tmp< faMatrix< Type > > operator-(const faMatrix< Type > &)
Foam::SymmTensor::zy
const Cmpt & zy() const
Definition: SymmTensorI.H:126
Foam::innerProduct< SymmTensor< Cmpt >, SymmTensor< Cmpt > >::type
Tensor< Cmpt > type
Definition: SymmTensorI.H:626
Foam::dev2
dimensionedSymmTensor dev2(const dimensionedSymmTensor &dt)
Definition: dimensionedSymmTensor.C:117
Foam::innerSqr
dimensionedSymmTensor innerSqr(const dimensionedSymmTensor &dt)
Definition: dimensionedSymmTensor.C:62
Foam::SymmTensor::SymmTensor
SymmTensor()=default
Default construct.
Foam::dimensioned::T
dimensioned< Type > T() const
Return transpose.
Definition: dimensionedSphericalTensor.C:38
Foam::Vector::z
const Cmpt & z() const
Access to the vector z component.
Definition: VectorI.H:85
Foam::outerProduct< SymmTensor< Cmpt >, Cmpt >::type
SymmTensor< Cmpt > type
Definition: SymmTensorI.H:610
Foam::magSqr
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
Foam::VectorSpace
Templated vector space.
Definition: VectorSpace.H:56
Foam::SymmTensor::xx
const Cmpt & xx() const
Definition: SymmTensorI.H:84
Foam::typeOfSum
Definition: products.H:97
Foam::outerProduct< Cmpt, SymmTensor< Cmpt > >::type
SymmTensor< Cmpt > type
Definition: SymmTensorI.H:618
Foam::SymmTensor::xy
const Cmpt & xy() const
Definition: SymmTensorI.H:90
Foam::SymmTensor::yx
const Cmpt & yx() const
Definition: SymmTensorI.H:102
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::sph
SphericalTensor< Cmpt > sph(const DiagTensor< Cmpt > &dt)
Return the spherical part of a DiagTensor as a SphericalTensor.
Definition: DiagTensorI.H:130
Foam::operator&&
dimensioned< typename scalarProduct< Type1, Type2 >::type > operator&&(const dimensioned< Type1 > &, const dimensioned< Type2 > &)
Foam::FatalError
error FatalError
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::SphericalTensor::ii
const Cmpt & ii() const
Definition: SphericalTensorI.H:68
Foam::SphericalTensor
A templated (3 x 3) diagonal tensor of objects of <T>, effectively containing 1 element,...
Definition: SphericalTensor.H:57
Foam::operator/
dimensionedScalar operator/(const scalar s1, const dimensionedScalar &ds2)
Definition: dimensionedScalar.C:68
Tensor.H
Foam::Vector::y
const Cmpt & y() const
Access to the vector y component.
Definition: VectorI.H:79
FatalErrorInFunction
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:453
Foam::sqr
dimensionedSymmTensor sqr(const dimensionedVector &dv)
Definition: dimensionedSymmTensor.C:51
Foam::SymmTensor::diag
Vector< Cmpt > diag() const
Extract the diagonal as a vector.
Definition: SymmTensorI.H:194
Foam::SymmTensor::yy
const Cmpt & yy() const
Definition: SymmTensorI.H:108
Foam::Vector
Templated 3D Vector derived from VectorSpace adding construction from 3 components,...
Definition: Vector.H:62
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::operator*
tmp< faMatrix< Type > > operator*(const areaScalarField &, const faMatrix< Type > &)
Foam::SymmTensor::operator=
SymmTensor & operator=(const SymmTensor &)=default
Copy assignment.
Foam::SymmTensor::zz
const Cmpt & zz() const
Definition: SymmTensorI.H:132
Foam::SymmTensor::zx
const Cmpt & zx() const
Definition: SymmTensorI.H:120
Foam::tr
dimensionedScalar tr(const dimensionedSphericalTensor &dt)
Definition: dimensionedSphericalTensor.C:51
Foam::det
dimensionedScalar det(const dimensionedSphericalTensor &dt)
Definition: dimensionedSphericalTensor.C:62
Foam::innerProduct< SphericalTensor< Cmpt >, SymmTensor< Cmpt > >::type
SymmTensor< Cmpt > type
Definition: SymmTensorI.H:667
Foam::innerProduct< SymmTensor< Cmpt >, SphericalTensor< Cmpt > >::type
SymmTensor< Cmpt > type
Definition: SymmTensorI.H:675
Foam::innerProduct< Vector< Cmpt >, SymmTensor< Cmpt > >::type
Vector< Cmpt > type
Definition: SymmTensorI.H:642
Foam::innerProduct< SymmTensor< Cmpt >, Vector< Cmpt > >::type
Vector< Cmpt > type
Definition: SymmTensorI.H:634
Foam::twoSymm
dimensionedSymmTensor twoSymm(const dimensionedSymmTensor &dt)
Definition: dimensionedSymmTensor.C:95
Foam::outerProduct
Definition: products.H:106
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
Foam::typeOfSum< SymmTensor< Cmpt >, SphericalTensor< Cmpt > >::type
SymmTensor< Cmpt > type
Definition: SymmTensorI.H:659