From: kronbichler Date: Wed, 24 Jul 2013 15:43:22 +0000 (+0000) Subject: Make tests work: convert DoFHandler::cell_iterator to DataOut::cell_iterator X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ea43a1c05ba4a110958684e9e7d3ceae593b131;p=dealii-svn.git Make tests work: convert DoFHandler::cell_iterator to DataOut::cell_iterator git-svn-id: https://svn.dealii.org/trunk@30151 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/bits/data_out_multi_dh_05/cmp/generic b/tests/bits/data_out_multi_dh_05/cmp/generic index 95533e8ba5..ddad4531f8 100644 --- a/tests/bits/data_out_multi_dh_05/cmp/generic +++ b/tests/bits/data_out_multi_dh_05/cmp/generic @@ -20,16 +20,26 @@ CELLS 3 9 CELL_TYPES 3 3 3 3 POINT_DATA 6 -VECTORS vector double +VECTORS vector1 double 0.0 0 0 1.0 0 0 2.0 0 0 3.0 0 0 3.0 0 0 0.0 0 0 -SCALARS scalar double 1 +VECTORS vector2 double +0.0 0 0 +-1.0 0 0 +-2.0 0 0 +-3.0 0 0 +-3.0 0 0 +0.0 0 0 +SCALARS scalar1 double 1 LOOKUP_TABLE default 0.0 1.0 2.0 3.0 3.0 0.0 +SCALARS scalar2 double 1 +LOOKUP_TABLE default +0.0 -1.0 -2.0 -3.0 -3.0 0.0 # vtk DataFile Version 3.0 #This file was generated ASCII @@ -77,7 +87,7 @@ CELLS 7 35 CELL_TYPES 7 9 9 9 9 9 9 9 POINT_DATA 28 -VECTORS vector double +VECTORS vector1 double 0.0 1.0 0 2.0 3.0 0 4.0 5.0 0 @@ -106,9 +116,41 @@ VECTORS vector double 24. 25. 0 26. 27. 0 4.0 5.0 0 -SCALARS scalar double 1 +VECTORS vector2 double +0.0 -1.0 0 +-2.0 -3.0 0 +-4.0 -5.0 0 +-6.0 -7.0 0 +-8.0 -9.0 0 +-4.0 -5.0 0 +-10. -11. 0 +-12. -13. 0 +-4.0 -5.0 0 +-6.0 -7.0 0 +-12. -13. 0 +-14. -15. 0 +-16. -17. 0 +-18. -19. 0 +-20. -21. 0 +-22. -23. 0 +-18. -19. 0 +0.0 -1.0 0 +-22. -23. 0 +-24. -25. 0 +-20. -21. 0 +-22. -23. 0 +-8.0 -9.0 0 +-26. -27. 0 +-22. -23. 0 +-24. -25. 0 +-26. -27. 0 +-4.0 -5.0 0 +SCALARS scalar1 double 1 LOOKUP_TABLE default 0.0 1.0 2.0 3.0 4.0 2.0 5.0 6.0 2.0 3.0 6.0 7.0 8.0 9.0 10. 11. 9.0 0.0 11. 12. 10. 11. 4.0 13. 11. 12. 13. 2.0 +SCALARS scalar2 double 1 +LOOKUP_TABLE default +0.0 -1.0 -2.0 -3.0 -4.0 -2.0 -5.0 -6.0 -2.0 -3.0 -6.0 -7.0 -8.0 -9.0 -10. -11. -9.0 0.0 -11. -12. -10. -11. -4.0 -13. -11. -12. -13. -2.0 # vtk DataFile Version 3.0 #This file was generated ASCII @@ -256,7 +298,7 @@ CELLS 15 135 CELL_TYPES 15 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 POINT_DATA 120 -VECTORS vector double +VECTORS vector1 double 0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 @@ -377,6 +419,130 @@ VECTORS vector double 1.3e+02 1.3e+02 1.3e+02 1.4e+02 1.4e+02 1.4e+02 18. 19. 20. -SCALARS scalar double 1 +VECTORS vector2 double +0.0 -1.0 -2.0 +-3.0 -4.0 -5.0 +-6.0 -7.0 -8.0 +-9.0 -10. -11. +-12. -13. -14. +-15. -16. -17. +-18. -19. -20. +-21. -22. -23. +-24. -25. -26. +-6.0 -7.0 -8.0 +-27. -28. -29. +-30. -31. -32. +-33. -34. -35. +-18. -19. -20. +-36. -37. -38. +-39. -40. -41. +-6.0 -7.0 -8.0 +-9.0 -10. -11. +-30. -31. -32. +-42. -43. -44. +-18. -19. -20. +-21. -22. -23. +-39. -40. -41. +-45. -46. -47. +-48. -49. -50. +-12. -13. -14. +-33. -34. -35. +-18. -19. -20. +-51. -52. -53. +-54. -55. -56. +-57. -58. -59. +-60. -61. -62. +-12. -13. -14. +-15. -16. -17. +-18. -19. -20. +-21. -22. -23. +-54. -55. -56. +-63. -64. -65. +-60. -61. -62. +-66. -67. -68. +-33. -34. -35. +-18. -19. -20. +-36. -37. -38. +-39. -40. -41. +-57. -58. -59. +-60. -61. -62. +-69. -70. -71. +-72. -73. -74. +-18. -19. -20. +-21. -22. -23. +-39. -40. -41. +-45. -46. -47. +-60. -61. -62. +-66. -67. -68. +-72. -73. -74. +-75. -76. -77. +-78. -79. -80. +-81. -82. -83. +-84. -85. -86. +-87. -88. -89. +-90. -91. -92. +-93. -94. -95. +-96. -97. -98. +-99. -1.0e+02 -1.0e+02 +-81. -82. -83. +0.0 -1.0 -2.0 +-87. -88. -89. +-1.0e+02 -1.0e+02 -1.0e+02 +-93. -94. -95. +-1.0e+02 -1.1e+02 -1.1e+02 +-99. -1.0e+02 -1.0e+02 +-1.1e+02 -1.1e+02 -1.1e+02 +-84. -85. -86. +-87. -88. -89. +-24. -25. -26. +-1.1e+02 -1.1e+02 -1.1e+02 +-96. -97. -98. +-99. -1.0e+02 -1.0e+02 +-1.1e+02 -1.2e+02 -1.2e+02 +-1.2e+02 -1.2e+02 -1.2e+02 +-87. -88. -89. +-1.0e+02 -1.0e+02 -1.0e+02 +-1.1e+02 -1.1e+02 -1.1e+02 +-6.0 -7.0 -8.0 +-99. -1.0e+02 -1.0e+02 +-1.1e+02 -1.1e+02 -1.1e+02 +-1.2e+02 -1.2e+02 -1.2e+02 +-1.2e+02 -1.2e+02 -1.2e+02 +-90. -91. -92. +-93. -94. -95. +-96. -97. -98. +-99. -1.0e+02 -1.0e+02 +-48. -49. -50. +-1.2e+02 -1.2e+02 -1.2e+02 +-1.3e+02 -1.3e+02 -1.3e+02 +-1.3e+02 -1.3e+02 -1.3e+02 +-93. -94. -95. +-1.0e+02 -1.1e+02 -1.1e+02 +-99. -1.0e+02 -1.0e+02 +-1.1e+02 -1.1e+02 -1.1e+02 +-1.2e+02 -1.2e+02 -1.2e+02 +-12. -13. -14. +-1.3e+02 -1.3e+02 -1.3e+02 +-1.3e+02 -1.3e+02 -1.3e+02 +-96. -97. -98. +-99. -1.0e+02 -1.0e+02 +-1.1e+02 -1.2e+02 -1.2e+02 +-1.2e+02 -1.2e+02 -1.2e+02 +-1.3e+02 -1.3e+02 -1.3e+02 +-1.3e+02 -1.3e+02 -1.3e+02 +-33. -34. -35. +-1.4e+02 -1.4e+02 -1.4e+02 +-99. -1.0e+02 -1.0e+02 +-1.1e+02 -1.1e+02 -1.1e+02 +-1.2e+02 -1.2e+02 -1.2e+02 +-1.2e+02 -1.2e+02 -1.2e+02 +-1.3e+02 -1.3e+02 -1.3e+02 +-1.3e+02 -1.3e+02 -1.3e+02 +-1.4e+02 -1.4e+02 -1.4e+02 +-18. -19. -20. +SCALARS scalar1 double 1 LOOKUP_TABLE default 0.0 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 2.0 9.0 10. 11. 6.0 12. 13. 2.0 3.0 10. 14. 6.0 7.0 13. 15. 16. 4.0 11. 6.0 17. 18. 19. 20. 4.0 5.0 6.0 7.0 18. 21. 20. 22. 11. 6.0 12. 13. 19. 20. 23. 24. 6.0 7.0 13. 15. 20. 22. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 27. 0.0 29. 34. 31. 35. 33. 36. 28. 29. 8.0 37. 32. 33. 38. 39. 29. 34. 37. 2.0 33. 36. 39. 40. 30. 31. 32. 33. 16. 41. 42. 43. 31. 35. 33. 36. 41. 4.0 43. 44. 32. 33. 38. 39. 42. 43. 11. 45. 33. 36. 39. 40. 43. 44. 45. 6.0 +SCALARS scalar2 double 1 +LOOKUP_TABLE default +0.0 -1.0 -2.0 -3.0 -4.0 -5.0 -6.0 -7.0 -8.0 -2.0 -9.0 -10. -11. -6.0 -12. -13. -2.0 -3.0 -10. -14. -6.0 -7.0 -13. -15. -16. -4.0 -11. -6.0 -17. -18. -19. -20. -4.0 -5.0 -6.0 -7.0 -18. -21. -20. -22. -11. -6.0 -12. -13. -19. -20. -23. -24. -6.0 -7.0 -13. -15. -20. -22. -24. -25. -26. -27. -28. -29. -30. -31. -32. -33. -27. 0.0 -29. -34. -31. -35. -33. -36. -28. -29. -8.0 -37. -32. -33. -38. -39. -29. -34. -37. -2.0 -33. -36. -39. -40. -30. -31. -32. -33. -16. -41. -42. -43. -31. -35. -33. -36. -41. -4.0 -43. -44. -32. -33. -38. -39. -42. -43. -11. -45. -33. -36. -39. -40. -43. -44. -45. -6.0 diff --git a/tests/mpi/p4est_2d_constraintmatrix_03.cc b/tests/mpi/p4est_2d_constraintmatrix_03.cc index 0b29c5ce1f..fc8a52dd8f 100644 --- a/tests/mpi/p4est_2d_constraintmatrix_03.cc +++ b/tests/mpi/p4est_2d_constraintmatrix_03.cc @@ -58,29 +58,29 @@ public: subdomain_id (subdomain_id) {} - virtual typename DoFHandler::cell_iterator + virtual typename DataOut::cell_iterator first_cell () { - typename DoFHandler::active_cell_iterator - cell = this->dofs->begin_active(); - while ((cell != this->dofs->end()) && + typename DataOut::active_cell_iterator + cell = this->triangulation->begin_active(); + while ((cell != this->triangulation->end()) && (cell->subdomain_id() != subdomain_id)) ++cell; return cell; } - virtual typename DoFHandler::cell_iterator - next_cell (const typename DoFHandler::cell_iterator &old_cell) + virtual typename DataOut::cell_iterator + next_cell (const typename DataOut::cell_iterator &old_cell) { - if (old_cell != this->dofs->end()) + if (old_cell != this->triangulation->end()) { const IteratorFilters::SubdomainEqualTo predicate(subdomain_id); return ++(FilteredIterator - ::active_cell_iterator> + ::active_cell_iterator> (predicate,old_cell)); } else diff --git a/tests/mpi/p4est_2d_constraintmatrix_04.cc b/tests/mpi/p4est_2d_constraintmatrix_04.cc index 70462edc71..bb60437849 100644 --- a/tests/mpi/p4est_2d_constraintmatrix_04.cc +++ b/tests/mpi/p4est_2d_constraintmatrix_04.cc @@ -65,29 +65,29 @@ public: subdomain_id (subdomain_id) {} - virtual typename DoFHandler::cell_iterator + virtual typename DataOut::cell_iterator first_cell () { - typename DoFHandler::active_cell_iterator - cell = this->dofs->begin_active(); - while ((cell != this->dofs->end()) && + typename DataOut::active_cell_iterator + cell = this->triangulation->begin_active(); + while ((cell != this->triangulation->end()) && (cell->subdomain_id() != subdomain_id)) ++cell; return cell; } - virtual typename DoFHandler::cell_iterator - next_cell (const typename DoFHandler::cell_iterator &old_cell) + virtual typename DataOut::cell_iterator + next_cell (const typename DataOut::cell_iterator &old_cell) { - if (old_cell != this->dofs->end()) + if (old_cell != this->triangulation->end()) { const IteratorFilters::SubdomainEqualTo predicate(subdomain_id); return ++(FilteredIterator - ::active_cell_iterator> + ::active_cell_iterator> (predicate,old_cell)); } else diff --git a/tests/mpi/p4est_3d_constraintmatrix_03.cc b/tests/mpi/p4est_3d_constraintmatrix_03.cc index ebbcd9066d..98164f7cd4 100644 --- a/tests/mpi/p4est_3d_constraintmatrix_03.cc +++ b/tests/mpi/p4est_3d_constraintmatrix_03.cc @@ -64,29 +64,29 @@ public: subdomain_id (subdomain_id) {} - virtual typename DoFHandler::cell_iterator + virtual typename DataOut::cell_iterator first_cell () { - typename DoFHandler::active_cell_iterator - cell = this->dofs->begin_active(); - while ((cell != this->dofs->end()) && + typename DataOut::active_cell_iterator + cell = this->triangulation->begin_active(); + while ((cell != this->triangulation->end()) && (cell->subdomain_id() != subdomain_id)) ++cell; return cell; } - virtual typename DoFHandler::cell_iterator - next_cell (const typename DoFHandler::cell_iterator &old_cell) + virtual typename DataOut::cell_iterator + next_cell (const typename DataOut::cell_iterator &old_cell) { - if (old_cell != this->dofs->end()) + if (old_cell != this->triangulation->end()) { const IteratorFilters::SubdomainEqualTo predicate(subdomain_id); return ++(FilteredIterator - ::active_cell_iterator> + ::active_cell_iterator> (predicate,old_cell)); } else