Alamo
Eigen_Amrex.H
Go to the documentation of this file.
1
2AMREX_FORCE_INLINE void operator+= (amrex::Vector<amrex::Real> a)
3{
4 eigen_assert(a.size() == AMREX_SPACEDIM);
5 AMREX_D_TERM(this->operator()(0) += a[0];,
6 this->operator()(1) += a[1];,
7 this->operator()(2) += a[2];);
8}
9Matrix<amrex::Real,AMREX_SPACEDIM,1> operator* (const amrex::Vector<amrex::Real>& x) // WORKS
10{
11 eigen_assert(x.size() == AMREX_SPACEDIM);
12 Matrix<amrex::Real,AMREX_SPACEDIM,1> ret;
13 AMREX_D_TERM(ret(0) = this->operator()(0) * x[0];,
14 ret(1) = this->operator()(1) * x[1];,
15 ret(2) = this->operator()(2) * x[2];);
16 return ret;
17}
18Matrix<_Scalar,_Rows,_Cols>& operator*= (const amrex::Vector<amrex::Real>& x) // WORKS
19{
20 eigen_assert(x.size() == AMREX_SPACEDIM);
21 AMREX_D_TERM(this->operator()(0) *= x[0];,
22 this->operator()(1) *= x[1];,
23 this->operator()(2) *= x[2];);
24 return *this;
25}
26operator amrex::Vector<amrex::Real>() // WORKS
27{
28 return {{AMREX_D_DECL(this->operator()(0),
29 this->operator()(1),
30 this->operator()(2))}};
31}
Matrix< _Scalar, _Rows, _Cols > & operator*=(const amrex::Vector< amrex::Real > &x)
Definition Eigen_Amrex.H:18
Matrix< amrex::Real, AMREX_SPACEDIM, 1 > operator*(const amrex::Vector< amrex::Real > &x)
Definition Eigen_Amrex.H:9
AMREX_FORCE_INLINE void operator+=(amrex::Vector< amrex::Real > a)
Definition Eigen_Amrex.H:2