class_CwiseUnaryOp_ptrfun.cpp File Reference
#include <Eigen/Core>
#include <iostream>

Functions

double ramp (double x)
 
int main (int, char **)
 

Function Documentation

◆ main()

int main ( int  ,
char **   
)
12  {
13  Eigen::Matrix4d m1 = Eigen::Matrix4d::Random();
14  std::cout << m1 << std::endl << "becomes: " << std::endl << m1.unaryExpr(std::ptr_fun(ramp)) << std::endl;
15  return 0;
16 }
Matrix3d m1
Definition: IOFormat.cpp:2
double ramp(double x)
Definition: class_CwiseUnaryOp_ptrfun.cpp:5

References m1, and ramp().

◆ ramp()

double ramp ( double  x)
5  {
6  if (x > 0)
7  return x;
8  else
9  return 0;
10 }
list x
Definition: plotDoE.py:28

References plotDoE::x.

Referenced by main(), OscillatingWall::position(), and UnstructuredImmersedEllipseProblem< ELEMENT >::set_boundary_velocity().