From: wolf Date: Tue, 28 May 2002 07:25:33 +0000 (+0000) Subject: Many more fixes for the two-stage lookup problem we have with the C++ standard. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=70b33321014d9e875807a46a5d50684ae75d84be;p=dealii-svn.git Many more fixes for the two-stage lookup problem we have with the C++ standard. git-svn-id: https://svn.dealii.org/trunk@5892 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/include/grid/tria_iterator.h b/deal.II/deal.II/include/grid/tria_iterator.h index 5bb60880f0..0bbb7ddc58 100644 --- a/deal.II/deal.II/include/grid/tria_iterator.h +++ b/deal.II/deal.II/include/grid/tria_iterator.h @@ -997,8 +997,8 @@ TriaIterator::TriaIterator (const TriaRawIteratorstate() != IteratorState::past_the_end) + Assert (this->accessor.used(), ExcAssignmentOfUnusedObject()); #endif }; @@ -1027,8 +1027,8 @@ TriaActiveIterator::TriaActiveIterator (const TriaRawIteratorstate() != IteratorState::past_the_end) + Assert (this->accessor.has_children()==false, ExcAssignmentOfInactiveObject()); #endif }; diff --git a/deal.II/deal.II/include/grid/tria_iterator.templates.h b/deal.II/deal.II/include/grid/tria_iterator.templates.h index a9132d6403..67770ff130 100644 --- a/deal.II/deal.II/include/grid/tria_iterator.templates.h +++ b/deal.II/deal.II/include/grid/tria_iterator.templates.h @@ -186,7 +186,7 @@ TriaIterator::operator = (const TriaRawIterator &i) // state==IteratorState::past_the_end, and will then // throw the exception! if (this->state() != IteratorState::past_the_end) - Assert (accessor.used(), + Assert (this->accessor.used(), ExcAssignmentOfUnusedObject()); #endif return *this; @@ -334,7 +334,7 @@ TriaActiveIterator::operator = (const TriaRawIteratorstate() != IteratorState::past_the_end) - Assert (accessor.used() && accessor.has_children()==false, + Assert (this->accessor.used() && accessor.has_children()==false, ExcAssignmentOfInactiveObject()); #endif return *this; @@ -354,7 +354,7 @@ TriaActiveIterator::operator = (const TriaIterator & // state==IteratorState::past_the_end, and will then // throw the exception! if (this->state() != IteratorState::past_the_end) - Assert (accessor.has_children()==false, + Assert (this->accessor.has_children()==false, ExcAssignmentOfInactiveObject()); #endif return *this; diff --git a/deal.II/deal.II/source/dofs/dof_accessor.cc b/deal.II/deal.II/source/dofs/dof_accessor.cc index 3aea88fcf6..7a36993279 100644 --- a/deal.II/deal.II/source/dofs/dof_accessor.cc +++ b/deal.II/deal.II/source/dofs/dof_accessor.cc @@ -34,15 +34,15 @@ template void DoFObjectAccessor<1, dim>::set_dof_index (const unsigned int i, const unsigned int index) const { - Assert (dof_handler != 0, DoFAccessor::ExcInvalidObject()); + Assert (this->dof_handler != 0, DoFAccessor::ExcInvalidObject()); // make sure a FE has been selected // and enough room was reserved - Assert (dof_handler->selected_fe != 0, DoFAccessor::ExcInvalidObject()); - Assert (iselected_fe->dofs_per_line, + Assert (this->dof_handler->selected_fe != 0, DoFAccessor::ExcInvalidObject()); + Assert (idof_handler->selected_fe->dofs_per_line, ExcIndexRange (i, 0, dof_handler->selected_fe->dofs_per_line)); - dof_handler->levels[present_level] - ->line_dofs[present_index*dof_handler->selected_fe->dofs_per_line+i] = index; + this->dof_handler->levels[this->present_level] + ->line_dofs[this->present_index*this->dof_handler->selected_fe->dofs_per_line+i] = index; }; @@ -64,18 +64,18 @@ void DoFObjectAccessor<1, dim>::set_vertex_dof_index (const unsigned int vertex, // qualified exception names typedef DoFAccessor BaseClass; - Assert (dof_handler != 0, + Assert (this->dof_handler != 0, typename BaseClass::ExcInvalidObject()); - Assert (dof_handler->selected_fe != 0, + Assert (this->dof_handler->selected_fe != 0, typename BaseClass::ExcInvalidObject()); Assert (vertex<2, ExcIndexRange (i,0,2)); - Assert (iselected_fe->dofs_per_vertex, + Assert (idof_handler->selected_fe->dofs_per_vertex, ExcIndexRange (i, 0, dof_handler->selected_fe->dofs_per_vertex)); - const unsigned int dof_number = (vertex_index(vertex) * - dof_handler->selected_fe->dofs_per_vertex + + const unsigned int dof_number = (this->vertex_index(vertex) * + this->dof_handler->selected_fe->dofs_per_vertex + i); - dof_handler->vertex_dofs[dof_number] = index; + this->dof_handler->vertex_dofs[dof_number] = index; }; @@ -96,14 +96,14 @@ distribute_local_to_global (const Vector &local_source, // qualified exception names typedef DoFAccessor BaseClass; - Assert (dof_handler != 0, + Assert (this->dof_handler != 0, typename BaseClass::ExcInvalidObject()); - Assert (dof_handler->selected_fe != 0, + Assert (this->dof_handler->selected_fe != 0, typename BaseClass::ExcInvalidObject()); - Assert (local_source.size() == (2*dof_handler->get_fe().dofs_per_vertex + + Assert (local_source.size() == (2*this->dof_handler->get_fe().dofs_per_vertex + dof_handler->get_fe().dofs_per_line), typename BaseClass::ExcVectorDoesNotMatch()); - Assert (dof_handler->n_dofs() == global_destination.size(), + Assert (this->dof_handler->n_dofs() == global_destination.size(), typename BaseClass::ExcVectorDoesNotMatch()); const unsigned int n_dofs = local_source.size(); @@ -135,16 +135,16 @@ distribute_local_to_global (const FullMatrix &local_source, // qualified exception names typedef DoFAccessor BaseClass; - Assert (dof_handler != 0, + Assert (this->dof_handler != 0, typename BaseClass::ExcInvalidObject()); - Assert (dof_handler->selected_fe != 0, + Assert (this->dof_handler->selected_fe != 0, typename BaseClass::ExcInvalidObject()); - Assert (local_source.m() == (2*dof_handler->get_fe().dofs_per_vertex + + Assert (local_source.m() == (2*this->dof_handler->get_fe().dofs_per_vertex + dof_handler->get_fe().dofs_per_line), typename BaseClass::ExcVectorDoesNotMatch()); Assert (local_source.m() == local_source.n(), typename BaseClass::ExcMatrixDoesNotMatch()); - Assert (dof_handler->n_dofs() == global_destination.m(), + Assert (this->dof_handler->n_dofs() == global_destination.m(), typename BaseClass::ExcMatrixDoesNotMatch()); Assert (global_destination.m() == global_destination.n(), typename BaseClass::ExcMatrixDoesNotMatch()); @@ -171,16 +171,16 @@ DoFObjectAccessor<1,dim>::get_dof_values (const InputVector &values, { Assert (dim==1, ExcInternalError()); - Assert (dof_handler != 0, DoFAccessor<1>::ExcInvalidObject()); - Assert (&dof_handler->get_fe() != 0, DoFAccessor<1>::ExcInvalidObject()); - Assert (local_values.size() == dof_handler->get_fe().dofs_per_cell, + Assert (this->dof_handler != 0, DoFAccessor<1>::ExcInvalidObject()); + Assert (&this->dof_handler->get_fe() != 0, DoFAccessor<1>::ExcInvalidObject()); + Assert (local_values.size() == this->dof_handler->get_fe().dofs_per_cell, DoFAccessor<1>::ExcVectorDoesNotMatch()); - Assert (values.size() == dof_handler->n_dofs(), + Assert (values.size() == this->dof_handler->n_dofs(), DoFAccessor<1>::ExcVectorDoesNotMatch()); - Assert (has_children() == false, DoFAccessor<1>::ExcNotActive()); + Assert (this->has_children() == false, DoFAccessor<1>::ExcNotActive()); - const unsigned int dofs_per_vertex = dof_handler->get_fe().dofs_per_vertex, - dofs_per_line = dof_handler->get_fe().dofs_per_line; + 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; typename Vector::iterator next_local_value=local_values.begin(); for (unsigned int vertex=0; vertex<2; ++vertex) for (unsigned int d=0; d::set_dof_values (const Vector &local_values, { Assert (dim==1, ExcInternalError()); - Assert (dof_handler != 0, DoFAccessor<1>::ExcInvalidObject()); - Assert (&dof_handler->get_fe() != 0, DoFAccessor<1>::ExcInvalidObject()); - Assert (local_values.size() == dof_handler->get_fe().dofs_per_cell, + Assert (this->dof_handler != 0, DoFAccessor<1>::ExcInvalidObject()); + Assert (&this->dof_handler->get_fe() != 0, DoFAccessor<1>::ExcInvalidObject()); + Assert (local_values.size() == this->dof_handler->get_fe().dofs_per_cell, DoFAccessor<1>::ExcVectorDoesNotMatch()); - Assert (values.size() == dof_handler->n_dofs(), + Assert (values.size() == this->dof_handler->n_dofs(), DoFAccessor<1>::ExcVectorDoesNotMatch()); - Assert (has_children() == false, DoFAccessor<1>::ExcNotActive()); + Assert (this->has_children() == false, DoFAccessor<1>::ExcNotActive()); - const unsigned int dofs_per_vertex = dof_handler->get_fe().dofs_per_vertex, - dofs_per_line = dof_handler->get_fe().dofs_per_line; + 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; typename Vector::const_iterator next_local_value=local_values.begin(); for (unsigned int vertex=0; vertex<2; ++vertex) for (unsigned int d=0; d void DoFObjectAccessor<2, dim>::set_dof_index (const unsigned int i, const unsigned int index) const { - Assert (dof_handler != 0, + Assert (this->dof_handler != 0, typename DoFAccessor::ExcInvalidObject()); // make sure a FE has been selected // and enough room was reserved - Assert (dof_handler->selected_fe != 0, + Assert (this->dof_handler->selected_fe != 0, typename DoFAccessor::ExcInvalidObject()); - Assert (iselected_fe->dofs_per_quad, + Assert (idof_handler->selected_fe->dofs_per_quad, ExcIndexRange (i, 0, dof_handler->selected_fe->dofs_per_quad)); - dof_handler->levels[present_level] - ->quad_dofs[present_index*dof_handler->selected_fe->dofs_per_quad+i] = index; + this->dof_handler->levels[this->present_level] + ->quad_dofs[this->present_index*this->dof_handler->selected_fe->dofs_per_quad+i] = index; }; @@ -252,18 +252,18 @@ DoFObjectAccessor<2, dim>::set_vertex_dof_index (const unsigned int vertex, const unsigned int i, const unsigned int index) const { - Assert (dof_handler != 0, + Assert (this->dof_handler != 0, typename DoFAccessor::ExcInvalidObject()); - Assert (dof_handler->selected_fe != 0, + Assert (this->dof_handler->selected_fe != 0, typename DoFAccessor::ExcInvalidObject()); Assert (vertex<4, ExcIndexRange (i,0,4)); - Assert (iselected_fe->dofs_per_vertex, + Assert (idof_handler->selected_fe->dofs_per_vertex, ExcIndexRange (i, 0, dof_handler->selected_fe->dofs_per_vertex)); - const unsigned int dof_number = (vertex_index(vertex) * - dof_handler->selected_fe->dofs_per_vertex + + const unsigned int dof_number = (this->vertex_index(vertex) * + this->dof_handler->selected_fe->dofs_per_vertex + i); - dof_handler->vertex_dofs[dof_number] = index; + this->dof_handler->vertex_dofs[dof_number] = index; }; @@ -272,15 +272,15 @@ template void DoFObjectAccessor<2, dim>:: distribute_local_to_global (const Vector &local_source, Vector &global_destination) const { - Assert (dof_handler != 0, + Assert (this->dof_handler != 0, typename DoFAccessor::ExcInvalidObject()); - Assert (dof_handler->selected_fe != 0, + Assert (this->dof_handler->selected_fe != 0, typename DoFAccessor::ExcInvalidObject()); - Assert (local_source.size() == (4*dof_handler->get_fe().dofs_per_vertex + + Assert (local_source.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), typename DoFAccessor::ExcVectorDoesNotMatch()); - Assert (dof_handler->n_dofs() == global_destination.size(), + Assert (this->dof_handler->n_dofs() == global_destination.size(), typename DoFAccessor::ExcVectorDoesNotMatch()); const unsigned int n_dofs = local_source.size(); @@ -300,17 +300,17 @@ template void DoFObjectAccessor<2, dim>:: distribute_local_to_global (const FullMatrix &local_source, SparseMatrix &global_destination) const { - Assert (dof_handler != 0, + Assert (this->dof_handler != 0, typename DoFAccessor::ExcInvalidObject()); - Assert (dof_handler->selected_fe != 0, + Assert (this->dof_handler->selected_fe != 0, typename DoFAccessor::ExcInvalidObject()); - Assert (local_source.m() == (4*dof_handler->get_fe().dofs_per_vertex + + Assert (local_source.m() == (4*this->dof_handler->get_fe().dofs_per_vertex + 4*dof_handler->get_fe().dofs_per_line + dof_handler->get_fe().dofs_per_quad), typename DoFAccessor::ExcMatrixDoesNotMatch()); Assert (local_source.m() == local_source.n(), typename DoFAccessor::ExcMatrixDoesNotMatch()); - Assert (dof_handler->n_dofs() == global_destination.m(), + Assert (this->dof_handler->n_dofs() == global_destination.m(), typename DoFAccessor::ExcMatrixDoesNotMatch()); Assert (global_destination.m() == global_destination.n(), typename DoFAccessor::ExcMatrixDoesNotMatch()); @@ -337,20 +337,20 @@ DoFObjectAccessor<2,dim>::get_dof_values (const InputVector &values, { Assert (dim==2, ExcInternalError()); - Assert (dof_handler != 0, + Assert (this->dof_handler != 0, typename DoFAccessor::ExcInvalidObject()); - Assert (&dof_handler->get_fe() != 0, + Assert (&this->dof_handler->get_fe() != 0, typename DoFAccessor::ExcInvalidObject()); - Assert (local_values.size() == dof_handler->get_fe().dofs_per_cell, + Assert (local_values.size() == this->dof_handler->get_fe().dofs_per_cell, typename DoFAccessor::ExcVectorDoesNotMatch()); - Assert (values.size() == dof_handler->n_dofs(), + Assert (values.size() == this->dof_handler->n_dofs(), typename DoFAccessor::ExcVectorDoesNotMatch()); - Assert (has_children() == false, typename DoFAccessor:: + Assert (this->has_children() == false, typename DoFAccessor:: ExcNotActive()); - const unsigned int dofs_per_vertex = dof_handler->get_fe().dofs_per_vertex, - dofs_per_line = dof_handler->get_fe().dofs_per_line, - dofs_per_quad = dof_handler->get_fe().dofs_per_quad; + 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 = this->dof_handler->get_fe().dofs_per_quad; typename Vector::iterator next_local_value=local_values.begin(); for (unsigned int vertex=0; vertex<4; ++vertex) for (unsigned int d=0; d::set_dof_values (const Vector &local_values, { Assert (dim==2, ExcInternalError()); - Assert (dof_handler != 0, + Assert (this->dof_handler != 0, typename DoFAccessor::ExcInvalidObject()); - Assert (&dof_handler->get_fe() != 0, + Assert (&this->dof_handler->get_fe() != 0, typename DoFAccessor::ExcInvalidObject()); - Assert (local_values.size() == dof_handler->get_fe().dofs_per_cell, + Assert (local_values.size() == this->dof_handler->get_fe().dofs_per_cell, typename DoFAccessor::ExcVectorDoesNotMatch()); - Assert (values.size() == dof_handler->n_dofs(), + Assert (values.size() == this->dof_handler->n_dofs(), typename DoFAccessor::ExcVectorDoesNotMatch()); - Assert (has_children() == false, + Assert (this->has_children() == false, typename DoFAccessor::ExcNotActive()); - const unsigned int dofs_per_vertex = dof_handler->get_fe().dofs_per_vertex, - dofs_per_line = dof_handler->get_fe().dofs_per_line, - dofs_per_quad = dof_handler->get_fe().dofs_per_quad; + 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 = this->dof_handler->get_fe().dofs_per_quad; typename Vector::const_iterator next_local_value=local_values.begin(); for (unsigned int vertex=0; vertex<4; ++vertex) for (unsigned int d=0; d void DoFObjectAccessor<3, dim>::set_dof_index (const unsigned int i, const unsigned int index) const { - Assert (dof_handler != 0, + Assert (this->dof_handler != 0, typename DoFAccessor::ExcInvalidObject()); // make sure a FE has been selected // and enough room was reserved - Assert (dof_handler->selected_fe != 0, + Assert (this->dof_handler->selected_fe != 0, typename DoFAccessor::ExcInvalidObject()); - Assert (iselected_fe->dofs_per_hex, + Assert (idof_handler->selected_fe->dofs_per_hex, ExcIndexRange (i, 0, dof_handler->selected_fe->dofs_per_hex)); - dof_handler->levels[present_level] - ->hex_dofs[present_index*dof_handler->selected_fe->dofs_per_hex+i] = index; + this->dof_handler->levels[this->present_level] + ->hex_dofs[this->present_index*this->dof_handler->selected_fe->dofs_per_hex+i] = index; }; @@ -431,19 +431,19 @@ void DoFObjectAccessor<3, dim>::set_vertex_dof_index (const unsigned int vertex, const unsigned int i, const unsigned int index) const { - Assert (dof_handler != 0, + Assert (this->dof_handler != 0, typename DoFAccessor::ExcInvalidObject()); - Assert (dof_handler->selected_fe != 0, + Assert (this->dof_handler->selected_fe != 0, typename DoFAccessor::ExcInvalidObject()); Assert (vertex<8, ExcIndexRange (i,0,8)); - Assert (iselected_fe->dofs_per_vertex, + Assert (idof_handler->selected_fe->dofs_per_vertex, ExcIndexRange (i, 0, dof_handler->selected_fe->dofs_per_vertex)); - const unsigned int dof_number = (vertex_index(vertex) * - dof_handler->selected_fe->dofs_per_vertex + + const unsigned int dof_number = (this->vertex_index(vertex) * + this->dof_handler->selected_fe->dofs_per_vertex + i); - dof_handler->vertex_dofs[dof_number] = index; + this->dof_handler->vertex_dofs[dof_number] = index; }; @@ -453,16 +453,16 @@ void DoFObjectAccessor<3, dim>:: distribute_local_to_global (const Vector &local_source, Vector &global_destination) const { - Assert (dof_handler != 0, + Assert (this->dof_handler != 0, typename DoFAccessor::ExcInvalidObject()); - Assert (dof_handler->selected_fe != 0, + Assert (this->dof_handler->selected_fe != 0, typename DoFAccessor::ExcInvalidObject()); - Assert (local_source.size() == (8*dof_handler->get_fe().dofs_per_vertex + + Assert (local_source.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), typename DoFAccessor::ExcVectorDoesNotMatch()); - Assert (dof_handler->n_dofs() == global_destination.size(), + Assert (this->dof_handler->n_dofs() == global_destination.size(), typename DoFAccessor::ExcVectorDoesNotMatch()); const unsigned int n_dofs = local_source.size(); @@ -483,18 +483,18 @@ void DoFObjectAccessor<3, dim>:: distribute_local_to_global (const FullMatrix &local_source, SparseMatrix &global_destination) const { - Assert (dof_handler != 0, + Assert (this->dof_handler != 0, typename DoFAccessor::ExcInvalidObject()); - Assert (dof_handler->selected_fe != 0, + Assert (this->dof_handler->selected_fe != 0, typename DoFAccessor::ExcInvalidObject()); - Assert (local_source.m() == (8*dof_handler->get_fe().dofs_per_vertex + + Assert (local_source.m() == (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), typename DoFAccessor::ExcMatrixDoesNotMatch()); Assert (local_source.m() == local_source.n(), typename DoFAccessor::ExcMatrixDoesNotMatch()); - Assert (dof_handler->n_dofs() == global_destination.m(), + Assert (this->dof_handler->n_dofs() == global_destination.m(), typename DoFAccessor::ExcMatrixDoesNotMatch()); Assert (global_destination.m() == global_destination.n(), typename DoFAccessor::ExcMatrixDoesNotMatch()); @@ -521,17 +521,17 @@ DoFObjectAccessor<3,dim>::get_dof_values (const InputVector &values, { Assert (dim==3, ExcInternalError()); - Assert (dof_handler != 0, DoFAccessor<3>::ExcInvalidObject()); - Assert (&dof_handler->get_fe() != 0, DoFAccessor<3>::ExcInvalidObject()); - Assert (local_values.size() == dof_handler->get_fe().dofs_per_cell, + Assert (this->dof_handler != 0, DoFAccessor<3>::ExcInvalidObject()); + Assert (&this->dof_handler->get_fe() != 0, DoFAccessor<3>::ExcInvalidObject()); + Assert (local_values.size() == this->dof_handler->get_fe().dofs_per_cell, DoFAccessor<3>::ExcVectorDoesNotMatch()); - Assert (values.size() == dof_handler->n_dofs(), + Assert (values.size() == this->dof_handler->n_dofs(), DoFAccessor<3>::ExcVectorDoesNotMatch()); - Assert (has_children() == false, + Assert (this->has_children() == false, DoFAccessor<3>::ExcNotActive()); - const unsigned int dofs_per_vertex = dof_handler->get_fe().dofs_per_vertex, - dofs_per_line = dof_handler->get_fe().dofs_per_line, + 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; typename Vector::iterator next_local_value = local_values.begin(); @@ -561,19 +561,19 @@ DoFObjectAccessor<3,dim>::set_dof_values (const Vector &local_values, { Assert (dim==3, ExcInternalError()); - Assert (dof_handler != 0, + Assert (this->dof_handler != 0, DoFAccessor<3>::ExcInvalidObject()); - Assert (&dof_handler->get_fe() != 0, + Assert (&this->dof_handler->get_fe() != 0, DoFAccessor<3>::ExcInvalidObject()); - Assert (local_values.size() == dof_handler->get_fe().dofs_per_cell, + Assert (local_values.size() == this->dof_handler->get_fe().dofs_per_cell, DoFAccessor<3>::ExcVectorDoesNotMatch()); - Assert (values.size() == dof_handler->n_dofs(), + Assert (values.size() == this->dof_handler->n_dofs(), DoFAccessor<3>::ExcVectorDoesNotMatch()); - Assert (has_children() == false, + Assert (this->has_children() == false, DoFAccessor<3>::ExcNotActive()); - const unsigned int dofs_per_vertex = dof_handler->get_fe().dofs_per_vertex, - dofs_per_line = dof_handler->get_fe().dofs_per_line, + 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; typename Vector::const_iterator next_local_value=local_values.begin(); @@ -617,7 +617,7 @@ template <> TriaIterator<2, DoFObjectAccessor<1,2> > DoFCellAccessor<2>::face (const unsigned int i) const { - return line(i); + return this->line(i); }; #endif @@ -641,16 +641,16 @@ void DoFCellAccessor::get_interpolated_dof_values (const InputVector &values, Vector &interpolated_values) const { - const unsigned int dofs_per_cell = dof_handler->get_fe().dofs_per_cell; + const unsigned int dofs_per_cell = this->dof_handler->get_fe().dofs_per_cell; - Assert (dof_handler != 0, DoFAccessor::ExcInvalidObject()); - Assert (&dof_handler->get_fe() != 0, DoFAccessor::ExcInvalidObject()); + Assert (this->dof_handler != 0, DoFAccessor::ExcInvalidObject()); + Assert (&this->dof_handler->get_fe() != 0, DoFAccessor::ExcInvalidObject()); Assert (interpolated_values.size() == dofs_per_cell, DoFAccessor::ExcVectorDoesNotMatch()); - Assert (values.size() == dof_handler->n_dofs(), + Assert (values.size() == this->dof_handler->n_dofs(), DoFAccessor::ExcVectorDoesNotMatch()); - if (!has_children()) + if (!this->has_children()) // if this cell has no children: simply // return the exact values on this cell get_dof_values (values, interpolated_values); @@ -672,7 +672,7 @@ DoFCellAccessor::get_interpolated_dof_values (const InputVector &values, tmp1); // interpolate these to the mother // cell - dof_handler->get_fe().restrict(child).vmult (tmp2, tmp1); + this->dof_handler->get_fe().restrict(child).vmult (tmp2, tmp1); // now write those entries in tmp2 // which are != 0 into the output @@ -704,16 +704,16 @@ void DoFCellAccessor::set_dof_values_by_interpolation (const Vector &local_values, OutputVector &values) const { - const unsigned int dofs_per_cell = dof_handler->get_fe().dofs_per_cell; + const unsigned int dofs_per_cell = this->dof_handler->get_fe().dofs_per_cell; - Assert (dof_handler != 0, DoFAccessor::ExcInvalidObject()); - Assert (&dof_handler->get_fe() != 0, DoFAccessor::ExcInvalidObject()); + Assert (this->dof_handler != 0, DoFAccessor::ExcInvalidObject()); + Assert (&this->dof_handler->get_fe() != 0, DoFAccessor::ExcInvalidObject()); Assert (local_values.size() == dofs_per_cell, DoFAccessor::ExcVectorDoesNotMatch()); - Assert (values.size() == dof_handler->n_dofs(), + Assert (values.size() == this->dof_handler->n_dofs(), DoFAccessor::ExcVectorDoesNotMatch()); - if (!has_children()) + if (!this->has_children()) // if this cell has no children: simply // set the values on this cell set_dof_values (local_values, values); @@ -727,7 +727,7 @@ DoFCellAccessor::set_dof_values_by_interpolation (const Vector &loc { // prolong the given data // to the present cell - dof_handler->get_fe().prolongate(child).vmult (tmp, local_values); + this->dof_handler->get_fe().prolongate(child).vmult (tmp, local_values); this->child(child)->set_dof_values_by_interpolation (tmp, values); }; }; diff --git a/deal.II/deal.II/source/grid/grid_reordering.cc b/deal.II/deal.II/source/grid/grid_reordering.cc index 3b9abab561..7091a5a5e4 100644 --- a/deal.II/deal.II/source/grid/grid_reordering.cc +++ b/deal.II/deal.II/source/grid/grid_reordering.cc @@ -619,7 +619,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 +736,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 < this->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 < this->rotational_states_of_cells-1) { // possible. push that state to // the stack and leave @@ -820,7 +820,7 @@ bool GridReordering::try_rotate_single_neighbors (typename std::vectorrotational_states_of_cells; ++neighbor_rot) { // first, if the // neighbor itself does @@ -840,7 +840,7 @@ bool GridReordering::try_rotate_single_neighbors (typename std::vectorrotational_states_of_cells; ++cell_rot) if (cells[cell_no].check_consistency (cell_rot) == true) { // ah, see, @@ -968,7 +968,7 @@ 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 < this->rotational_states_of_cells) { // yes, can be // done. then do so and diff --git a/deal.II/deal.II/source/grid/persistent_tria.cc b/deal.II/deal.II/source/grid/persistent_tria.cc index afce7456a7..ca166e9a04 100644 --- a/deal.II/deal.II/source/grid/persistent_tria.cc +++ b/deal.II/deal.II/source/grid/persistent_tria.cc @@ -59,8 +59,8 @@ PersistentTriangulation::execute_coarsening_and_refinement () // first save flags refine_flags.push_back (std::vector()); coarsen_flags.push_back (std::vector()); - save_refine_flags (refine_flags.back()); - save_coarsen_flags (coarsen_flags.back()); + this->save_refine_flags (refine_flags.back()); + this->save_coarsen_flags (coarsen_flags.back()); // then refine triangulation Triangulation::execute_coarsening_and_refinement (); @@ -95,8 +95,8 @@ PersistentTriangulation::restore (const unsigned int step) { Assert(stepload_refine_flags (refine_flags[step-1]); + this->load_coarsen_flags (coarsen_flags[step-1]); Triangulation::execute_coarsening_and_refinement (); }; @@ -116,7 +116,7 @@ template void PersistentTriangulation::copy_triangulation (const Triangulation &old_grid) { - clear (); + this->clear (); coarse_grid = &old_grid; refine_flags.clear (); coarsen_flags.clear (); @@ -145,9 +145,9 @@ PersistentTriangulation::write_flags(std::ostream &out) const for (unsigned int i=0; iwrite_bool_vector (mn_tria_refine_flags_begin, refine_flags[i], mn_tria_refine_flags_end, out); - write_bool_vector (mn_tria_coarsen_flags_begin, coarsen_flags[i], + this->write_bool_vector (mn_tria_coarsen_flags_begin, coarsen_flags[i], mn_tria_coarsen_flags_end, out); } @@ -176,9 +176,9 @@ PersistentTriangulation::read_flags(std::istream &in) { refine_flags.push_back (std::vector()); coarsen_flags.push_back (std::vector()); - read_bool_vector (mn_tria_refine_flags_begin, refine_flags.back(), + this->read_bool_vector (mn_tria_refine_flags_begin, refine_flags.back(), mn_tria_refine_flags_end, in); - read_bool_vector (mn_tria_coarsen_flags_begin, coarsen_flags.back(), + this->read_bool_vector (mn_tria_coarsen_flags_begin, coarsen_flags.back(), mn_tria_coarsen_flags_end, in); } diff --git a/deal.II/deal.II/source/grid/tria_accessor.cc b/deal.II/deal.II/source/grid/tria_accessor.cc index 5becb54b56..c40c48e360 100644 --- a/deal.II/deal.II/source/grid/tria_accessor.cc +++ b/deal.II/deal.II/source/grid/tria_accessor.cc @@ -28,7 +28,7 @@ template void TriaObjectAccessor<1, dim>::set (const Line &line) const { - tria->levels[present_level]->lines.lines[present_index] = line; + this->tria->levels[this->present_level]->lines.lines[this->present_index] = line; }; @@ -37,7 +37,7 @@ template int TriaObjectAccessor<1, dim>::vertex_index (const unsigned int i) const { Assert (i<2, ExcIndexRange(i,0,2)); - return tria->levels[present_level]->lines.lines[present_index].vertex (i); + return this->tria->levels[this->present_level]->lines.lines[this->present_index].vertex (i); }; @@ -46,7 +46,7 @@ template Point & TriaObjectAccessor<1, dim>::vertex (const unsigned int i) const { - return tria->vertices[vertex_index(i)]; + return this->tria->vertices[vertex_index(i)]; }; @@ -54,9 +54,9 @@ TriaObjectAccessor<1, dim>::vertex (const unsigned int i) const template void TriaObjectAccessor<1, dim>::set_used_flag () const { - Assert (state() == IteratorState::valid, + Assert (this->state() == IteratorState::valid, typename TriaAccessor::ExcDereferenceInvalidObject()); - tria->levels[present_level]->lines.used[present_index] = true; + this->tria->levels[this->present_level]->lines.used[this->present_index] = true; }; @@ -64,9 +64,9 @@ void TriaObjectAccessor<1, dim>::set_used_flag () const template void TriaObjectAccessor<1, dim>::clear_used_flag () const { - Assert (state() == IteratorState::valid, + Assert (this->state() == IteratorState::valid, typename TriaAccessor::ExcDereferenceInvalidObject()); - tria->levels[present_level]->lines.used[present_index] = false; + this->tria->levels[this->present_level]->lines.used[this->present_index] = false; }; @@ -99,7 +99,7 @@ template void TriaObjectAccessor<1, dim>::set_user_pointer (void *p) const { Assert (used(), typename TriaAccessor::ExcCellNotUsed()); - tria->levels[present_level]->lines.user_pointers[present_index] = p; + this->tria->levels[this->present_level]->lines.user_pointers[this->present_index] = p; }; @@ -108,7 +108,7 @@ template void TriaObjectAccessor<1, dim>::clear_user_pointer () const { Assert (used(), typename TriaAccessor::ExcCellNotUsed()); - tria->levels[present_level]->lines.user_pointers[present_index] = 0; + this->tria->levels[this->present_level]->lines.user_pointers[this->present_index] = 0; }; @@ -117,7 +117,7 @@ template void * TriaObjectAccessor<1, dim>::user_pointer () const { Assert (used(), typename TriaAccessor::ExcCellNotUsed()); - return tria->levels[present_level]->lines.user_pointers[present_index]; + return this->tria->levels[this->present_level]->lines.user_pointers[this->present_index]; }; @@ -130,7 +130,7 @@ void TriaObjectAccessor<1, dim>::set_children (const int index) const (!has_children() && (index>=0)), typename TriaAccessor::ExcCantSetChildren(index)); - tria->levels[present_level]->lines.children[present_index] = index; + this->tria->levels[this->present_level]->lines.children[this->present_index] = index; }; @@ -149,7 +149,7 @@ unsigned char TriaObjectAccessor<1, dim>::boundary_indicator () const Assert (dim>=2, typename TriaAccessor::ExcNotUsefulForThisDimension()); Assert (used(), typename TriaAccessor::ExcCellNotUsed()); - return tria->levels[present_level]->lines.material_id[present_index]; + return this->tria->levels[this->present_level]->lines.material_id[this->present_index]; }; @@ -160,7 +160,7 @@ void TriaObjectAccessor<1, dim>::set_boundary_indicator (unsigned char boundary_ Assert (dim>=2, typename TriaAccessor::ExcNotUsefulForThisDimension()); Assert (used(), typename TriaAccessor::ExcCellNotUsed()); - tria->levels[present_level]->lines.material_id[present_index] = boundary_ind; + this->tria->levels[this->present_level]->lines.material_id[this->present_index] = boundary_ind; }; @@ -227,7 +227,7 @@ unsigned int TriaObjectAccessor<1, dim>::number_of_children () const template void TriaObjectAccessor<2, dim>::set (const Quad &quad) const { - tria->levels[present_level]->quads.quads[present_index] = quad; + this->tria->levels[this->present_level]->quads.quads[this->present_index] = quad; }; @@ -247,7 +247,7 @@ template Point & TriaObjectAccessor<2, dim>::vertex (const unsigned int i) const { - return tria->vertices[vertex_index(i)]; + return this->tria->vertices[vertex_index(i)]; }; @@ -256,9 +256,9 @@ template void TriaObjectAccessor<2, dim>::set_used_flag () const { - Assert (state() == IteratorState::valid, + Assert (this->state() == IteratorState::valid, typename TriaAccessor::ExcDereferenceInvalidObject()); - tria->levels[present_level]->quads.used[present_index] = true; + this->tria->levels[this->present_level]->quads.used[this->present_index] = true; }; @@ -266,9 +266,9 @@ TriaObjectAccessor<2, dim>::set_used_flag () const template void TriaObjectAccessor<2, dim>::clear_used_flag () const { - Assert (state() == IteratorState::valid, + Assert (this->state() == IteratorState::valid, typename TriaAccessor::ExcDereferenceInvalidObject()); - tria->levels[present_level]->quads.used[present_index] = false; + this->tria->levels[this->present_level]->quads.used[this->present_index] = false; }; @@ -301,7 +301,7 @@ template void TriaObjectAccessor<2, dim>::set_user_pointer (void *p) const { Assert (used(), typename TriaAccessor::ExcCellNotUsed()); - tria->levels[present_level]->quads.user_pointers[present_index] = p; + this->tria->levels[this->present_level]->quads.user_pointers[this->present_index] = p; }; @@ -310,7 +310,7 @@ template void TriaObjectAccessor<2, dim>::clear_user_pointer () const { Assert (used(), typename TriaAccessor::ExcCellNotUsed()); - tria->levels[present_level]->quads.user_pointers[present_index] = 0; + this->tria->levels[this->present_level]->quads.user_pointers[this->present_index] = 0; }; @@ -319,7 +319,7 @@ template void * TriaObjectAccessor<2, dim>::user_pointer () const { Assert (used(), typename TriaAccessor::ExcCellNotUsed()); - return tria->levels[present_level]->quads.user_pointers[present_index]; + return this->tria->levels[this->present_level]->quads.user_pointers[this->present_index]; }; @@ -333,7 +333,7 @@ void TriaObjectAccessor<2, dim>::set_children (const int index) const (!has_children() && (index>=0)), typename TriaAccessor::ExcCantSetChildren(index)); - tria->levels[present_level]->quads.children[present_index] = index; + this->tria->levels[this->present_level]->quads.children[this->present_index] = index; }; @@ -352,7 +352,7 @@ unsigned char TriaObjectAccessor<2, dim>::boundary_indicator () const Assert (dim>=3, typename TriaAccessor::ExcNotUsefulForThisDimension()); Assert (used(), typename TriaAccessor::ExcCellNotUsed()); - return tria->levels[present_level]->quads.material_id[present_index]; + return this->tria->levels[this->present_level]->quads.material_id[this->present_index]; }; @@ -363,7 +363,7 @@ void TriaObjectAccessor<2, dim>::set_boundary_indicator (unsigned char boundary_ Assert (dim>=3, typename TriaAccessor::ExcNotUsefulForThisDimension()); Assert (used(), typename TriaAccessor::ExcCellNotUsed()); - tria->levels[present_level]->quads.material_id[present_index] = boundary_ind; + this->tria->levels[this->present_level]->quads.material_id[this->present_index] = boundary_ind; }; @@ -618,7 +618,7 @@ unsigned int TriaObjectAccessor<2, dim>::number_of_children () const template void TriaObjectAccessor<3, dim>::set (const Hexahedron &hex) const { - tria->levels[present_level]->hexes.hexes[present_index] = hex; + this->tria->levels[this->present_level]->hexes.hexes[this->present_index] = hex; }; @@ -643,7 +643,7 @@ template Point & TriaObjectAccessor<3, dim>::vertex (const unsigned int i) const { - return tria->vertices[vertex_index(i)]; + return this->tria->vertices[vertex_index(i)]; }; @@ -651,9 +651,9 @@ TriaObjectAccessor<3, dim>::vertex (const unsigned int i) const template void TriaObjectAccessor<3, dim>::set_used_flag () const { - Assert (state() == IteratorState::valid, + Assert (this->state() == IteratorState::valid, typename TriaAccessor::ExcDereferenceInvalidObject()); - tria->levels[present_level]->hexes.used[present_index] = true; + this->tria->levels[this->present_level]->hexes.used[this->present_index] = true; }; @@ -661,9 +661,9 @@ void TriaObjectAccessor<3, dim>::set_used_flag () const template void TriaObjectAccessor<3, dim>::clear_used_flag () const { - Assert (state() == IteratorState::valid, + Assert (this->state() == IteratorState::valid, typename TriaAccessor::ExcDereferenceInvalidObject()); - tria->levels[present_level]->hexes.used[present_index] = false; + this->tria->levels[this->present_level]->hexes.used[this->present_index] = false; }; @@ -696,7 +696,7 @@ template void TriaObjectAccessor<3, dim>::set_user_pointer (void *p) const { Assert (used(), typename TriaAccessor::ExcCellNotUsed()); - tria->levels[present_level]->hexes.user_pointers[present_index] = p; + this->tria->levels[this->present_level]->hexes.user_pointers[this->present_index] = p; }; @@ -705,7 +705,7 @@ template void TriaObjectAccessor<3, dim>::clear_user_pointer () const { Assert (used(), typename TriaAccessor::ExcCellNotUsed()); - tria->levels[present_level]->hexes.user_pointers[present_index] = 0; + this->tria->levels[this->present_level]->hexes.user_pointers[this->present_index] = 0; }; @@ -714,7 +714,7 @@ template void * TriaObjectAccessor<3, dim>::user_pointer () const { Assert (used(), typename TriaAccessor::ExcCellNotUsed()); - return tria->levels[present_level]->hexes.user_pointers[present_index]; + return this->tria->levels[this->present_level]->hexes.user_pointers[this->present_index]; }; @@ -727,7 +727,7 @@ void TriaObjectAccessor<3, dim>::set_children (const int index) const (!has_children() && (index>=0)), typename TriaAccessor::ExcCantSetChildren(index)); - tria->levels[present_level]->hexes.children[present_index] = index; + this->tria->levels[this->present_level]->hexes.children[this->present_index] = index; }; @@ -746,7 +746,7 @@ unsigned char TriaObjectAccessor<3, dim>::boundary_indicator () const Assert (dim<4, typename TriaAccessor::ExcNotUsefulForThisDimension()); Assert (used(), typename TriaAccessor::ExcCellNotUsed()); - return tria->levels[present_level]->hexes.material_id[present_index]; + return this->tria->levels[this->present_level]->hexes.material_id[this->present_index]; }; @@ -757,7 +757,7 @@ void TriaObjectAccessor<3, dim>::set_boundary_indicator (unsigned char boundary_ Assert (dim<4, typename TriaAccessor::ExcNotUsefulForThisDimension()); Assert (used(), typename TriaAccessor::ExcCellNotUsed()); - tria->levels[present_level]->hexes.material_id[present_index] = boundary_ind; + this->tria->levels[this->present_level]->hexes.material_id[this->present_index] = boundary_ind; }; @@ -1614,8 +1614,8 @@ bool CellAccessor<2>::at_boundary () const template <> unsigned char CellAccessor<2>::material_id () const { - Assert (used(), TriaAccessor<2>::ExcCellNotUsed()); - return tria->levels[present_level]->quads.material_id[present_index]; + Assert (this->used(), TriaAccessor<2>::ExcCellNotUsed()); + return this->tria->levels[this->present_level]->quads.material_id[this->present_index]; }; @@ -1623,8 +1623,8 @@ unsigned char CellAccessor<2>::material_id () const template <> void CellAccessor<2>::set_material_id (const unsigned char mat_id) const { - Assert (used(), TriaAccessor<2>::ExcCellNotUsed()); - tria->levels[present_level]->quads.material_id[present_index] + Assert (this->used(), TriaAccessor<2>::ExcCellNotUsed()); + this->tria->levels[this->present_level]->quads.material_id[this->present_index] = mat_id; }; @@ -1651,9 +1651,9 @@ bool CellAccessor<2>::point_inside (const Point<2> &p) const { // vector from the first vertex // of the line to the point - const Point<2> to_p = p-vertex(f); + const Point<2> to_p = p-this->vertex(f); // vector describing the line - const Point<2> face = vertex((f+1)%4)-vertex(f); + const Point<2> face = this->vertex((f+1)%4)-vertex(f); // if we rotate the face vector // by 90 degrees to the left @@ -1731,8 +1731,8 @@ bool CellAccessor<3>::point_inside (const Point<3> &) const template unsigned int CellAccessor::subdomain_id () const { - Assert (used(), typename TriaAccessor::ExcCellNotUsed()); - return tria->levels[present_level]->subdomain_ids[present_index]; + Assert (this->used(), typename TriaAccessor::ExcCellNotUsed()); + return this->tria->levels[this->present_level]->subdomain_ids[this->present_index]; }; @@ -1741,8 +1741,8 @@ template void CellAccessor::set_subdomain_id (const unsigned int new_subdomain_id) const { - Assert (used(), typename TriaAccessor::ExcCellNotUsed()); - tria->levels[present_level]->subdomain_ids[present_index] + Assert (this->used(), typename TriaAccessor::ExcCellNotUsed()); + this->tria->levels[this->present_level]->subdomain_ids[this->present_index] = new_subdomain_id; }; @@ -1757,20 +1757,20 @@ void CellAccessor::set_neighbor (const unsigned int i, if (pointer.state() == IteratorState::valid) { - tria->levels[present_level]-> - neighbors[present_index*GeometryInfo::faces_per_cell+i].first + this->tria->levels[this->present_level]-> + neighbors[this->present_index*GeometryInfo::faces_per_cell+i].first = pointer->present_level; - tria->levels[present_level]-> - neighbors[present_index*GeometryInfo::faces_per_cell+i].second + this->tria->levels[this->present_level]-> + neighbors[this->present_index*GeometryInfo::faces_per_cell+i].second = pointer->present_index; } else { - tria->levels[present_level]-> - neighbors[present_index*GeometryInfo::faces_per_cell+i].first + this->tria->levels[this->present_level]-> + neighbors[this->present_index*GeometryInfo::faces_per_cell+i].first = -1; - tria->levels[present_level]-> - neighbors[present_index*GeometryInfo::faces_per_cell+i].second + this->tria->levels[this->present_level]-> + neighbors[this->present_index*GeometryInfo::faces_per_cell+i].second = -1; }; }; @@ -1782,7 +1782,7 @@ unsigned int CellAccessor::neighbor_of_neighbor (const unsigned int neighbo { // make sure that the neighbor is // not on a coarser level - Assert (neighbor_level(neighbor) == present_level, + Assert (neighbor_level(neighbor) == this->present_level, typename TriaAccessor::ExcNeighborIsCoarser()); Assert (neighbor < GeometryInfo::faces_per_cell, typename TriaAccessor::ExcInvalidNeighbor(neighbor)); @@ -1805,8 +1805,8 @@ unsigned int CellAccessor::neighbor_of_neighbor (const unsigned int neighbo const unsigned int neighbor_guess = GeometryInfo::opposite_face[neighbor]; - if ((neighbor_cell->neighbor_index (neighbor_guess) == present_index) && - (neighbor_cell->neighbor_level (neighbor_guess) == present_level)) + if ((neighbor_cell->neighbor_index (neighbor_guess) == this->present_index) && + (neighbor_cell->neighbor_level (neighbor_guess) == this->present_level)) return neighbor_guess; else // if the guess was false, then @@ -1815,8 +1815,8 @@ unsigned int CellAccessor::neighbor_of_neighbor (const unsigned int neighbo // the hard way { for (unsigned int face=0; face::faces_per_cell; ++face) - if ((neighbor_cell->neighbor_index (face) == present_index) && - (neighbor_cell->neighbor_level (face) == present_level)) + if ((neighbor_cell->neighbor_index (face) == this->present_index) && + (neighbor_cell->neighbor_level (face) == this->present_level)) return face; // we should never get here, @@ -1835,7 +1835,7 @@ CellAccessor::neighbor_of_coarser_neighbor (const unsigned int neighbor) co { // make sure that the neighbor is // on a coarser level - Assert (neighbor_level(neighbor) < present_level, + Assert (neighbor_level(neighbor) < this->present_level, typename TriaAccessor::ExcNeighborIsNotCoarser()); Assert (neighbor < GeometryInfo::faces_per_cell, typename TriaAccessor::ExcInvalidNeighbor(neighbor)); @@ -1897,7 +1897,7 @@ CellAccessor::neighbor_of_coarser_neighbor (const unsigned int neighbor) co template bool CellAccessor::at_boundary (const unsigned int i) const { - Assert (used(), typename TriaAccessor::ExcCellNotUsed()); + Assert (this->used(), typename TriaAccessor::ExcCellNotUsed()); Assert (i::faces_per_cell, ExcIndexRange (i,0,GeometryInfo::faces_per_cell)); @@ -1920,7 +1920,7 @@ template bool CellAccessor::has_boundary_lines () const { for (unsigned int l=0; l::lines_per_cell; ++l) - if (line(l)->at_boundary()) + if (this->line(l)->at_boundary()) return true; return false; 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 55d61eed64..aaf6091e46 100644 --- a/deal.II/deal.II/source/grid/tria_boundary_lib.cc +++ b/deal.II/deal.II/source/grid/tria_boundary_lib.cc @@ -500,7 +500,7 @@ get_new_point_on_line (const typename Triangulation::line_iterator &line) c // to the plane part of the // boundary const Point line_center = line->center(); - if (line_center(0) == center(0)) + if (this->line_this->center(0) == center(0)) return line_center; else return HyperBallBoundary::get_new_point_on_line (line); @@ -529,7 +529,7 @@ HalfHyperBallBoundary:: get_new_point_on_quad (const typename Triangulation::quad_iterator &quad) const { const Point quad_center = quad->center(); - if (quad_center(0) == center(0)) + if (this->quad_this->center(0) == center(0)) return quad_center; else return HyperBallBoundary::get_new_point_on_quad (quad); @@ -548,7 +548,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 (this->line_this->center(0) == center(0)) return StraightBoundary::get_intermediate_points_on_line (line, points); else return HyperBallBoundary::get_intermediate_points_on_line (line, points); @@ -567,7 +567,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 (this->quad_this->center(0) == center(0)) StraightBoundary::get_intermediate_points_on_quad (quad, points); else HyperBallBoundary::get_intermediate_points_on_quad (quad, points); @@ -614,7 +614,7 @@ get_normals_at_vertices (const typename Triangulation::face_iterator &face, // to the plane part of the // boundary const Point quad_center = face->center(); - if (quad_center(0) == center(0)) + if (this->quad_this->center(0) == center(0)) StraightBoundary::get_normals_at_vertices (face, face_vertex_normals); else HyperBallBoundary::get_normals_at_vertices (face, face_vertex_normals); @@ -629,7 +629,7 @@ template HyperShellBoundary::HyperShellBoundary (const Point ¢er) : HyperBallBoundary(center, 0.) { - compute_radius_automatically=true; + this->compute_radius_automatically=true; }; 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 e0f447c3b4..a9a19900aa 100644 --- a/deal.II/deal.II/source/multigrid/mg_dof_accessor.cc +++ b/deal.II/deal.II/source/multigrid/mg_dof_accessor.cc @@ -46,16 +46,16 @@ MGDoFObjectAccessor<1, dim>::MGDoFObjectAccessor (Triangulation *tria, template unsigned int MGDoFObjectAccessor<1, dim>::mg_dof_index (const unsigned int i) const { - Assert (dof_handler != 0, DoFAccessor::ExcInvalidObject()); - Assert (mg_dof_handler != 0, DoFAccessor::ExcInvalidObject()); + Assert (this->dof_handler != 0, DoFAccessor::ExcInvalidObject()); + Assert (this->mg_dof_handler != 0, DoFAccessor::ExcInvalidObject()); // make sure a FE has been selected // and enough room was reserved - Assert (&dof_handler->get_fe() != 0, DoFAccessor::ExcInvalidObject()); - Assert (iget_fe().dofs_per_line, + 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)); - return mg_dof_handler->mg_levels[present_level] - ->line_dofs[present_index*dof_handler->get_fe().dofs_per_line+i]; + return this->mg_dof_handler->mg_levels[this->present_level] + ->line_dofs[this->present_index*this->dof_handler->get_fe().dofs_per_line+i]; }; @@ -63,16 +63,16 @@ template void MGDoFObjectAccessor<1, dim>::set_mg_dof_index (const unsigned int i, const unsigned int index) const { - Assert (dof_handler != 0, DoFAccessor::ExcInvalidObject()); - Assert (mg_dof_handler != 0, DoFAccessor::ExcInvalidObject()); + Assert (this->dof_handler != 0, DoFAccessor::ExcInvalidObject()); + Assert (this->mg_dof_handler != 0, DoFAccessor::ExcInvalidObject()); // make sure a FE has been selected // and enough room was reserved - Assert (&dof_handler->get_fe() != 0, DoFAccessor::ExcInvalidObject()); - Assert (iget_fe().dofs_per_line, + 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)); - mg_dof_handler->mg_levels[present_level] - ->line_dofs[present_index*dof_handler->get_fe().dofs_per_line+i] = index; + this->mg_dof_handler->mg_levels[this->present_level] + ->line_dofs[this->present_index*this->dof_handler->get_fe().dofs_per_line+i] = index; }; @@ -80,15 +80,15 @@ template unsigned int MGDoFObjectAccessor<1, dim>::mg_vertex_dof_index (const unsigned int vertex, const unsigned int i) const { - Assert (dof_handler != 0, DoFAccessor::ExcInvalidObject()); - Assert (mg_dof_handler != 0, DoFAccessor::ExcInvalidObject()); - Assert (&dof_handler->get_fe() != 0, DoFAccessor::ExcInvalidObject()); + Assert (this->dof_handler != 0, DoFAccessor::ExcInvalidObject()); + Assert (this->mg_dof_handler != 0, DoFAccessor::ExcInvalidObject()); + Assert (&this->dof_handler->get_fe() != 0, DoFAccessor::ExcInvalidObject()); Assert (vertex<2, ExcIndexRange (i,0,2)); - Assert (iget_fe().dofs_per_vertex, + Assert (idof_handler->get_fe().dofs_per_vertex, ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_vertex)); - return (mg_dof_handler->mg_vertex_dofs[vertex_index(vertex)] - .get_index (present_level, i, 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)); }; @@ -97,15 +97,15 @@ void MGDoFObjectAccessor<1, dim>::set_mg_vertex_dof_index (const unsigned int ve const unsigned int i, const unsigned int index) const { - Assert (dof_handler != 0, DoFAccessor::ExcInvalidObject()); - Assert (mg_dof_handler != 0, DoFAccessor::ExcInvalidObject()); - Assert (&dof_handler->get_fe() != 0, DoFAccessor::ExcInvalidObject()); + Assert (this->dof_handler != 0, DoFAccessor::ExcInvalidObject()); + Assert (this->mg_dof_handler != 0, DoFAccessor::ExcInvalidObject()); + Assert (&this->dof_handler->get_fe() != 0, DoFAccessor::ExcInvalidObject()); Assert (vertex<2, ExcIndexRange (i,0,2)); - Assert (iget_fe().dofs_per_vertex, + Assert (idof_handler->get_fe().dofs_per_vertex, ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_vertex)); - mg_dof_handler->mg_vertex_dofs[vertex_index(vertex)] - .set_index (present_level, i, dof_handler->get_fe().dofs_per_vertex, index); + 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); }; @@ -113,15 +113,15 @@ template void MGDoFObjectAccessor<1, dim>::get_mg_dof_indices (std::vector &dof_indices) const { - Assert (dof_handler != 0, DoFAccessor::ExcInvalidObject()); - Assert (mg_dof_handler != 0, DoFAccessor::ExcInvalidObject()); - Assert (&dof_handler->get_fe() != 0, DoFAccessor::ExcInvalidObject()); - Assert (dof_indices.size() == (2*dof_handler->get_fe().dofs_per_vertex + + Assert (this->dof_handler != 0, DoFAccessor::ExcInvalidObject()); + 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), DoFAccessor::ExcVectorDoesNotMatch()); - const unsigned int dofs_per_vertex = dof_handler->get_fe().dofs_per_vertex, - dofs_per_line = dof_handler->get_fe().dofs_per_line; + 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; std::vector::iterator next = dof_indices.begin(); for (unsigned int vertex=0; vertex<2; ++vertex) for (unsigned int d=0; d::get_mg_dof_values (const Vector &values, Vector &dof_values) const { - Assert (dof_handler != 0, DoFAccessor<1>::ExcInvalidObject()); - Assert (mg_dof_handler != 0, DoFAccessor<1>::ExcInvalidObject()); - Assert (&dof_handler->get_fe() != 0, DoFAccessor<1>::ExcInvalidObject()); - Assert (dof_values.size() == dof_handler->get_fe().dofs_per_cell, + Assert (this->dof_handler != 0, DoFAccessor<1>::ExcInvalidObject()); + Assert (this->mg_dof_handler != 0, DoFAccessor<1>::ExcInvalidObject()); + Assert (&this->dof_handler->get_fe() != 0, DoFAccessor<1>::ExcInvalidObject()); + Assert (dof_values.size() == this->dof_handler->get_fe().dofs_per_cell, DoFAccessor<1>::ExcVectorDoesNotMatch()); - Assert (values.size() == dof_handler->n_dofs(), + Assert (values.size() == this->dof_handler->n_dofs(), DoFAccessor<1>::ExcVectorDoesNotMatch()); - const unsigned int dofs_per_vertex = dof_handler->get_fe().dofs_per_vertex, - dofs_per_line = dof_handler->get_fe().dofs_per_line; + 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; typename Vector::iterator next_dof_value=dof_values.begin(); for (unsigned int vertex=0; vertex<2; ++vertex) for (unsigned int d=0; d TriaIterator > MGDoFObjectAccessor<1, dim>::child (const unsigned int i) const { - TriaIterator > q (tria, - present_level+1, - child_index (i), - mg_dof_handler); + TriaIterator > q (this->tria, + this->present_level+1, + this->child_index (i), + this->mg_dof_handler); #ifdef DEBUG if (q.state() != IteratorState::past_the_end) @@ -203,16 +203,16 @@ MGDoFObjectAccessor<2, dim>::MGDoFObjectAccessor (Triangulation *tria, template unsigned int MGDoFObjectAccessor<2, dim>::mg_dof_index (const unsigned int i) const { - Assert (dof_handler != 0, DoFAccessor::ExcInvalidObject()); - Assert (mg_dof_handler != 0, DoFAccessor::ExcInvalidObject()); + Assert (this->dof_handler != 0, DoFAccessor::ExcInvalidObject()); + Assert (this->mg_dof_handler != 0, DoFAccessor::ExcInvalidObject()); // make sure a FE has been selected // and enough room was reserved - Assert (&dof_handler->get_fe() != 0, DoFAccessor::ExcInvalidObject()); - Assert (iget_fe().dofs_per_quad, + 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)); - return mg_dof_handler->mg_levels[present_level] - ->quad_dofs[present_index*dof_handler->get_fe().dofs_per_quad+i]; + return this->mg_dof_handler->mg_levels[this->present_level] + ->quad_dofs[this->present_index*this->dof_handler->get_fe().dofs_per_quad+i]; }; @@ -220,16 +220,16 @@ template void MGDoFObjectAccessor<2, dim>::set_mg_dof_index (const unsigned int i, const unsigned int index) const { - Assert (dof_handler != 0, DoFAccessor::ExcInvalidObject()); - Assert (mg_dof_handler != 0, DoFAccessor::ExcInvalidObject()); + Assert (this->dof_handler != 0, DoFAccessor::ExcInvalidObject()); + Assert (this->mg_dof_handler != 0, DoFAccessor::ExcInvalidObject()); // make sure a FE has been selected // and enough room was reserved - Assert (&dof_handler->get_fe() != 0, DoFAccessor::ExcInvalidObject()); - Assert (iget_fe().dofs_per_quad, + 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)); - mg_dof_handler->mg_levels[present_level] - ->quad_dofs[present_index*dof_handler->get_fe().dofs_per_quad+i] = index; + this->mg_dof_handler->mg_levels[this->present_level] + ->quad_dofs[this->present_index*this->dof_handler->get_fe().dofs_per_quad+i] = index; }; @@ -237,15 +237,15 @@ template unsigned int MGDoFObjectAccessor<2, dim>::mg_vertex_dof_index (const unsigned int vertex, const unsigned int i) const { - Assert (dof_handler != 0, DoFAccessor::ExcInvalidObject()); - Assert (mg_dof_handler != 0, DoFAccessor::ExcInvalidObject()); - Assert (&dof_handler->get_fe() != 0, DoFAccessor::ExcInvalidObject()); + Assert (this->dof_handler != 0, DoFAccessor::ExcInvalidObject()); + Assert (this->mg_dof_handler != 0, DoFAccessor::ExcInvalidObject()); + Assert (&this->dof_handler->get_fe() != 0, DoFAccessor::ExcInvalidObject()); Assert (vertex<4, ExcIndexRange (i,0,4)); - Assert (iget_fe().dofs_per_vertex, + Assert (idof_handler->get_fe().dofs_per_vertex, ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_vertex)); - return (mg_dof_handler->mg_vertex_dofs[vertex_index(vertex)] - .get_index (present_level, i, 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)); }; @@ -254,15 +254,15 @@ void MGDoFObjectAccessor<2, dim>::set_mg_vertex_dof_index (const unsigned int ve const unsigned int i, const unsigned int index) const { - Assert (dof_handler != 0, DoFAccessor::ExcInvalidObject()); - Assert (mg_dof_handler != 0, DoFAccessor::ExcInvalidObject()); - Assert (&dof_handler->get_fe() != 0, DoFAccessor::ExcInvalidObject()); + Assert (this->dof_handler != 0, DoFAccessor::ExcInvalidObject()); + Assert (this->mg_dof_handler != 0, DoFAccessor::ExcInvalidObject()); + Assert (&this->dof_handler->get_fe() != 0, DoFAccessor::ExcInvalidObject()); Assert (vertex<4, ExcIndexRange (i,0,4)); - Assert (iget_fe().dofs_per_vertex, + Assert (idof_handler->get_fe().dofs_per_vertex, ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_vertex)); - mg_dof_handler->mg_vertex_dofs[vertex_index(vertex)] - .set_index (present_level, i, dof_handler->get_fe().dofs_per_vertex, index); + 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); }; @@ -270,16 +270,16 @@ template void MGDoFObjectAccessor<2, dim>::get_mg_dof_indices (std::vector &dof_indices) const { - Assert (dof_handler != 0, DoFAccessor::ExcInvalidObject()); - Assert (mg_dof_handler != 0, DoFAccessor::ExcInvalidObject()); - Assert (&dof_handler->get_fe() != 0, DoFAccessor::ExcInvalidObject()); - Assert (dof_indices.size() == (4*dof_handler->get_fe().dofs_per_vertex + + Assert (this->dof_handler != 0, DoFAccessor::ExcInvalidObject()); + 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), DoFAccessor<2>::ExcVectorDoesNotMatch()); - const unsigned int dofs_per_vertex = dof_handler->get_fe().dofs_per_vertex, - dofs_per_line = dof_handler->get_fe().dofs_per_line, + 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; std::vector::iterator next = dof_indices.begin(); for (unsigned int vertex=0; vertex<4; ++vertex) @@ -302,16 +302,16 @@ void MGDoFObjectAccessor<2,dim>::get_mg_dof_values (const Vector &values, Vector &dof_values) const { - Assert (dof_handler != 0, DoFAccessor<2>::ExcInvalidObject()); - Assert (mg_dof_handler != 0, DoFAccessor<2>::ExcInvalidObject()); - Assert (&dof_handler->get_fe() != 0, DoFAccessor<2>::ExcInvalidObject()); - Assert (dof_values.size() == dof_handler->get_fe().dofs_per_cell, + Assert (this->dof_handler != 0, DoFAccessor<2>::ExcInvalidObject()); + Assert (this->mg_dof_handler != 0, DoFAccessor<2>::ExcInvalidObject()); + Assert (&this->dof_handler->get_fe() != 0, DoFAccessor<2>::ExcInvalidObject()); + Assert (dof_values.size() == this->dof_handler->get_fe().dofs_per_cell, DoFAccessor<2>::ExcVectorDoesNotMatch()); - Assert (values.size() == mg_dof_handler->n_dofs(present_level), + Assert (values.size() == this->mg_dof_handler->n_dofs(this->present_level), DoFAccessor<2>::ExcVectorDoesNotMatch()); - const unsigned int dofs_per_vertex = dof_handler->get_fe().dofs_per_vertex, - dofs_per_line = dof_handler->get_fe().dofs_per_line, + 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; typename Vector::iterator next_dof_value=dof_values.begin(); for (unsigned int vertex=0; vertex<4; ++vertex) @@ -336,10 +336,10 @@ MGDoFObjectAccessor<2, dim>::line (const unsigned int i) const return TriaIterator > ( - tria, - present_level, - line_index (i), - mg_dof_handler + this->tria, + this->present_level, + this->line_index (i), + this->mg_dof_handler ); }; @@ -348,10 +348,10 @@ template TriaIterator > MGDoFObjectAccessor<2, dim>::child (const unsigned int i) const { - TriaIterator > q (tria, - present_level+1, - child_index (i), - mg_dof_handler); + TriaIterator > q (this->tria, + this->present_level+1, + this->child_index (i), + this->mg_dof_handler); #ifdef DEBUG if (q.state() != IteratorState::past_the_end) @@ -385,16 +385,16 @@ MGDoFObjectAccessor<3, dim>::MGDoFObjectAccessor (Triangulation *tria, template unsigned int MGDoFObjectAccessor<3, dim>::mg_dof_index (const unsigned int i) const { - Assert (dof_handler != 0, DoFAccessor::ExcInvalidObject()); - Assert (mg_dof_handler != 0, DoFAccessor::ExcInvalidObject()); + Assert (this->dof_handler != 0, DoFAccessor::ExcInvalidObject()); + Assert (this->mg_dof_handler != 0, DoFAccessor::ExcInvalidObject()); // make sure a FE has been selected // and enough room was reserved - Assert (&dof_handler->get_fe() != 0, DoFAccessor::ExcInvalidObject()); - Assert (iget_fe().dofs_per_hex, + 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)); - return mg_dof_handler->mg_levels[present_level] - ->hex_dofs[present_index*dof_handler->get_fe().dofs_per_hex+i]; + return this->mg_dof_handler->mg_levels[this->present_level] + ->hex_dofs[this->present_index*this->dof_handler->get_fe().dofs_per_hex+i]; }; @@ -402,16 +402,16 @@ template void MGDoFObjectAccessor<3, dim>::set_mg_dof_index (const unsigned int i, const unsigned int index) const { - Assert (dof_handler != 0, DoFAccessor::ExcInvalidObject()); - Assert (mg_dof_handler != 0, DoFAccessor::ExcInvalidObject()); + Assert (this->dof_handler != 0, DoFAccessor::ExcInvalidObject()); + Assert (this->mg_dof_handler != 0, DoFAccessor::ExcInvalidObject()); // make sure a FE has been selected // and enough room was reserved - Assert (&dof_handler->get_fe() != 0, DoFAccessor::ExcInvalidObject()); - Assert (iget_fe().dofs_per_hex, + 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)); - mg_dof_handler->mg_levels[present_level] - ->hex_dofs[present_index*dof_handler->get_fe().dofs_per_hex+i] = index; + this->mg_dof_handler->mg_levels[this->present_level] + ->hex_dofs[this->present_index*this->dof_handler->get_fe().dofs_per_hex+i] = index; }; @@ -419,15 +419,15 @@ template unsigned int MGDoFObjectAccessor<3, dim>::mg_vertex_dof_index (const unsigned int vertex, const unsigned int i) const { - Assert (dof_handler != 0, DoFAccessor::ExcInvalidObject()); - Assert (mg_dof_handler != 0, DoFAccessor::ExcInvalidObject()); - Assert (&dof_handler->get_fe() != 0, DoFAccessor::ExcInvalidObject()); + Assert (this->dof_handler != 0, DoFAccessor::ExcInvalidObject()); + Assert (this->mg_dof_handler != 0, DoFAccessor::ExcInvalidObject()); + Assert (&this->dof_handler->get_fe() != 0, DoFAccessor::ExcInvalidObject()); Assert (vertex<8, ExcIndexRange (i,0,8)); - Assert (iget_fe().dofs_per_vertex, + Assert (idof_handler->get_fe().dofs_per_vertex, ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_vertex)); - return (mg_dof_handler->mg_vertex_dofs[vertex_index(vertex)] - .get_index (present_level, i, 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)); }; @@ -436,15 +436,15 @@ void MGDoFObjectAccessor<3, dim>::set_mg_vertex_dof_index (const unsigned int ve const unsigned int i, const unsigned int index) const { - Assert (dof_handler != 0, DoFAccessor::ExcInvalidObject()); - Assert (mg_dof_handler != 0, DoFAccessor::ExcInvalidObject()); - Assert (&dof_handler->get_fe() != 0, DoFAccessor::ExcInvalidObject()); + Assert (this->dof_handler != 0, DoFAccessor::ExcInvalidObject()); + Assert (this->mg_dof_handler != 0, DoFAccessor::ExcInvalidObject()); + Assert (&this->dof_handler->get_fe() != 0, DoFAccessor::ExcInvalidObject()); Assert (vertex<4, ExcIndexRange (i,0,4)); - Assert (iget_fe().dofs_per_vertex, + Assert (idof_handler->get_fe().dofs_per_vertex, ExcIndexRange (i, 0, dof_handler->get_fe().dofs_per_vertex)); - mg_dof_handler->mg_vertex_dofs[vertex_index(vertex)] - .set_index (present_level, i, dof_handler->get_fe().dofs_per_vertex, index); + 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); }; @@ -452,17 +452,17 @@ template void MGDoFObjectAccessor<3, dim>::get_mg_dof_indices (std::vector &dof_indices) const { - Assert (dof_handler != 0, DoFAccessor::ExcInvalidObject()); - Assert (mg_dof_handler != 0, DoFAccessor::ExcInvalidObject()); - Assert (&dof_handler->get_fe() != 0, DoFAccessor::ExcInvalidObject()); - Assert (dof_indices.size() == (8*dof_handler->get_fe().dofs_per_vertex + + Assert (this->dof_handler != 0, DoFAccessor::ExcInvalidObject()); + 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), DoFAccessor<3>::ExcVectorDoesNotMatch()); - const unsigned int dofs_per_vertex = dof_handler->get_fe().dofs_per_vertex, - dofs_per_line = dof_handler->get_fe().dofs_per_line, + 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; std::vector::iterator next = dof_indices.begin(); @@ -489,16 +489,16 @@ void MGDoFObjectAccessor<3,dim>::get_mg_dof_values (const Vector &values, Vector &dof_values) const { - Assert (dof_handler != 0, DoFAccessor<2>::ExcInvalidObject()); - Assert (mg_dof_handler != 0, DoFAccessor<2>::ExcInvalidObject()); - Assert (&dof_handler->get_fe() != 0, DoFAccessor<2>::ExcInvalidObject()); - Assert (dof_values.size() == dof_handler->get_fe().dofs_per_cell, + Assert (this->dof_handler != 0, DoFAccessor<2>::ExcInvalidObject()); + Assert (this->mg_dof_handler != 0, DoFAccessor<2>::ExcInvalidObject()); + Assert (&this->dof_handler->get_fe() != 0, DoFAccessor<2>::ExcInvalidObject()); + Assert (dof_values.size() == this->dof_handler->get_fe().dofs_per_cell, DoFAccessor<3>::ExcVectorDoesNotMatch()); - Assert (values.size() == mg_dof_handler->n_dofs(present_level), + Assert (values.size() == this->mg_dof_handler->n_dofs(this->present_level), DoFAccessor<3>::ExcVectorDoesNotMatch()); - const unsigned int dofs_per_vertex = dof_handler->get_fe().dofs_per_vertex, - dofs_per_line = dof_handler->get_fe().dofs_per_line, + 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; typename Vector::iterator next_dof_value=dof_values.begin(); @@ -512,7 +512,7 @@ MGDoFObjectAccessor<3,dim>::get_mg_dof_values (const Vector &values, for (unsigned int d=0; dquad(quad)->mg_dof_index(d)); for (unsigned int d=0; ddof_index(d)); Assert (next_dof_value == dof_values.end(), ExcInternalError()); @@ -526,10 +526,10 @@ MGDoFObjectAccessor<3, dim>::line (const unsigned int i) const { return TriaIterator > ( - tria, - present_level, - line_index (i), - mg_dof_handler + this->tria, + this->present_level, + this->line_index (i), + this->mg_dof_handler ); }; @@ -541,10 +541,10 @@ MGDoFObjectAccessor<3, dim>::quad (const unsigned int i) const { return TriaIterator > ( - tria, - present_level, - quad_index (i), - mg_dof_handler + this->tria, + this->present_level, + this->quad_index (i), + this->mg_dof_handler ); }; @@ -552,10 +552,10 @@ MGDoFObjectAccessor<3, dim>::quad (const unsigned int i) const { template TriaIterator > MGDoFObjectAccessor<3, dim>::child (const unsigned int i) const { - TriaIterator > q (tria, - present_level+1, - child_index (i), - mg_dof_handler); + TriaIterator > q (this->tria, + this->present_level+1, + this->child_index (i), + this->mg_dof_handler); #ifdef DEBUG if (q.state() != IteratorState::past_the_end) @@ -578,10 +578,10 @@ MGDoFObjectAccessor<3, dim>::copy_from (const MGDoFObjectAccessor<3, dim> &a) { template TriaIterator > MGDoFCellAccessor::neighbor (const unsigned int i) const { - TriaIterator > q (tria, - neighbor_level (i), - neighbor_index (i), - mg_dof_handler); + TriaIterator > q (this->tria, + this->neighbor_level (i), + this->neighbor_index (i), + this->mg_dof_handler); #ifdef DEBUG if (q.state() != IteratorState::past_the_end) @@ -594,10 +594,10 @@ MGDoFCellAccessor::neighbor (const unsigned int i) const { template TriaIterator > MGDoFCellAccessor::child (const unsigned int i) const { - TriaIterator > q (tria, - present_level+1, - child_index (i), - mg_dof_handler); + TriaIterator > q (this->tria, + this->present_level+1, + this->child_index (i), + this->mg_dof_handler); #ifdef DEBUG if (q.state() != IteratorState::past_the_end) @@ -626,7 +626,7 @@ template <> MGDoFCellAccessor<2>::face_iterator MGDoFCellAccessor<2>::face (const unsigned int i) const { - return line(i); + return this->line(i); }; #endif diff --git a/deal.II/deal.II/source/multigrid/mg_dof_handler.cc b/deal.II/deal.II/source/multigrid/mg_dof_handler.cc index 9756fb9e1b..649d2939e2 100644 --- a/deal.II/deal.II/source/multigrid/mg_dof_handler.cc +++ b/deal.II/deal.II/source/multigrid/mg_dof_handler.cc @@ -777,9 +777,9 @@ MGDoFHandler<3>::last_active_face (const unsigned int level) const { template typename MGDoFHandler::raw_line_iterator MGDoFHandler::begin_raw_line (const unsigned int level) const { - return raw_line_iterator (tria, - tria->begin_raw_line(level)->level(), - tria->begin_raw_line(level)->index(), + return raw_line_iterator (this->tria, + this->tria->begin_raw_line(level)->level(), + this->tria->begin_raw_line(level)->index(), this); }; @@ -787,9 +787,9 @@ MGDoFHandler::begin_raw_line (const unsigned int level) const { template typename MGDoFHandler::line_iterator MGDoFHandler::begin_line (const unsigned int level) const { - return line_iterator (tria, - tria->begin_line(level)->level(), - tria->begin_line(level)->index(), + return line_iterator (this->tria, + this->tria->begin_line(level)->level(), + this->tria->begin_line(level)->index(), this); }; @@ -797,9 +797,9 @@ MGDoFHandler::begin_line (const unsigned int level) const { template typename MGDoFHandler::active_line_iterator MGDoFHandler::begin_active_line (const unsigned int level) const { - return active_line_iterator (tria, - tria->begin_active_line(level)->level(), - tria->begin_active_line(level)->index(), + return active_line_iterator (this->tria, + this->tria->begin_active_line(level)->level(), + this->tria->begin_active_line(level)->index(), this); }; @@ -807,9 +807,9 @@ MGDoFHandler::begin_active_line (const unsigned int level) const { template typename MGDoFHandler::raw_quad_iterator MGDoFHandler::begin_raw_quad (const unsigned int level) const { - return raw_quad_iterator (tria, - tria->begin_raw_quad(level)->level(), - tria->begin_raw_quad(level)->index(), + return raw_quad_iterator (this->tria, + this->tria->begin_raw_quad(level)->level(), + this->tria->begin_raw_quad(level)->index(), this); }; @@ -817,9 +817,9 @@ MGDoFHandler::begin_raw_quad (const unsigned int level) const { template typename MGDoFHandler::quad_iterator MGDoFHandler::begin_quad (const unsigned int level) const { - return quad_iterator (tria, - tria->begin_quad(level)->level(), - tria->begin_quad(level)->index(), + return quad_iterator (this->tria, + this->tria->begin_quad(level)->level(), + this->tria->begin_quad(level)->index(), this); }; @@ -827,9 +827,9 @@ MGDoFHandler::begin_quad (const unsigned int level) const { template typename MGDoFHandler::active_quad_iterator MGDoFHandler::begin_active_quad (const unsigned int level) const { - return active_quad_iterator (tria, - tria->begin_active_quad(level)->level(), - tria->begin_active_quad(level)->index(), + return active_quad_iterator (this->tria, + this->tria->begin_active_quad(level)->level(), + this->tria->begin_active_quad(level)->index(), this); }; @@ -837,9 +837,9 @@ MGDoFHandler::begin_active_quad (const unsigned int level) const { template typename MGDoFHandler::raw_hex_iterator MGDoFHandler::begin_raw_hex (const unsigned int level) const { - return raw_hex_iterator (tria, - tria->begin_raw_hex(level)->level(), - tria->begin_raw_hex(level)->index(), + return raw_hex_iterator (this->tria, + this->tria->begin_raw_hex(level)->level(), + this->tria->begin_raw_hex(level)->index(), this); }; @@ -847,9 +847,9 @@ MGDoFHandler::begin_raw_hex (const unsigned int level) const { template typename MGDoFHandler::hex_iterator MGDoFHandler::begin_hex (const unsigned int level) const { - return hex_iterator (tria, - tria->begin_hex(level)->level(), - tria->begin_hex(level)->index(), + return hex_iterator (this->tria, + this->tria->begin_hex(level)->level(), + this->tria->begin_hex(level)->index(), this); }; @@ -857,9 +857,9 @@ MGDoFHandler::begin_hex (const unsigned int level) const { template typename MGDoFHandler::active_hex_iterator MGDoFHandler::begin_active_hex (const unsigned int level) const { - return active_hex_iterator (tria, - tria->begin_active_hex(level)->level(), - tria->begin_active_hex(level)->index(), + return active_hex_iterator (this->tria, + this->tria->begin_active_hex(level)->level(), + this->tria->begin_active_hex(level)->index(), this); }; @@ -867,21 +867,21 @@ MGDoFHandler::begin_active_hex (const unsigned int level) const { template typename MGDoFHandler::raw_line_iterator MGDoFHandler::end_line () const { - return raw_line_iterator (tria, -1, -1, this); + return raw_line_iterator (this->tria, -1, -1, this); }; template typename MGDoFHandler::raw_quad_iterator MGDoFHandler::end_quad () const { - return raw_quad_iterator (tria, -1, -1, this); + return raw_quad_iterator (this->tria, -1, -1, this); }; template typename MGDoFHandler::raw_hex_iterator MGDoFHandler::end_hex () const { - return raw_hex_iterator (tria, -1, -1, this); + return raw_hex_iterator (this->tria, -1, -1, this); }; @@ -1023,9 +1023,9 @@ MGDoFHandler::end_active_hex (const unsigned int level) const { template typename MGDoFHandler::raw_line_iterator MGDoFHandler::last_raw_line (const unsigned int level) const { - return raw_line_iterator (tria, - tria->last_raw_line(level)->level(), - tria->last_raw_line(level)->index(), + return raw_line_iterator (this->tria, + this->tria->last_raw_line(level)->level(), + this->tria->last_raw_line(level)->index(), this); }; @@ -1033,9 +1033,9 @@ MGDoFHandler::last_raw_line (const unsigned int level) const { template typename MGDoFHandler::line_iterator MGDoFHandler::last_line (const unsigned int level) const { - return line_iterator (tria, - tria->last_line(level)->level(), - tria->last_line(level)->index(), + return line_iterator (this->tria, + this->tria->last_line(level)->level(), + this->tria->last_line(level)->index(), this); }; @@ -1043,9 +1043,9 @@ MGDoFHandler::last_line (const unsigned int level) const { template typename MGDoFHandler::active_line_iterator MGDoFHandler::last_active_line (const unsigned int level) const { - return active_line_iterator (tria, - tria->last_active_line(level)->level(), - tria->last_active_line(level)->index(), + return active_line_iterator (this->tria, + this->tria->last_active_line(level)->level(), + this->tria->last_active_line(level)->index(), this); }; @@ -1053,9 +1053,9 @@ MGDoFHandler::last_active_line (const unsigned int level) const { template typename MGDoFHandler::raw_quad_iterator MGDoFHandler::last_raw_quad (const unsigned int level) const { - return raw_quad_iterator (tria, - tria->last_raw_quad(level)->level(), - tria->last_raw_quad(level)->index(), + return raw_quad_iterator (this->tria, + this->tria->last_raw_quad(level)->level(), + this->tria->last_raw_quad(level)->index(), this); }; @@ -1063,9 +1063,9 @@ MGDoFHandler::last_raw_quad (const unsigned int level) const { template typename MGDoFHandler::quad_iterator MGDoFHandler::last_quad (const unsigned int level) const { - return quad_iterator (tria, - tria->last_quad(level)->level(), - tria->last_quad(level)->index(), + return quad_iterator (this->tria, + this->tria->last_quad(level)->level(), + this->tria->last_quad(level)->index(), this); }; @@ -1073,9 +1073,9 @@ MGDoFHandler::last_quad (const unsigned int level) const { template typename MGDoFHandler::active_quad_iterator MGDoFHandler::last_active_quad (const unsigned int level) const { - return active_quad_iterator (tria, - tria->last_active_quad(level)->level(), - tria->last_active_quad(level)->index(), + return active_quad_iterator (this->tria, + this->tria->last_active_quad(level)->level(), + this->tria->last_active_quad(level)->index(), this); }; @@ -1083,9 +1083,9 @@ MGDoFHandler::last_active_quad (const unsigned int level) const { template typename MGDoFHandler::raw_hex_iterator MGDoFHandler::last_raw_hex (const unsigned int level) const { - return raw_hex_iterator (tria, - tria->last_raw_hex(level)->level(), - tria->last_raw_hex(level)->index(), + return raw_hex_iterator (this->tria, + this->tria->last_raw_hex(level)->level(), + this->tria->last_raw_hex(level)->index(), this); }; @@ -1093,9 +1093,9 @@ MGDoFHandler::last_raw_hex (const unsigned int level) const { template typename MGDoFHandler::hex_iterator MGDoFHandler::last_hex (const unsigned int level) const { - return hex_iterator (tria, - tria->last_hex(level)->level(), - tria->last_hex(level)->index(), + return hex_iterator (this->tria, + this->tria->last_hex(level)->level(), + this->tria->last_hex(level)->index(), this); }; @@ -1103,9 +1103,9 @@ MGDoFHandler::last_hex (const unsigned int level) const { template typename MGDoFHandler::active_hex_iterator MGDoFHandler::last_active_hex (const unsigned int level) const { - return active_hex_iterator (tria, - tria->last_active_hex(level)->level(), - tria->last_active_hex(level)->index(), + return active_hex_iterator (this->tria, + this->tria->last_active_hex(level)->level(), + this->tria->last_active_hex(level)->index(), this); }; @@ -1186,15 +1186,15 @@ void MGDoFHandler::distribute_dofs (const FiniteElement &fe, // reserve space for the MG dof numbers reserve_space (); - mg_used_dofs.resize (tria->n_levels(), 0); + mg_used_dofs.resize (this->tria->n_levels(), 0); // clear user flags because we will // need them - tria->clear_user_flags (); + this->tria->clear_user_flags (); // now distribute indices on each level // separately - for (unsigned int level=0; leveln_levels(); ++level) + for (unsigned int level=0; leveltria->n_levels(); ++level) { unsigned int next_free_dof = offset; cell_iterator cell = begin(level), @@ -1269,18 +1269,18 @@ template <> unsigned int MGDoFHandler<2>::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<2>::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 four sides - if (selected_fe->dofs_per_line > 0) + if (this->selected_fe->dofs_per_line > 0) for (unsigned int side=0; side::faces_per_cell; ++side) { line_iterator line = cell->line(side); @@ -1290,13 +1290,13 @@ MGDoFHandler<2>::distribute_dofs_on_cell (cell_iterator &cell, // numbered (check only first dof) if (line->mg_dof_index(0) == DoFHandler<2>::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++); }; // dofs of quad - if (selected_fe->dofs_per_quad > 0) + if (this->selected_fe->dofs_per_quad > 0) for (unsigned int d=0; ddofs_per_quad; ++d) cell->set_mg_dof_index (d, next_free_dof++); @@ -1442,10 +1442,10 @@ void MGDoFHandler<2>::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) @@ -1587,8 +1587,8 @@ template <> void MGDoFHandler<2>::reserve_space () { const unsigned int dim = 2; - Assert (selected_fe != 0, DoFHandler::ExcNoFESelected()); - Assert (tria->n_levels() > 0, DoFHandler<2>::ExcInvalidTriangulation()); + Assert (this->selected_fe != 0, DoFHandler::ExcNoFESelected()); + Assert (this->tria->n_levels() > 0, DoFHandler<2>::ExcInvalidTriangulation()); //////////////////////////// // DESTRUCTION @@ -1599,15 +1599,15 @@ void MGDoFHandler<2>::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<2>); - 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<2>::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<2>::invalid_dof_index); }; @@ -1624,9 +1624,9 @@ void MGDoFHandler<2>::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 min_level (this->tria->vertices.size(), tria->n_levels()); std::vector max_level (tria->vertices.size(), 0); Triangulation::cell_iterator cell = tria->begin(), @@ -1652,7 +1652,7 @@ void MGDoFHandler<2>::reserve_space () { 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 69ae8c3c36..e821f1f039 100644 --- a/deal.II/deal.II/source/numerics/data_out.cc +++ b/deal.II/deal.II/source/numerics/data_out.cc @@ -346,17 +346,17 @@ void DataOut::build_some_patches (Data data) // we don't support anything else // as well static const MappingQ1 mapping; - FEValues fe_patch_values (mapping, dofs->get_fe(), + FEValues fe_patch_values (mapping, this->dofs->get_fe(), patch_points, update_values); const unsigned int n_q_points = patch_points.n_quadrature_points; unsigned int cell_number = 0; - typename std::vector >::iterator patch = patches.begin(); + typename std::vector >::iterator patch = this->patches.begin(); typename DoFHandler::cell_iterator cell=first_cell(); // get first cell in this thread - for (unsigned int i=0; (iend()); ++i) + for (unsigned int i=0; (idofs->end()); ++i) { ++patch; ++cell_number; @@ -365,9 +365,9 @@ void DataOut::build_some_patches (Data data) // now loop over all cells and // actually create the patches - for (;cell != dofs->end();) + for (;cell != this->dofs->end();) { - Assert (patch != patches.end(), ExcInternalError()); + Assert (patch != this->patches.end(), ExcInternalError()); // Insert cell-patch pair into // map for neighbors @@ -381,15 +381,15 @@ void DataOut::build_some_patches (Data data) fe_patch_values.reinit (cell); // first fill dof_data - for (unsigned int dataset=0; datasetdof_data.size(); ++dataset) { if (data.n_components == 1) { - if (dof_data[dataset].has_block) - fe_patch_values.get_function_values (*dof_data[dataset].block_data, + if (this->dof_data[dataset].has_block) + fe_patch_values.get_function_values (*this->dof_data[dataset].block_data, data.patch_values); else - fe_patch_values.get_function_values (*dof_data[dataset].single_data, + fe_patch_values.get_function_values (*this->dof_data[dataset].single_data, data.patch_values); for (unsigned int q=0; q::build_some_patches (Data data) else // system of components { - if (dof_data[dataset].has_block) - fe_patch_values.get_function_values (*dof_data[dataset].block_data, + if (this->dof_data[dataset].has_block) + fe_patch_values.get_function_values (*this->dof_data[dataset].block_data, data.patch_values_system); else - fe_patch_values.get_function_values (*dof_data[dataset].single_data, + fe_patch_values.get_function_values (*this->dof_data[dataset].single_data, data.patch_values_system); for (unsigned int component=0; component::build_some_patches (Data data) }; // then do the cell data - for (unsigned int dataset=0; datasetcell_data.size(); ++dataset) { - if (cell_data[dataset].has_block) + if (this->cell_data[dataset].has_block) { - const double value = (*cell_data[dataset].block_data)(cell_number); + const double value = (*this->cell_data[dataset].block_data)(cell_number); for (unsigned int q=0; qdata(dataset+dof_data.size()*data.n_components,q) = + patch->data(dataset+this->dof_data.size()*data.n_components,q) = value; } else { - const double value = (*cell_data[dataset].single_data)(cell_number); + const double value = (*this->cell_data[dataset].single_data)(cell_number); for (unsigned int q=0; qdata(dataset+dof_data.size()*data.n_components,q) = + patch->data(dataset+this->dof_data.size()*data.n_components,q) = value; } }; }; // next cell (patch) in this thread for (unsigned int i=0; - (iend()); ++i) + (idofs->end()); ++i) { ++patch; ++cell_number; @@ -450,7 +450,7 @@ void DataOut::build_patches (const unsigned int n_subdivisions, ExcInvalidNumberOfSubdivisions(n_subdivisions)); typedef DataOut_DoFData BaseClass; - Assert (dofs != 0, typename BaseClass::ExcNoDoFHandlerSelected()); + Assert (this->dofs != 0, typename BaseClass::ExcNoDoFHandlerSelected()); #ifdef DEAL_II_USE_MT const unsigned int n_threads = n_threads_; @@ -471,15 +471,15 @@ void DataOut::build_patches (const unsigned int n_subdivisions, QIterated patch_points (q_trapez, n_subdivisions); const unsigned int n_q_points = patch_points.n_quadrature_points; - const unsigned int n_components = dofs->get_fe().n_components(); - const unsigned int n_datasets = dof_data.size() * n_components + - cell_data.size(); + const unsigned int n_components = this->dofs->get_fe().n_components(); + const unsigned int n_datasets = this->dof_data.size() * n_components + + this->cell_data.size(); // clear the patches array if (true) { typename std::vector > dummy; - patches.swap (dummy); + this->patches.swap (dummy); }; // first count the cells we want to @@ -487,7 +487,7 @@ void DataOut::build_patches (const unsigned int n_subdivisions, // there is enough memory for that unsigned int n_patches = 0; for (typename DoFHandler::cell_iterator cell=first_cell(); - cell != dofs->end(); + cell != this->dofs->end(); cell = next_cell(cell)) ++n_patches; @@ -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); - patches.insert (patches.end(), n_patches, default_patch); + this->patches.insert (patches.end(), n_patches, default_patch); #ifdef DEAL_II_USE_MT @@ -624,7 +624,7 @@ template typename DoFHandler::cell_iterator DataOut::first_cell () { - return dofs->begin_active (); + return this->dofs->begin_active (); }; 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 b390163115..def79752d2 100644 --- a/deal.II/deal.II/source/numerics/data_out_faces.cc +++ b/deal.II/deal.II/source/numerics/data_out_faces.cc @@ -43,17 +43,17 @@ void DataOutFaces::build_some_patches (Data data) // we don't support anything else // as well static const MappingQ1 mapping; - FEFaceValues fe_patch_values (mapping, dofs->get_fe(), + FEFaceValues fe_patch_values (mapping, this->dofs->get_fe(), patch_points, update_values); const unsigned int n_q_points = patch_points.n_quadrature_points; unsigned int face_number = 0; - typename std::vector >::iterator patch = patches.begin(); + typename std::vector >::iterator patch = this->patches.begin(); FaceDescriptor face=first_face(); // get first face in this thread - for (unsigned int i=0; (iend()); ++i) + for (unsigned int i=0; (idofs->end()); ++i) { ++patch; ++face_number; @@ -62,9 +62,9 @@ void DataOutFaces::build_some_patches (Data data) // now loop over all cells and // actually create the patches - for (; face.first != dofs->end();) + for (; face.first != this->dofs->end();) { - Assert (patch != patches.end(), ExcInternalError()); + Assert (patch != this->patches.end(), ExcInternalError()); for (unsigned int vertex=0; vertex::vertices_per_cell; ++vertex) patch->vertices[vertex] = face.first->face(face.second)->vertex(vertex); @@ -74,15 +74,15 @@ void DataOutFaces::build_some_patches (Data data) fe_patch_values.reinit (face.first, face.second); // first fill dof_data - for (unsigned int dataset=0; datasetdof_data.size(); ++dataset) { if (data.n_components == 1) { - if (dof_data[dataset].has_block) - fe_patch_values.get_function_values (*dof_data[dataset].block_data, + if (this->dof_data[dataset].has_block) + fe_patch_values.get_function_values (*this->dof_data[dataset].block_data, data.patch_values); else - fe_patch_values.get_function_values (*dof_data[dataset].single_data, + fe_patch_values.get_function_values (*this->dof_data[dataset].single_data, data.patch_values); for (unsigned int q=0; q::build_some_patches (Data data) else // system of components { - if (dof_data[dataset].has_block) - fe_patch_values.get_function_values (*dof_data[dataset].block_data, + if (this->dof_data[dataset].has_block) + fe_patch_values.get_function_values (*this->dof_data[dataset].block_data, data.patch_values_system); else - fe_patch_values.get_function_values (*dof_data[dataset].single_data, + fe_patch_values.get_function_values (*this->dof_data[dataset].single_data, data.patch_values_system); for (unsigned int component=0; component::build_some_patches (Data data) }; // then do the cell data - for (unsigned int dataset=0; datasetcell_data.size(); ++dataset) { - if (cell_data[dataset].has_block) + if (this->cell_data[dataset].has_block) { - const double value = (*cell_data[dataset].block_data)(face_number); + const double value = (*this->cell_data[dataset].block_data)(face_number); for (unsigned int q=0; qdata(dataset+dof_data.size()*data.n_components,q) = + patch->data(dataset+this->dof_data.size()*data.n_components,q) = value; } else { - const double value = (*cell_data[dataset].single_data)(face_number); + const double value = (*this->cell_data[dataset].single_data)(face_number); for (unsigned int q=0; qdata(dataset+dof_data.size()*data.n_components,q) = + patch->data(dataset+this->dof_data.size()*data.n_components,q) = value; } }; }; // next cell (patch) in this thread for (unsigned int i=0; - (iend()); ++i) + (idofs->end()); ++i) { ++patch; ++face_number; @@ -145,7 +145,7 @@ void DataOutFaces::build_patches (const unsigned int n_subdivisions, ExcInvalidNumberOfSubdivisions(n_subdivisions)); typedef DataOut_DoFData BaseClass; - Assert (dofs != 0, typename BaseClass::ExcNoDoFHandlerSelected()); + Assert (this->dofs != 0, typename BaseClass::ExcNoDoFHandlerSelected()); #ifdef DEAL_II_USE_MT const unsigned int n_threads = n_threads_; @@ -166,15 +166,15 @@ void DataOutFaces::build_patches (const unsigned int n_subdivisions, QIterated patch_points (q_trapez, n_subdivisions); const unsigned int n_q_points = patch_points.n_quadrature_points; - const unsigned int n_components = dofs->get_fe().n_components(); - const unsigned int n_datasets = dof_data.size() * n_components + - cell_data.size(); + const unsigned int n_components = this->dofs->get_fe().n_components(); + const unsigned int n_datasets = this->dof_data.size() * n_components + + this->cell_data.size(); // clear the patches array if (true) { std::vector > dummy; - patches.swap (dummy); + this->patches.swap (dummy); }; // first count the cells we want to @@ -182,7 +182,7 @@ void DataOutFaces::build_patches (const unsigned int n_subdivisions, // there is enough memory for that unsigned int n_patches = 0; for (FaceDescriptor face=first_face(); - face.first != dofs->end(); + face.first != this->dofs->end(); face = next_face(face)) ++n_patches; @@ -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); - patches.insert (patches.end(), n_patches, default_patch); + this->patches.insert (patches.end(), n_patches, default_patch); #ifdef DEAL_II_USE_MT @@ -235,8 +235,8 @@ DataOutFaces::first_face () { // simply find first active cell // with a face on the boundary - typename DoFHandler::active_cell_iterator cell = dofs->begin_active(); - for (; cell != dofs->end(); ++cell) + typename DoFHandler::active_cell_iterator cell = this->dofs->begin_active(); + for (; cell != this->dofs->end(); ++cell) for (unsigned int f=0; f::faces_per_cell; ++f) if (cell->face(f)->at_boundary()) return FaceDescriptor(cell, f); @@ -280,7 +280,7 @@ DataOutFaces::next_face (const FaceDescriptor &old_face) ++active_cell; // while there are active cells - while (active_cell != dofs->end()) + while (active_cell != this->dofs->end()) { // check all the faces of this // active cell @@ -299,7 +299,7 @@ DataOutFaces::next_face (const FaceDescriptor &old_face) // we fell off the edge, so return // with invalid pointer - face.first = dofs->end(); + face.first = this->dofs->end(); face.second = 0; return face; }; 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 699e40240a..af25b60100 100644 --- a/deal.II/deal.II/source/numerics/data_out_rotation.cc +++ b/deal.II/deal.II/source/numerics/data_out_rotation.cc @@ -48,7 +48,7 @@ void DataOutRotation::build_some_patches (Data data) // we don't support anything else // as well static const MappingQ1 mapping; - FEValues fe_patch_values (mapping, dofs->get_fe(), + FEValues fe_patch_values (mapping, this->dofs->get_fe(), patch_points, update_values); const unsigned int n_patches_per_circle = data.n_patches_per_circle; @@ -78,11 +78,11 @@ void DataOutRotation::build_some_patches (Data data) unsigned int cell_number = 0; - typename std::vector >::iterator patch = patches.begin(); + typename std::vector >::iterator patch = this->patches.begin(); typename DoFHandler::cell_iterator cell=first_cell(); // get first cell in this thread - for (unsigned int i=0; (iend()); ++i) + for (unsigned int i=0; (idofs->end()); ++i) { std::advance (patch, n_patches_per_circle); ++cell_number; @@ -91,11 +91,11 @@ void DataOutRotation::build_some_patches (Data data) // now loop over all cells and // actually create the patches - for (; cell != dofs->end(); ) + for (; cell != this->dofs->end(); ) { for (unsigned int angle=0; anglepatches.end(), ExcInternalError()); // first compute the @@ -161,15 +161,15 @@ void DataOutRotation::build_some_patches (Data data) fe_patch_values.reinit (cell); // first fill dof_data - for (unsigned int dataset=0; datasetdof_data.size(); ++dataset) { if (data.n_components == 1) { - if (dof_data[dataset].has_block) - fe_patch_values.get_function_values (*dof_data[dataset].block_data, + if (this->dof_data[dataset].has_block) + fe_patch_values.get_function_values (*this->dof_data[dataset].block_data, data.patch_values); else - fe_patch_values.get_function_values (*dof_data[dataset].single_data, + fe_patch_values.get_function_values (*this->dof_data[dataset].single_data, data.patch_values); switch (dim) @@ -200,11 +200,11 @@ void DataOutRotation::build_some_patches (Data data) else // system of components { - if (dof_data[dataset].has_block) - fe_patch_values.get_function_values (*dof_data[dataset].block_data, + if (this->dof_data[dataset].has_block) + fe_patch_values.get_function_values (*this->dof_data[dataset].block_data, data.patch_values_system); else - fe_patch_values.get_function_values (*dof_data[dataset].single_data, + fe_patch_values.get_function_values (*this->dof_data[dataset].single_data, data.patch_values_system); for (unsigned int component=0; component::build_some_patches (Data data) }; // then do the cell data - for (unsigned int dataset=0; datasetcell_data.size(); ++dataset) { - const double value = cell_data[dataset].has_block ? - (*cell_data[dataset].block_data)(cell_number) : + const double value = this->cell_data[dataset].has_block ? + (*this->cell_data[dataset].block_data)(cell_number) : (*cell_data[dataset].single_data)(cell_number); switch (dim) { case 1: for (unsigned int x=0; xdata(dataset+dof_data.size()*data.n_components, + patch->data(dataset+this->dof_data.size()*data.n_components, x*n_points + y) = value; @@ -259,7 +259,7 @@ void DataOutRotation::build_some_patches (Data data) for (unsigned int x=0; xdata(dataset+dof_data.size()*data.n_components, + patch->data(dataset+this->dof_data.size()*data.n_components, x*n_points*n_points + y*n_points + z) @@ -282,13 +282,13 @@ void DataOutRotation::build_some_patches (Data data) // threads, not the ones // belonging to this thread. const int skip_threads = static_cast(data.n_threads)-1; - for (int i=0; (iend()); ++i) + for (int i=0; (idofs->end()); ++i) std::advance (patch, n_patches_per_circle); // however, cell and cell // number have not yet been // increased - for (unsigned int i=0; (iend()); ++i) + for (unsigned int i=0; (idofs->end()); ++i) { ++cell_number; cell=next_cell(cell); @@ -323,7 +323,7 @@ void DataOutRotation::build_patches (const unsigned int n_patches_per_circl ExcInvalidNumberOfSubdivisions(n_subdivisions)); typedef DataOut_DoFData BaseClass; - Assert (dofs != 0, typename BaseClass::ExcNoDoFHandlerSelected()); + Assert (this->dofs != 0, typename BaseClass::ExcNoDoFHandlerSelected()); #ifdef DEAL_II_USE_MT const unsigned int n_threads = n_threads_; @@ -344,15 +344,15 @@ void DataOutRotation::build_patches (const unsigned int n_patches_per_circl QIterated patch_points (q_trapez, n_subdivisions); const unsigned int n_q_points = patch_points.n_quadrature_points; - const unsigned int n_components = dofs->get_fe().n_components(); - const unsigned int n_datasets = dof_data.size() * n_components + - cell_data.size(); + const unsigned int n_components = this->dofs->get_fe().n_components(); + const unsigned int n_datasets = this->dof_data.size() * n_components + + this->cell_data.size(); // clear the patches array if (true) { std::vector > dummy; - patches.swap (dummy); + this->patches.swap (dummy); }; // first count the cells we want to @@ -360,7 +360,7 @@ void DataOutRotation::build_patches (const unsigned int n_patches_per_circl // there is enough memory for that unsigned int n_patches = 0; for (typename DoFHandler::cell_iterator cell=first_cell(); - cell != dofs->end(); + cell != this->dofs->end(); cell = next_cell(cell)) ++n_patches; // then also take into account that @@ -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)); - patches.insert (patches.end(), n_patches, default_patch); + this->patches.insert (patches.end(), n_patches, default_patch); #ifdef DEAL_II_USE_MT @@ -418,7 +418,7 @@ template typename DoFHandler::cell_iterator DataOutRotation::first_cell () { - return dofs->begin_active (); + return this->dofs->begin_active (); }; diff --git a/deal.II/lac/include/lac/solver_cg.h b/deal.II/lac/include/lac/solver_cg.h index dd48289f34..d712f34a4e 100644 --- a/deal.II/lac/include/lac/solver_cg.h +++ b/deal.II/lac/include/lac/solver_cg.h @@ -205,9 +205,9 @@ SolverCG::solve (const MATRIX &A, // Memory allocation Vr = this->memory.alloc(); - Vp = memory.alloc(); - Vz = memory.alloc(); - VAp = memory.alloc(); + Vp = this->memory.alloc(); + Vz = this->memory.alloc(); + VAp = this->memory.alloc(); // define some aliases for simpler access VECTOR& g = *Vr; VECTOR& h = *Vp;