// Mesh
const std::string filename = "../mesh.msh";
std::ifstream input_file(filename);
Triangulation<2,2> triangulation;
GridIn<2> grid_in;
grid_in.attach_triangulation(triangulation);
grid_in.read_msh(input_file);
//Manifold
const Point<2> center(0.0, 0.0);
SphericalManifold<2,2> circular_manifold(center);
triangulation.reset_all_manifolds();
triangulation.set_all_manifold_ids(0);
triangulation.set_manifold (0, circular_manifold);
// DoFHandler, Mapping, and FE
DoFHandler<2,2> dof_handler(triangulation);
MappingQ<2,2> mapping(2);
const FE_Q<2,2> fe(1);
dof_handler.distribute_dofs(fe);
// Output
DataOut<2> data_out;
data_out.attach_dof_handler(dof_handler);
data_out.build_patches(mapping, 5);
std::ofstream out("output_mesh.vtu");
data_out.write(out, DataOutBase::vtu);
I'm surely doing something wrong, any hint?
I leave a zip file attached with all the necessary to compile and run this snippet of code.