Hi,
I am trying to get the coordinates of the DOFs. The following simple code gives me always zero output:
...
x = 0, 0
x = 0, 3.21143e-322
x = 6.90901e-310, 5.08597e-317
Can anyone try it out? I use the stable version of dolfin: dolfin-1.3.0.
Thank you,
Murtazo
main.cpp:
#include <dolfin.h>
#include "P1.h"
using namespace dolfin;
int main()
{
UnitSquare mesh(5,5);
P1::FunctionSpace V(mesh);
const GenericDofMap& dm = *V.dofmap();
dolfin::la_index ds = dm.max_cell_dimension();
boost::multi_array<double, 2> coor(boost::extents[ds][2]);
std::vector<double> vert_coor(3);
for (CellIterator cell(mesh); !cell.end(); ++cell)
{
dm.tabulate_coordinates(coor, vert_coor, *cell);
for (int i = 0; i < ds; i++)
info("x = %g, %g", coor[i][0], coor[i][1]);
info("");
}
return 0;
}
P1.ufl:
element = FiniteElement("Lagrange", triangle, 1)