From 62067ddfca6481d37b7e9366c8cedd9bc18f9f2b Mon Sep 17 00:00:00 2001 From: guido Date: Wed, 3 Jul 2002 16:52:33 +0000 Subject: [PATCH] deal.II lib ISOified for icc -Xc git-svn-id: https://svn.dealii.org/trunk@6217 0785d39b-7218-0410-832d-ea1e28bc413d --- .../deal.II/include/grid/tria_boundary_lib.h | 6 - deal.II/deal.II/include/numerics/data_out.h | 2 +- deal.II/deal.II/source/dofs/dof_accessor.cc | 2 +- .../deal.II/source/grid/grid_reordering.cc | 59 +++-- deal.II/deal.II/source/grid/tria_accessor.cc | 21 +- .../deal.II/source/grid/tria_boundary_lib.cc | 18 +- .../source/multigrid/mg_dof_accessor.cc | 48 ++--- .../source/multigrid/mg_dof_handler.cc | 204 +++++++++--------- deal.II/deal.II/source/numerics/data_out.cc | 4 +- .../deal.II/source/numerics/data_out_faces.cc | 2 +- .../source/numerics/data_out_rotation.cc | 4 +- .../deal.II/source/numerics/time_dependent.cc | 4 +- 12 files changed, 197 insertions(+), 177 deletions(-) diff --git a/deal.II/deal.II/include/grid/tria_boundary_lib.h b/deal.II/deal.II/include/grid/tria_boundary_lib.h index de9b4d3e1b..fd60b0e5a3 100644 --- a/deal.II/deal.II/include/grid/tria_boundary_lib.h +++ b/deal.II/deal.II/include/grid/tria_boundary_lib.h @@ -470,12 +470,6 @@ class HalfHyperShellBoundary : public HyperShellBoundary virtual void get_normals_at_vertices (const typename Triangulation::face_iterator &face, typename Boundary::FaceVertexNormals &face_vertex_normals) const; - - private: - /** - * Store the center of the spheres. - */ - const Point center; }; diff --git a/deal.II/deal.II/include/numerics/data_out.h b/deal.II/deal.II/include/numerics/data_out.h index d6c8dd0e26..3c80133704 100644 --- a/deal.II/deal.II/include/numerics/data_out.h +++ b/deal.II/deal.II/include/numerics/data_out.h @@ -638,7 +638,6 @@ class DataOut : public DataOut_DoFData << "The number of subdivisions per patch, " << arg1 << ", is not valid."); - private: /** * Define a map from cell * iterators to patch iterators @@ -648,6 +647,7 @@ class DataOut : public DataOut_DoFData typename std::vector< ::DataOutBase::Patch >::iterator> PatchMap; + private: /** * All data needed in one thread * is gathered in the struct diff --git a/deal.II/deal.II/source/dofs/dof_accessor.cc b/deal.II/deal.II/source/dofs/dof_accessor.cc index 788de3f216..ab57a454ca 100644 --- a/deal.II/deal.II/source/dofs/dof_accessor.cc +++ b/deal.II/deal.II/source/dofs/dof_accessor.cc @@ -629,7 +629,7 @@ template <> TriaIterator<3, DoFObjectAccessor<2, 3> > DoFCellAccessor<3>::face (const unsigned int i) const { - return quad(i); + return this->quad(i); }; #endif diff --git a/deal.II/deal.II/source/grid/grid_reordering.cc b/deal.II/deal.II/source/grid/grid_reordering.cc index 8ec0ab4e26..dc8a583302 100644 --- a/deal.II/deal.II/source/grid/grid_reordering.cc +++ b/deal.II/deal.II/source/grid/grid_reordering.cc @@ -245,7 +245,7 @@ GridReordering<3>::Cell::insert_faces (std::map &global_faces) { { vertices[1], vertices[5], vertices[6], vertices[2] } }, { { vertices[3], vertices[2], vertices[6], vertices[7] } }, { { vertices[0], vertices[4], vertices[7], vertices[3] } } }; - Face new_faces[GeometryInfo::faces_per_cell][rotational_states_of_faces] + Face new_faces[GeometryInfo::faces_per_cell][GridReorderingInfo::rotational_states_of_faces] = { { new_faces_tmp[0], new_faces_tmp[0], new_faces_tmp[0], new_faces_tmp[0], new_faces_tmp[0], new_faces_tmp[0], new_faces_tmp[0], new_faces_tmp[0] }, { new_faces_tmp[1], new_faces_tmp[0], new_faces_tmp[0], new_faces_tmp[0], @@ -262,7 +262,7 @@ GridReordering<3>::Cell::insert_faces (std::map &global_faces) // first do the faces in their // usual direction for (unsigned int face=0; face::faces_per_cell; ++face) - for (unsigned int rot=1; rot::rotational_states_of_faces/2; ++rot) for (unsigned int v=0; v::vertices_per_face; ++v) new_faces[face][rot].vertices[v] = new_faces[face][0].vertices[(v+rot) % GeometryInfo::vertices_per_face]; @@ -271,11 +271,14 @@ GridReordering<3>::Cell::insert_faces (std::map &global_faces) // as we only have to revert // indices 1 and 3 for (unsigned int face=0; face::faces_per_cell; ++face) - for (unsigned int rot=rotational_states_of_faces/2; rot::rotational_states_of_faces/2; + rot::rotational_states_of_faces; + ++rot) { for (unsigned int v=0; v::vertices_per_face; ++v) new_faces[face][rot].vertices[v] - = new_faces[face][rot-rotational_states_of_faces/2].vertices[v]; + = new_faces[face] + [rot-GridReorderingInfo::rotational_states_of_faces/2].vertices[v]; std::swap (new_faces[face][rot].vertices[1], new_faces[face][rot].vertices[3]); }; @@ -293,16 +296,23 @@ GridReordering<3>::Cell::insert_faces (std::map &global_faces) // it or not. we don't care about // that here, though std::map::iterator - new_faces_ptr[rotational_states_of_faces][GeometryInfo::faces_per_cell]; + new_faces_ptr[GridReorderingInfo::rotational_states_of_faces] + [GeometryInfo::faces_per_cell]; for (unsigned int face=0; face::faces_per_cell; ++face) - for (unsigned int rot=0; rot::rotational_states_of_faces; + ++rot) new_faces_ptr[rot][face] = global_faces.insert (std::make_pair(new_faces[face][rot], FaceData())).first; // and crosslink them to each other for (unsigned int face=0; face::faces_per_cell; ++face) - for (unsigned int rot=0; rot::rotational_states_of_faces; + ++rot) + for (unsigned int other_rot=0; + other_rot::rotational_states_of_faces; + ++other_rot) { if (other_rot < rot) new_faces_ptr[rot][face]->second.reverse_faces[other_rot] @@ -335,7 +345,9 @@ GridReordering<3>::Cell::insert_faces (std::map &global_faces) // no, faces had not been // used before, so we are the // first adjacent cell - for (unsigned int rot=0; rot::rotational_states_of_faces; + ++rot) { Assert (new_faces_ptr[rot][face]->second.adjacent_cells[0] == FaceData::invalid_adjacent_cell, @@ -351,7 +363,9 @@ GridReordering<3>::Cell::insert_faces (std::map &global_faces) const unsigned int previous_neighbor = new_faces_ptr[0][face]->second.adjacent_cells[0]; // cout << " as neighbor 1 (previous: " << previous_neighbor << ")" << endl; - for (unsigned int rot=0; rot::rotational_states_of_faces; + ++rot) { Assert (new_faces_ptr[rot][face]->second.adjacent_cells[0] == previous_neighbor, @@ -420,11 +434,11 @@ GridReordering<3>::Cell::insert_faces (std::map &global_faces) // cell (store which face and which // orientation): static std::pair - cell_orientation_faces[rotational_states_of_cells][GeometryInfo::faces_per_cell]; + cell_orientation_faces[GridReorderingInfo::rotational_states_of_cells][GeometryInfo::faces_per_cell]; if (already_initialized == false) { - for (unsigned int rot=0; rot::rotational_states_of_cells; ++rot) { // initialize a standard // cell with the vertex @@ -463,7 +477,9 @@ GridReordering<3>::Cell::insert_faces (std::map &global_faces) bool face_found = false; for (unsigned int f=0; (!face_found) && (f::faces_per_cell); ++f) - for (unsigned int r=0; r::rotational_states_of_faces; + ++r) if (standard_faces[face] == new_faces[f][r]) { cell_orientation_faces[rot][face] = std::make_pair(f,r); @@ -526,7 +542,9 @@ GridReordering<3>::Cell::insert_faces (std::map &global_faces) // link the faces in their // directions to the cell in each // of its orientations - for (unsigned int rot=0; rot::rotational_states_of_cells; + ++rot) for (unsigned int face=0; face::faces_per_cell; ++face) faces[rot][face] = new_faces_ptr [cell_orientation_faces[rot][face].second] @@ -619,7 +637,7 @@ bool GridReordering::Cell::check_consistency (const unsigned int rot) const { const FaceData &face = faces[rot][face_no]->second; - for (unsigned int face_rot=0; face_rotrotational_states_of_faces-1; ++face_rot) { const FaceData &reverse_face = face.reverse_faces[face_rot]->second; if (reverse_face.use_count != 0) @@ -736,14 +754,14 @@ void GridReordering::track_back (typename std::vector &cells, // stack rotation_states.pop_back(); }; - Assert (last_rotation_state < rotational_states_of_cells, ExcInternalError()); + Assert (last_rotation_state < GridReorderingInfo::rotational_states_of_cells, ExcInternalError()); // now we will have to find out // whether we can try the last cell // we have popped from the stack in // another rotation state, or will // have to backtrack further: - if (last_rotation_state < rotational_states_of_cells-1) + if (last_rotation_state < GridReorderingInfo::rotational_states_of_cells-1) { // possible. push that state to // the stack and leave @@ -820,7 +838,7 @@ bool GridReordering::try_rotate_single_neighbors (typename std::vector::rotational_states_of_cells; ++neighbor_rot) { // first, if the // neighbor itself does @@ -840,7 +858,7 @@ bool GridReordering::try_rotate_single_neighbors (typename std::vector::rotational_states_of_cells; ++cell_rot) if (cells[cell_no].check_consistency (cell_rot) == true) { // ah, see, @@ -968,7 +986,8 @@ void GridReordering::find_reordering (typename std::vector // no, doesn't work. see if // we can rotate the top // cell so that it works - if (rotation_states.back()+1 < rotational_states_of_cells) + if (rotation_states.back()+1 + < GridReorderingInfo::rotational_states_of_cells) { // yes, can be // done. then do so and diff --git a/deal.II/deal.II/source/grid/tria_accessor.cc b/deal.II/deal.II/source/grid/tria_accessor.cc index 529ff3dae2..8fea61e021 100644 --- a/deal.II/deal.II/source/grid/tria_accessor.cc +++ b/deal.II/deal.II/source/grid/tria_accessor.cc @@ -1563,8 +1563,9 @@ bool CellAccessor<1>::at_boundary () const template <> unsigned char CellAccessor<1>::material_id () const { - Assert (used(), TriaAccessor<1>::ExcCellNotUsed()); - return tria->levels[present_level]->lines.material_id[present_index]; + Assert (this->used(), TriaAccessor<1>::ExcCellNotUsed()); + return this->tria->levels[this->present_level] + ->lines.material_id[this->present_index]; }; @@ -1572,8 +1573,8 @@ unsigned char CellAccessor<1>::material_id () const template <> void CellAccessor<1>::set_material_id (const unsigned char mat_id) const { - Assert (used(), TriaAccessor<1>::ExcCellNotUsed()); - tria->levels[present_level]->lines.material_id[present_index] + Assert (this->used(), TriaAccessor<1>::ExcCellNotUsed()); + this->tria->levels[this->present_level]->lines.material_id[this->present_index] = mat_id; }; @@ -1581,7 +1582,7 @@ void CellAccessor<1>::set_material_id (const unsigned char mat_id) const template <> bool CellAccessor<1>::point_inside (const Point<1> &p) const { - return (vertex(0)[0] <= p[0]) && (p[0] <= vertex(1)[0]); + return (this->vertex(0)[0] <= p[0]) && (p[0] <= this->vertex(1)[0]); } @@ -1653,7 +1654,7 @@ bool CellAccessor<2>::point_inside (const Point<2> &p) const // of the line to the point const Point<2> to_p = p-this->vertex(f); // vector describing the line - const Point<2> face = this->vertex((f+1)%4)-vertex(f); + const Point<2> face = this->vertex((f+1)%4)-this->vertex(f); // if we rotate the face vector // by 90 degrees to the left @@ -1699,8 +1700,8 @@ bool CellAccessor<3>::at_boundary () const template <> unsigned char CellAccessor<3>::material_id () const { - Assert (used(), TriaAccessor<3>::ExcCellNotUsed()); - return tria->levels[present_level]->hexes.material_id[present_index]; + Assert (this->used(), TriaAccessor<3>::ExcCellNotUsed()); + return this->tria->levels[this->present_level]->hexes.material_id[this->present_index]; }; @@ -1708,8 +1709,8 @@ unsigned char CellAccessor<3>::material_id () const template <> void CellAccessor<3>::set_material_id (const unsigned char mat_id) const { - Assert (used(), TriaAccessor<3>::ExcCellNotUsed()); - tria->levels[present_level]->hexes.material_id[present_index] + Assert (this->used(), TriaAccessor<3>::ExcCellNotUsed()); + this->tria->levels[this->present_level]->hexes.material_id[this->present_index] = mat_id; }; diff --git a/deal.II/deal.II/source/grid/tria_boundary_lib.cc b/deal.II/deal.II/source/grid/tria_boundary_lib.cc index 676f6b1cb1..6f9ada2841 100644 --- a/deal.II/deal.II/source/grid/tria_boundary_lib.cc +++ b/deal.II/deal.II/source/grid/tria_boundary_lib.cc @@ -654,8 +654,8 @@ get_new_point_on_line (const typename Triangulation::line_iterator &line) c // points of the line are on the // axis of symmetry. if so, then // return the mid point - if ((line->vertex(0)(0) == center(0)) && - (line->vertex(1)(0) == center(0))) + if ((line->vertex(0)(0) == this->center(0)) && + (line->vertex(1)(0) == this->center(0))) return (line->vertex(0) + line->vertex(1))/2; @@ -689,10 +689,10 @@ get_new_point_on_quad (const typename Triangulation::quad_iterator &quad) c { // same thing as for the new point // on the line - if ((quad->vertex(0)(0) == center(0)) && - (quad->vertex(1)(0) == center(0)) && - (quad->vertex(2)(0) == center(0)) && - (quad->vertex(3)(0) == center(0))) + if ((quad->vertex(0)(0) == this->center(0)) && + (quad->vertex(1)(0) == this->center(0)) && + (quad->vertex(2)(0) == this->center(0)) && + (quad->vertex(3)(0) == this->center(0))) return (quad->vertex(0) + quad->vertex(1) + quad->vertex(2) + quad->vertex(3) )/4; @@ -716,7 +716,7 @@ get_intermediate_points_on_line (const typename Triangulation::line_iterato // to the plane part of the // boundary const Point line_center = line->center(); - if (line_center(0) == center(0)) + if (line_center(0) == this->center(0)) return StraightBoundary::get_intermediate_points_on_line (line, points); else return HyperShellBoundary::get_intermediate_points_on_line (line, points); @@ -735,7 +735,7 @@ get_intermediate_points_on_quad (const typename Triangulation::quad_iterato // to the plane part of the // boundary const Point quad_center = quad->center(); - if (quad_center(0) == center(0)) + if (quad_center(0) == this->center(0)) StraightBoundary::get_intermediate_points_on_quad (quad, points); else HyperShellBoundary::get_intermediate_points_on_quad (quad, points); @@ -779,7 +779,7 @@ HalfHyperShellBoundary:: get_normals_at_vertices (const typename Triangulation::face_iterator &face, typename Boundary::FaceVertexNormals &face_vertex_normals) const { - if (face->center()(0) == center(0)) + if (face->center()(0) == this->center(0)) StraightBoundary::get_normals_at_vertices (face, face_vertex_normals); else HyperShellBoundary::get_normals_at_vertices (face, face_vertex_normals); diff --git a/deal.II/deal.II/source/multigrid/mg_dof_accessor.cc b/deal.II/deal.II/source/multigrid/mg_dof_accessor.cc index da2f329f65..e68364210f 100644 --- a/deal.II/deal.II/source/multigrid/mg_dof_accessor.cc +++ b/deal.II/deal.II/source/multigrid/mg_dof_accessor.cc @@ -52,7 +52,7 @@ unsigned int MGDoFObjectAccessor<1, dim>::mg_dof_index (const unsigned int i) co // and enough room was reserved Assert (&this->dof_handler->get_fe() != 0, DoFAccessor::ExcInvalidObject()); Assert (idof_handler->get_fe().dofs_per_line, - ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_line)); + ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_line)); return this->mg_dof_handler->mg_levels[this->present_level] ->line_dofs[this->present_index*this->dof_handler->get_fe().dofs_per_line+i]; @@ -69,7 +69,7 @@ void MGDoFObjectAccessor<1, dim>::set_mg_dof_index (const unsigned int i, // and enough room was reserved Assert (&this->dof_handler->get_fe() != 0, DoFAccessor::ExcInvalidObject()); Assert (idof_handler->get_fe().dofs_per_line, - ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_line)); + ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_line)); this->mg_dof_handler->mg_levels[this->present_level] ->line_dofs[this->present_index*this->dof_handler->get_fe().dofs_per_line+i] = index; @@ -85,7 +85,7 @@ unsigned int MGDoFObjectAccessor<1, dim>::mg_vertex_dof_index (const unsigned in Assert (&this->dof_handler->get_fe() != 0, DoFAccessor::ExcInvalidObject()); Assert (vertex<2, ExcIndexRange (i,0,2)); Assert (idof_handler->get_fe().dofs_per_vertex, - ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_vertex)); + ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_vertex)); return (this->mg_dof_handler->mg_vertex_dofs[this->vertex_index(vertex)] .get_index (this->present_level, i, this->dof_handler->get_fe().dofs_per_vertex)); @@ -102,7 +102,7 @@ void MGDoFObjectAccessor<1, dim>::set_mg_vertex_dof_index (const unsigned int ve Assert (&this->dof_handler->get_fe() != 0, DoFAccessor::ExcInvalidObject()); Assert (vertex<2, ExcIndexRange (i,0,2)); Assert (idof_handler->get_fe().dofs_per_vertex, - ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_vertex)); + ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_vertex)); this->mg_dof_handler->mg_vertex_dofs[this->vertex_index(vertex)] .set_index (this->present_level, i, this->dof_handler->get_fe().dofs_per_vertex, index); @@ -117,7 +117,7 @@ MGDoFObjectAccessor<1, dim>::get_mg_dof_indices (std::vector &dof_ Assert (this->mg_dof_handler != 0, DoFAccessor::ExcInvalidObject()); Assert (&this->dof_handler->get_fe() != 0, DoFAccessor::ExcInvalidObject()); Assert (dof_indices.size() == (2*this->dof_handler->get_fe().dofs_per_vertex + - dof_handler->get_fe().dofs_per_line), + this->dof_handler->get_fe().dofs_per_line), DoFAccessor::ExcVectorDoesNotMatch()); const unsigned int dofs_per_vertex = this->dof_handler->get_fe().dofs_per_vertex, @@ -209,7 +209,7 @@ unsigned int MGDoFObjectAccessor<2, dim>::mg_dof_index (const unsigned int i) co // and enough room was reserved Assert (&this->dof_handler->get_fe() != 0, DoFAccessor::ExcInvalidObject()); Assert (idof_handler->get_fe().dofs_per_quad, - ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_quad)); + ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_quad)); return this->mg_dof_handler->mg_levels[this->present_level] ->quad_dofs[this->present_index*this->dof_handler->get_fe().dofs_per_quad+i]; @@ -226,7 +226,7 @@ void MGDoFObjectAccessor<2, dim>::set_mg_dof_index (const unsigned int i, // and enough room was reserved Assert (&this->dof_handler->get_fe() != 0, DoFAccessor::ExcInvalidObject()); Assert (idof_handler->get_fe().dofs_per_quad, - ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_quad)); + ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_quad)); this->mg_dof_handler->mg_levels[this->present_level] ->quad_dofs[this->present_index*this->dof_handler->get_fe().dofs_per_quad+i] = index; @@ -242,7 +242,7 @@ unsigned int MGDoFObjectAccessor<2, dim>::mg_vertex_dof_index (const unsigned in Assert (&this->dof_handler->get_fe() != 0, DoFAccessor::ExcInvalidObject()); Assert (vertex<4, ExcIndexRange (i,0,4)); Assert (idof_handler->get_fe().dofs_per_vertex, - ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_vertex)); + ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_vertex)); return (this->mg_dof_handler->mg_vertex_dofs[this->vertex_index(vertex)] .get_index (this->present_level, i, this->dof_handler->get_fe().dofs_per_vertex)); @@ -259,7 +259,7 @@ void MGDoFObjectAccessor<2, dim>::set_mg_vertex_dof_index (const unsigned int ve Assert (&this->dof_handler->get_fe() != 0, DoFAccessor::ExcInvalidObject()); Assert (vertex<4, ExcIndexRange (i,0,4)); Assert (idof_handler->get_fe().dofs_per_vertex, - ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_vertex)); + ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_vertex)); this->mg_dof_handler->mg_vertex_dofs[this->vertex_index(vertex)] .set_index (this->present_level, i, this->dof_handler->get_fe().dofs_per_vertex, index); @@ -274,13 +274,13 @@ MGDoFObjectAccessor<2, dim>::get_mg_dof_indices (std::vector &dof_ Assert (this->mg_dof_handler != 0, DoFAccessor::ExcInvalidObject()); Assert (&this->dof_handler->get_fe() != 0, DoFAccessor::ExcInvalidObject()); Assert (dof_indices.size() == (4*this->dof_handler->get_fe().dofs_per_vertex + - 4*dof_handler->get_fe().dofs_per_line + - dof_handler->get_fe().dofs_per_quad), + 4*this->dof_handler->get_fe().dofs_per_line + + this->dof_handler->get_fe().dofs_per_quad), DoFAccessor<2>::ExcVectorDoesNotMatch()); const unsigned int dofs_per_vertex = this->dof_handler->get_fe().dofs_per_vertex, dofs_per_line = this->dof_handler->get_fe().dofs_per_line, - dofs_per_quad = dof_handler->get_fe().dofs_per_quad; + dofs_per_quad = this->dof_handler->get_fe().dofs_per_quad; std::vector::iterator next = dof_indices.begin(); for (unsigned int vertex=0; vertex<4; ++vertex) for (unsigned int d=0; d::get_mg_dof_values (const Vector &values, const unsigned int dofs_per_vertex = this->dof_handler->get_fe().dofs_per_vertex, dofs_per_line = this->dof_handler->get_fe().dofs_per_line, - dofs_per_quad = dof_handler->get_fe().dofs_per_quad; + dofs_per_quad = this->dof_handler->get_fe().dofs_per_quad; typename Vector::iterator next_dof_value=dof_values.begin(); for (unsigned int vertex=0; vertex<4; ++vertex) for (unsigned int d=0; d::mg_dof_index (const unsigned int i) co // and enough room was reserved Assert (&this->dof_handler->get_fe() != 0, DoFAccessor::ExcInvalidObject()); Assert (idof_handler->get_fe().dofs_per_hex, - ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_hex)); + ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_hex)); return this->mg_dof_handler->mg_levels[this->present_level] ->hex_dofs[this->present_index*this->dof_handler->get_fe().dofs_per_hex+i]; @@ -408,7 +408,7 @@ void MGDoFObjectAccessor<3, dim>::set_mg_dof_index (const unsigned int i, // and enough room was reserved Assert (&this->dof_handler->get_fe() != 0, DoFAccessor::ExcInvalidObject()); Assert (idof_handler->get_fe().dofs_per_hex, - ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_hex)); + ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_hex)); this->mg_dof_handler->mg_levels[this->present_level] ->hex_dofs[this->present_index*this->dof_handler->get_fe().dofs_per_hex+i] = index; @@ -424,7 +424,7 @@ unsigned int MGDoFObjectAccessor<3, dim>::mg_vertex_dof_index (const unsigned in Assert (&this->dof_handler->get_fe() != 0, DoFAccessor::ExcInvalidObject()); Assert (vertex<8, ExcIndexRange (i,0,8)); Assert (idof_handler->get_fe().dofs_per_vertex, - ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_vertex)); + ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_vertex)); return (this->mg_dof_handler->mg_vertex_dofs[this->vertex_index(vertex)] .get_index (this->present_level, i, this->dof_handler->get_fe().dofs_per_vertex)); @@ -441,7 +441,7 @@ void MGDoFObjectAccessor<3, dim>::set_mg_vertex_dof_index (const unsigned int ve Assert (&this->dof_handler->get_fe() != 0, DoFAccessor::ExcInvalidObject()); Assert (vertex<4, ExcIndexRange (i,0,4)); Assert (idof_handler->get_fe().dofs_per_vertex, - ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_vertex)); + ExcIndexRange (i, 0, this->dof_handler->get_fe().dofs_per_vertex)); this->mg_dof_handler->mg_vertex_dofs[this->vertex_index(vertex)] .set_index (this->present_level, i, this->dof_handler->get_fe().dofs_per_vertex, index); @@ -456,15 +456,15 @@ MGDoFObjectAccessor<3, dim>::get_mg_dof_indices (std::vector &dof_ Assert (this->mg_dof_handler != 0, DoFAccessor::ExcInvalidObject()); Assert (&this->dof_handler->get_fe() != 0, DoFAccessor::ExcInvalidObject()); Assert (dof_indices.size() == (8*this->dof_handler->get_fe().dofs_per_vertex + - 12*dof_handler->get_fe().dofs_per_line + - 6*dof_handler->get_fe().dofs_per_quad + - dof_handler->get_fe().dofs_per_hex), + 12*this->dof_handler->get_fe().dofs_per_line + + 6*this->dof_handler->get_fe().dofs_per_quad + + this->dof_handler->get_fe().dofs_per_hex), DoFAccessor<3>::ExcVectorDoesNotMatch()); const unsigned int dofs_per_vertex = this->dof_handler->get_fe().dofs_per_vertex, dofs_per_line = this->dof_handler->get_fe().dofs_per_line, - dofs_per_quad = dof_handler->get_fe().dofs_per_quad, - dofs_per_hex = dof_handler->get_fe().dofs_per_hex; + dofs_per_quad = this->dof_handler->get_fe().dofs_per_quad, + dofs_per_hex = this->dof_handler->get_fe().dofs_per_hex; std::vector::iterator next = dof_indices.begin(); for (unsigned int vertex=0; vertex<8; ++vertex) for (unsigned int d=0; d::get_mg_dof_values (const Vector &values, const unsigned int dofs_per_vertex = this->dof_handler->get_fe().dofs_per_vertex, dofs_per_line = this->dof_handler->get_fe().dofs_per_line, - dofs_per_quad = dof_handler->get_fe().dofs_per_quad, - dofs_per_hex = dof_handler->get_fe().dofs_per_hex; + dofs_per_quad = this->dof_handler->get_fe().dofs_per_quad, + dofs_per_hex = this->dof_handler->get_fe().dofs_per_hex; typename Vector::iterator next_dof_value=dof_values.begin(); for (unsigned int vertex=0; vertex<8; ++vertex) for (unsigned int d=0; d #include #include +#include + #include @@ -166,7 +168,7 @@ MGDoFHandler<1>::last_active (const unsigned int level) const { template <> MGDoFDimensionInfo<1>::raw_face_iterator MGDoFHandler<1>::begin_raw_face (const unsigned int) const { - Assert (false, ExcFunctionNotUseful()); + Assert (false, ExcImpossibleInDim(1)); return 0; }; @@ -174,7 +176,7 @@ MGDoFHandler<1>::begin_raw_face (const unsigned int) const { template <> MGDoFDimensionInfo<1>::face_iterator MGDoFHandler<1>::begin_face (const unsigned int) const { - Assert (false, ExcFunctionNotUseful()); + Assert (false, ExcImpossibleInDim(1)); return 0; }; @@ -182,7 +184,7 @@ MGDoFHandler<1>::begin_face (const unsigned int) const { template <> MGDoFDimensionInfo<1>::active_face_iterator MGDoFHandler<1>::begin_active_face (const unsigned int) const { - Assert (false, ExcFunctionNotUseful()); + Assert (false, ExcImpossibleInDim(1)); return 0; }; @@ -190,7 +192,7 @@ MGDoFHandler<1>::begin_active_face (const unsigned int) const { template <> MGDoFDimensionInfo<1>::raw_face_iterator MGDoFHandler<1>::end_face () const { - Assert (false, ExcFunctionNotUseful()); + Assert (false, ExcImpossibleInDim(1)); return 0; }; @@ -198,7 +200,7 @@ MGDoFHandler<1>::end_face () const { template <> MGDoFDimensionInfo<1>::raw_face_iterator MGDoFHandler<1>::last_raw_face () const { - Assert (false, ExcFunctionNotUseful()); + Assert (false, ExcImpossibleInDim(1)); return 0; }; @@ -206,7 +208,7 @@ MGDoFHandler<1>::last_raw_face () const { template <> MGDoFDimensionInfo<1>::raw_face_iterator MGDoFHandler<1>::last_raw_face (const unsigned int) const { - Assert (false, ExcFunctionNotUseful()); + Assert (false, ExcImpossibleInDim(1)); return 0; }; @@ -214,7 +216,7 @@ MGDoFHandler<1>::last_raw_face (const unsigned int) const { template <> MGDoFDimensionInfo<1>::face_iterator MGDoFHandler<1>::last_face () const { - Assert (false, ExcFunctionNotUseful()); + Assert (false, ExcImpossibleInDim(1)); return 0; }; @@ -222,7 +224,7 @@ MGDoFHandler<1>::last_face () const { template <> MGDoFDimensionInfo<1>::face_iterator MGDoFHandler<1>::last_face (const unsigned int) const { - Assert (false, ExcFunctionNotUseful()); + Assert (false, ExcImpossibleInDim(1)); return 0; }; @@ -230,7 +232,7 @@ MGDoFHandler<1>::last_face (const unsigned int) const { template <> MGDoFDimensionInfo<1>::active_face_iterator MGDoFHandler<1>::last_active_face () const { - Assert (false, ExcFunctionNotUseful()); + Assert (false, ExcImpossibleInDim(1)); return 0; }; @@ -238,7 +240,7 @@ MGDoFHandler<1>::last_active_face () const { template <> MGDoFDimensionInfo<1>::active_face_iterator MGDoFHandler<1>::last_active_face (const unsigned int) const { - Assert (false, ExcFunctionNotUseful()); + Assert (false, ExcImpossibleInDim(1)); return 0; }; @@ -246,7 +248,7 @@ MGDoFHandler<1>::last_active_face (const unsigned int) const { template <> MGDoFHandler<1>::raw_quad_iterator MGDoFHandler<1>::begin_raw_quad (const unsigned int) const { - Assert (false, ExcNotImplemented()); + Assert (false, ExcImpossibleInDim(1)); return 0; }; @@ -254,7 +256,7 @@ MGDoFHandler<1>::begin_raw_quad (const unsigned int) const { template <> MGDoFHandler<1>::quad_iterator MGDoFHandler<1>::begin_quad (const unsigned int) const { - Assert (false, ExcNotImplemented()); + Assert (false, ExcImpossibleInDim(1)); return 0; }; @@ -262,7 +264,7 @@ MGDoFHandler<1>::begin_quad (const unsigned int) const { template <> MGDoFHandler<1>::active_quad_iterator MGDoFHandler<1>::begin_active_quad (const unsigned int) const { - Assert (false, ExcNotImplemented()); + Assert (false, ExcImpossibleInDim(1)); return 0; }; @@ -270,7 +272,7 @@ MGDoFHandler<1>::begin_active_quad (const unsigned int) const { template <> MGDoFHandler<1>::raw_quad_iterator MGDoFHandler<1>::end_quad () const { - Assert (false, ExcNotImplemented()); + Assert (false, ExcImpossibleInDim(1)); return 0; }; @@ -278,7 +280,7 @@ MGDoFHandler<1>::end_quad () const { template <> MGDoFHandler<1>::raw_quad_iterator MGDoFHandler<1>::last_raw_quad (const unsigned int) const { - Assert (false, ExcNotImplemented()); + Assert (false, ExcImpossibleInDim(1)); return 0; }; @@ -286,7 +288,7 @@ MGDoFHandler<1>::last_raw_quad (const unsigned int) const { template <> MGDoFHandler<1>::quad_iterator MGDoFHandler<1>::last_quad (const unsigned int) const { - Assert (false, ExcNotImplemented()); + Assert (false, ExcImpossibleInDim(1)); return 0; }; @@ -294,7 +296,7 @@ MGDoFHandler<1>::last_quad (const unsigned int) const { template <> MGDoFHandler<1>::active_quad_iterator MGDoFHandler<1>::last_active_quad (const unsigned int) const { - Assert (false, ExcNotImplemented()); + Assert (false, ExcImpossibleInDim(1)); return 0; }; @@ -302,7 +304,7 @@ MGDoFHandler<1>::last_active_quad (const unsigned int) const { template <> MGDoFHandler<1>::raw_quad_iterator MGDoFHandler<1>::last_raw_quad () const { - Assert (false, ExcNotImplemented()); + Assert (false, ExcImpossibleInDim(1)); return 0; }; @@ -310,7 +312,7 @@ MGDoFHandler<1>::last_raw_quad () const { template <> MGDoFHandler<1>::quad_iterator MGDoFHandler<1>::last_quad () const { - Assert (false, ExcNotImplemented()); + Assert (false, ExcImpossibleInDim(1)); return 0; }; @@ -318,7 +320,7 @@ MGDoFHandler<1>::last_quad () const { template <> MGDoFHandler<1>::active_quad_iterator MGDoFHandler<1>::last_active_quad () const { - Assert (false, ExcNotImplemented()); + Assert (false, ExcImpossibleInDim(1)); return 0; }; @@ -326,7 +328,7 @@ MGDoFHandler<1>::last_active_quad () const { template <> MGDoFHandler<1>::raw_hex_iterator MGDoFHandler<1>::begin_raw_hex (const unsigned int) const { - Assert (false, ExcNotImplemented()); + Assert (false, ExcImpossibleInDim(1)); return 0; }; @@ -334,7 +336,7 @@ MGDoFHandler<1>::begin_raw_hex (const unsigned int) const { template <> MGDoFHandler<1>::hex_iterator MGDoFHandler<1>::begin_hex (const unsigned int) const { - Assert (false, ExcNotImplemented()); + Assert (false, ExcImpossibleInDim(1)); return 0; }; @@ -342,7 +344,7 @@ MGDoFHandler<1>::begin_hex (const unsigned int) const { template <> MGDoFHandler<1>::active_hex_iterator MGDoFHandler<1>::begin_active_hex (const unsigned int) const { - Assert (false, ExcNotImplemented()); + Assert (false, ExcImpossibleInDim(1)); return 0; }; @@ -350,7 +352,7 @@ MGDoFHandler<1>::begin_active_hex (const unsigned int) const { template <> MGDoFHandler<1>::raw_hex_iterator MGDoFHandler<1>::end_hex () const { - Assert (false, ExcNotImplemented()); + Assert (false, ExcImpossibleInDim(1)); return 0; }; @@ -358,7 +360,7 @@ MGDoFHandler<1>::end_hex () const { template <> MGDoFHandler<1>::raw_hex_iterator MGDoFHandler<1>::last_raw_hex (const unsigned int) const { - Assert (false, ExcNotImplemented()); + Assert (false, ExcImpossibleInDim(1)); return 0; }; @@ -366,7 +368,7 @@ MGDoFHandler<1>::last_raw_hex (const unsigned int) const { template <> MGDoFHandler<1>::hex_iterator MGDoFHandler<1>::last_hex (const unsigned int) const { - Assert (false, ExcNotImplemented()); + Assert (false, ExcImpossibleInDim(1)); return 0; }; @@ -374,7 +376,7 @@ MGDoFHandler<1>::last_hex (const unsigned int) const { template <> MGDoFHandler<1>::active_hex_iterator MGDoFHandler<1>::last_active_hex (const unsigned int) const { - Assert (false, ExcNotImplemented()); + Assert (false, ExcImpossibleInDim(1)); return 0; }; @@ -382,7 +384,7 @@ MGDoFHandler<1>::last_active_hex (const unsigned int) const { template <> MGDoFHandler<1>::raw_hex_iterator MGDoFHandler<1>::last_raw_hex () const { - Assert (false, ExcNotImplemented()); + Assert (false, ExcImpossibleInDim(1)); return 0; }; @@ -390,7 +392,7 @@ MGDoFHandler<1>::last_raw_hex () const { template <> MGDoFHandler<1>::hex_iterator MGDoFHandler<1>::last_hex () const { - Assert (false, ExcNotImplemented()); + Assert (false, ExcImpossibleInDim(1)); return 0; }; @@ -398,7 +400,7 @@ MGDoFHandler<1>::last_hex () const { template <> MGDoFHandler<1>::active_hex_iterator MGDoFHandler<1>::last_active_hex () const { - Assert (false, ExcNotImplemented()); + Assert (false, ExcImpossibleInDim(1)); return 0; }; @@ -550,7 +552,7 @@ MGDoFHandler<2>::last_active_face (const unsigned int level) const { template <> MGDoFHandler<2>::raw_hex_iterator MGDoFHandler<2>::begin_raw_hex (const unsigned int) const { - Assert (false, ExcNotImplemented()); + Assert (false, ExcImpossibleInDim(2)); return 0; }; @@ -558,7 +560,7 @@ MGDoFHandler<2>::begin_raw_hex (const unsigned int) const { template <> MGDoFHandler<2>::hex_iterator MGDoFHandler<2>::begin_hex (const unsigned int) const { - Assert (false, ExcNotImplemented()); + Assert (false, ExcImpossibleInDim(2)); return 0; }; @@ -566,7 +568,7 @@ MGDoFHandler<2>::begin_hex (const unsigned int) const { template <> MGDoFHandler<2>::active_hex_iterator MGDoFHandler<2>::begin_active_hex (const unsigned int) const { - Assert (false, ExcNotImplemented()); + Assert (false, ExcImpossibleInDim(2)); return 0; }; @@ -574,7 +576,7 @@ MGDoFHandler<2>::begin_active_hex (const unsigned int) const { template <> MGDoFHandler<2>::raw_hex_iterator MGDoFHandler<2>::end_hex () const { - Assert (false, ExcNotImplemented()); + Assert (false, ExcImpossibleInDim(2)); return 0; }; @@ -582,7 +584,7 @@ MGDoFHandler<2>::end_hex () const { template <> MGDoFHandler<2>::raw_hex_iterator MGDoFHandler<2>::last_raw_hex (const unsigned int) const { - Assert (false, ExcNotImplemented()); + Assert (false, ExcImpossibleInDim(2)); return 0; }; @@ -590,7 +592,7 @@ MGDoFHandler<2>::last_raw_hex (const unsigned int) const { template <> MGDoFHandler<2>::hex_iterator MGDoFHandler<2>::last_hex (const unsigned int) const { - Assert (false, ExcNotImplemented()); + Assert (false, ExcImpossibleInDim(2)); return 0; }; @@ -598,7 +600,7 @@ MGDoFHandler<2>::last_hex (const unsigned int) const { template <> MGDoFHandler<2>::active_hex_iterator MGDoFHandler<2>::last_active_hex (const unsigned int) const { - Assert (false, ExcNotImplemented()); + Assert (false, ExcImpossibleInDim(2)); return 0; }; @@ -606,7 +608,7 @@ MGDoFHandler<2>::last_active_hex (const unsigned int) const { template <> MGDoFHandler<2>::raw_hex_iterator MGDoFHandler<2>::last_raw_hex () const { - Assert (false, ExcNotImplemented()); + Assert (false, ExcImpossibleInDim(2)); return 0; }; @@ -614,7 +616,7 @@ MGDoFHandler<2>::last_raw_hex () const { template <> MGDoFHandler<2>::hex_iterator MGDoFHandler<2>::last_hex () const { - Assert (false, ExcNotImplemented()); + Assert (false, ExcImpossibleInDim(2)); return 0; }; @@ -622,7 +624,7 @@ MGDoFHandler<2>::last_hex () const { template <> MGDoFHandler<2>::active_hex_iterator MGDoFHandler<2>::last_active_hex () const { - Assert (false, ExcNotImplemented()); + Assert (false, ExcImpossibleInDim(2)); return 0; }; @@ -1197,7 +1199,7 @@ void MGDoFHandler::distribute_dofs (const FiniteElement &fe, // same state as it was at the // beginning of this function. std::vector user_flags; - tria->save_user_flags(user_flags); + this->tria->save_user_flags(user_flags); const_cast &>(*(this->tria)).clear_user_flags (); // now distribute indices on each level @@ -1227,7 +1229,7 @@ MGDoFHandler<1>::distribute_dofs_on_cell (cell_iterator &cell, unsigned int next_free_dof) { // distribute dofs of vertices - if (selected_fe->dofs_per_vertex > 0) + if (this->selected_fe->dofs_per_vertex > 0) for (unsigned int v=0; v::vertices_per_cell; ++v) { cell_iterator neighbor = cell->neighbor(v); @@ -1242,11 +1244,11 @@ MGDoFHandler<1>::distribute_dofs_on_cell (cell_iterator &cell, // mg dofs the same) { if (v==0) - for (unsigned int d=0; ddofs_per_vertex; ++d) + for (unsigned int d=0; dselected_fe->dofs_per_vertex; ++d) cell->set_mg_vertex_dof_index (0, d, neighbor->mg_vertex_dof_index (1, d)); else - for (unsigned int d=0; ddofs_per_vertex; ++d) + for (unsigned int d=0; dselected_fe->dofs_per_vertex; ++d) cell->set_mg_vertex_dof_index (1, d, neighbor->mg_vertex_dof_index (0, d)); @@ -1256,13 +1258,13 @@ MGDoFHandler<1>::distribute_dofs_on_cell (cell_iterator &cell, }; // otherwise: create dofs newly - for (unsigned int d=0; ddofs_per_vertex; ++d) + for (unsigned int d=0; dselected_fe->dofs_per_vertex; ++d) cell->set_mg_vertex_dof_index (v, d, next_free_dof++); }; // dofs of line - if (selected_fe->dofs_per_line > 0) - for (unsigned int d=0; ddofs_per_line; ++d) + if (this->selected_fe->dofs_per_line > 0) + for (unsigned int d=0; dselected_fe->dofs_per_line; ++d) cell->set_mg_dof_index (d, next_free_dof++); // note that this cell has been processed @@ -1308,7 +1310,7 @@ MGDoFHandler<2>::distribute_dofs_on_cell (cell_iterator &cell, // dofs of quad if (this->selected_fe->dofs_per_quad > 0) - for (unsigned int d=0; ddofs_per_quad; ++d) + for (unsigned int d=0; dselected_fe->dofs_per_quad; ++d) cell->set_mg_dof_index (d, next_free_dof++); @@ -1327,18 +1329,18 @@ template <> unsigned int MGDoFHandler<3>::distribute_dofs_on_cell (cell_iterator &cell, unsigned int next_free_dof) { - if (selected_fe->dofs_per_vertex > 0) + if (this->selected_fe->dofs_per_vertex > 0) // number dofs on vertices for (unsigned int vertex=0; vertex::vertices_per_cell; ++vertex) // check whether dofs for this // vertex have been distributed // (only check the first dof) if (cell->mg_vertex_dof_index(vertex, 0) == DoFHandler<3>::invalid_dof_index) - for (unsigned int d=0; ddofs_per_vertex; ++d) + for (unsigned int d=0; dselected_fe->dofs_per_vertex; ++d) cell->set_mg_vertex_dof_index (vertex, d, next_free_dof++); // for the lines - if (selected_fe->dofs_per_line > 0) + if (this->selected_fe->dofs_per_line > 0) for (unsigned int l=0; l::lines_per_cell; ++l) { line_iterator line = cell->line(l); @@ -1348,12 +1350,12 @@ MGDoFHandler<3>::distribute_dofs_on_cell (cell_iterator &cell, // numbered (check only first dof) if (line->mg_dof_index(0) == DoFHandler<3>::invalid_dof_index) // if not: distribute dofs - for (unsigned int d=0; ddofs_per_line; ++d) + for (unsigned int d=0; dselected_fe->dofs_per_line; ++d) line->set_mg_dof_index (d, next_free_dof++); }; // for the quads - if (selected_fe->dofs_per_quad > 0) + if (this->selected_fe->dofs_per_quad > 0) for (unsigned int q=0; q::lines_per_cell; ++q) { quad_iterator quad = cell->quad(q); @@ -1363,14 +1365,14 @@ MGDoFHandler<3>::distribute_dofs_on_cell (cell_iterator &cell, // numbered (check only first dof) if (quad->mg_dof_index(0) == DoFHandler<3>::invalid_dof_index) // if not: distribute dofs - for (unsigned int d=0; ddofs_per_line; ++d) + for (unsigned int d=0; dselected_fe->dofs_per_line; ++d) quad->set_mg_dof_index (d, next_free_dof++); }; // dofs of cell - if (selected_fe->dofs_per_hex > 0) - for (unsigned int d=0; ddofs_per_hex; ++d) + if (this->selected_fe->dofs_per_hex > 0) + for (unsigned int d=0; dselected_fe->dofs_per_hex; ++d) cell->set_mg_dof_index (d, next_free_dof++); @@ -1409,7 +1411,7 @@ unsigned int MGDoFHandler::n_dofs (const unsigned int level) const { template <> void MGDoFHandler<1>::renumber_dofs (const unsigned int level, const std::vector &new_numbers) { - Assert (new_numbers.size() == n_dofs(level), ExcRenumberingIncomplete()); + Assert (new_numbers.size() == n_dofs(level), DoFHandler<1>::ExcRenumberingIncomplete()); // note that we can not use cell iterators // in this function since then we would @@ -1423,10 +1425,10 @@ void MGDoFHandler<1>::renumber_dofs (const unsigned int level, // the present level if ((i->get_coarsest_level() <= level) && (i->get_finest_level() >= level)) - for (unsigned int d=0; ddofs_per_vertex; ++d) - i->set_index (level, d, selected_fe->dofs_per_vertex, + for (unsigned int d=0; dselected_fe->dofs_per_vertex; ++d) + i->set_index (level, d, this->selected_fe->dofs_per_vertex, new_numbers[i->get_index (level, d, - selected_fe->dofs_per_vertex)]); + this->selected_fe->dofs_per_vertex)]); for (std::vector::iterator i=mg_levels[level]->line_dofs.begin(); i!=mg_levels[level]->line_dofs.end(); ++i) @@ -1481,7 +1483,8 @@ void MGDoFHandler<2>::renumber_dofs (const unsigned int level, template <> void MGDoFHandler<3>::renumber_dofs (const unsigned int level, const std::vector &new_numbers) { - Assert (new_numbers.size() == n_dofs(level), ExcRenumberingIncomplete()); + Assert (new_numbers.size() == n_dofs(level), + DoFHandler<3>::ExcRenumberingIncomplete()); for (std::vector::iterator i=mg_vertex_dofs.begin(); i!=mg_vertex_dofs.end(); ++i) @@ -1489,10 +1492,10 @@ void MGDoFHandler<3>::renumber_dofs (const unsigned int level, // the present level if ((i->get_coarsest_level() <= level) && (i->get_finest_level() >= level)) - for (unsigned int d=0; ddofs_per_vertex; ++d) - i->set_index (level, d, selected_fe->dofs_per_vertex, + for (unsigned int d=0; dselected_fe->dofs_per_vertex; ++d) + i->set_index (level, d, this->selected_fe->dofs_per_vertex, new_numbers[i->get_index (level, d, - selected_fe->dofs_per_vertex)]); + this->selected_fe->dofs_per_vertex)]); for (std::vector::iterator i=mg_levels[level]->line_dofs.begin(); i!=mg_levels[level]->line_dofs.end(); ++i) @@ -1525,8 +1528,8 @@ template <> void MGDoFHandler<1>::reserve_space () { const unsigned int dim = 1; - Assert (selected_fe != 0, ExcNoFESelected()); - Assert (tria->n_levels() > 0, ExcInvalidTriangulation()); + Assert (this->selected_fe != 0, DoFHandler::ExcNoFESelected()); + Assert (this->tria->n_levels() > 0, DoFHandler::ExcInvalidTriangulation()); ////////////////////////// // DESTRUCTION @@ -1537,12 +1540,12 @@ void MGDoFHandler<1>::reserve_space () { // first allocate space for the // lines on each level - for (unsigned int i=0; in_levels(); ++i) + for (unsigned int i=0; itria->n_levels(); ++i) { mg_levels.push_back (new DoFLevel<1>); - mg_levels.back()->line_dofs = std::vector(tria->levels[i]->lines.lines.size() * - selected_fe->dofs_per_line, + mg_levels.back()->line_dofs = std::vector(this->tria->levels[i]->lines.lines.size() * + this->selected_fe->dofs_per_line, DoFHandler<1>::invalid_dof_index); }; @@ -1558,13 +1561,13 @@ void MGDoFHandler<1>::reserve_space () { // over all cells and storing the // maximum and minimum level each // vertex we pass by belongs to - mg_vertex_dofs.resize (tria->vertices.size()); + mg_vertex_dofs.resize (this->tria->vertices.size()); - std::vector min_level (tria->vertices.size(), tria->n_levels()); - std::vector max_level (tria->vertices.size(), 0); + std::vector min_level (this->tria->vertices.size(), this->tria->n_levels()); + std::vector max_level (this->tria->vertices.size(), 0); - Triangulation::cell_iterator cell = tria->begin(), - endc = tria->end(); + Triangulation::cell_iterator cell = this->tria->begin(), + endc = this->tria->end(); for (; cell!=endc; ++cell) for (unsigned int vertex=0; vertex::vertices_per_cell; ++vertex) @@ -1577,15 +1580,15 @@ void MGDoFHandler<1>::reserve_space () { }; // now allocate the needed space - for (unsigned int vertex=0; vertexvertices.size(); ++vertex) + for (unsigned int vertex=0; vertextria->vertices.size(); ++vertex) { //TODO:[WB,GK] These conditions are violated on unused vertices - Assert (min_level[vertex] < tria->n_levels(), ExcInternalError()); + Assert (min_level[vertex] < this->tria->n_levels(), ExcInternalError()); Assert (max_level[vertex] >= min_level[vertex], ExcInternalError()); mg_vertex_dofs[vertex].init (min_level[vertex], max_level[vertex], - selected_fe->dofs_per_vertex); + this->selected_fe->dofs_per_vertex); }; }; @@ -1637,11 +1640,12 @@ void MGDoFHandler<2>::reserve_space () { // vertex we pass by belongs to mg_vertex_dofs.resize (this->tria->vertices.size()); - std::vector min_level (this->tria->vertices.size(), tria->n_levels()); - std::vector max_level (tria->vertices.size(), 0); + std::vector min_level (this->tria->vertices.size(), + this->tria->n_levels()); + std::vector max_level (this->tria->vertices.size(), 0); - Triangulation::cell_iterator cell = tria->begin(), - endc = tria->end(); + Triangulation::cell_iterator cell = this->tria->begin(), + endc = this->tria->end(); for (; cell!=endc; ++cell) for (unsigned int vertex=0; vertex::vertices_per_cell; ++vertex) @@ -1655,10 +1659,10 @@ void MGDoFHandler<2>::reserve_space () { // now allocate the needed space - for (unsigned int vertex=0; vertexvertices.size(); ++vertex) + for (unsigned int vertex=0; vertextria->vertices.size(); ++vertex) { //TODO:[WB,GK] These conditions are violated on unused vertices - Assert (min_level[vertex] < tria->n_levels(), ExcInternalError()); + Assert (min_level[vertex] < this->tria->n_levels(), ExcInternalError()); Assert (max_level[vertex] >= min_level[vertex], ExcInternalError()); mg_vertex_dofs[vertex].init (min_level[vertex], @@ -1676,8 +1680,8 @@ template <> void MGDoFHandler<3>::reserve_space () { const unsigned int dim = 3; - Assert (selected_fe != 0, ExcNoFESelected()); - Assert (tria->n_levels() > 0, ExcInvalidTriangulation()); + Assert (this->selected_fe != 0, DoFHandler<3>::ExcNoFESelected()); + Assert (this->tria->n_levels() > 0, DoFHandler<3>::ExcInvalidTriangulation()); //////////////////////////// // DESTRUCTION @@ -1688,18 +1692,18 @@ void MGDoFHandler<3>::reserve_space () { // first allocate space for the // lines and quads on each level - for (unsigned int i=0; in_levels(); ++i) + for (unsigned int i=0; itria->n_levels(); ++i) { mg_levels.push_back (new DoFLevel<3>); - mg_levels.back()->line_dofs = std::vector (tria->levels[i]->lines.lines.size() * - selected_fe->dofs_per_line, + mg_levels.back()->line_dofs = std::vector (this->tria->levels[i]->lines.lines.size() * + this->selected_fe->dofs_per_line, DoFHandler<3>::invalid_dof_index); - mg_levels.back()->quad_dofs = std::vector (tria->levels[i]->quads.quads.size() * - selected_fe->dofs_per_quad, + mg_levels.back()->quad_dofs = std::vector (this->tria->levels[i]->quads.quads.size() * + this->selected_fe->dofs_per_quad, DoFHandler<3>::invalid_dof_index); - mg_levels.back()->hex_dofs = std::vector (tria->levels[i]->hexes.hexes.size() * - selected_fe->dofs_per_hex, + mg_levels.back()->hex_dofs = std::vector (this->tria->levels[i]->hexes.hexes.size() * + this->selected_fe->dofs_per_hex, DoFHandler<3>::invalid_dof_index); }; @@ -1716,13 +1720,13 @@ void MGDoFHandler<3>::reserve_space () { // over all cells and storing the // maximum and minimum level each // vertex we pass by belongs to - mg_vertex_dofs.resize (tria->vertices.size()); + mg_vertex_dofs.resize (this->tria->vertices.size()); - std::vector min_level (tria->vertices.size(), tria->n_levels()); - std::vector max_level (tria->vertices.size(), 0); + std::vector min_level (this->tria->vertices.size(), this->tria->n_levels()); + std::vector max_level (this->tria->vertices.size(), 0); - Triangulation::cell_iterator cell = tria->begin(), - endc = tria->end(); + Triangulation::cell_iterator cell = this->tria->begin(), + endc = this->tria->end(); for (; cell!=endc; ++cell) for (unsigned int vertex=0; vertex::vertices_per_cell; ++vertex) @@ -1736,15 +1740,15 @@ void MGDoFHandler<3>::reserve_space () { // now allocate the needed space - for (unsigned int vertex=0; vertexvertices.size(); ++vertex) + for (unsigned int vertex=0; vertextria->vertices.size(); ++vertex) { //TODO:[WB,GK] These conditions are violated on unused vertices - Assert (min_level[vertex] < tria->n_levels(), ExcInternalError()); + Assert (min_level[vertex] < this->tria->n_levels(), ExcInternalError()); Assert (max_level[vertex] >= min_level[vertex], ExcInternalError()); mg_vertex_dofs[vertex].init (min_level[vertex], max_level[vertex], - selected_fe->dofs_per_vertex); + this->selected_fe->dofs_per_vertex); }; }; diff --git a/deal.II/deal.II/source/numerics/data_out.cc b/deal.II/deal.II/source/numerics/data_out.cc index ddf369d44e..8ae4f47022 100644 --- a/deal.II/deal.II/source/numerics/data_out.cc +++ b/deal.II/deal.II/source/numerics/data_out.cc @@ -522,7 +522,7 @@ void DataOut::build_patches (const unsigned int n_subdivisions, ::DataOutBase::Patch default_patch; default_patch.n_subdivisions = n_subdivisions; default_patch.data.reinit (n_datasets, n_q_points); - this->patches.insert (patches.end(), n_patches, default_patch); + this->patches.insert (this->patches.end(), n_patches, default_patch); #ifdef DEAL_II_USE_MT @@ -543,7 +543,7 @@ void DataOut::build_patches (const unsigned int n_subdivisions, // consecutively. unsigned int patch_no = 0; for (typename std::vector< ::DataOutBase::Patch >::iterator - patch = patches.begin(); patch != patches.end(); ++patch) + patch = this->patches.begin(); patch != this->patches.end(); ++patch) patch->me = patch_no++; // Traverse the map of cells diff --git a/deal.II/deal.II/source/numerics/data_out_faces.cc b/deal.II/deal.II/source/numerics/data_out_faces.cc index f13eb73bdb..a1e252498e 100644 --- a/deal.II/deal.II/source/numerics/data_out_faces.cc +++ b/deal.II/deal.II/source/numerics/data_out_faces.cc @@ -210,7 +210,7 @@ void DataOutFaces::build_patches (const unsigned int n_subdivisions, ::DataOutBase::Patch default_patch; default_patch.n_subdivisions = n_subdivisions; default_patch.data.reinit (n_datasets, n_q_points); - this->patches.insert (patches.end(), n_patches, default_patch); + this->patches.insert (this->patches.end(), n_patches, default_patch); #ifdef DEAL_II_USE_MT diff --git a/deal.II/deal.II/source/numerics/data_out_rotation.cc b/deal.II/deal.II/source/numerics/data_out_rotation.cc index 1029d37c18..c07fad9426 100644 --- a/deal.II/deal.II/source/numerics/data_out_rotation.cc +++ b/deal.II/deal.II/source/numerics/data_out_rotation.cc @@ -243,7 +243,7 @@ void DataOutRotation::build_some_patches (Data data) { const double value = this->cell_data[dataset].has_block ? (*this->cell_data[dataset].block_data)(cell_number) : - (*cell_data[dataset].single_data)(cell_number); + (*this->cell_data[dataset].single_data)(cell_number); switch (dim) { case 1: @@ -396,7 +396,7 @@ void DataOutRotation::build_patches (const unsigned int n_patches_per_circl default_patch.n_subdivisions = n_subdivisions; default_patch.data.reinit (n_datasets, n_q_points * (n_subdivisions+1)); - this->patches.insert (patches.end(), n_patches, default_patch); + this->patches.insert (this->patches.end(), n_patches, default_patch); #ifdef DEAL_II_USE_MT diff --git a/deal.II/deal.II/source/numerics/time_dependent.cc b/deal.II/deal.II/source/numerics/time_dependent.cc index 3e39043df9..1a281ccfc1 100644 --- a/deal.II/deal.II/source/numerics/time_dependent.cc +++ b/deal.II/deal.II/source/numerics/time_dependent.cc @@ -417,7 +417,9 @@ template TimeStepBase_Tria::TimeStepBase_Tria() : TimeStepBase (0), tria (0), - coarse_grid (0) + coarse_grid (0), + flags(0), + refinement_flags(0) { Assert (false, ExcPureVirtualFunctionCalled()); }; -- 2.39.5