Block-Structured AMR Software Framework
 
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches
AMReX_RealVect.H
Go to the documentation of this file.
1#ifndef AMREX_REALVECT_H_
2#define AMREX_REALVECT_H_
3#include <AMReX_Config.H>
4
5#include <AMReX_Box.H>
6#include <AMReX_REAL.H>
7#include <AMReX_SPACE.H>
8#include <AMReX_IntVect.H>
9#include <AMReX_Utility.H>
10#include <AMReX_Math.H>
11
12#include <cmath>
13#include <cstddef>
14#include <cstdlib>
15#include <cstring>
16#include <iosfwd>
17#include <vector>
18
19namespace amrex
20{
21
32{
33public:
34
39
41
44 constexpr RealVect () noexcept {} // NOLINT
45
46 explicit RealVect (const std::vector<Real>& vr) noexcept : vect{AMREX_D_DECL(vr[0],vr[1],vr[2])} {
47 BL_ASSERT(vr.size() == AMREX_SPACEDIM);
48 }
49
51
56#if (AMREX_SPACEDIM > 1)
58 constexpr RealVect (AMREX_D_DECL(Real i, Real j, Real k)) noexcept : vect{AMREX_D_DECL(i,j,k)} {}
59#endif
60
62 explicit constexpr RealVect (Real i) noexcept : vect{AMREX_D_DECL(i,i,i)} {}
63
65
70 explicit RealVect (const Real* a) noexcept : vect{AMREX_D_DECL(a[0],a[1],a[2])} {}
71
73
78 RealVect (const IntVect & iv) noexcept : vect{AMREX_D_DECL((Real)iv[0],(Real)iv[1],(Real)iv[2])} {}
79
81
85 Real& operator[] (int i) && = delete;
86
88
93 inline
94 Real& operator[] (int i) & noexcept
95 { AMREX_ASSERT(i>=0 && i < SpaceDim); return vect[i]; }
96
98
102 inline
103 const Real& operator[] (int i) const& noexcept
104 { AMREX_ASSERT(i>=0 && i < SpaceDim); return vect[i]; }
105
112
114
117 [[nodiscard]] AMREX_GPU_HOST_DEVICE
118 inline
119 Real* begin () noexcept { return vect; }
120
122
125 [[nodiscard]] AMREX_GPU_HOST_DEVICE
126 inline
127 const Real* begin () const noexcept { return vect; }
128
130
133 [[nodiscard]] AMREX_GPU_HOST_DEVICE
134 inline
135 Real* end () noexcept { return vect + AMREX_SPACEDIM; }
136
138
141 [[nodiscard]] AMREX_GPU_HOST_DEVICE
142 inline
143 const Real* end () const noexcept { return vect + AMREX_SPACEDIM; }
144
151
153
158 bool operator== (const RealVect& p) const noexcept {
159 return AMREX_D_TERM(vect[0] == p[0], && vect[1] == p[1], && vect[2] == p[2]);
160 }
161
163
168 bool operator!= (const RealVect& p) const noexcept {
169 return AMREX_D_TERM(vect[0] != p[0], || vect[1] != p[1], || vect[2] != p[2]);
170 }
171
173
181 bool operator< (const RealVect& p) const noexcept;
182
184
192 bool operator<= (const RealVect& p) const noexcept;
193
195
203 bool operator> (const RealVect& p) const noexcept;
204
206
215 bool operator>= (const RealVect& p) const noexcept;
216
223
225
229 RealVect& operator+= (Real s) noexcept;
230
232
237 RealVect operator+ (Real s) const noexcept;
238
240
244 RealVect& operator+= (const RealVect& p) noexcept;
245
247
252 RealVect& operator-= (Real s) noexcept;
253
255
259 RealVect& operator-= (const RealVect& p) noexcept;
260
262
267 RealVect operator- (Real s) const noexcept;
268
270
274 RealVect& operator*= (Real s) noexcept;
275
277
280 [[nodiscard]] AMREX_GPU_HOST_DEVICE inline
281 Real dotProduct(const RealVect& a_rhs) const noexcept;
282
283#if (AMREX_SPACEDIM == 3)
285
288 [[nodiscard]] AMREX_GPU_HOST_DEVICE inline
289 RealVect crossProduct(const RealVect& a_rhs) const noexcept;
290#endif
291
293
297 RealVect& operator*= (const RealVect& p) noexcept;
298
299//XXX ///
300//XXX /**
301//XXX Returns component-wise product of this RealVect and argument.
302//XXX */
303//XXX RealVect operator* (const RealVect& p) const;
304
306
311 RealVect operator* (Real s) const noexcept;
312
314
318 RealVect& operator/= (Real s) noexcept;
319
321
325 RealVect& operator/= (const RealVect& p) noexcept;
326
327//XXX ///
328//XXX /**
329//XXX Returns component-wise quotient of this RealVect by argument.
330//XXX */
331//XXX RealVect operator/ (const RealVect& p) const;
332
334
339 RealVect operator/ (Real s) const noexcept;
340
342
346 RealVect& scale (Real s) noexcept;
347
349
353 [[nodiscard]] AMREX_GPU_HOST_DEVICE inline
354 IntVect floor () const noexcept;
355
357
361 [[nodiscard]] AMREX_GPU_HOST_DEVICE inline
362 IntVect ceil () const noexcept;
363
365
369 [[nodiscard]] AMREX_GPU_HOST_DEVICE inline
370 IntVect round () const noexcept;
371
378
380
385 RealVect& min (const RealVect& p) noexcept;
386
388
392 friend AMREX_GPU_HOST_DEVICE inline
393 RealVect min (const RealVect& p1, const RealVect& p2) noexcept;
394
396
401 RealVect& max (const RealVect& p) noexcept;
402
404
408 friend AMREX_GPU_HOST_DEVICE inline
409 RealVect max (const RealVect& p1, const RealVect& p2) noexcept;
410
417
419
423 RealVect operator+ () const noexcept;
424
426
430 RealVect operator- () const noexcept;
431
433
436 [[nodiscard]] AMREX_GPU_HOST_DEVICE inline
437 Real sum () const noexcept;
438
440
443 [[nodiscard]] AMREX_GPU_HOST_DEVICE inline
444 Real vectorLength() const noexcept;
445
447
450 [[nodiscard]] AMREX_GPU_HOST_DEVICE inline
451 Real radSquared() const noexcept;
452
454
457 [[nodiscard]] AMREX_GPU_HOST_DEVICE inline
458 Real product () const noexcept;
459
461
465 [[nodiscard]] AMREX_GPU_HOST_DEVICE inline
466 int minDir(const bool& a_doAbs) const noexcept;
467
469
473 [[nodiscard]] AMREX_GPU_HOST_DEVICE inline
474 int maxDir(const bool& a_doAbs) const noexcept;
475
482
484
487 [[nodiscard]] AMREX_GPU_HOST_DEVICE
488 const Real* dataPtr() const noexcept { return vect; }
489
491
495 Real* dataPtr() noexcept { return vect; }
496
503
505
517 RealVect BASISREALV(int dir) noexcept;
518
520
524
526
530
537
539
543 static constexpr RealVect TheZeroVector () noexcept {
544 return RealVect(0.);
545 }
546
551 static constexpr RealVect TheUnitVector () noexcept {
552 return RealVect(1.);
553 }
554
561
563
568 RealVect operator+ (Real s, const RealVect& p) noexcept;
569
571
575 RealVect operator- (Real s, const RealVect& p) noexcept;
576
578
583 RealVect operator* (Real s, const RealVect& p) noexcept;
585
590 RealVect operator/ (Real s, const RealVect& p) noexcept;
591
593
597 RealVect operator+ (const RealVect& s, const RealVect& p) noexcept;
598
600
604 RealVect operator- (const RealVect& s, const RealVect& p) noexcept;
605
607
611 RealVect operator* (const RealVect& s, const RealVect& p) noexcept;
613
617 RealVect operator/ (const RealVect& s, const RealVect& p) noexcept;
618
620
624 friend inline AMREX_GPU_HOST_DEVICE
625 RealVect scale (const RealVect& p, Real s) noexcept;
626
630
633 friend std::ostream& operator<< (std::ostream& ostr, const RealVect& p);
634
635 friend std::istream& operator>> (std::istream& is, RealVect& iv);
636
637protected:
638
642 Real vect[SpaceDim] = {AMREX_D_DECL(Real(0.),Real(0.),Real(0.))};
643
644};
645
647inline
648RealVect&
649RealVect::operator-= (Real s) noexcept
650{
651 AMREX_D_EXPR(vect[0] -= s, vect[1] -= s, vect[2] -= s);
652 return *this;
653}
654
656inline
658RealVect::operator*= (Real s) noexcept
659{
660 AMREX_D_EXPR(vect[0] *= s, vect[1] *= s, vect[2] *= s);
661 return *this;
662}
663
665inline
668{
669 AMREX_D_EXPR(vect[0] -= p[0], vect[1] -= p[1], vect[2] -= p[2]);
670
671 return *this;
672}
673
675inline
677RealVect::operator+ () const noexcept
678{
679 return RealVect(*this);
680}
681
683inline
685RealVect::operator- () const noexcept
686{
687 return RealVect(AMREX_D_DECL(-vect[0], -vect[1], -vect[2]));
688}
689
691inline
693RealVect::scale (Real s) noexcept
694{
695 AMREX_D_EXPR(vect[0] *= s, vect[1] *= s, vect[2] *= s);
696 return *this;
697}
698
700inline
702RealVect::floor () const noexcept
703{
704 return IntVect(AMREX_D_DECL(static_cast<int>(std::floor(vect[0])),
705 static_cast<int>(std::floor(vect[1])),
706 static_cast<int>(std::floor(vect[2]))));
707}
708
710inline
712RealVect::ceil () const noexcept
713{
714 return IntVect(AMREX_D_DECL(static_cast<int>(std::ceil(vect[0])),
715 static_cast<int>(std::ceil(vect[1])),
716 static_cast<int>(std::ceil(vect[2]))));
717}
718
720inline
722RealVect::round () const noexcept
723{
724 return IntVect(AMREX_D_DECL(static_cast<int>(std::round(vect[0])),
725 static_cast<int>(std::round(vect[1])),
726 static_cast<int>(std::round(vect[2]))));
727}
728
730inline
731Real
732RealVect::sum () const noexcept
733{
734 return AMREX_D_TERM(vect[0], + vect[1], + vect[2]);
735}
736
738inline
739Real
740RealVect::vectorLength () const noexcept
741{
742 Real len = this->radSquared();
743 len = std::sqrt(len);
744 return len;
745}
746
748inline
749Real
750RealVect::radSquared() const noexcept
751{
752 return AMREX_D_TERM(vect[0]*vect[0],
753 + vect[1]*vect[1],
754 + vect[2]*vect[2]);
755}
756
758inline
759Real
760RealVect::product () const noexcept
761{
762 return AMREX_D_TERM(vect[0], * vect[1], * vect[2]);
763}
764
766inline
768scale (const RealVect& p,
769 Real s) noexcept
770{
771 return RealVect(AMREX_D_DECL(s * p[0], s * p[1], s * p[2]));
772}
773
775inline
776bool
777RealVect::operator< (const RealVect& p) const noexcept
778{
779 return AMREX_D_TERM(vect[0] < p[0], && vect[1] < p[1], && vect[2] < p[2]);
780}
781
783inline
784bool
785RealVect::operator<= (const RealVect& p) const noexcept
786{
787 return AMREX_D_TERM(vect[0] <= p[0], && vect[1] <= p[1], && vect[2] <= p[2]);
788}
789
791inline
792bool
793RealVect::operator> (const RealVect& p) const noexcept
794{
795 return AMREX_D_TERM(vect[0] > p[0], && vect[1] > p[1], && vect[2] > p[2]);
796}
797
799inline
800bool
801RealVect::operator>= (const RealVect& p) const noexcept
802{
803 return AMREX_D_TERM(vect[0] >= p[0], && vect[1] >= p[1], && vect[2] >= p[2]);
804}
805
807inline
809RealVect::min (const RealVect& p) noexcept
810{
811 AMREX_D_EXPR(vect[0] = amrex::min(vect[0], p.vect[0]),
812 vect[1] = amrex::min(vect[1], p.vect[1]),
813 vect[2] = amrex::min(vect[2], p.vect[2]));
814 return *this;
815}
816
818inline
820RealVect::max (const RealVect& p) noexcept
821{
822 AMREX_D_EXPR(vect[0] = amrex::max(vect[0], p.vect[0]),
823 vect[1] = amrex::max(vect[1], p.vect[1]),
824 vect[2] = amrex::max(vect[2], p.vect[2]));
825 return *this;
826}
827
829inline
831min (const RealVect& p1,
832 const RealVect& p2) noexcept
833{
834 RealVect p(p1);
835 return p.min(p2);
836}
837
839inline
841max (const RealVect& p1,
842 const RealVect& p2) noexcept
843{
844 RealVect p(p1);
845 return p.max(p2);
846}
847
849Real RealVect::dotProduct(const RealVect& a_rhs) const noexcept
850{
851 return AMREX_D_TERM(vect[0]*a_rhs.vect[0], +
852 vect[1]*a_rhs.vect[1], +
853 vect[2]*a_rhs.vect[2]);
854}
855
856#if (AMREX_SPACEDIM == 3)
858 RealVect RealVect::crossProduct(const RealVect& a_rhs) const noexcept
859 {
860 RealVect tmp(vect[1]*a_rhs[2] - vect[2]*a_rhs[1],
861 vect[2]*a_rhs[0] - vect[0]*a_rhs[2],
862 vect[0]*a_rhs[1] - vect[1]*a_rhs[0]);
863 return tmp;
864 }
865#endif
866
868RealVect&
869RealVect::operator+= (Real s) noexcept
870{
871 AMREX_D_EXPR(vect[0] += s, vect[1] += s, vect[2] += s);
872 return *this;
873}
874
878{
879 AMREX_D_EXPR(vect[0] += p[0], vect[1] += p[1], vect[2] += p[2]);
880 return *this;
881}
882
886{
887 AMREX_D_EXPR(vect[0] *= p[0], vect[1] *= p[1], vect[2] *= p[2]);
888 return *this;
889}
890
893RealVect::operator* (Real s) const noexcept
894{
895 RealVect v(AMREX_D_DECL(vect[0]*s, vect[1]*s, vect[2]*s));
896 return v;
897}
898
901RealVect::operator- (Real s) const noexcept
902{
903 RealVect v(AMREX_D_DECL(vect[0]-s, vect[1]-s, vect[2]-s));
904 return v;
905}
906
909RealVect::operator+ (Real s) const noexcept
910{
911 RealVect v(AMREX_D_DECL(vect[0]+s, vect[1]+s, vect[2]+s));
912 return v;
913}
914
917RealVect::operator/= (Real s) noexcept
918{
919 AMREX_D_EXPR(vect[0] /= s, vect[1] /= s, vect[2] /= s);
920 return *this;
921}
922
926{
927 AMREX_D_EXPR(vect[0] /= p[0], vect[1] /= p[1], vect[2] /= p[2]);
928 return *this;
929}
930
933RealVect::operator/ (Real s) const noexcept
934{
935 RealVect result( AMREX_D_DECL( vect[0] / s, vect[1] / s, vect[2] / s));
936 return result ;
937}
938
940int
941RealVect::minDir(const bool& a_doAbs) const noexcept
942{
943 int mDir = 0;
944 for (int idir=0; idir<SpaceDim; idir++)
945 {
946 if (a_doAbs)
947 {
948 if (std::abs(vect[idir]) < std::abs(vect[mDir]))
949 {
950 mDir = idir;
951 }
952 }
953 else
954 {
955 if (vect[idir] < vect[mDir])
956 {
957 mDir = idir;
958 }
959 }
960 }
961 return mDir;
962}
963
965int
966RealVect::maxDir(const bool& a_doAbs) const noexcept
967{
968 int mDir = 0;
969 for (int idir=0; idir<SpaceDim; idir++)
970 {
971 if (a_doAbs)
972 {
973 if (std::abs(vect[idir]) > std::abs(vect[mDir]))
974 {
975 mDir = idir;
976 }
977 }
978 else
979 {
980 if (vect[idir] > vect[mDir])
981 {
982 mDir = idir;
983 }
984 }
985 }
986 return mDir;
987}
988
991BASISREALV (int dir) noexcept
992{
993 AMREX_ASSERT(dir >= 0 && dir < SpaceDim);
994 RealVect tmp(AMREX_D_DECL(0.,0.,0.));
995 tmp.vect[dir] = 1;
996 return tmp;
997}
998
1002 const RealVect& p) noexcept
1003{
1004 return RealVect(AMREX_D_DECL(s/p[0], s/p[1], s/p[2]));
1005}
1006
1010 const RealVect& p) noexcept
1011{
1012 return RealVect(AMREX_D_DECL(p[0] + s, p[1] + s, p[2] + s));
1013}
1014
1018 const RealVect& p) noexcept
1019{
1020 return RealVect(AMREX_D_DECL(s - p[0], s - p[1], s - p[2]));
1021}
1022
1026 const RealVect& p) noexcept
1027{
1028 return RealVect(AMREX_D_DECL(s * p[0], s * p[1], s * p[2]));
1029}
1030
1034 const RealVect& p) noexcept
1035{
1036 return RealVect(AMREX_D_DECL(s[0] / p[0], s[1] /p[1], s[2] / p[2]));
1037}
1038
1042 const RealVect& p) noexcept
1043{
1044 return RealVect(AMREX_D_DECL(p[0] + s[0], p[1] +s[1], p[2] + s[2]));
1045}
1046
1050 const RealVect& p) noexcept
1051{
1052 return RealVect(AMREX_D_DECL(s[0] - p[0], s[1] - p[1], s[2] - p[2]));
1053}
1054
1058 const RealVect& p) noexcept
1059{
1060 return RealVect(AMREX_D_DECL(p[0] * s[0], p[1] *s[1], p[2] * s[2]));
1061}
1062
1063}
1064
1065#endif
#define BL_ASSERT(EX)
Definition AMReX_BLassert.H:39
#define AMREX_ASSERT(EX)
Definition AMReX_BLassert.H:38
#define AMREX_FORCE_INLINE
Definition AMReX_Extension.H:119
#define AMREX_EXPORT
Definition AMReX_Extension.H:191
#define AMREX_GPU_HOST_DEVICE
Definition AMReX_GpuQualifiers.H:20
int idir
Definition AMReX_HypreMLABecLap.cpp:1093
#define AMREX_D_EXPR(a, b, c)
Definition AMReX_SPACE.H:81
#define AMREX_D_TERM(a, b, c)
Definition AMReX_SPACE.H:129
A Real vector in SpaceDim-dimensional space.
Definition AMReX_RealVect.H:32
friend AMREX_GPU_HOST_DEVICE RealVect min(const RealVect &p1, const RealVect &p2) noexcept
Definition AMReX_RealVect.H:831
Real vect[SpaceDim]
Definition AMReX_RealVect.H:642
AMREX_GPU_HOST_DEVICE bool operator!=(const RealVect &p) const noexcept
Definition AMReX_RealVect.H:168
AMREX_GPU_HOST_DEVICE Real * end() noexcept
Definition AMReX_RealVect.H:135
friend AMREX_GPU_HOST_DEVICE RealVect operator/(Real s, const RealVect &p) noexcept
Definition AMReX_RealVect.H:1001
AMREX_GPU_HOST_DEVICE Real product() const noexcept
Definition AMReX_RealVect.H:760
friend AMREX_GPU_HOST_DEVICE RealVect max(const RealVect &p1, const RealVect &p2) noexcept
Definition AMReX_RealVect.H:841
AMREX_GPU_HOST_DEVICE int maxDir(const bool &a_doAbs) const noexcept
Definition AMReX_RealVect.H:966
AMREX_GPU_HOST_DEVICE RealVect & max(const RealVect &p) noexcept
Definition AMReX_RealVect.H:820
AMREX_GPU_HOST_DEVICE RealVect & operator/=(Real s) noexcept
Definition AMReX_RealVect.H:917
RealVect(const std::vector< Real > &vr) noexcept
Definition AMReX_RealVect.H:46
AMREX_GPU_HOST_DEVICE Real * dataPtr() noexcept
Definition AMReX_RealVect.H:495
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE constexpr RealVect TheUnitVector() noexcept
Definition AMReX_RealVect.H:551
friend std::ostream & operator<<(std::ostream &ostr, const RealVect &p)
Definition AMReX_RealVect.cpp:11
AMREX_GPU_HOST_DEVICE IntVect round() const noexcept
Definition AMReX_RealVect.H:722
friend std::istream & operator>>(std::istream &is, RealVect &iv)
Definition AMReX_RealVect.cpp:18
friend AMREX_GPU_HOST_DEVICE RealVect BASISREALV(int dir) noexcept
Definition AMReX_RealVect.H:991
AMREX_GPU_HOST_DEVICE RealVect & operator-=(Real s) noexcept
Definition AMReX_RealVect.H:649
friend AMREX_GPU_HOST_DEVICE RealVect operator*(Real s, const RealVect &p) noexcept
Definition AMReX_RealVect.H:1025
AMREX_GPU_HOST_DEVICE Real vectorLength() const noexcept
Definition AMReX_RealVect.H:740
AMREX_GPU_HOST_DEVICE bool operator<(const RealVect &p) const noexcept
Definition AMReX_RealVect.H:777
AMREX_GPU_HOST_DEVICE Real dotProduct(const RealVect &a_rhs) const noexcept
Definition AMReX_RealVect.H:849
static AMREX_EXPORT const RealVect Unit
Definition AMReX_RealVect.H:529
AMREX_GPU_HOST_DEVICE RealVect operator+() const noexcept
Definition AMReX_RealVect.H:677
AMREX_GPU_HOST_DEVICE bool operator<=(const RealVect &p) const noexcept
Definition AMReX_RealVect.H:785
AMREX_GPU_HOST_DEVICE Real sum() const noexcept
Definition AMReX_RealVect.H:732
AMREX_GPU_HOST_DEVICE bool operator==(const RealVect &p) const noexcept
Definition AMReX_RealVect.H:158
AMREX_GPU_HOST_DEVICE IntVect ceil() const noexcept
Definition AMReX_RealVect.H:712
AMREX_GPU_HOST_DEVICE RealVect & min(const RealVect &p) noexcept
Definition AMReX_RealVect.H:809
AMREX_GPU_HOST_DEVICE const Real * begin() const noexcept
Definition AMReX_RealVect.H:127
AMREX_GPU_HOST_DEVICE const Real * end() const noexcept
Definition AMReX_RealVect.H:143
AMREX_GPU_HOST_DEVICE RealVect & operator+=(Real s) noexcept
Definition AMReX_RealVect.H:869
AMREX_GPU_HOST_DEVICE RealVect(const Real *a) noexcept
Definition AMReX_RealVect.H:70
Real & operator[](int i) &&=delete
AMREX_GPU_HOST_DEVICE Real * begin() noexcept
Definition AMReX_RealVect.H:119
AMREX_GPU_HOST_DEVICE RealVect & operator*=(Real s) noexcept
Definition AMReX_RealVect.H:658
AMREX_GPU_HOST_DEVICE constexpr RealVect(Real i) noexcept
Definition AMReX_RealVect.H:62
static AMREX_EXPORT const RealVect Zero
Definition AMReX_RealVect.H:523
AMREX_GPU_HOST_DEVICE Real radSquared() const noexcept
Definition AMReX_RealVect.H:750
AMREX_GPU_HOST_DEVICE static AMREX_FORCE_INLINE constexpr RealVect TheZeroVector() noexcept
Definition AMReX_RealVect.H:543
AMREX_GPU_HOST_DEVICE RealVect operator-() const noexcept
Definition AMReX_RealVect.H:685
friend AMREX_GPU_HOST_DEVICE RealVect scale(const RealVect &p, Real s) noexcept
Definition AMReX_RealVect.H:768
constexpr RealVect() noexcept
Definition AMReX_RealVect.H:44
AMREX_GPU_HOST_DEVICE int minDir(const bool &a_doAbs) const noexcept
Definition AMReX_RealVect.H:941
AMREX_GPU_HOST_DEVICE IntVect floor() const noexcept
Definition AMReX_RealVect.H:702
AMREX_GPU_HOST_DEVICE RealVect(const IntVect &iv) noexcept
Definition AMReX_RealVect.H:78
AMREX_GPU_HOST_DEVICE bool operator>=(const RealVect &p) const noexcept
Definition AMReX_RealVect.H:801
AMREX_GPU_HOST_DEVICE bool operator>(const RealVect &p) const noexcept
Definition AMReX_RealVect.H:793
AMREX_GPU_HOST_DEVICE const Real * dataPtr() const noexcept
Definition AMReX_RealVect.H:488
Definition AMReX_Amr.cpp:49
AMREX_GPU_HOST_DEVICE RealVect BASISREALV(int dir) noexcept
Definition AMReX_RealVect.H:991
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE GpuComplex< T > operator+(const GpuComplex< T > &a_x)
Identity operation on a complex number.
Definition AMReX_GpuComplex.H:166
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE constexpr const T & min(const T &a, const T &b) noexcept
Definition AMReX_Algorithm.H:21
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE IntVectND< dim > scale(const IntVectND< dim > &p, int s) noexcept
Returns a IntVectND obtained by multiplying each of the components of this IntVectND by s.
Definition AMReX_IntVect.H:1004
IntVectND< AMREX_SPACEDIM > IntVect
Definition AMReX_BaseFwd.H:30
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE GpuComplex< T > operator*(const GpuComplex< T > &a_x, const GpuComplex< T > &a_y) noexcept
Multiply two complex numbers.
Definition AMReX_GpuComplex.H:252
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE GpuComplex< T > operator/(const GpuComplex< T > &a_x, const GpuComplex< T > &a_y) noexcept
Divide a complex number by another one.
Definition AMReX_GpuComplex.H:288
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE constexpr const T & max(const T &a, const T &b) noexcept
Definition AMReX_Algorithm.H:35
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE GpuComplex< T > operator-(const GpuComplex< T > &a_x)
Negate a complex number.
Definition AMReX_GpuComplex.H:173