From: bangerth Date: Thu, 11 Oct 2007 23:45:03 +0000 (+0000) Subject: Add the missing assertion in DataOutReader::merge ensuring that the two sources for... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b78f40db104aa2440cb605a64943f3033d2fc4cb;p=dealii-svn.git Add the missing assertion in DataOutReader::merge ensuring that the two sources for merging have the same vector declarations. git-svn-id: https://svn.dealii.org/trunk@15297 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/base/source/data_out_base.cc b/deal.II/base/source/data_out_base.cc index 3d40d92872..19727a1ad3 100644 --- a/deal.II/base/source/data_out_base.cc +++ b/deal.II/base/source/data_out_base.cc @@ -4589,6 +4589,28 @@ merge (const DataOutReader &source) // names Assert (get_dataset_names() == source.get_dataset_names(), ExcIncompatibleDatasetNames()); + + // check equality of the vector data + // specifications + Assert (get_vector_data_ranges().size() == source.get_vector_data_ranges().size(), + ExcMessage ("Both sources need to declare the same components " + "as vectors.")); + for (unsigned int i=0; i() == + source.get_vector_data_ranges()[i].template get<0>(), + ExcMessage ("Both sources need to declare the same components " + "as vectors.")); + Assert (get_vector_data_ranges()[i].template get<1>() == + source.get_vector_data_ranges()[i].template get<1>(), + ExcMessage ("Both sources need to declare the same components " + "as vectors.")); + Assert (get_vector_data_ranges()[i].template get<2>() == + source.get_vector_data_ranges()[i].template get<2>(), + ExcMessage ("Both sources need to declare the same components " + "as vectors.")); + } + // make sure patches are compatible Assert (patches[0].n_subdivisions == source_patches[0].n_subdivisions, ExcIncompatiblePatchLists());