Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misleading error message in add_data_vector() function. #10767

Closed
cdev911 opened this issue Jul 30, 2020 · 0 comments · Fixed by #10768
Closed

Misleading error message in add_data_vector() function. #10767

cdev911 opened this issue Jul 30, 2020 · 0 comments · Fixed by #10768

Comments

@cdev911
Copy link
Contributor

cdev911 commented Jul 30, 2020

I encountered a misleading error message.

An error occurred in line <1183> of file </calculate/temp/cdev/spack-stage-dealii-develop-rhagfdv4pwivdatv7mchhb2ifeqhwwxr/spack-src/include/deal.II/numerics/data_out_dof_data.templates.h> in function
void dealii::DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::add_data_vector_internal(const DoFHandlerType*, const VectorType&, const std::vector<std::__cxx11::basic_string >&, dealii::DataOut_DoFData<DoFHandlerType, patch_dim, patch_space_dim>::DataVectorType, const std::vectordealii::DataComponentInterpretation::DataComponentInterpretation&, bool) [with VectorType = dealii::Vector; DoFHandlerType = dealii::hp::DoFHandler<2, 2>; int patch_dim = 2; int patch_space_dim = 2]
The violated condition was:
data_vector.size() == dof_handler->n_dofs()
Additional information:
The vector has size 1468 but the DoFHandler object says that there are 7302 degrees of freedom and there are 1468 active cells. The size of your vector needs to be either equal to the number of degrees of freedom, or equal to the number of active cells.

As you can see in the additional information the vector size and the number of active cells are equal, and the error message is misleading.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant