(Deleted) constant vector matrix multiplication


36
views
0
4 months ago by
noname  
Hello everyone,

I am using fenics in C++ language and I am trying to multiply a constant vector with a matrix row-wise inside an expression like so:

class B : public Expression
{
public:     
B (const std::vector<double> & normals) : _normals(normals) Expression(3) {}
void eval(Array<double>& values, const Array<double>& x) const
{ const double b =((M_PI*cos(2*M_PI*x[1]))/25 ,1/5, 0.0);     
for (size_t i = 0; i < _normals.size(); ++i)
{

     if (dot(b,_normals[i]))<0.0;     
 {values[0] = (M_PI*cos(2*M_PI*x[1]))/25;     
values[1] = 1/5 ;  
values[2] = 0.0;}     
else if (dot(b,_normals[i]))>0.0;            
{values[0] = 0.0;     
values[1] = 0.0;  
values[2] = 0.0;}
}       
}    private:   const std::vector<double> _normals;
};

and I get an error saying dot was not declared in the scope. Anyone knows what is the alternative of the dot expression ?
Thanks in advance










Community: FEniCS Project
Please login to add an answer/comment or follow this question.
The thread is closed. No new answer/comment may be added.

Similar posts:
Search »
  • Nothing matches yet.