How to get the vertex corodinates of all DG0 cells in a mesh
Asked by
Jason
Hi,
Is this the correct way to get the coordinates of the vertices of all DG0 cells that make up a mesh? Am I also correct in assuming for DG0 cells, there's just a single vertex in the center?
for (CellIterator cell(mesh); !cell.end(); ++cell) {
xy = new Array<double>(dim, geometry.
std::cout << (*xy)[0] << "\t" << (*xy)[1] << "\t" << (*xy)[2] << std::endl;
Point point( (*xy)[0], (*xy)[1], (*xy)[2] );
}
This prints out some normal values and aslo some very small ones leading me to think the above is not correct.
Thanks,
Jason
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- DOLFIN Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Johan Hake
- Solved:
- Last query:
- Last reply:
To post a message you must log in.