VectorSpaceI.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 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 "error.H"
30 #include "products.H"
31 #include "VectorSpaceOps.H"
32 #include "ops.H"
33 #include <type_traits>
34 
35 
36 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
37 
38 template<class Form, class Cmpt, Foam::direction Ncmpts>
40 {}
41 
42 
43 template<class Form, class Cmpt, Foam::direction Ncmpts>
45 {
47 }
48 
49 
50 template<class Form, class Cmpt, Foam::direction Ncmpts>
52 (
54 )
55 {
57 }
58 
59 
60 template<class Form, class Cmpt, Foam::direction Ncmpts>
61 template<class Form2, class Cmpt2>
63 (
65 )
66 {
68 }
69 
70 
71 template<class Form, class Cmpt, Foam::direction Ncmpts>
72 template<class SubVector, Foam::direction BStart>
75 (
76  const vsType& vs
77 )
78 :
79  vs_(vs)
80 {
81  static_assert
82  (
83  vsType::nComponents >= BStart + nComponents,
84  "Requested block size > VectorSpace size"
85  );
86 }
87 
88 
89 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
90 
91 template<class Form, class Cmpt, Foam::direction Ncmpts>
93 {
94  return Ncmpts;
95 }
96 
97 
98 template<class Form, class Cmpt, Foam::direction Ncmpts>
100 (
101  const direction d
102 ) const
103 {
104  #ifdef FULLDEBUG
105  if (d >= Ncmpts)
106  {
108  << "index out of range"
109  << abort(FatalError);
110  }
111  #endif
112 
113  return v_[d];
114 }
115 
116 
117 template<class Form, class Cmpt, Foam::direction Ncmpts>
119 (
120  const direction d
121 )
122 {
123  #ifdef FULLDEBUG
124  if (d >= Ncmpts)
125  {
127  << "index out of range"
128  << abort(FatalError);
129  }
130  #endif
131 
132  return v_[d];
133 }
134 
135 
136 template<class Form, class Cmpt, Foam::direction Ncmpts>
138 (
139  Cmpt& c,
140  const direction d
141 ) const
142 {
143  #ifdef FULLDEBUG
144  if (d >= Ncmpts)
145  {
147  << "index out of range"
148  << abort(FatalError);
149  }
150  #endif
151 
152  c = v_[d];
153 }
154 
155 
156 template<class Form, class Cmpt, Foam::direction Ncmpts>
158 (
159  const direction d,
160  const Cmpt& c
161 )
162 {
163  #ifdef FULLDEBUG
164  if (d >= Ncmpts)
165  {
167  << "index out of range"
168  << abort(FatalError);
169  }
170  #endif
171 
172  v_[d] = c;
173 }
174 
175 
176 template<class Form, class Cmpt, Foam::direction Ncmpts>
178 {
179  Form v;
181  return v;
182 }
183 
184 
185 template<class Form, class Cmpt, Foam::direction Ncmpts>
186 template<class SubVector, Foam::direction BStart>
188  ConstBlock<SubVector, BStart>
190 {
191  return *this;
192 }
193 
194 
195 // * * * * * * * * * * * * * * * * Iterator * * * * * * * * * * * * * * * * //
196 
197 template<class Form, class Cmpt, Foam::direction Ncmpts>
199 {
200  return v_;
201 }
202 
203 
204 template<class Form, class Cmpt, Foam::direction Ncmpts>
205 inline const Cmpt* Foam::VectorSpace<Form, Cmpt, Ncmpts>::cdata() const noexcept
206 {
207  return v_;
208 }
209 
210 
211 template<class Form, class Cmpt, Foam::direction Ncmpts>
213 {
214  return v_;
215 }
216 
217 
218 template<class Form, class Cmpt, Foam::direction Ncmpts>
220 {
221  return (v_ + Ncmpts);
222 }
223 
224 
225 template<class Form, class Cmpt, Foam::direction Ncmpts>
227 {
228  return v_;
229 }
230 
231 
232 template<class Form, class Cmpt, Foam::direction Ncmpts>
234 {
235  return (v_ + Ncmpts);
236 }
237 
238 
239 template<class Form, class Cmpt, Foam::direction Ncmpts>
241 {
242  return v_;
243 }
244 
245 
246 template<class Form, class Cmpt, Foam::direction Ncmpts>
248 {
249  return (v_ + Ncmpts);
250 }
251 
252 
253 // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
254 
255 template<class Form, class Cmpt, Foam::direction Ncmpts>
257 (
258  const direction d
259 ) const
260 {
261  #ifdef FULLDEBUG
262  if (d >= Ncmpts)
263  {
265  << "index out of range"
266  << abort(FatalError);
267  }
268  #endif
269 
270  return v_[d];
271 }
272 
273 
274 template<class Form, class Cmpt, Foam::direction Ncmpts>
276 (
277  const direction d
278 )
279 {
280  #ifdef FULLDEBUG
281  if (d >= Ncmpts)
282  {
284  << "index out of range"
285  << abort(FatalError);
286  }
287  #endif
288 
289  return v_[d];
290 }
291 
292 
293 template<class Form, class Cmpt, Foam::direction Ncmpts>
294 template<class SubVector, Foam::direction BStart>
295 inline const Cmpt&
297 ConstBlock<SubVector, BStart>::operator[]
298 (
299  const direction d
300 ) const
301 {
302  #ifdef FULLDEBUG
303  if (d >= Ncmpts)
304  {
306  << "index out of range"
307  << abort(FatalError);
308  }
309  #endif
310 
311  return vs_[BStart + d];
312 }
313 
314 
315 template<class Form, class Cmpt, Foam::direction Ncmpts>
316 template<class SubVector, Foam::direction BStart>
317 inline const Cmpt&
320 (
321  const direction i,
322  const direction j
323 ) const
324 {
325  #ifdef FULLDEBUG
326  if (i >= Ncmpts)
327  {
329  << "index " << i << " out of range"
330  << abort(FatalError);
331  }
332 
333  if (j)
334  {
336  << "index " << j << " != 0"
337  << abort(FatalError);
338  }
339  #endif
340 
341  return vs_[BStart + i];
342 }
343 
344 
345 template<class Form, class Cmpt, Foam::direction Ncmpts>
347 (
349 )
350 {
352 }
353 
354 
355 template<class Form, class Cmpt, Foam::direction Ncmpts>
357 (
359 )
360 {
362 }
363 
364 
365 template<class Form, class Cmpt, Foam::direction Ncmpts>
367 (
369 )
370 {
372 }
373 
374 
375 template<class Form, class Cmpt, Foam::direction Ncmpts>
377 {
379 }
380 
381 
382 template<class Form, class Cmpt, Foam::direction Ncmpts>
384 (
385  const scalar s
386 )
387 {
389 }
390 
391 
392 template<class Form, class Cmpt, Foam::direction Ncmpts>
394 (
395  const scalar s
396 )
397 {
399 }
400 
401 
402 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
403 
404 namespace Foam
405 {
406 
407 // * * * * * * * * * * * * * * * Global Functions * * * * * * * * * * * * * //
408 
409 template<class Form, class Cmpt, direction Ncmpts>
410 inline Cmpt& setComponent
411 (
413  const direction d
414 )
415 {
416  return vs.component(d);
417 }
418 
419 
420 template<class Form, class Cmpt, direction Ncmpts>
421 inline const Cmpt& component
422 (
424  const direction d
425 )
426 {
427  return vs.component(d);
428 }
429 
430 
431 // Powers of a Form
432 // Equivalent to outer-products between the Form and itself
433 // Form^0 = 1.0
434 template<class Form, class Cmpt, direction Ncmpts>
435 inline typename powProduct<Form, 0>::type pow
436 (
440 )
441 {
442  return 1.0;
443 }
444 
445 
446 // Form^1 = Form
447 template<class Form, class Cmpt, direction Ncmpts>
448 inline typename powProduct<Form, 1>::type pow
449 (
453 )
454 {
455  return static_cast<const Form&>(v);
456 }
457 
458 
459 // Form^2 = sqr(Form)
460 template<class Form, class Cmpt, direction Ncmpts>
461 inline typename powProduct<Form, 2>::type pow
462 (
466 )
467 {
468  return sqr(static_cast<const Form&>(v));
469 }
470 
471 
472 template<class Form, class Cmpt, direction Ncmpts>
473 inline scalar magSqr
474 (
476 )
477 {
478  scalar ms = magSqr(vs.v_[0]);
480  return ms;
481 }
482 
483 
484 template<class Form, class Cmpt, direction Ncmpts>
485 inline scalar mag
486 (
488 )
489 {
490  return ::sqrt(magSqr(static_cast<const Form&>(vs)));
491 }
492 
493 
494 template<class Form, class Cmpt, direction Ncmpts>
495 inline VectorSpace<Form, Cmpt, Ncmpts> normalised
496 (
498 )
499 {
500  const scalar s(mag(vs));
501  return s < ROOTVSMALL ? Zero : vs/s;
502 }
503 
504 
505 template<class Form, class Cmpt, direction Ncmpts>
506 inline VectorSpace<Form, Cmpt, Ncmpts> cmptMultiply
507 (
510 )
511 {
512  Form v;
514  return v;
515 }
516 
517 
518 template<class Form, class Cmpt, direction Ncmpts>
519 inline VectorSpace<Form, Cmpt, Ncmpts> cmptPow
520 (
523 )
524 {
525  Form v;
527  return v;
528 }
529 
530 
531 template<class Form, class Cmpt, direction Ncmpts>
532 inline VectorSpace<Form, Cmpt, Ncmpts> cmptDivide
533 (
536 )
537 {
538  Form v;
540  return v;
541 }
542 
543 
544 template<class Form, class Cmpt, direction Ncmpts>
545 inline VectorSpace<Form, Cmpt, Ncmpts> stabilise
546 (
548  const Cmpt& small
549 )
550 {
551  Form v;
553  return v;
554 }
555 
556 
557 template<class Form, class Cmpt, direction Ncmpts>
558 inline Cmpt cmptMax
559 (
561 )
562 {
563  Cmpt cMax = vs.v_[0];
565  return cMax;
566 }
567 
568 
569 template<class Form, class Cmpt, direction Ncmpts>
570 inline Cmpt cmptMin
571 (
573 )
574 {
575  Cmpt cMin = vs.v_[0];
577  return cMin;
578 }
579 
580 
581 template<class Form, class Cmpt, direction Ncmpts>
582 inline Cmpt cmptSum
583 (
585 )
586 {
587  Cmpt sum = vs.v_[0];
589  return sum;
590 }
591 
592 
593 template<class Form, class Cmpt, direction Ncmpts>
594 inline Cmpt cmptAv
595 (
597 )
598 {
599  return cmptSum(vs)/Ncmpts;
600 }
601 
602 
603 template<class Form, class Cmpt, direction Ncmpts>
604 inline Cmpt cmptProduct
605 (
607 )
608 {
609  Cmpt product = vs.v_[0];
611  return product;
612 }
613 
614 
615 template<class Form, class Cmpt, direction Ncmpts>
616 inline Form cmptSqr
617 (
619 )
620 {
621  Form v;
623  return v;
624 }
625 
626 
627 template<class Form, class Cmpt, direction Ncmpts>
628 inline Form cmptMag
629 (
631 )
632 {
633  Form v;
635  return v;
636 }
637 
638 
639 template<class Form, class Cmpt, direction Ncmpts>
640 inline Form cmptMagSqr
641 (
643 )
644 {
645  Form v;
647  return v;
648 }
649 
650 
651 template<class Form, class Cmpt, direction Ncmpts>
652 inline Form max
653 (
656 )
657 {
658  Form v;
660  return v;
661 }
662 
663 
664 template<class Form, class Cmpt, direction Ncmpts>
665 inline Form min
666 (
669 )
670 {
671  Form v;
673  return v;
674 }
675 
676 
677 template<class Form, class Cmpt, direction Ncmpts>
678 inline Form minMod
679 (
682 )
683 {
684  Form v;
686  return v;
687 }
688 
689 
690 template<class Type>
691 inline Type dot(const scalar s, const Type& t)
692 {
693  return s * t;
694 }
695 
696 
697 template<class Type>
698 inline Type dot(const Type& t, const scalar s)
699 {
700  return t * s;
701 }
702 
703 
704 template
705 <
706  class Form1, class Cmpt1, direction Ncmpts1,
707  class Form2, class Cmpt2, direction Ncmpts2
708 >
710 (
713 )
714 {
715  return static_cast<const Form1&>(t1) & static_cast<const Form2&>(t2);
716 }
717 
718 
719 // * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * //
720 
721 template<class Form, class Cmpt, direction Ncmpts>
722 inline Form operator-
723 (
725 )
726 {
727  Form v;
729  return v;
730 }
731 
732 
733 template<class Form, class Cmpt, direction Ncmpts>
734 inline Form operator+
735 (
738 )
739 {
740  Form v;
742  return v;
743 }
744 
745 template<class Form, class Cmpt, direction Ncmpts>
746 inline Form operator-
747 (
750 )
751 {
752  Form v;
754  return v;
755 }
756 
757 
758 template<class Form, class Cmpt, direction Ncmpts>
759 inline Form operator*
760 (
761  scalar s,
763 )
764 {
765  Form v;
767  return v;
768 }
769 
770 
771 template<class Form, class Cmpt, direction Ncmpts>
772 inline Form operator*
773 (
775  scalar s
776 )
777 {
778  Form v;
780  return v;
781 }
782 
783 
784 template<class Form, class Cmpt, direction Ncmpts>
785 inline Form operator/
786 (
788  scalar s
789 )
790 {
791  Form v;
793  return v;
794 }
795 
796 /*
797 template<class Form, class Cmpt, direction Ncmpts>
798 inline Form operator/
799 (
800  const VectorSpace<Form, Cmpt, Ncmpts>& vs1,
801  const VectorSpace<Form, Cmpt, Ncmpts>& vs2
802 )
803 {
804  Form v;
805  VectorSpaceOps<Ncmpts,0>::op(v, vs1, vs2, divideOp<Cmpt>());
806  return v;
807 }
808 
809 
810 template<class Form, class Cmpt, direction Ncmpts>
811 inline Form operator/
812 (
813  scalar s,
814  const VectorSpace<Form, Cmpt, Ncmpts>& vs
815 )
816 {
817  Form v;
818  VectorSpaceOps<Ncmpts,0>::opSV(v, s, vs, divideOp2<scalar, Cmpt>());
819  return v;
820 }
821 */
822 
823 
824 template<class Form, class Cmpt, direction Ncmpts>
825 inline Cmpt operator&&
826 (
829 )
830 {
831  Cmpt ddProd = vs1.v_[0]*vs2.v_[0];
832  for (direction i=1; i<Ncmpts; ++i)
833  {
834  ddProd += vs1.v_[i]*vs2.v_[i];
835  }
836  return ddProd;
837 }
838 
839 
840 template<class Form, class Cmpt, direction Ncmpts>
841 inline bool operator==
842 (
845 )
846 {
847  bool eq = true;
848  for (direction i=0; i<Ncmpts; ++i)
849  {
850  if (!(eq &= (equal(vs1.v_[i], vs2.v_[i])))) break;
851  }
852  return eq;
853 }
854 
855 
856 template<class Form, class Cmpt, direction Ncmpts>
857 inline bool operator!=
858 (
861 )
862 {
863  return !(vs1 == vs2);
864 }
865 
866 
867 template<class Form, class Cmpt, direction Ncmpts>
868 inline bool operator>
869 (
872 )
873 {
874  bool gt = true;
875  for (direction i=0; i<Ncmpts; ++i)
876  {
877  if (!(gt &= vs1.v_[i] > vs2.v_[i])) break;
878  }
879  return gt;
880 }
881 
882 
883 template<class Form, class Cmpt, direction Ncmpts>
884 inline bool operator<
885 (
888 )
889 {
890  bool lt = true;
891  for (direction i=0; i<Ncmpts; ++i)
892  {
893  if (!(lt &= vs1.v_[i] < vs2.v_[i])) break;
894  }
895  return lt;
896 }
897 
898 
899 template<class Form, class Cmpt, direction Ncmpts>
900 inline bool operator>=
901 (
904 )
905 {
906  return !(vs1 < vs2);
907 }
908 
909 
910 template<class Form, class Cmpt, direction Ncmpts>
911 inline bool operator<=
912 (
915 )
916 {
917  return !(vs1 > vs2);
918 }
919 
920 
921 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
922 
923 } // End namespace Foam
924 
925 // ************************************************************************* //
Foam::divideOp3
Definition: ops.H:218
Foam::maxOp
Definition: ops.H:223
Foam::cmptMagSqr
void cmptMagSqr(Field< Type > &res, const UList< Type > &f)
Definition: FieldFunctions.C:327
Foam::setComponent
label & setComponent(label &l, const direction)
Definition: label.H:127
Foam::component
void component(FieldField< Field, typename FieldField< Field, Type >::cmptType > &sf, const FieldField< Field, Type > &f, const direction d)
Definition: FieldFieldFunctions.C:44
Foam::VectorSpaceOps::opVS
static void opVS(V &vs, const V1 &vs1, const S &s, Op o)
Definition: VectorSpaceOps.H:70
Foam::cmptPow
Scalar cmptPow(const Scalar s1, const Scalar s2)
Definition: Scalar.H:363
Foam::VectorSpace::component
const Cmpt & component(const direction) const
Definition: VectorSpaceI.H:100
Foam::VectorSpace::uniform
static Form uniform(const Cmpt &s)
Return a VectorSpace with all elements = s.
Definition: VectorSpaceI.H:177
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::cmptMultiply
dimensioned< Type > cmptMultiply(const dimensioned< Type > &, const dimensioned< Type > &)
Foam::minusEqOp
Definition: ops.H:73
Foam::VectorSpace::cend
const_iterator cend() const
Return const_iterator to end of VectorSpace.
Definition: VectorSpaceI.H:233
VectorSpaceOps.H
Foam::Zero
static constexpr const zero Zero
Global zero.
Definition: zero.H:128
Foam::minOp
Definition: ops.H:224
Foam::multiplyEqOp
Definition: ops.H:74
Foam::VectorSpace::size
static constexpr direction size()
Return the number of elements in the VectorSpace = Ncmpts.
Definition: VectorSpaceI.H:92
Foam::cmptDivideOp
Definition: ops.H:221
Foam::dot
void dot(FieldField< Field1, typename innerProduct< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
Definition: FieldFieldFunctions.C:944
Foam::plusEqMagSqrOp2
Definition: ops.H:79
ops.H
Various functors for unary and binary operations. Can be used for parallel combine-reduce operations ...
Foam::cmptProduct
Cmpt cmptProduct(const VectorSpace< Form, Cmpt, Ncmpts > &vs)
Definition: VectorSpaceI.H:605
Foam::powProduct::type
symmTypeOfRank< typename pTraits< arg1 >::cmptType, arg2 *direction(pTraits< arg1 >::rank) >::type type
Definition: products.H:170
Foam::multiplyOp3
Definition: ops.H:217
Foam::VectorSpace::data
Cmpt * data() noexcept
Return pointer to the first data element.
Definition: VectorSpaceI.H:198
Foam::VectorSpaceOps::SeqOp
static void SeqOp(S &s, const V &vs, EqOp eo)
Definition: VectorSpaceOps.H:55
Foam::cmptPowOp
Definition: ops.H:220
Foam::VectorSpace::v_
Cmpt v_[Ncmpts]
The components of this vector space.
Definition: VectorSpace.H:83
Foam::VectorSpace::cbegin
const_iterator cbegin() const
Return const_iterator to begin of VectorSpace.
Definition: VectorSpaceI.H:226
Foam::VectorSpace::block
const ConstBlock< SubVector, BStart > block() const
Foam::eqSqrOp
Definition: ops.H:76
Foam::min
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
Definition: hashSets.C:33
Foam::minEqOp
Definition: ops.H:81
Foam::magSqr
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
Foam::VectorSpace
Templated vector space.
Definition: VectorSpace.H:56
Foam::cmptMin
void cmptMin(FieldField< Field, typename FieldField< Field, Type >::cmptType > &cf, const FieldField< Field, Type > &f)
Definition: FieldFieldFunctions.C:302
Foam::cmptMag
void cmptMag(FieldField< Field, Type > &cf, const FieldField< Field, Type > &f)
Definition: FieldFieldFunctions.C:400
Foam::cmptMax
void cmptMax(FieldField< Field, typename FieldField< Field, Type >::cmptType > &cf, const FieldField< Field, Type > &f)
Definition: FieldFieldFunctions.C:253
Foam::minModOp
Definition: ops.H:227
Foam::eqMagSqrOp
Definition: ops.H:78
error.H
Foam::stabilise
tmp< DimensionedField< scalar, GeoMesh > > stabilise(const DimensionedField< scalar, GeoMesh > &dsf, const dimensioned< scalar > &ds)
Definition: DimensionedScalarField.C:43
Foam::VectorSpace::VectorSpace
VectorSpace()
Construct null.
Definition: VectorSpaceI.H:39
Foam::cmptAv
tmp< DimensionedField< typename DimensionedField< Type, GeoMesh >::cmptType, GeoMesh >> cmptAv(const DimensionedField< Type, GeoMesh > &df)
Definition: DimensionedFieldFunctions.C:246
Foam::eqMinusOp
Definition: ops.H:92
Foam::pow
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
Definition: dimensionedScalar.C:75
Foam::max
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
Definition: hashSets.C:47
Foam::VectorSpace::replace
void replace(const direction, const Cmpt &)
Definition: VectorSpaceI.H:158
Foam::FatalError
error FatalError
Foam::eqOp
Definition: ops.H:71
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::cmptSum
Cmpt cmptSum(const SphericalTensor< Cmpt > &st)
Definition: SphericalTensorI.H:177
Foam::abort
errorManip< error > abort(error &err)
Definition: errorManip.H:137
Foam::multiplyEqOp2
Definition: ops.H:74
Foam::VectorSpace::begin
iterator begin()
Return an iterator to begin of VectorSpace.
Definition: VectorSpaceI.H:212
Foam::maxEqOp
Definition: ops.H:80
Foam::cmptMultiplyOp
Definition: ops.H:219
Foam::VectorSpace::end
iterator end()
Return an iterator to end of VectorSpace.
Definition: VectorSpaceI.H:219
Foam::eqMagOp
Definition: ops.H:77
Foam::cmptSqr
Scalar cmptSqr(const Scalar s)
Definition: Scalar.H:393
Foam::normalised
VectorSpace< Form, Cmpt, Ncmpts > normalised(const VectorSpace< Form, Cmpt, Ncmpts > &vs)
Definition: VectorSpaceI.H:496
Foam::cmptDivide
dimensioned< Type > cmptDivide(const dimensioned< Type > &, const dimensioned< Type > &)
Foam::VectorSpaceOps::eqOp
static void eqOp(V1 &vs1, const V2 &vs2, EqOp eo)
Definition: VectorSpaceOps.H:62
Foam::plusOp
Definition: ops.H:215
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::minusOp
Definition: ops.H:216
Foam::minMod
Scalar minMod(const Scalar s1, const Scalar s2)
Definition: Scalar.H:297
Foam::divideEqOp2
Definition: ops.H:75
Foam::VectorSpaceOps::op
static void op(V &vs, const V1 &vs1, const V1 &vs2, Op o)
Definition: VectorSpaceOps.H:84
Foam::sqrt
dimensionedScalar sqrt(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:144
Foam::pTraits
Traits class for primitives.
Definition: pTraits.H:52
Foam::mag
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
Foam::VectorSpaceOps::opSV
static void opSV(V &vs, const S &s, const V1 &vs1, Op o)
Definition: VectorSpaceOps.H:77
Foam::sum
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
Definition: DimensionedFieldFunctions.C:327
Foam::direction
uint8_t direction
Definition: direction.H:47
Foam::constant::universal::c
const dimensionedScalar c
Speed of light in a vacuum.
Foam::VectorSpaceOps
General looping form. Executing at index <I> with termination at <N>
Definition: VectorSpaceOps.H:45
Foam::plusEqOp
Definition: ops.H:72
Foam::VectorSpace::operator=
void operator=(const VectorSpace< Form, Cmpt, Ncmpts > &)
Definition: VectorSpaceI.H:347
Foam::stabiliseOp
Definition: ops.H:222
Foam::equal
bool equal(const T &s1, const T &s2)
Compare two values for equality.
Definition: doubleFloat.H:46
products.H
Traits classes for inner and outer products of primitives.
Foam::VectorSpace::operator
friend Ostream & operator(Ostream &, const VectorSpace< Form, Cmpt, Ncmpts > &)
Foam::innerProduct::type
typeOfRank< typename pTraits< arg1 >::cmptType, direction(pTraits< arg1 >::rank)+direction(pTraits< arg2 >::rank) - 2 >::type type
Definition: products.H:149
Foam::VectorSpace::cdata
const Cmpt * cdata() const noexcept
Return const pointer to the first data element.
Definition: VectorSpaceI.H:205
Foam::zero
A class representing the concept of 0 (zero), which can be used to avoid manipulating objects that ar...
Definition: zero.H:61