This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

Pushing a DirichletBC instance into a std::vector<const BoundaryCondition*> problem

0 votes

I'm trying to pass an instance of DirichletBC into a vector of type BoundaryCondition*. Here's my code

std::vector<const BoundaryCondition*> bcs;
DirichletBC bcl(V0, c, left);
bcs.push_back(&bcl);

I'm getting the error

no matching function for call to 
‘std::vector<const dolfin::BoundaryCondition*>::push_back(dolfin::DirichletBC*)’

As this is done in examples I've seen I'm confused as to why it isn't working. I'm using FEniCS 1.5.0.

closed with the note: Fixed.
asked Apr 23, 2015 by garj FEniCS Novice (130 points)
closed May 14, 2015 by garj
...