From: wolf Date: Fri, 19 Nov 1999 16:25:19 +0000 (+0000) Subject: Finally start with renaming total_dofs to dofs_per_cell. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c652c51c805e418eedd05c7474e512940801f67f;p=dealii-svn.git Finally start with renaming total_dofs to dofs_per_cell. git-svn-id: https://svn.dealii.org/trunk@1908 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/source/dofs/dof_renumbering.cc b/deal.II/deal.II/source/dofs/dof_renumbering.cc index da1eb6f145..f7ffda9a55 100644 --- a/deal.II/deal.II/source/dofs/dof_renumbering.cc +++ b/deal.II/deal.II/source/dofs/dof_renumbering.cc @@ -370,7 +370,7 @@ template void DoFRenumbering::component_wise (DoFHandler &dof_handler, const vector &component_order_arg) { - const unsigned int total_dofs = dof_handler.get_fe().total_dofs; + const unsigned int dofs_per_cell = dof_handler.get_fe().total_dofs; // do nothing if the FE has only // one component @@ -394,10 +394,10 @@ void DoFRenumbering::component_wise (DoFHandler &dof_handler, // vector to hold the dof indices on // the cell we visit at a time - vector local_dof_indices(total_dofs); + vector local_dof_indices(dofs_per_cell); // prebuilt list to which component // a given dof on a cell belongs - vector component_list (total_dofs); + vector component_list (dofs_per_cell); for (unsigned int i=0; i &dof_handler, // and insert them into the global // list using their component cell->get_dof_indices (local_dof_indices); - for (unsigned int i=0; i::create_mass_matrix (const DoFHandler &dof, SparseMatrix &matrix) { const FiniteElement &fe = dof.get_fe(); - const unsigned int total_dofs = fe.total_dofs; + const unsigned int dofs_per_cell = fe.total_dofs; - FullMatrix local_mass_matrix (total_dofs, total_dofs); - vector dofs_on_this_cell (total_dofs); + FullMatrix local_mass_matrix (dofs_per_cell, dofs_per_cell); + vector dofs_on_this_cell (dofs_per_cell); DoFHandler::active_cell_iterator cell = dof.begin_active(), endc = dof.end(); @@ -93,8 +93,8 @@ void MatrixCreator::create_mass_matrix (const DoFHandler &dof, cell->get_dof_indices (dofs_on_this_cell); fe.get_local_mass_matrix (cell, local_mass_matrix); - for (unsigned int i=0; i void MassMatrix::assemble (FullMatrix &cell_matrix, const FEValues &fe_values, const typename DoFHandler::cell_iterator &) const { - const unsigned int total_dofs = fe_values.total_dofs, - n_q_points = fe_values.n_quadrature_points; + const unsigned int dofs_per_cell = fe_values.total_dofs, + n_q_points = fe_values.n_quadrature_points; const FiniteElement &fe = fe_values.get_fe(); const unsigned int n_components = fe.n_components; - Assert (cell_matrix.n() == total_dofs, - Equation::ExcWrongSize(cell_matrix.n(), total_dofs)); - Assert (cell_matrix.m() == total_dofs, - Equation::ExcWrongSize(cell_matrix.m(), total_dofs)); + Assert (cell_matrix.n() == dofs_per_cell, + Equation::ExcWrongSize(cell_matrix.n(), dofs_per_cell)); + Assert (cell_matrix.m() == dofs_per_cell, + Equation::ExcWrongSize(cell_matrix.m(), dofs_per_cell)); Assert (cell_matrix.all_zero(), Equation::ExcObjectNotEmpty()); @@ -669,8 +669,8 @@ void MassMatrix::assemble (FullMatrix &cell_matrix, vector coefficient_values (fe_values.n_quadrature_points); coefficient->value_list (fe_values.get_quadrature_points(), coefficient_values); - for (unsigned int i=0; i::assemble (FullMatrix &cell_matrix, Vector(n_components)); coefficient->vector_value_list (fe_values.get_quadrature_points(), coefficient_values); - for (unsigned int i=0; i::assemble (FullMatrix &cell_matrix, } else // no coefficient given - for (unsigned int i=0; i::assemble (FullMatrix &cell_matrix, const DoFHandler::cell_iterator &) const { Assert (right_hand_side != 0, ExcNoRHSSelected()); - const unsigned int total_dofs = fe_values.total_dofs, - n_q_points = fe_values.n_quadrature_points; + const unsigned int dofs_per_cell = fe_values.total_dofs, + n_q_points = fe_values.n_quadrature_points; const FiniteElement &fe = fe_values.get_fe(); const unsigned int n_components = fe.n_components; @@ -742,12 +742,12 @@ void MassMatrix::assemble (FullMatrix &cell_matrix, // implemented at present Assert (n_components==1, ExcNotImplemented()); - Assert (cell_matrix.n() == total_dofs, - Equation::ExcWrongSize(cell_matrix.n(), total_dofs)); - Assert (cell_matrix.m() == total_dofs, - Equation::ExcWrongSize(cell_matrix.m(), total_dofs)); - Assert (rhs.size() == total_dofs, - Equation::ExcWrongSize(rhs.size(), total_dofs)); + Assert (cell_matrix.n() == dofs_per_cell, + Equation::ExcWrongSize(cell_matrix.n(), dofs_per_cell)); + Assert (cell_matrix.m() == dofs_per_cell, + Equation::ExcWrongSize(cell_matrix.m(), dofs_per_cell)); + Assert (rhs.size() == dofs_per_cell, + Equation::ExcWrongSize(rhs.size(), dofs_per_cell)); Assert (cell_matrix.all_zero(), Equation::ExcObjectNotEmpty()); Assert (rhs.all_zero(), @@ -764,9 +764,9 @@ void MassMatrix::assemble (FullMatrix &cell_matrix, coefficient->value_list (fe_values.get_quadrature_points(), coefficient_values); for (unsigned int point=0; point::assemble (FullMatrix &cell_matrix, } else for (unsigned int point=0; point::assemble (Vector &rhs, const DoFHandler::cell_iterator &) const { Assert (right_hand_side != 0, ExcNoRHSSelected()); - const unsigned int total_dofs = fe_values.total_dofs, - n_q_points = fe_values.n_quadrature_points; + const unsigned int dofs_per_cell = fe_values.total_dofs, + n_q_points = fe_values.n_quadrature_points; const FiniteElement &fe = fe_values.get_fe(); const unsigned int n_components = fe.n_components; @@ -807,8 +807,8 @@ void MassMatrix::assemble (Vector &rhs, // implemented at present Assert (n_components==1, ExcNotImplemented()); - Assert (rhs.size() == total_dofs, - Equation::ExcWrongSize(rhs.size(), total_dofs)); + Assert (rhs.size() == dofs_per_cell, + Equation::ExcWrongSize(rhs.size(), dofs_per_cell)); Assert (rhs.all_zero(), Equation::ExcObjectNotEmpty()); @@ -818,7 +818,7 @@ void MassMatrix::assemble (Vector &rhs, right_hand_side->value_list (fe_values.get_quadrature_points(), rhs_values); for (unsigned int point=0; point::assemble (FullMatrix &cell_matrix, const DoFHandler::cell_iterator &) const { Assert (right_hand_side != 0, ExcNoRHSSelected()); - const unsigned int total_dofs = fe_values.total_dofs, - n_q_points = fe_values.n_quadrature_points; + const unsigned int dofs_per_cell = fe_values.total_dofs, + n_q_points = fe_values.n_quadrature_points; const FiniteElement &fe = fe_values.get_fe(); const unsigned int n_components = fe.n_components; @@ -853,12 +853,12 @@ void LaplaceMatrix::assemble (FullMatrix &cell_matrix, // at present Assert (n_components==1, ExcNotImplemented()); - Assert (cell_matrix.n() == total_dofs, - Equation::ExcWrongSize(cell_matrix.n(), total_dofs)); - Assert (cell_matrix.m() == total_dofs, - Equation::ExcWrongSize(cell_matrix.m(), total_dofs)); - Assert (rhs.size() == total_dofs, - Equation::ExcWrongSize(rhs.size(), total_dofs)); + Assert (cell_matrix.n() == dofs_per_cell, + Equation::ExcWrongSize(cell_matrix.n(), dofs_per_cell)); + Assert (cell_matrix.m() == dofs_per_cell, + Equation::ExcWrongSize(cell_matrix.m(), dofs_per_cell)); + Assert (rhs.size() == dofs_per_cell, + Equation::ExcWrongSize(rhs.size(), dofs_per_cell)); Assert (cell_matrix.all_zero(), Equation::ExcObjectNotEmpty()); Assert (rhs.all_zero(), @@ -876,9 +876,9 @@ void LaplaceMatrix::assemble (FullMatrix &cell_matrix, coefficient->value_list (fe_values.get_quadrature_points(), coefficient_values); for (unsigned int point=0; point::assemble (FullMatrix &cell_matrix, } else for (unsigned int point=0; point void LaplaceMatrix::assemble (FullMatrix &cell_matrix, const FEValues &fe_values, const DoFHandler::cell_iterator &) const { - const unsigned int total_dofs = fe_values.total_dofs, - n_q_points = fe_values.n_quadrature_points; + const unsigned int dofs_per_cell = fe_values.total_dofs, + n_q_points = fe_values.n_quadrature_points; const FiniteElement &fe = fe_values.get_fe(); const unsigned int n_components = fe.n_components; @@ -920,10 +920,10 @@ void LaplaceMatrix::assemble (FullMatrix &cell_matrix, // at present Assert ((n_components==1) || (coefficient==0), ExcNotImplemented()); - Assert (cell_matrix.n() == total_dofs, - Equation::ExcWrongSize(cell_matrix.n(), total_dofs)); - Assert (cell_matrix.m() == total_dofs, - Equation::ExcWrongSize(cell_matrix.m(), total_dofs)); + Assert (cell_matrix.n() == dofs_per_cell, + Equation::ExcWrongSize(cell_matrix.n(), dofs_per_cell)); + Assert (cell_matrix.m() == dofs_per_cell, + Equation::ExcWrongSize(cell_matrix.m(), dofs_per_cell)); Assert (cell_matrix.all_zero(), Equation::ExcObjectNotEmpty()); @@ -936,16 +936,16 @@ void LaplaceMatrix::assemble (FullMatrix &cell_matrix, coefficient->value_list (fe_values.get_quadrature_points(), coefficient_values); for (unsigned int point=0; point::assemble (Vector &rhs, const DoFHandler::cell_iterator &) const { Assert (right_hand_side != 0, ExcNoRHSSelected()); - const unsigned int total_dofs = fe_values.total_dofs, - n_q_points = fe_values.n_quadrature_points; + const unsigned int dofs_per_cell = fe_values.total_dofs, + n_q_points = fe_values.n_quadrature_points; const FiniteElement &fe = fe_values.get_fe(); const unsigned int n_components = fe.n_components; @@ -976,8 +976,8 @@ void LaplaceMatrix::assemble (Vector &rhs, // at present Assert (n_components==1, ExcNotImplemented()); - Assert (rhs.size() == total_dofs, - Equation::ExcWrongSize(rhs.size(), total_dofs)); + Assert (rhs.size() == dofs_per_cell, + Equation::ExcWrongSize(rhs.size(), dofs_per_cell)); Assert (rhs.all_zero(), Equation::ExcObjectNotEmpty()); @@ -987,7 +987,7 @@ void LaplaceMatrix::assemble (Vector &rhs, right_hand_side->value_list (fe_values.get_quadrature_points(), rhs_values); for (unsigned int point=0; point