Hey all, I am trying to solve a level set equation with DG. When I use degree=1, everything is ok, but when I change it to degree=0, it cannot output the results, and says:
An error occurred in line <957> of file </home/seven/Documents/dealii-8.4.1/source/numerics/data_out_dof_data.cc> in function void dealii::DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::add_data_vector(const VectorType&, const std::vector<std::basic_string<char> >&, dealii::DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::DataVectorType, const std::vector<dealii::DataComponentInterpretation::DataComponentInterpretation>&) [with VectorType = dealii::Vector<double>; DoFHandlerType = dealii::DoFHandler<2>; int patch_dim = 2; int patch_space_dim = 2] The violated condition was: (dofs == 0) || (triangulation->n_active_cells() != dofs->n_dofs()) The name and call sequence of the exception was: ExcMessage("Unable to determine the type of vector automatically because the number of DoFs " "is equal to the number of cells. Please specify DataVectorType.") Additional Information: Unable to determine the type of vector automatically because the number of DoFs is equal to the number of cells. Please specify DataVectorType. And the following is my code: DataOut<dim> data_out; data_out.attach_dof_handler (dof_handler); data_out.add_data_vector (solution, "u"); data_out.build_patches (); std::ostringstream filename; filename << "sol -" << timestep_number<<".vtk"; std::ofstream output (filename.str().c_str()); data_out.write_vtk (output); What can I do to solve this problem? Thanks, Jiaqi -- The deal.II project is located at http://www.dealii.org/ For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en --- You received this message because you are subscribed to the Google Groups "deal.II User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to dealii+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.