Tutorial_Map_rowmajor.cpp File Reference

Functions

 for (int i=0;i< 8;++i) array[i]
 
 cout<< "Column-major:\n"<< Map< Matrix< int, 2, 4 > > (array)<< endl
 
 cout<< "Row-major:\n"<< Map< Matrix< int, 2, 4, RowMajor > > (array)<< endl
 
 cout<< "Row-major using stride:\n"<< Map< Matrix< int, 2, 4 >, Unaligned, Stride< 1, 4 > > (array)<< endl
 

Variables

int array [8]
 

Function Documentation

◆ cout<< "Column-major:\n"<< Map< Matrix< int, 2, 4 > >()

cout<< "Column-major:\n"<< Map< Matrix< int, 2, 4 > > ( array  )

◆ cout<< "Row-major using stride:\n"<< Map< Matrix< int, 2, 4 >, Unaligned, Stride< 1, 4 > >()

cout<< "Row-major using stride:\n"<< Map< Matrix< int, 2, 4 >, Unaligned, Stride< 1, 4 > > ( array  )

◆ cout<< "Row-major:\n"<< Map< Matrix< int, 2, 4, RowMajor > >()

cout<< "Row-major:\n"<< Map< Matrix< int, 2, 4, RowMajor > > ( array  )

◆ for()

for ( )
287  {
288  int start = std::max(0, j - *ku);
289  int end = std::min((*m) - 1, j + *kl);
290  int len = end - start + 1;
291  int offset = (*ku) - j + start;
292  if (OP(*trans) == NOTR)
293  make_vector(actual_y + start, len) += (alpha * actual_x[j]) * mat_coeffs.col(j).segment(offset, len);
294  else if (OP(*trans) == TR)
295  actual_y[j] +=
296  alpha * (mat_coeffs.col(j).segment(offset, len).transpose() * make_vector(actual_x + start, len)).value();
297  else
298  actual_y[j] +=
299  alpha * (mat_coeffs.col(j).segment(offset, len).adjoint() * make_vector(actual_x + start, len)).value();
300  }
Eigen::Map< Eigen::Matrix< T, Eigen::Dynamic, 1 >, 0, Eigen::InnerStride< Eigen::Dynamic > > make_vector(T *data, int size, int incr)
Definition: common.h:99
#define TR
Definition: common.h:40
#define OP(X)
Definition: common.h:54
#define NOTR
Definition: common.h:39
#define min(a, b)
Definition: datatypes.h:22
#define max(a, b)
Definition: datatypes.h:23
static constexpr lastp1_t end
Definition: IndexedViewHelper.h:79
char int int int int * ku
Definition: level2_impl.h:240
char * trans
Definition: level2_impl.h:240
Scalar * actual_y
Definition: level2_impl.h:275
char int int int * kl
Definition: level2_impl.h:240
Scalar alpha
Definition: level2_impl.h:41
ConstMatrixType mat_coeffs(a, coeff_rows, *n, *lda)
const char const int * m
Definition: level2_impl.h:27
const Scalar * actual_x
Definition: level2_impl.h:274
squared absolute value
Definition: GlobalFunctions.h:87
void start(const unsigned &i)
(Re-)start i-th timer
Definition: oomph_utilities.cc:243
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2

References actual_x, actual_y, alpha, Eigen::placeholders::end, TanhSolnForSteadyAxisymAdvectionDiffusion::get_exact_u(), j, kl, ku, m, make_vector(), mat_coeffs(), max, min, NOTR, OP, oomph::Data::set_value(), oomph::CumulativeTimings::start(), TR, trans, Eigen::value, plotDoE::x, and oomph::Node::x().

Referenced by operator>>(), and DropletBoundary::writeVTK().

Variable Documentation

◆ array

int array[8]