Location of computational points

Hi,

Is it possible to get the locations of the computational points?

For example if a mesh has Th.nv = 1000 points and I am using P2 elements, there are more computational points than mesh vertices. But is there a way to get the locations of computational points?

Thank you!

For example,

fespace Vh(Th, P2);
Vh xh = x, yh = y;
for (int j = 0; j < Vh.ndof; ++j) {
    cout << "(" << xh[][j] << ", " << yh[][j] << ")" << endl;
}

OR

fespace Vh(Th, [P2, P2])
Vh [xh, yh] = [x, y];
for (int j = 0; j < Vh.ndof; ++j) {
    int I = 2 * j;
    int J = I + 1;
    cout << "(" << xh[][I] << ", " << xh[][J] << ")" << endl;
}
2 Likes

Exactly what I needed. Thank you!