← Back to team overview

dolfin team mailing list archive

question on new mesh

 

Hi,

I'd like to know how the new mesh library handles moving verices in a
mesh. This seems to not work:

// STRETCH MESH [0 1]x[0 1] -> [a b]x[a b] --------------------%%%
void Mesh_fcns::meshTransformation(Mesh& mesh, real a, real b)
{
  for(VertexIterator n(mesh); !n.end(); ++n)
    {
      Vertex& vertex = *n;
      vertex.point().x() = (b-a)*vertex.point().x() + a;
      vertex.point().y() = (b-a)*vertex.point().y() + a;
    }
}

How to do it?
/Dag



Follow ups