From 50cae2bcfa79e0f0568fdfee25045cee8fa6708e Mon Sep 17 00:00:00 2001 From: wolf Date: Wed, 24 Feb 1999 19:22:35 +0000 Subject: [PATCH] Check in the large patches needed to make the transition from dVector to Vector and the parallelling transitions dFMatrix->FullMatrix, dSMatrix->SparseMatrix. git-svn-id: https://svn.dealii.org/trunk@900 0785d39b-7218-0410-832d-ea1e28bc413d --- .../Attic/examples/convergence/convergence.cc | 28 +- .../deal.II/Attic/examples/dof/dof_test.cc | 6 +- .../error-estimation/error-estimation.cc | 28 +- .../Attic/examples/multigrid/multigrid.cc | 42 +- .../Attic/examples/poisson/equation.cc | 16 +- .../deal.II/Attic/examples/poisson/poisson.cc | 2 +- .../deal.II/Attic/examples/poisson/poisson.h | 15 +- .../deal.II/Attic/examples/poisson/problem.cc | 2 +- deal.II/deal.II/include/dofs/dof_accessor.h | 48 +- .../deal.II/include/dofs/dof_constraints.h | 31 +- deal.II/deal.II/include/dofs/dof_handler.h | 79 ++-- deal.II/deal.II/include/dofs/dof_levels.h | 9 +- .../deal.II/include/dofs/mg_dof_accessor.h | 8 +- deal.II/deal.II/include/dofs/mg_dof_handler.h | 14 +- deal.II/deal.II/include/fe/fe.h | 28 +- .../deal.II/include/fe/fe_lib.criss_cross.h | 9 +- deal.II/deal.II/include/fe/fe_lib.dg.h | 12 +- deal.II/deal.II/include/fe/fe_lib.lagrange.h | 8 +- .../deal.II/include/fe/fe_linear_mapping.h | 4 +- deal.II/deal.II/include/fe/fe_system.h | 6 +- deal.II/deal.II/include/fe/fe_values.h | 27 +- deal.II/deal.II/include/grid/tria.h | 75 ++-- deal.II/deal.II/include/grid/tria_accessor.h | 26 +- deal.II/deal.II/include/grid/tria_boundary.h | 4 +- deal.II/deal.II/include/grid/tria_iterator.h | 8 - deal.II/deal.II/include/grid/tria_quad.h | 1 - .../include/multigrid/mg_dof_accessor.h | 8 +- .../include/multigrid/mg_dof_handler.h | 14 +- deal.II/deal.II/include/multigrid/multigrid.h | 82 ++-- deal.II/deal.II/include/numerics/assembler.h | 33 +- deal.II/deal.II/include/numerics/base.h | 22 +- deal.II/deal.II/include/numerics/data_io.h | 20 +- .../include/numerics/error_estimator.h | 24 +- deal.II/deal.II/include/numerics/matrices.h | 56 +-- deal.II/deal.II/include/numerics/multigrid.h | 82 ++-- deal.II/deal.II/include/numerics/vectors.h | 61 ++- deal.II/deal.II/source/dofs/dof_accessor.cc | 68 +-- .../deal.II/source/dofs/dof_constraints.cc | 32 +- deal.II/deal.II/source/dofs/dof_handler.cc | 73 +-- .../deal.II/source/dofs/mg_dof_accessor.cc | 14 +- deal.II/deal.II/source/dofs/mg_dof_handler.cc | 6 +- deal.II/deal.II/source/fe/fe.cc | 18 +- .../deal.II/source/fe/fe_lib.criss_cross.cc | 8 +- deal.II/deal.II/source/fe/fe_lib.cubic.cc | 6 +- deal.II/deal.II/source/fe/fe_lib.dg.cc | 8 +- .../deal.II/source/fe/fe_lib.dg.constant.cc | 4 +- deal.II/deal.II/source/fe/fe_lib.linear.cc | 6 +- deal.II/deal.II/source/fe/fe_lib.quadratic.cc | 6 +- deal.II/deal.II/source/fe/fe_lib.quartic.cc | 4 +- .../deal.II/source/fe/fe_linear_mapping.cc | 10 +- deal.II/deal.II/source/fe/fe_system.cc | 8 +- deal.II/deal.II/source/fe/fe_values.cc | 26 +- deal.II/deal.II/source/grid/tria.cc | 32 +- .../source/multigrid/mg_dof_accessor.cc | 14 +- .../source/multigrid/mg_dof_handler.cc | 6 +- deal.II/deal.II/source/multigrid/multigrid.cc | 8 +- deal.II/deal.II/source/numerics/assembler.cc | 20 +- deal.II/deal.II/source/numerics/base.cc | 6 +- deal.II/deal.II/source/numerics/data_io.cc | 6 +- .../source/numerics/error_estimator.cc | 19 +- deal.II/deal.II/source/numerics/matrices.cc | 102 ++--- deal.II/deal.II/source/numerics/multigrid.cc | 8 +- deal.II/deal.II/source/numerics/vectors.cc | 418 +++++++++--------- tests/big-tests/convergence/convergence.cc | 28 +- tests/big-tests/dof/dof_test.cc | 6 +- .../error-estimation/error-estimation.cc | 28 +- tests/big-tests/multigrid/multigrid.cc | 42 +- tests/big-tests/poisson/equation.cc | 16 +- tests/big-tests/poisson/poisson.cc | 2 +- tests/big-tests/poisson/poisson.h | 15 +- tests/big-tests/poisson/problem.cc | 2 +- 71 files changed, 953 insertions(+), 1060 deletions(-) diff --git a/deal.II/deal.II/Attic/examples/convergence/convergence.cc b/deal.II/deal.II/Attic/examples/convergence/convergence.cc index b3a3373277..2584e4fe46 100644 --- a/deal.II/deal.II/Attic/examples/convergence/convergence.cc +++ b/deal.II/deal.II/Attic/examples/convergence/convergence.cc @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include @@ -36,14 +36,14 @@ class PoissonEquation : public Equation { Equation(1), right_hand_side (rhs) {}; - virtual void assemble (dFMatrix &cell_matrix, - dVector &rhs, + virtual void assemble (FullMatrix &cell_matrix, + Vector &rhs, const FEValues &fe_values, const DoFHandler::cell_iterator &cell) const; - virtual void assemble (dFMatrix &cell_matrix, + virtual void assemble (FullMatrix &cell_matrix, const FEValues &fe_values, const DoFHandler::cell_iterator &cell) const; - virtual void assemble (dVector &rhs, + virtual void assemble (Vector &rhs, const FEValues &fe_values, const DoFHandler::cell_iterator &cell) const; protected: @@ -149,8 +149,8 @@ Tensor<1,2> Solution<2>::gradient (const Point<2> &p) const { template <> -void PoissonEquation<2>::assemble (dFMatrix &cell_matrix, - dVector &rhs, +void PoissonEquation<2>::assemble (FullMatrix &cell_matrix, + Vector &rhs, const FEValues<2> &fe_values, const DoFHandler<2>::cell_iterator &) const { for (unsigned int point=0; point::assemble (dFMatrix &cell_matrix, template -void PoissonEquation::assemble (dFMatrix &, +void PoissonEquation::assemble (FullMatrix &, const FEValues &, const DoFHandler::cell_iterator &) const { Assert (false, ExcPureVirtualFunctionCalled()); @@ -178,7 +178,7 @@ void PoissonEquation::assemble (dFMatrix &, template -void PoissonEquation::assemble (dVector &, +void PoissonEquation::assemble (Vector &, const FEValues &, const DoFHandler::cell_iterator &) const { Assert (false, ExcPureVirtualFunctionCalled()); @@ -330,8 +330,8 @@ int PoissonProblem::run (const unsigned int level) { solve (); Solution sol; - dVector l1_error_per_cell, l2_error_per_cell, linfty_error_per_cell; - dVector h1_seminorm_error_per_cell, h1_error_per_cell; + Vector l1_error_per_cell, l2_error_per_cell, linfty_error_per_cell; + Vector h1_seminorm_error_per_cell, h1_error_per_cell; cout << " Calculating L1 error... "; VectorTools::integrate_difference (*dof_handler, @@ -375,8 +375,8 @@ int PoissonProblem::run (const unsigned int level) { if (dof->n_dofs()<=5000) { - dVector l1_error_per_dof, l2_error_per_dof, linfty_error_per_dof; - dVector h1_seminorm_error_per_dof, h1_error_per_dof; + Vector l1_error_per_dof, l2_error_per_dof, linfty_error_per_dof; + Vector h1_seminorm_error_per_dof, h1_error_per_dof; dof->distribute_cell_to_dof_vector (l1_error_per_cell, l1_error_per_dof); dof->distribute_cell_to_dof_vector (l2_error_per_cell, l2_error_per_dof); dof->distribute_cell_to_dof_vector (linfty_error_per_cell, @@ -385,7 +385,7 @@ int PoissonProblem::run (const unsigned int level) { h1_seminorm_error_per_dof); dof->distribute_cell_to_dof_vector (h1_error_per_cell, h1_error_per_dof); -// dVector projected_solution; +// Vector projected_solution; // ConstraintMatrix constraints; // constraints.close (); // VectorTools::project (*dof, constraints, *fe, diff --git a/deal.II/deal.II/Attic/examples/dof/dof_test.cc b/deal.II/deal.II/Attic/examples/dof/dof_test.cc index a176758e01..9144ac0f11 100644 --- a/deal.II/deal.II/Attic/examples/dof/dof_test.cc +++ b/deal.II/deal.II/Attic/examples/dof/dof_test.cc @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include @@ -356,8 +356,8 @@ void TestCases::run (ParameterHandler &prm) { cout << " Renumbering degrees of freedom..." << endl; dof->renumber_dofs (Cuthill_McKee, false); - dSMatrixStruct sparsity (dof->n_dofs(), - dof->max_couplings_between_dofs()); + SparseMatrixStruct sparsity (dof->n_dofs(), + dof->max_couplings_between_dofs()); dof->make_sparsity_pattern (sparsity); diff --git a/deal.II/deal.II/Attic/examples/error-estimation/error-estimation.cc b/deal.II/deal.II/Attic/examples/error-estimation/error-estimation.cc index 54e1c13f2d..9c8db1acae 100644 --- a/deal.II/deal.II/Attic/examples/error-estimation/error-estimation.cc +++ b/deal.II/deal.II/Attic/examples/error-estimation/error-estimation.cc @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include @@ -45,14 +45,14 @@ class PoissonEquation : public Equation { right_hand_side (rhs), coefficient (coefficient) {}; - virtual void assemble (dFMatrix &cell_matrix, - dVector &rhs, + virtual void assemble (FullMatrix &cell_matrix, + Vector &rhs, const FEValues &fe_values, const DoFHandler::cell_iterator &cell) const; - virtual void assemble (dFMatrix &cell_matrix, + virtual void assemble (FullMatrix &cell_matrix, const FEValues &fe_values, const DoFHandler::cell_iterator &cell) const; - virtual void assemble (dVector &rhs, + virtual void assemble (Vector &rhs, const FEValues &fe_values, const DoFHandler::cell_iterator &cell) const; protected: @@ -256,8 +256,8 @@ double RHS<2>::Kink::operator () (const Point<2> &) const { template <> -void PoissonEquation<2>::assemble (dFMatrix &cell_matrix, - dVector &rhs, +void PoissonEquation<2>::assemble (FullMatrix &cell_matrix, + Vector &rhs, const FEValues<2> &fe_values, const DoFHandler<2>::cell_iterator &) const { for (unsigned int point=0; point::assemble (dFMatrix &cell_matrix, template -void PoissonEquation::assemble (dFMatrix &, +void PoissonEquation::assemble (FullMatrix &, const FEValues &, const DoFHandler::cell_iterator &) const { Assert (false, ExcPureVirtualFunctionCalled()); @@ -291,7 +291,7 @@ void PoissonEquation::assemble (dFMatrix &, template -void PoissonEquation::assemble (dVector &, +void PoissonEquation::assemble (Vector &, const FEValues &, const DoFHandler::cell_iterator &) const { Assert (false, ExcPureVirtualFunctionCalled()); @@ -465,8 +465,8 @@ void PoissonProblem::run (ParameterHandler &prm) { cout << " Solving..." << endl; solve (); - dVector l2_error_per_cell, linfty_error_per_cell, h1_error_per_cell; - dVector estimated_error_per_cell; + Vector l2_error_per_cell, linfty_error_per_cell, h1_error_per_cell; + Vector estimated_error_per_cell; QGauss3 q; cout << " Calculating L2 error... "; @@ -505,9 +505,9 @@ void PoissonProblem::run (ParameterHandler &prm) { cout << estimated_error_per_cell.l2_norm() << endl; estimated_error.push_back (estimated_error_per_cell.l2_norm()); - dVector l2_error_per_dof, linfty_error_per_dof; - dVector h1_error_per_dof, estimated_error_per_dof; - dVector error_ratio; + Vector l2_error_per_dof, linfty_error_per_dof; + Vector h1_error_per_dof, estimated_error_per_dof; + Vector error_ratio; dof->distribute_cell_to_dof_vector (l2_error_per_cell, l2_error_per_dof); dof->distribute_cell_to_dof_vector (linfty_error_per_cell, linfty_error_per_dof); diff --git a/deal.II/deal.II/Attic/examples/multigrid/multigrid.cc b/deal.II/deal.II/Attic/examples/multigrid/multigrid.cc index b3d4c57e96..4b41c688f8 100644 --- a/deal.II/deal.II/Attic/examples/multigrid/multigrid.cc +++ b/deal.II/deal.II/Attic/examples/multigrid/multigrid.cc @@ -19,8 +19,8 @@ #include #include -#include -#include +#include +#include #include #include @@ -41,14 +41,14 @@ class PoissonEquation : public Equation { Equation(1), right_hand_side (rhs) {}; - virtual void assemble (dFMatrix &cell_matrix, - dVector &rhs, + virtual void assemble (FullMatrix &cell_matrix, + Vector &rhs, const FEValues &fe_values, const DoFHandler::cell_iterator &cell) const; - virtual void assemble (dFMatrix &cell_matrix, + virtual void assemble (FullMatrix &cell_matrix, const FEValues &fe_values, const DoFHandler::cell_iterator &cell) const; - virtual void assemble (dVector &rhs, + virtual void assemble (Vector &rhs, const FEValues &fe_values, const DoFHandler::cell_iterator &cell) const; protected: @@ -125,22 +125,22 @@ class PoissonProblem { /** * Sparsity pattern of the system matrix. */ - dSMatrixStruct system_sparsity; + SparseMatrixStruct system_sparsity; /** * System matrix. */ - dSMatrix system_matrix; + SparseMatrix system_matrix; /** * Vector storing the right hand side. */ - dVector right_hand_side; + Vector right_hand_side; /** * Solution vector. */ - dVector solution; + Vector solution; /** * List of constraints introduced by @@ -228,8 +228,8 @@ Tensor<1,2> Solution<2>::gradient (const Point<2> &p) const { template <> -void PoissonEquation<2>::assemble (dFMatrix &cell_matrix, - dVector &rhs, +void PoissonEquation<2>::assemble (FullMatrix &cell_matrix, + Vector &rhs, const FEValues<2> &fe_values, const DoFHandler<2>::cell_iterator &) const { for (unsigned int point=0; point::assemble (dFMatrix &cell_matrix, template -void PoissonEquation::assemble (dFMatrix &, +void PoissonEquation::assemble (FullMatrix &, const FEValues &, const DoFHandler::cell_iterator &) const { Assert (false, ExcPureVirtualFunctionCalled()); @@ -257,7 +257,7 @@ void PoissonEquation::assemble (dFMatrix &, template -void PoissonEquation::assemble (dVector &, +void PoissonEquation::assemble (Vector &, const FEValues &, const DoFHandler::cell_iterator &) const { Assert (false, ExcPureVirtualFunctionCalled()); @@ -393,8 +393,8 @@ void PoissonProblem::solve () { Assert ((tria!=0) && (dof!=0), ExcNoTriaSelected()); SolverControl control(4000, 1e-16); - PrimitiveVectorMemory memory; - SolverCG cg(control,memory); + PrimitiveVectorMemory > memory; + SolverCG,Vector > cg(control,memory); // solve cg.solve (system_matrix, solution, right_hand_side); @@ -486,8 +486,8 @@ int PoissonProblem::run (const unsigned int level) { solve (); Solution sol; - dVector l1_error_per_cell, l2_error_per_cell, linfty_error_per_cell; - dVector h1_seminorm_error_per_cell, h1_error_per_cell; + Vector l1_error_per_cell, l2_error_per_cell, linfty_error_per_cell; + Vector h1_seminorm_error_per_cell, h1_error_per_cell; cout << " Calculating L1 error... "; VectorTools::integrate_difference (*dof, @@ -531,8 +531,8 @@ int PoissonProblem::run (const unsigned int level) { if (dof->DoFHandler::n_dofs()<=5000) { - dVector l1_error_per_dof, l2_error_per_dof, linfty_error_per_dof; - dVector h1_seminorm_error_per_dof, h1_error_per_dof; + Vector l1_error_per_dof, l2_error_per_dof, linfty_error_per_dof; + Vector h1_seminorm_error_per_dof, h1_error_per_dof; dof->distribute_cell_to_dof_vector (l1_error_per_cell, l1_error_per_dof); dof->distribute_cell_to_dof_vector (l2_error_per_cell, l2_error_per_dof); dof->distribute_cell_to_dof_vector (linfty_error_per_cell, @@ -541,7 +541,7 @@ int PoissonProblem::run (const unsigned int level) { h1_seminorm_error_per_dof); dof->distribute_cell_to_dof_vector (h1_error_per_cell, h1_error_per_dof); -// dVector projected_solution; +// Vector projected_solution; // ConstraintMatrix constraints; // constraints.close (); // VectorTools::project (*dof, constraints, *fe, diff --git a/deal.II/deal.II/Attic/examples/poisson/equation.cc b/deal.II/deal.II/Attic/examples/poisson/equation.cc index ed7b4ebabe..17dc3ead17 100644 --- a/deal.II/deal.II/Attic/examples/poisson/equation.cc +++ b/deal.II/deal.II/Attic/examples/poisson/equation.cc @@ -3,15 +3,15 @@ #include "poisson.h" -#include +#include #if deal_II_dimension == 1 template <> -void PoissonEquation<1>::assemble (dFMatrix &cell_matrix, - dVector &rhs, +void PoissonEquation<1>::assemble (FullMatrix &cell_matrix, + Vector &rhs, const FEValues<1> &fe_values, const DoFHandler<1>::cell_iterator &) const { for (unsigned int point=0; point::assemble (dFMatrix &cell_matrix, //#if deal_II_dimension >= 2 template -void PoissonEquation::assemble (dFMatrix &cell_matrix, - dVector &rhs, +void PoissonEquation::assemble (FullMatrix &cell_matrix, + Vector &rhs, const FEValues &fe_values, const DoFHandler::cell_iterator &) const { const vector > >&gradients = fe_values.get_shape_grads (); - const dFMatrix &values = fe_values.get_shape_values (); + const FullMatrix &values = fe_values.get_shape_values (); vector rhs_values (fe_values.n_quadrature_points); const vector &weights = fe_values.get_JxW_values (); @@ -63,7 +63,7 @@ void PoissonEquation::assemble (dFMatrix &cell_matrix, template -void PoissonEquation::assemble (dFMatrix &, +void PoissonEquation::assemble (FullMatrix &, const FEValues &, const DoFHandler::cell_iterator &) const { Assert (false, ExcPureVirtualFunctionCalled()); @@ -72,7 +72,7 @@ void PoissonEquation::assemble (dFMatrix &, template -void PoissonEquation::assemble (dVector &, +void PoissonEquation::assemble (Vector &, const FEValues &, const DoFHandler::cell_iterator &) const { Assert (false, ExcPureVirtualFunctionCalled()); diff --git a/deal.II/deal.II/Attic/examples/poisson/poisson.cc b/deal.II/deal.II/Attic/examples/poisson/poisson.cc index b4017ea350..6c657c1b33 100644 --- a/deal.II/deal.II/Attic/examples/poisson/poisson.cc +++ b/deal.II/deal.II/Attic/examples/poisson/poisson.cc @@ -4,7 +4,7 @@ #include "poisson.h" -#include +#include diff --git a/deal.II/deal.II/Attic/examples/poisson/poisson.h b/deal.II/deal.II/Attic/examples/poisson/poisson.h index f85471ab30..36756276b7 100644 --- a/deal.II/deal.II/Attic/examples/poisson/poisson.h +++ b/deal.II/deal.II/Attic/examples/poisson/poisson.h @@ -20,15 +20,14 @@ #include #include #include -#include +#include #include #include #include -extern "C" { -# include -} +#include + @@ -42,14 +41,14 @@ class PoissonEquation : public Equation { Equation(1), right_hand_side (rhs) {}; - virtual void assemble (dFMatrix &cell_matrix, - dVector &rhs, + virtual void assemble (FullMatrix &cell_matrix, + Vector &rhs, const FEValues &fe_values, const DoFHandler::cell_iterator &cell) const; - virtual void assemble (dFMatrix &cell_matrix, + virtual void assemble (FullMatrix &cell_matrix, const FEValues &fe_values, const DoFHandler::cell_iterator &cell) const; - virtual void assemble (dVector &rhs, + virtual void assemble (Vector &rhs, const FEValues &fe_values, const DoFHandler::cell_iterator &cell) const; protected: diff --git a/deal.II/deal.II/Attic/examples/poisson/problem.cc b/deal.II/deal.II/Attic/examples/poisson/problem.cc index 20ffc09441..2a8452b97c 100644 --- a/deal.II/deal.II/Attic/examples/poisson/problem.cc +++ b/deal.II/deal.II/Attic/examples/poisson/problem.cc @@ -4,7 +4,7 @@ #include "poisson.h" -#include +#include diff --git a/deal.II/deal.II/include/dofs/dof_accessor.h b/deal.II/deal.II/include/dofs/dof_accessor.h index 02da83439d..ee9a549db4 100644 --- a/deal.II/deal.II/include/dofs/dof_accessor.h +++ b/deal.II/deal.II/include/dofs/dof_accessor.h @@ -6,14 +6,8 @@ /*---------------------------- dof_iterator.h ---------------------------*/ -template class Triangulation; -template class DoFHandler; -class dVector; -class dFMatrix; -class dSMatrix; - - #include +#include #include @@ -257,8 +251,8 @@ class DoFLineAccessor : public DoFAccessor, public BaseClass { * rather than just set, since this is * usually what one wants. */ - void distribute_local_to_global (const dVector &local_source, - dVector &global_destination) const; + void distribute_local_to_global (const Vector &local_source, + Vector &global_destination) const; /** * This function does much the same as the @@ -268,8 +262,8 @@ class DoFLineAccessor : public DoFAccessor, public BaseClass { * is supposed to have non-zero entry * slots where required. */ - void distribute_local_to_global (const dFMatrix &local_source, - dSMatrix &global_destination) const; + void distribute_local_to_global (const FullMatrix &local_source, + SparseMatrix &global_destination) const; /** * Implement the copy operator needed @@ -383,8 +377,8 @@ class DoFQuadAccessor : public DoFAccessor, public BaseClass { * rather than just set, since this is * usually what one wants. */ - void distribute_local_to_global (const dVector &local_source, - dVector &global_destination) const; + void distribute_local_to_global (const Vector &local_source, + Vector &global_destination) const; /** * This function does much the same as the @@ -394,8 +388,8 @@ class DoFQuadAccessor : public DoFAccessor, public BaseClass { * is supposed to have non-zero entry * slots where required. */ - void distribute_local_to_global (const dFMatrix &local_source, - dSMatrix &global_destination) const; + void distribute_local_to_global (const FullMatrix &local_source, + SparseMatrix &global_destination) const; /** * Implement the copy operator needed @@ -515,8 +509,8 @@ class DoFHexAccessor : public DoFAccessor, public BaseClass { * rather than just set, since this is * usually what one wants. */ - void distribute_local_to_global (const dVector &local_source, - dVector &global_destination) const; + void distribute_local_to_global (const Vector &local_source, + Vector &global_destination) const; /** * This function does much the same as the @@ -526,8 +520,8 @@ class DoFHexAccessor : public DoFAccessor, public BaseClass { * is supposed to have non-zero entry * slots where required. */ - void distribute_local_to_global (const dFMatrix &local_source, - dSMatrix &global_destination) const; + void distribute_local_to_global (const FullMatrix &local_source, + SparseMatrix &global_destination) const; /** * Implement the copy operator needed @@ -765,8 +759,8 @@ class DoFCellAccessor : public DoFSubstructAccessor { * function is only callable for active * cells. */ - void get_dof_values (const dVector &values, - dVector &local_values) const; + void get_dof_values (const Vector &values, + Vector &local_values) const; /** * Return the interpolation of the given @@ -807,8 +801,8 @@ class DoFCellAccessor : public DoFSubstructAccessor { * what the this function does in these * cases. */ - void get_interpolated_dof_values (const dVector &values, - dVector &interpolated_values) const; + void get_interpolated_dof_values (const Vector &values, + Vector &interpolated_values) const; /** * This function is the counterpart to @@ -832,8 +826,8 @@ class DoFCellAccessor : public DoFSubstructAccessor { * It is assumed that both vectors already * have the right size beforehand. */ - void set_dof_values (const dVector &local_values, - dVector &values) const; + void set_dof_values (const Vector &local_values, + Vector &values) const; /** * This, again, is the counterpart to @@ -888,8 +882,8 @@ class DoFCellAccessor : public DoFSubstructAccessor { * the prolongation matrices represent in * this case. */ - void set_dof_values_by_interpolation (const dVector &local_values, - dVector &values) const; + void set_dof_values_by_interpolation (const Vector &local_values, + Vector &values) const; /** * Exception diff --git a/deal.II/deal.II/include/dofs/dof_constraints.h b/deal.II/deal.II/include/dofs/dof_constraints.h index 5d8c57b67e..dd3685f741 100644 --- a/deal.II/deal.II/include/dofs/dof_constraints.h +++ b/deal.II/deal.II/include/dofs/dof_constraints.h @@ -9,15 +9,10 @@ #include #include #include +#include -class ostream; -class dSMatrix; -class dSMatrixStruct; -class dVector; - - /** * This class represents the matrix denoting the distribution of the degrees * of freedom of hanging nodes. @@ -168,8 +163,8 @@ class ConstraintMatrix { * The constraint matrix object must be * closed to call this function. */ - void condense (const dSMatrixStruct &uncondensed, - dSMatrixStruct &condensed) const; + void condense (const SparseMatrixStruct &uncondensed, + SparseMatrixStruct &condensed) const; /** @@ -188,7 +183,7 @@ class ConstraintMatrix { * The matrix struct is compressed at the * end of the function. */ - void condense (dSMatrixStruct &sparsity) const; + void condense (SparseMatrixStruct &sparsity) const; /** * Condense a given matrix. The associated @@ -201,8 +196,8 @@ class ConstraintMatrix { * The constraint matrix object must be * closed to call this function. */ - void condense (const dSMatrix &uncondensed, - dSMatrix &condensed) const; + void condense (const SparseMatrix &uncondensed, + SparseMatrix &condensed) const; /** * This function does much the same as @@ -211,7 +206,7 @@ class ConstraintMatrix { * documentation of this class for more * detailed information. */ - void condense (dSMatrix &matrix) const; + void condense (SparseMatrix &matrix) const; /** * Condense the given vector #uncondensed# @@ -219,13 +214,13 @@ class ConstraintMatrix { * responsibility to guarantee that all * entries of #condensed# be zero! */ - void condense (const dVector &uncondensed, - dVector &condensed) const; + void condense (const Vector &uncondensed, + Vector &condensed) const; /** * Condense the given vector in-place. */ - void condense (dVector &vec) const; + void condense (Vector &vec) const; /** * Re-distribute the elements of the vector @@ -237,14 +232,14 @@ class ConstraintMatrix { * #condense# somehow, but it should be noted * that it is not the inverse of #condense#- */ - void distribute (const dVector &condensed, - dVector &uncondensed) const; + void distribute (const Vector &condensed, + Vector &uncondensed) const; /** * Re-distribute the elements of the vector * in-place. */ - void distribute (dVector &vec) const; + void distribute (Vector &vec) const; /** diff --git a/deal.II/deal.II/include/dofs/dof_handler.h b/deal.II/deal.II/include/dofs/dof_handler.h index 1929f2acd2..76a27b25ad 100644 --- a/deal.II/deal.II/include/dofs/dof_handler.h +++ b/deal.II/deal.II/include/dofs/dof_handler.h @@ -8,37 +8,10 @@ #include #include #include +#include #include - -template class TriaAccessor; -template class LineAccessor; -template class QuadAccessor; -template class HexAccessor; -template class CellAccessor; - -template class DoFLineAccessor; -template class DoFQuadAccessor; -template class DoFHexAccessor; -template class DoFCellAccessor; - -template class DoFLevel; - - -template class TriaRawIterator; -template class TriaIterator; -template class TriaActiveIterator; - -template class Triangulation; -template class FiniteElement; -template class Function; - -class dVector; -class dSMatrix; -class dSMatrixStruct; -class ConstraintMatrix; - - - +#include +#include @@ -273,7 +246,7 @@ enum RenumberingMethod { * * The renumbering algorithms need quite a lot of memory, since they have * to store for each dof with which other dofs it couples. This is done - * using a #dSMatrixStruct# object used to store the sparsity pattern of + * using a #SparseMatrixStruct# object used to store the sparsity pattern of * matrices. It * is not useful for the user to do anything between distributing the dofs * and renumbering, i.e. the calls to #DoFHandler::distribute_dofs# and @@ -471,12 +444,12 @@ enum RenumberingMethod { * * To build the matrix, you first have to call * #make_transfer_matrix (old_dof_object, sparsity_pattern);#, then create a - * sparse matrix out of this pattern, e.g. by #dSMatrix m(sparsity_pattern);# + * sparse matrix out of this pattern, e.g. by #SparseMatrix m(sparsity_pattern);# * and finally give this to the second run: * #make_transfer_matrix (old_dof_object, m);#. The spasity pattern created * by the first run is automatically compressed. * - * When creating the #dSMatrixStruct# sparsity pattern, you have to give the + * When creating the #SparseMatrixStruct# sparsity pattern, you have to give the * dimension and the maximum number of entries per row. Obviously the image * dimension is the number of dofs on the new grid (you can get this using the * #n_dofs()# function), while the range dimension is the number of dofs on the @@ -659,9 +632,9 @@ class DoFHandler : public DoFDimensionInfo { * added. However, if you don't want to call * #ConstraintMatrix::condense(1)#, you * have to compress the matrix yourself, - * using #dSMatrixStruct::compress()#. + * using #SparseMatrixStruct::compress()#. */ - void make_sparsity_pattern (dSMatrixStruct &) const; + void make_sparsity_pattern (SparseMatrixStruct &) const; /** * Write the sparsity structure of the @@ -678,14 +651,14 @@ class DoFHandler : public DoFDimensionInfo { * added. However, if you don't want to call * #ConstraintMatrix::condense(1)#, you * have to compress the matrix yourself, - * using #dSMatrixStruct::compress()#. + * using #SparseMatrixStruct::compress()#. * * Since this function is obviously useless * in one spatial dimension, it is not * implemented. */ void make_boundary_sparsity_pattern (const vector &dof_to_boundary_mapping, - dSMatrixStruct &) const; + SparseMatrixStruct &) const; /** * Write the sparsity structure of the @@ -712,9 +685,9 @@ class DoFHandler : public DoFDimensionInfo { * in one spatial dimension, it is not * implemented. */ - void make_boundary_sparsity_pattern (const FunctionMap &boundary_indicators, - const vector &dof_to_boundary_mapping, - dSMatrixStruct &sparsity) const; + void make_boundary_sparsity_pattern (const FunctionMap &boundary_indicators, + const vector &dof_to_boundary_mapping, + SparseMatrixStruct &sparsity) const; /** @@ -740,7 +713,7 @@ class DoFHandler : public DoFDimensionInfo { * documentation for this class. */ void make_transfer_matrix (const DoFHandler &transfer_from, - dSMatrixStruct &transfer_pattern) const; + SparseMatrixStruct &transfer_pattern) const; /** * Make up the transfer matrix which @@ -760,7 +733,7 @@ class DoFHandler : public DoFDimensionInfo { * documentation for this class. */ void make_transfer_matrix (const DoFHandler &transfer_from, - dSMatrix &transfer_matrix) const; + SparseMatrix &transfer_matrix) const; /** * Return the maximum number of @@ -770,7 +743,7 @@ class DoFHandler : public DoFDimensionInfo { * This is the maximum number of entries * per line in the system matrix; this * information can therefore be used upon - * construction of the #dSMatrixStruct# + * construction of the #SparseMatrixStruct# * object. * * The returned number is not really the @@ -825,9 +798,17 @@ class DoFHandler : public DoFDimensionInfo { * number of active cells. The size of * #dof_data# is adjusted to the right * size. + * + * Note that the input vector may be + * a vector of any data type as long + * as it is convertible to #double#. + * The output vector, being a data + * vector on the grid, always consists + * of elements of type #double#. */ - void distribute_cell_to_dof_vector (const dVector &cell_data, - dVector &dof_data) const; + template + void distribute_cell_to_dof_vector (const Vector &cell_data, + Vector &dof_data) const; /** * Create a mapping from degree of freedom @@ -1585,15 +1566,15 @@ class DoFHandler : public DoFDimensionInfo { */ void transfer_cell (const cell_iterator &old_cell, const cell_iterator &new_cell, - dSMatrixStruct &transfer_pattern) const; + SparseMatrixStruct &transfer_pattern) const; /** * Make up part of the transfer matrix by * looking at the two cells given. */ - void transfer_cell (const cell_iterator &old_cell, - const cell_iterator &new_cell, - dSMatrix &transfer_matrix) const; + void transfer_cell (const cell_iterator &old_cell, + const cell_iterator &new_cell, + SparseMatrix &transfer_matrix) const; /** * Space to store the DoF numbers for the diff --git a/deal.II/deal.II/include/dofs/dof_levels.h b/deal.II/deal.II/include/dofs/dof_levels.h index e5b460d0b4..0cb5c84a6e 100644 --- a/deal.II/deal.II/include/dofs/dof_levels.h +++ b/deal.II/deal.II/include/dofs/dof_levels.h @@ -16,7 +16,14 @@ * other types than those explicitely instantiated. */ template -class DoFLevel; +class DoFLevel { + private: + /** + * Make the constructor private to avoid + * that someone uses this class. + */ + DoFLevel (); +}; diff --git a/deal.II/deal.II/include/dofs/mg_dof_accessor.h b/deal.II/deal.II/include/dofs/mg_dof_accessor.h index 0ee7b25e6b..31e9920f5e 100644 --- a/deal.II/deal.II/include/dofs/mg_dof_accessor.h +++ b/deal.II/deal.II/include/dofs/mg_dof_accessor.h @@ -9,10 +9,6 @@ #include -// forward declaration -template class MGDoFHandler; - - /** @@ -668,8 +664,8 @@ class MGDoFCellAccessor : public MGDoFSubstructAccessor { * entries as there are degrees of * freedom on this level. */ - void get_mg_dof_values (const dVector &values, - dVector &dof_values) const; + void get_mg_dof_values (const Vector &values, + Vector &dof_values) const; /** diff --git a/deal.II/deal.II/include/dofs/mg_dof_handler.h b/deal.II/deal.II/include/dofs/mg_dof_handler.h index 6f80e19be7..f3d661171b 100644 --- a/deal.II/deal.II/include/dofs/mg_dof_handler.h +++ b/deal.II/deal.II/include/dofs/mg_dof_handler.h @@ -10,14 +10,6 @@ -// forward declarations -template class MGDoFLineAccessor; -template class MGDoFQuadAccessor; -template class MGDoFCellAccessor; - - - - /** * Define some types which differ between the dimensions. This class * is analogous to the \Ref{TriaDimensionInfo} class hierarchy. @@ -212,10 +204,10 @@ class MGDoFHandler : public DoFHandler { * added. However, if you don't want to call * #ConstraintMatrix::condense(1)#, you * have to compress the matrix yourself, - * using #dSMatrixStruct::compress()#. + * using #SparseMatrixStruct::compress()#. */ - void make_sparsity_pattern (const unsigned int level, - dSMatrixStruct &sparsity) const; + void make_sparsity_pattern (const unsigned int level, + SparseMatrixStruct &sparsity) const; /*--------------------------------------*/ diff --git a/deal.II/deal.II/include/fe/fe.h b/deal.II/deal.II/include/fe/fe.h index b6d47ef7f4..188b11f66a 100644 --- a/deal.II/deal.II/include/fe/fe.h +++ b/deal.II/deal.II/include/fe/fe.h @@ -11,14 +11,10 @@ #include #include #include -#include +#include -template class Boundary; -template class FiniteElementData; - - /** * Dimension independent data for finite elements. See the #FiniteElementBase# @@ -203,7 +199,7 @@ class FiniteElementBase : * mother cell. See the #restriction# array * for more information. */ - const dFMatrix & restrict (const unsigned int child) const; + const FullMatrix & restrict (const unsigned int child) const; /** * Return a readonly reference to the @@ -211,7 +207,7 @@ class FiniteElementBase : * mother cell to the child with the given * number. */ - const dFMatrix & prolongate (const unsigned int child) const; + const FullMatrix & prolongate (const unsigned int child) const; /** * Return a readonly reference to the @@ -223,7 +219,7 @@ class FiniteElementBase : * one space dimension, since there are no * constraints then. */ - const dFMatrix & constraints () const; + const FullMatrix & constraints () const; /** * Comparison operator. We also check for @@ -378,7 +374,7 @@ class FiniteElementBase : * matrix are discarded and will not fill * up the transfer matrix. */ - dFMatrix restriction[GeometryInfo::children_per_cell]; + FullMatrix restriction[GeometryInfo::children_per_cell]; /** * Have #N=2^dim# matrices keeping the @@ -416,7 +412,7 @@ class FiniteElementBase : * matrix are discarded and will not fill * up the transfer matrix. */ - dFMatrix prolongation[GeometryInfo::children_per_cell]; + FullMatrix prolongation[GeometryInfo::children_per_cell]; /** * Specify the constraints which the @@ -430,7 +426,7 @@ class FiniteElementBase : * This field is obviously useless in one * space dimension. */ - dFMatrix interface_constraints; + FullMatrix interface_constraints; /** * Map between linear dofs and component dofs. @@ -875,7 +871,7 @@ class FiniteElement : public FiniteElementBase { const bool compute_support_points, vector > &q_points, const bool compute_q_points, - const dFMatrix &shape_values_transform, + const FullMatrix &shape_values_transform, const vector > > &shape_grads_transform, const Boundary &boundary) const; @@ -999,7 +995,7 @@ class FiniteElement : public FiniteElementBase { const bool compute_face_jacobians, vector > &normal_vectors, const bool compute_normal_vectors, - const dFMatrix &shape_values_transform, + const FullMatrix &shape_values_transform, const vector > > &shape_grads_transform, const Boundary &boundary) const; @@ -1046,7 +1042,7 @@ class FiniteElement : public FiniteElementBase { const bool compute_face_jacobians, vector > &normal_vectors, const bool compute_normal_vectors, - const dFMatrix &shape_values_transform, + const FullMatrix &shape_values_transform, const vector > > &shape_grads_transform, const Boundary &boundary) const; @@ -1317,8 +1313,8 @@ class FiniteElement : public FiniteElementBase { * documentation. */ virtual void get_local_mass_matrix (const DoFHandler::cell_iterator &cell, - const Boundary &boundary, - dFMatrix &local_mass_matrix) const =0; + const Boundary &boundary, + FullMatrix &local_mass_matrix) const =0; /** * Exception diff --git a/deal.II/deal.II/include/fe/fe_lib.criss_cross.h b/deal.II/deal.II/include/fe/fe_lib.criss_cross.h index c703a736c9..6381a946ff 100644 --- a/deal.II/deal.II/include/fe/fe_lib.criss_cross.h +++ b/deal.II/deal.II/include/fe/fe_lib.criss_cross.h @@ -8,7 +8,8 @@ #include #include -#include +#include + /** * This class implements a rather unusual macro element, the so-called @@ -45,7 +46,7 @@ * triangular element, which uses a linear mapping. The missing linearity * makes assemblage of matrices a bit more complicated, since the gradient * is not constant and we need more than one quadrature point, as well - * as some other dubtle difficulties. This problem can, however, be cured + * as some other subtle difficulties. This problem can, however, be cured * using a trick: the usual transformation from unit coordinates $\vec\xi$ * to real coordinates $\vec x(\vec\xi)$ looks like * $$ @@ -227,7 +228,7 @@ class FECrissCross : public FiniteElement { */ virtual void get_local_mass_matrix (const DoFHandler::cell_iterator &cell, const Boundary &boundary, - dFMatrix &local_mass_matrix) const; + FullMatrix &local_mass_matrix) const; /** * Return the value of the #i#th shape @@ -340,7 +341,7 @@ class FECrissCross : public FiniteElement { const bool compute_support_points, vector > &q_points, const bool compute_q_points, - const dFMatrix &shape_values_transform, + const FullMatrix &shape_values_transform, const vector > > &shape_grad_transform, const Boundary &boundary) const; diff --git a/deal.II/deal.II/include/fe/fe_lib.dg.h b/deal.II/deal.II/include/fe/fe_lib.dg.h index ce5e8c2f14..63ca7269b3 100644 --- a/deal.II/deal.II/include/fe/fe_lib.dg.h +++ b/deal.II/deal.II/include/fe/fe_lib.dg.h @@ -76,7 +76,7 @@ class FEDGConstant : public FELinearMapping { */ virtual void get_local_mass_matrix (const DoFHandler::cell_iterator &cell, const Boundary &boundary, - dFMatrix &local_mass_matrix) const; + FullMatrix &local_mass_matrix) const; /** * Return a readonly reference to the @@ -90,7 +90,7 @@ class FEDGConstant : public FELinearMapping { * matrices is not yet finally decided * about. */ - const dFMatrix & restrict (const unsigned int) const; + const FullMatrix & restrict (const unsigned int) const; /** * Exception @@ -136,7 +136,7 @@ class FEDGLinear : public FELinear{ * matrices is not yet finally decided * about. */ - const dFMatrix & restrict (const unsigned int) const; + const FullMatrix & restrict (const unsigned int) const; }; @@ -176,7 +176,7 @@ class FEDGQuadraticSub : public FEQuadraticSub{ * matrices is not yet finally decided * about. */ - const dFMatrix & restrict (const unsigned int) const; + const FullMatrix & restrict (const unsigned int) const; }; @@ -217,7 +217,7 @@ class FEDGCubicSub : public FECubicSub{ * matrices is not yet finally decided * about. */ - const dFMatrix & restrict (const unsigned int) const; + const FullMatrix & restrict (const unsigned int) const; }; @@ -257,7 +257,7 @@ class FEDGQuarticSub : public FEQuarticSub{ * matrices is not yet finally decided * about. */ - const dFMatrix & restrict (const unsigned int) const; + const FullMatrix & restrict (const unsigned int) const; }; diff --git a/deal.II/deal.II/include/fe/fe_lib.lagrange.h b/deal.II/deal.II/include/fe/fe_lib.lagrange.h index 9842e8d854..cabbf3d545 100644 --- a/deal.II/deal.II/include/fe/fe_lib.lagrange.h +++ b/deal.II/deal.II/include/fe/fe_lib.lagrange.h @@ -110,7 +110,7 @@ class FELinear : public FELinearMapping { */ virtual void get_local_mass_matrix (const DoFHandler::cell_iterator &cell, const Boundary &boundary, - dFMatrix &local_mass_matrix) const; + FullMatrix &local_mass_matrix) const; private: @@ -291,7 +291,7 @@ class FEQuadraticSub : public FELinearMapping { */ virtual void get_local_mass_matrix (const DoFHandler::cell_iterator &cell, const Boundary &boundary, - dFMatrix &local_mass_matrix) const; + FullMatrix &local_mass_matrix) const; private: @@ -416,7 +416,7 @@ class FECubicSub : public FELinearMapping { */ virtual void get_local_mass_matrix (const DoFHandler::cell_iterator &cell, const Boundary &boundary, - dFMatrix &local_mass_matrix) const; + FullMatrix &local_mass_matrix) const; private: @@ -542,7 +542,7 @@ class FEQuarticSub : public FELinearMapping { */ virtual void get_local_mass_matrix (const DoFHandler::cell_iterator &cell, const Boundary &boundary, - dFMatrix &local_mass_matrix) const; + FullMatrix &local_mass_matrix) const; private: diff --git a/deal.II/deal.II/include/fe/fe_linear_mapping.h b/deal.II/deal.II/include/fe/fe_linear_mapping.h index b9001fb258..67cd6426e2 100644 --- a/deal.II/deal.II/include/fe/fe_linear_mapping.h +++ b/deal.II/deal.II/include/fe/fe_linear_mapping.h @@ -6,7 +6,7 @@ /*---------------------------- fe_linear_mapping.h ---------------------------*/ -#include +#include #include @@ -146,7 +146,7 @@ class FELinearMapping : public FiniteElement { const bool compute_support_points, vector > &q_points, const bool compute_q_points, - const dFMatrix &shape_values_transform, + const FullMatrix &shape_values_transform, const vector > > &shape_grad_transform, const Boundary &boundary) const; diff --git a/deal.II/deal.II/include/fe/fe_system.h b/deal.II/deal.II/include/fe/fe_system.h index 00c152ec23..1dca911bb1 100644 --- a/deal.II/deal.II/include/fe/fe_system.h +++ b/deal.II/deal.II/include/fe/fe_system.h @@ -9,6 +9,8 @@ #include #include + + /** * This class provides an interface to group several equal elements together * into one. To the outside world, the resulting object looks just like @@ -219,7 +221,7 @@ class FESystem : public FiniteElement */ virtual void get_local_mass_matrix (const DoFHandler::cell_iterator &cell, const Boundary &boundary, - dFMatrix &local_mass_matrix) const; + FullMatrix &local_mass_matrix) const; /** * Return the value of the #i#th shape @@ -329,7 +331,7 @@ class FESystem : public FiniteElement const bool compute_support_points, vector > &q_points, const bool compute_q_points, - const dFMatrix &shape_values_transform, + const FullMatrix &shape_values_transform, const vector > > &shape_grad_transform, const Boundary &boundary) const; diff --git a/deal.II/deal.II/include/fe/fe_values.h b/deal.II/deal.II/include/fe/fe_values.h index 273e0fbeb7..b57150d59f 100644 --- a/deal.II/deal.II/include/fe/fe_values.h +++ b/deal.II/deal.II/include/fe/fe_values.h @@ -8,17 +8,12 @@ #include #include -#include +#include #include #include #include -// forward declarations -template class Boundary; -template class FiniteElement; -template class Quadrature; - /** @@ -275,7 +270,7 @@ class FEValuesBase { * For the format of this matrix, see the * documentation for the matrix itself. */ - const dFMatrix & get_shape_values () const; + const FullMatrix & get_shape_values () const; /** * Return the values of the finite @@ -297,8 +292,8 @@ class FEValuesBase { * #values# object already has the * right size. */ - void get_function_values (const dVector &fe_function, - vector &values) const; + void get_function_values (const Vector &fe_function, + vector &values) const; /** * Access to vector valued finite element functions. @@ -308,8 +303,8 @@ class FEValuesBase { * but applied to multi-component * elements. */ - void get_function_values (const dVector &fe_function, - vector > &values) const; + void get_function_values (const Vector &fe_function, + vector > &values) const; /** * Return the gradient of the #i#th shape @@ -346,7 +341,7 @@ class FEValuesBase { * #gradients# object already has the * right size. */ - void get_function_grads (const dVector &fe_function, + void get_function_grads (const Vector &fe_function, vector > &gradients) const; /** @@ -393,7 +388,7 @@ class FEValuesBase { * #second_derivatives# object already has * the right size. */ - void get_function_2nd_derivatives (const dVector &fe_function, + void get_function_2nd_derivatives (const Vector &fe_function, vector > &second_derivatives) const; /** @@ -529,7 +524,7 @@ class FEValuesBase { * is determined by the #selected_dataset# * variable. */ - vector shape_values; + vector > shape_values; /** * Store the gradients of the shape @@ -647,7 +642,7 @@ class FEValuesBase { * of the #i#th transfer basis function * at the #j#th quadrature point. */ - vector shape_values_transform; + vector > shape_values_transform; /** * Store which of the data sets in the @@ -1207,7 +1202,7 @@ class FESubfaceValues : public FEFaceValuesBase { template inline -const dFMatrix & FEValuesBase::get_shape_values () const { +const FullMatrix & FEValuesBase::get_shape_values () const { Assert (selected_dataset +#include +#include +#include #include #include #include -//forward declaration needed -template class Boundary; - -template class TriaAccessor; -template class LineAccessor; -template class QuadAccessor; -template class HexAccessor; -template class CellAccessor; - -template class TriangulationLevel; - -template class TriaRawIterator; -template class TriaIterator; -template class TriaActiveIterator; - -template class DoFHandler; -template class MGDoFHandler; - -class dVector; - - -class istream; -class ostream; - /** @@ -670,12 +649,12 @@ class TriaDimensionInfo<3> { * elements. * * The central function to this is - * #refine (const dVector &criterion, const double threshold)#: it takes a + * #refine (const Vector &criterion, const double threshold)#: it takes a * vector of values, one per active cell, which denote the criterion according * to which the triangulation is to be refined. It marks all cells for which * the criterion is greater than the threshold being given as the second * argument. Analogously, - * #coarsen (const dVector &criterion, const double threshold)# flags those + * #coarsen (const Vector &criterion, const double threshold)# flags those * cells for coarsening for which the criterion is less than the treshold. * * There are two variations of these functions, which rely on #refine# and @@ -1690,9 +1669,15 @@ class Triangulation : public TriaDimensionInfo, public Subscriptor { * for mesh refinement; refer to the * following functions and to the general * doc for this class for more information. + * + * Note that this function takes a vector + * of #float#s, rather than the usual + * #double#s, since accuracy is not so + * much needed here and saving memory may + * be a good goal when using many cells. */ - void refine (const dVector &criteria, - const double threshold); + void refine (const Vector &criteria, + const double threshold); /** * Analogue to the #refine# function: @@ -1700,9 +1685,15 @@ class Triangulation : public TriaDimensionInfo, public Subscriptor { * which the absolute value of the * criterion is less than the * given threshold. + * + * Note that this function takes a vector + * of #float#s, rather than the usual + * #double#s, since accuracy is not so + * much needed here and saving memory may + * be a good goal when using many cells. */ - void coarsen (const dVector &criteria, - const double threshold); + void coarsen (const Vector &criteria, + const double threshold); /** * Refine the triangulation by refining @@ -1718,10 +1709,16 @@ class Triangulation : public TriaDimensionInfo, public Subscriptor { * * Refer to the general doc of this class * for more information. + * + * Note that this function takes a vector + * of #float#s, rather than the usual + * #double#s, since accuracy is not so + * much needed here and saving memory may + * be a good goal when using many cells. */ - void refine_and_coarsen_fixed_number (const dVector &criteria, - const double top_fraction_of_cells, - const double bottom_fraction_of_cells); + void refine_and_coarsen_fixed_number (const Vector &criteria, + const double top_fraction_of_cells, + const double bottom_fraction_of_cells); /** * Refine the triangulation by flagging @@ -1737,10 +1734,16 @@ class Triangulation : public TriaDimensionInfo, public Subscriptor { * * Refer to the general doc of this class * for more information. + * + * Note that this function takes a vector + * of #float#s, rather than the usual + * #double#s, since accuracy is not so + * much needed here and saving memory may + * be a good goal when using many cells. */ - void refine_and_coarsen_fixed_fraction (const dVector &criteria, - const double top_fraction, - const double bottom_fraction); + void refine_and_coarsen_fixed_fraction (const Vector &criteria, + const double top_fraction, + const double bottom_fraction); /** * Refine all cells on all levels which diff --git a/deal.II/deal.II/include/grid/tria_accessor.h b/deal.II/deal.II/include/grid/tria_accessor.h index 3b3c39f8bb..35fbf9bcb4 100644 --- a/deal.II/deal.II/include/grid/tria_accessor.h +++ b/deal.II/deal.II/include/grid/tria_accessor.h @@ -7,30 +7,8 @@ #include - - -// forward declaration needed -class Line; -class Quad; -class Hexahedron; - -template class Point; - - -template class TriaAccessor; -template class LineAccessor; -template class QuadAccessor; -template class CellAccessor; - -template class DoFCellAccessor; -template class DoFLineAccessor; - -template class TriaRawIterator; -template class TriaIterator; -template class TriaActiveIterator; - -template class Triangulation; - +#include +#include diff --git a/deal.II/deal.II/include/grid/tria_boundary.h b/deal.II/deal.II/include/grid/tria_boundary.h index d6153543fe..bc2a07c4a6 100644 --- a/deal.II/deal.II/include/grid/tria_boundary.h +++ b/deal.II/deal.II/include/grid/tria_boundary.h @@ -8,9 +8,7 @@ #include #include #include - - -template class Triangulation; +#include diff --git a/deal.II/deal.II/include/grid/tria_iterator.h b/deal.II/deal.II/include/grid/tria_iterator.h index 6294346195..5e7ef319e3 100644 --- a/deal.II/deal.II/include/grid/tria_iterator.h +++ b/deal.II/deal.II/include/grid/tria_iterator.h @@ -17,14 +17,6 @@ -// forward declaration needed -template class Triangulation; - - - - - - /** diff --git a/deal.II/deal.II/include/grid/tria_quad.h b/deal.II/deal.II/include/grid/tria_quad.h index 3ce7b84c0c..0fddc1bbb5 100644 --- a/deal.II/deal.II/include/grid/tria_quad.h +++ b/deal.II/deal.II/include/grid/tria_quad.h @@ -9,7 +9,6 @@ #include -template class Triangulation; /** diff --git a/deal.II/deal.II/include/multigrid/mg_dof_accessor.h b/deal.II/deal.II/include/multigrid/mg_dof_accessor.h index 0ee7b25e6b..31e9920f5e 100644 --- a/deal.II/deal.II/include/multigrid/mg_dof_accessor.h +++ b/deal.II/deal.II/include/multigrid/mg_dof_accessor.h @@ -9,10 +9,6 @@ #include -// forward declaration -template class MGDoFHandler; - - /** @@ -668,8 +664,8 @@ class MGDoFCellAccessor : public MGDoFSubstructAccessor { * entries as there are degrees of * freedom on this level. */ - void get_mg_dof_values (const dVector &values, - dVector &dof_values) const; + void get_mg_dof_values (const Vector &values, + Vector &dof_values) const; /** diff --git a/deal.II/deal.II/include/multigrid/mg_dof_handler.h b/deal.II/deal.II/include/multigrid/mg_dof_handler.h index 6f80e19be7..f3d661171b 100644 --- a/deal.II/deal.II/include/multigrid/mg_dof_handler.h +++ b/deal.II/deal.II/include/multigrid/mg_dof_handler.h @@ -10,14 +10,6 @@ -// forward declarations -template class MGDoFLineAccessor; -template class MGDoFQuadAccessor; -template class MGDoFCellAccessor; - - - - /** * Define some types which differ between the dimensions. This class * is analogous to the \Ref{TriaDimensionInfo} class hierarchy. @@ -212,10 +204,10 @@ class MGDoFHandler : public DoFHandler { * added. However, if you don't want to call * #ConstraintMatrix::condense(1)#, you * have to compress the matrix yourself, - * using #dSMatrixStruct::compress()#. + * using #SparseMatrixStruct::compress()#. */ - void make_sparsity_pattern (const unsigned int level, - dSMatrixStruct &sparsity) const; + void make_sparsity_pattern (const unsigned int level, + SparseMatrixStruct &sparsity) const; /*--------------------------------------*/ diff --git a/deal.II/deal.II/include/multigrid/multigrid.h b/deal.II/deal.II/include/multigrid/multigrid.h index 4b25e6ad19..7cc7cfa6a4 100644 --- a/deal.II/deal.II/include/multigrid/multigrid.h +++ b/deal.II/deal.II/include/multigrid/multigrid.h @@ -4,7 +4,10 @@ #define __multigrid_H /*---------------------------- multigrid.h ---------------------------*/ -class dVector; + +#include + + /** * Vector with data for each level. @@ -21,25 +24,24 @@ class dVector; */ class MGVector { - MGVector(const MGVector&); -public: - /** - * Constructor using the number of - * levels. - */ - MGVector(unsigned l); - /** - * Access to data on a specific - level. - */ - dVector& operator[](unsigned l); - - /** - * Access to data on a specific - level. - */ - const dVector& operator[](unsigned l) const; - + MGVector(const MGVector&); + public: + /** + * Constructor using the number of + * levels. + */ + MGVector(unsigned l); + /** + * Access to data on a specific + * level. + */ + Vector& operator[](unsigned l); + + /** + * Access to data on a specific + level. + */ + const Vector& operator[](unsigned l) const; }; @@ -95,19 +97,19 @@ class MultiGrid * corresponding levels of an * MGVector. */ - void copy_to_mg(MGVector& dst, const dVector& src) const; + void copy_to_mg(MGVector& dst, const Vector& src) const; /** * Transfer from MGVector to - * dVector. + * Vector. * * Copies data from active portions * of an MGVector into the * respective positions of a - * dVector. All other entries of + * Vector. All other entries of * #src# are zero. */ - void copy_from_mg(dVector& dst, const MGVector& src) const; + void copy_from_mg(Vector& dst, const MGVector& src) const; /** * The actual v-cycle multigrid method. @@ -144,8 +146,8 @@ protected: * */ virtual void smooth(unsigned level, - dVector& x, - const dVector& b, + Vector& x, + const Vector& b, unsigned steps) const; /** @@ -153,8 +155,8 @@ protected: * Defaults to #smooth#. */ virtual void post_smooth(unsigned level, - dVector& dst, - const dVector& src, + Vector& dst, + const Vector& src, unsigned steps) const; /** @@ -163,8 +165,8 @@ protected: * */ virtual void level_vmult(unsigned level, - dVector& dst, - const dVector& src) const; + Vector& dst, + const Vector& src) const; /** * Apply operator on non-refined * cells. @@ -175,8 +177,8 @@ protected: * normal fine-grid matrix. */ virtual void level_active_vmult(unsigned level, - dVector& dst, - const dVector& src) const; + Vector& dst, + const Vector& src) const; /** * Restriction from #level#. @@ -187,8 +189,8 @@ protected: * and #dst# is on #level#-1. */ virtual void restriction(unsigned level, - dVector& dst, - const dVector& src) const; + Vector& dst, + const Vector& src) const; /** @@ -199,15 +201,15 @@ protected: * #level# and #src# on #level#-1. */ virtual void prolongation(unsigned level, - dVector& dst, - const dVector& src) const; + Vector& dst, + const Vector& src) const; /** * Solve exactly on coarsest grid. */ virtual void coarse_grid_solution(unsigned l, - dVector& dst, - const dVector& src) const; + Vector& dst, + const Vector& src) const; @@ -227,14 +229,14 @@ public: * the outer iteration. * */ - void vmult(dVector& dst, const dVector& src) const; + void vmult(Vector& dst, const Vector& src) const; /** Multigrid preconditioning. * * This is the function, where the * multigrid method is implemented. * */ - void precondition(dVector& dst, const dVector& src) const; + void precondition(Vector& dst, const Vector& src) const; }; diff --git a/deal.II/deal.II/include/numerics/assembler.h b/deal.II/deal.II/include/numerics/assembler.h index 17c5722977..d7d12350e0 100644 --- a/deal.II/deal.II/include/numerics/assembler.h +++ b/deal.II/deal.II/include/numerics/assembler.h @@ -12,13 +12,6 @@ #include -// forward declarations -template class FiniteElement; -template class Quadrature; - -class dFMatrix; -class dVector; - @@ -56,8 +49,8 @@ class Equation { * #ExcWrongSize# and #ExcObjectNotEmpty# * are declared. */ - virtual void assemble (dFMatrix &cell_matrix, - dVector &rhs, + virtual void assemble (FullMatrix &cell_matrix, + Vector &rhs, const FEValues &fe_values, const DoFHandler::cell_iterator &cell) const; @@ -74,7 +67,7 @@ class Equation { * #ExcWrongSize# and #ExcObjectNotEmpty# * are declared. */ - virtual void assemble (dFMatrix &cell_matrix, + virtual void assemble (FullMatrix &cell_matrix, const FEValues &fe_values, const DoFHandler::cell_iterator &cell) const; @@ -91,7 +84,7 @@ class Equation { * #ExcWrongSize# and #ExcObjectNotEmpty# * are declared. */ - virtual void assemble (dVector &rhs, + virtual void assemble (Vector &rhs, const FEValues &fe_values, const DoFHandler::cell_iterator &cell) const; @@ -146,11 +139,11 @@ struct AssemblerData { AssemblerData (const DoFHandler &dof, const bool assemble_matrix, const bool assemble_rhs, - dSMatrix &matrix, - dVector &rhs_vector, + SparseMatrix &matrix, + Vector &rhs_vector, const Quadrature &quadrature, const FiniteElement &fe, - const UpdateFlags &update_flags, + const UpdateFlags &update_flags, const Boundary &boundary); /** @@ -172,7 +165,7 @@ struct AssemblerData { * to clear this object (set all entries * to zero) before use. */ - dSMatrix &matrix; + SparseMatrix &matrix; /** * Pointer to the vector to be assembled @@ -181,7 +174,7 @@ struct AssemblerData { * to clear this object (set all entries * to zero) before use. */ - dVector &rhs_vector; + Vector &rhs_vector; /** * Pointer to a quadrature object to be @@ -280,12 +273,12 @@ class Assembler : public DoFCellAccessor { /** * Store a local cell matrix. */ - dFMatrix cell_matrix; + FullMatrix cell_matrix; /** * Right hand side local to cell. */ - dVector cell_vector; + Vector cell_vector; /** * Store whether to assemble the @@ -303,13 +296,13 @@ class Assembler : public DoFCellAccessor { * Pointer to the matrix to be assembled * by this object. */ - dSMatrix &matrix; + SparseMatrix &matrix; /** * Pointer to the vector to be assembled * by this object. */ - dVector &rhs_vector; + Vector &rhs_vector; /** * Pointer to the finite element used for diff --git a/deal.II/deal.II/include/numerics/base.h b/deal.II/deal.II/include/numerics/base.h index d311a073d0..df6bacb1cb 100644 --- a/deal.II/deal.II/include/numerics/base.h +++ b/deal.II/deal.II/include/numerics/base.h @@ -6,25 +6,13 @@ /*---------------------------- problem_base.h ---------------------------*/ -#include +#include #include #include #include #include -// forward declaration -template class Triangulation; -template class DoFHandler; -template class FiniteElement; -template class Quadrature; -template class DataOut; -template class Equation; -template class Assembler; -template class Boundary; -template class StraightBoundary; -template class Function; - @@ -227,22 +215,22 @@ class ProblemBase { /** * Sparsity pattern of the system matrix. */ - dSMatrixStruct system_sparsity; + SparseMatrixStruct system_sparsity; /** * System matrix. */ - dSMatrix system_matrix; + SparseMatrix system_matrix; /** * Vector storing the right hand side. */ - dVector right_hand_side; + Vector right_hand_side; /** * Solution vector. */ - dVector solution; + Vector solution; /** * List of constraints introduced by diff --git a/deal.II/deal.II/include/numerics/data_io.h b/deal.II/deal.II/include/numerics/data_io.h index 9b9c6fed9a..87f2a6a5b4 100644 --- a/deal.II/deal.II/include/numerics/data_io.h +++ b/deal.II/deal.II/include/numerics/data_io.h @@ -6,15 +6,11 @@ /*---------------------------- data_io.h ---------------------------*/ #include +#include +#include #include #include -template class Triangulation; -template class DoFHandler; - -class dVector; - - @@ -359,9 +355,9 @@ class DataOut { * see which characters are valid and which * are not. */ - void add_data_vector (const dVector &data, - const string &name, - const string &units=""); + void add_data_vector (const Vector &data, + const string &name, + const string &units=""); /** * Release the pointers to the data @@ -531,16 +527,18 @@ class DataOut { /** * Constructor */ - DataEntry (const dVector *data, const string name, const string units); + DataEntry (const Vector *data, const string name, const string units); /** * Pointer to the data vector. */ - const dVector *data; + const Vector *data; + /** * Name of this component. */ string name; + /** * Physical unit name of this * component. diff --git a/deal.II/deal.II/include/numerics/error_estimator.h b/deal.II/deal.II/include/numerics/error_estimator.h index d80d0f8110..e54f3a41b9 100644 --- a/deal.II/deal.II/include/numerics/error_estimator.h +++ b/deal.II/deal.II/include/numerics/error_estimator.h @@ -11,17 +11,6 @@ #include -// forward declarations -template class DoFHandler; -template class Quadrature; -template class FiniteElement; -template class FEFaceValues; -template class FESubfaceValues; -template class Boundary; -template class Function; -class dVector; - - /** @@ -44,7 +33,10 @@ class dVector; * the conormal derivative $a\frac{du}{dn} = g$. * * The error estimator returns a vector of estimated errors per cell which - * can be used to feed the #Triangulation::refine_*# functions. + * can be used to feed the #Triangulation::refine_*# functions. This + * vector contains elements of data type #float#, rather than #double#, + * since accuracy is not so important here, and since this can save rather + * a lot of memory, when using many cells. * * * \subsection{Implementation} @@ -175,8 +167,8 @@ class KellyErrorEstimator { const FiniteElement &fe, const Boundary &boundary, const FunctionMap &neumann_bc, - const dVector &solution, - dVector &error, + const Vector &solution, + Vector &error, const Function *coefficient = 0); /** @@ -234,7 +226,7 @@ class KellyErrorEstimator { FEFaceValues &fe_face_values_cell, FEFaceValues &fe_face_values_neighbor, FaceIntegrals &face_integrals, - const dVector &solution, + const Vector&solution, const Function *coefficient); /** @@ -253,7 +245,7 @@ class KellyErrorEstimator { FEFaceValues &fe_face_values, FESubfaceValues &fe_subface_values, FaceIntegrals &face_integrals, - const dVector &solution, + const Vector &solution, const Function *coefficient); }; diff --git a/deal.II/deal.II/include/numerics/matrices.h b/deal.II/deal.II/include/numerics/matrices.h index d5e9b088fc..4156e0ede4 100644 --- a/deal.II/deal.II/include/numerics/matrices.h +++ b/deal.II/deal.II/include/numerics/matrices.h @@ -10,18 +10,6 @@ #include #include -template class Triangulation; -template class DoFHandler; -template class FiniteElement; -template class FEValues; -template class Quadrature; -template class Function; -template class Boundary; -template class Equation; - -class dVector; -class dFMatrix; -class dSMatrix; @@ -36,7 +24,7 @@ class dSMatrix; * * All functions take a sparse matrix object to hold the matrix to be * created. The functions assume that the matrix is initialized with a - * sparsity pattern (#dSMatrixStruct#) corresponding to the given degree + * sparsity pattern (#SparseMatrixStruct#) corresponding to the given degree * of freedom handler, i.e. the sparsity structure is already as needed. * You can do this by calling the #DoFHandler::make_sparsity_pattern# * function. @@ -196,7 +184,7 @@ class MatrixCreator { static void create_mass_matrix (const DoFHandler &dof, const Quadrature &q, const Boundary &boundary, - dSMatrix &matrix, + SparseMatrix &matrix, const Function *a = 0); /** @@ -219,9 +207,9 @@ class MatrixCreator { static void create_mass_matrix (const DoFHandler &dof, const Quadrature &q, const Boundary &boundary, - dSMatrix &matrix, + SparseMatrix &matrix, const Function &rhs, - dVector &rhs_vector, + Vector &rhs_vector, const Function *a = 0); /** @@ -245,7 +233,7 @@ class MatrixCreator { */ static void create_mass_matrix (const DoFHandler &dof, const Boundary &boundary, - dSMatrix &matrix); + SparseMatrix &matrix); /** * Assemble the mass matrix and a right @@ -265,9 +253,9 @@ class MatrixCreator { static void create_boundary_mass_matrix (const DoFHandler &dof, const Quadrature &q, const Boundary &boundary, - dSMatrix &matrix, + SparseMatrix &matrix, const FunctionMap &rhs, - dVector &rhs_vector, + Vector &rhs_vector, vector &vec_to_dof_mapping, const Function *a = 0); @@ -282,7 +270,7 @@ class MatrixCreator { static void create_laplace_matrix (const DoFHandler &dof, const Quadrature &q, const Boundary &boundary, - dSMatrix &matrix, + SparseMatrix &matrix, const Function *a = 0); /** @@ -297,9 +285,9 @@ class MatrixCreator { static void create_laplace_matrix (const DoFHandler &dof, const Quadrature &q, const Boundary &boundary, - dSMatrix &matrix, + SparseMatrix &matrix, const Function &rhs, - dVector &rhs_vector, + Vector &rhs_vector, const Function *a = 0); /** @@ -309,7 +297,7 @@ class MatrixCreator { */ static void create_interpolation_matrix(const FiniteElement &high, const FiniteElement &low, - dFMatrix& result); + FullMatrix& result); /** @@ -404,9 +392,9 @@ class MatrixTools : public MatrixCreator { * documentation. */ static void apply_boundary_values (const map &boundary_values, - dSMatrix &matrix, - dVector &solution, - dVector &right_hand_side); + SparseMatrix &matrix, + Vector &solution, + Vector &right_hand_side); /** * Exception @@ -522,8 +510,8 @@ class MassMatrix : public Equation { * and right hand side to have the right * size and to be empty. */ - virtual void assemble (dFMatrix &cell_matrix, - dVector &rhs, + virtual void assemble (FullMatrix &cell_matrix, + Vector &rhs, const FEValues &fe_values, const typename DoFHandler::cell_iterator &) const; @@ -532,7 +520,7 @@ class MassMatrix : public Equation { * If a coefficient was given to the * constructor, it is used. */ - virtual void assemble (dFMatrix &cell_matrix, + virtual void assemble (FullMatrix &cell_matrix, const FEValues &fe_values, const typename DoFHandler::cell_iterator &) const; @@ -543,7 +531,7 @@ class MassMatrix : public Equation { * constructor in order to call this * function. */ - virtual void assemble (dVector &rhs, + virtual void assemble (Vector &rhs, const FEValues &fe_values, const typename DoFHandler::cell_iterator &) const; @@ -625,8 +613,8 @@ class LaplaceMatrix : public Equation { * a coefficient was given to the * constructor, it is used. */ - virtual void assemble (dFMatrix &cell_matrix, - dVector &rhs, + virtual void assemble (FullMatrix &cell_matrix, + Vector &rhs, const FEValues &fe_values, const typename DoFHandler::cell_iterator &) const; @@ -635,7 +623,7 @@ class LaplaceMatrix : public Equation { * If a coefficient was given to the * constructor, it is used. */ - virtual void assemble (dFMatrix &cell_matrix, + virtual void assemble (FullMatrix &cell_matrix, const FEValues &fe_values, const typename DoFHandler::cell_iterator &) const; @@ -646,7 +634,7 @@ class LaplaceMatrix : public Equation { * constructor in order to call this * function. */ - virtual void assemble (dVector &rhs, + virtual void assemble (Vector &rhs, const FEValues &fe_values, const typename DoFHandler::cell_iterator &) const; diff --git a/deal.II/deal.II/include/numerics/multigrid.h b/deal.II/deal.II/include/numerics/multigrid.h index 4b25e6ad19..7cc7cfa6a4 100644 --- a/deal.II/deal.II/include/numerics/multigrid.h +++ b/deal.II/deal.II/include/numerics/multigrid.h @@ -4,7 +4,10 @@ #define __multigrid_H /*---------------------------- multigrid.h ---------------------------*/ -class dVector; + +#include + + /** * Vector with data for each level. @@ -21,25 +24,24 @@ class dVector; */ class MGVector { - MGVector(const MGVector&); -public: - /** - * Constructor using the number of - * levels. - */ - MGVector(unsigned l); - /** - * Access to data on a specific - level. - */ - dVector& operator[](unsigned l); - - /** - * Access to data on a specific - level. - */ - const dVector& operator[](unsigned l) const; - + MGVector(const MGVector&); + public: + /** + * Constructor using the number of + * levels. + */ + MGVector(unsigned l); + /** + * Access to data on a specific + * level. + */ + Vector& operator[](unsigned l); + + /** + * Access to data on a specific + level. + */ + const Vector& operator[](unsigned l) const; }; @@ -95,19 +97,19 @@ class MultiGrid * corresponding levels of an * MGVector. */ - void copy_to_mg(MGVector& dst, const dVector& src) const; + void copy_to_mg(MGVector& dst, const Vector& src) const; /** * Transfer from MGVector to - * dVector. + * Vector. * * Copies data from active portions * of an MGVector into the * respective positions of a - * dVector. All other entries of + * Vector. All other entries of * #src# are zero. */ - void copy_from_mg(dVector& dst, const MGVector& src) const; + void copy_from_mg(Vector& dst, const MGVector& src) const; /** * The actual v-cycle multigrid method. @@ -144,8 +146,8 @@ protected: * */ virtual void smooth(unsigned level, - dVector& x, - const dVector& b, + Vector& x, + const Vector& b, unsigned steps) const; /** @@ -153,8 +155,8 @@ protected: * Defaults to #smooth#. */ virtual void post_smooth(unsigned level, - dVector& dst, - const dVector& src, + Vector& dst, + const Vector& src, unsigned steps) const; /** @@ -163,8 +165,8 @@ protected: * */ virtual void level_vmult(unsigned level, - dVector& dst, - const dVector& src) const; + Vector& dst, + const Vector& src) const; /** * Apply operator on non-refined * cells. @@ -175,8 +177,8 @@ protected: * normal fine-grid matrix. */ virtual void level_active_vmult(unsigned level, - dVector& dst, - const dVector& src) const; + Vector& dst, + const Vector& src) const; /** * Restriction from #level#. @@ -187,8 +189,8 @@ protected: * and #dst# is on #level#-1. */ virtual void restriction(unsigned level, - dVector& dst, - const dVector& src) const; + Vector& dst, + const Vector& src) const; /** @@ -199,15 +201,15 @@ protected: * #level# and #src# on #level#-1. */ virtual void prolongation(unsigned level, - dVector& dst, - const dVector& src) const; + Vector& dst, + const Vector& src) const; /** * Solve exactly on coarsest grid. */ virtual void coarse_grid_solution(unsigned l, - dVector& dst, - const dVector& src) const; + Vector& dst, + const Vector& src) const; @@ -227,14 +229,14 @@ public: * the outer iteration. * */ - void vmult(dVector& dst, const dVector& src) const; + void vmult(Vector& dst, const Vector& src) const; /** Multigrid preconditioning. * * This is the function, where the * multigrid method is implemented. * */ - void precondition(dVector& dst, const dVector& src) const; + void precondition(Vector& dst, const Vector& src) const; }; diff --git a/deal.II/deal.II/include/numerics/vectors.h b/deal.II/deal.II/include/numerics/vectors.h index 90720acd88..a4567f8a75 100644 --- a/deal.II/deal.II/include/numerics/vectors.h +++ b/deal.II/deal.II/include/numerics/vectors.h @@ -6,20 +6,10 @@ /*---------------------------- vectors.h ---------------------------*/ - +#include #include #include -template class DoFHandler; -template class Function; -template class Quadrature; -template class QGauss2; -template class FiniteElement; -template class Boundary; -template class StraightBoundary; -class ConstraintMatrix; -class dVector; -class VectorFunction; /** @@ -231,16 +221,16 @@ enum NormType { * full $H_1$ norm is the sum of the seminorm and the $L_2$ norm. * * To get the {\it global} L_1 error, you have to sum up the entries in - * #difference#, e.g. using #dVector::l1_norm# function. + * #difference#, e.g. using #Vector::l1_norm# function. * For the global L_2 difference, you have to sum up the squares of the - * entries and take the root of the sum, e.g. using #dVector::l2_norm#. + * entries and take the root of the sum, e.g. using #Vector::l2_norm#. * These two operations represent the * l_1 and l_2 norms of the vectors, but you need not take the absolute * value of each entry, since the cellwise norms are already positive. * * To get the global mean difference, simply sum up the elements as above. * To get the L_\infty norm, take the maximum of the vector elements, e.g. - * using the #dVector::linfty_norm# function. + * using the #Vector::linfty_norm# function. * * For the global $H_1$ norm and seminorm, the same rule applies as for the * $L_2$ norm: compute the $l_2$ norm of the cell error vector. @@ -279,7 +269,7 @@ class VectorTools { static void interpolate (const DoFHandler &dof, const Boundary &boundary, const Function &function, - dVector &vec); + Vector &vec); /** * Interpolate different finite @@ -295,9 +285,9 @@ class VectorTools { */ static void interpolate(const DoFHandler &high_dof, const DoFHandler &low_dof, - const dFMatrix &transfer, - const dVector &high, - dVector &low); + const FullMatrix &transfer, + const Vector &high, + Vector &low); /** * Compute the projection of @@ -320,7 +310,7 @@ class VectorTools { const Boundary &boundary, const Quadrature &q, const Function &function, - dVector &vec, + Vector &vec, const bool enforce_zero_boundary = false, const Quadrature &q_boundary = QGauss2(), const bool project_to_boundary_first = false); @@ -335,7 +325,7 @@ class VectorTools { const Quadrature &q, const Boundary &boundary, const Function &rhs, - dVector &rhs_vector); + Vector &rhs_vector); /** * Make up the list of node subject @@ -384,29 +374,38 @@ class VectorTools { * is given as a continuous function * object. * + * Note that this function returns + * its results in a vector of #float#s, + * rather than in a vector of #double#s, + * since accuracy is not that important + * here and to save memory. During + * computation of the results, the full + * accuracy of the #double# data type is + * used. + * * See the general documentation of this * class for more information. */ static void integrate_difference (const DoFHandler &dof, - const dVector &fe_function, + const Vector &fe_function, const Function &exact_solution, - dVector &difference, + Vector &difference, const Quadrature &q, const NormType &norm, - const Boundary &boundary=StraightBoundary()); + const Boundary &boundary=StraightBoundary()); /** * Compute the error for the solution of a system. * See the other #integrate_difference#. */ - static void integrate_difference (const DoFHandler &dof, - const dVector &fe_function, - const VectorFunction &exact_solution, - dVector &difference, - const Quadrature &q, - const FiniteElement &fe, - const NormType &norm, - const Boundary &boundary); +// static void integrate_difference (const DoFHandler &dof, +// const Vector &fe_function, +// const TensorFunction<1,dim>&exact_solution, +// Vector &difference, +// const Quadrature &q, +// const FiniteElement &fe, +// const NormType &norm, +// const Boundary &boundary); /** diff --git a/deal.II/deal.II/source/dofs/dof_accessor.cc b/deal.II/deal.II/source/dofs/dof_accessor.cc index 8de719c16a..3a6d94f78b 100644 --- a/deal.II/deal.II/source/dofs/dof_accessor.cc +++ b/deal.II/deal.II/source/dofs/dof_accessor.cc @@ -10,9 +10,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include @@ -134,8 +134,8 @@ DoFLineAccessor::child (const unsigned int i) const { template void DoFLineAccessor:: -distribute_local_to_global (const dVector &local_source, - dVector &global_destination) const { +distribute_local_to_global (const Vector &local_source, + Vector &global_destination) const { Assert (dof_handler != 0, ExcInvalidObject()); Assert (dof_handler->selected_fe != 0, ExcInvalidObject()); Assert (local_source.size() == (2*dof_handler->get_fe().dofs_per_vertex + @@ -159,8 +159,8 @@ distribute_local_to_global (const dVector &local_source, template void DoFLineAccessor:: -distribute_local_to_global (const dFMatrix &local_source, - dSMatrix &global_destination) const { +distribute_local_to_global (const FullMatrix &local_source, + SparseMatrix &global_destination) const { Assert (dof_handler != 0, ExcInvalidObject()); Assert (dof_handler->selected_fe != 0, ExcInvalidObject()); Assert (local_source.m() == (2*dof_handler->get_fe().dofs_per_vertex + @@ -327,8 +327,8 @@ DoFQuadAccessor::child (const unsigned int i) const { template void DoFQuadAccessor:: -distribute_local_to_global (const dVector &local_source, - dVector &global_destination) const { +distribute_local_to_global (const Vector &local_source, + Vector &global_destination) const { Assert (dof_handler != 0, ExcInvalidObject()); Assert (dof_handler->selected_fe != 0, ExcInvalidObject()); Assert (local_source.size() == (4*dof_handler->get_fe().dofs_per_vertex + @@ -353,8 +353,8 @@ distribute_local_to_global (const dVector &local_source, template void DoFQuadAccessor:: -distribute_local_to_global (const dFMatrix &local_source, - dSMatrix &global_destination) const { +distribute_local_to_global (const FullMatrix &local_source, + SparseMatrix &global_destination) const { Assert (dof_handler != 0, ExcInvalidObject()); Assert (dof_handler->selected_fe != 0, ExcInvalidObject()); Assert (local_source.m() == (4*dof_handler->get_fe().dofs_per_vertex + @@ -542,8 +542,8 @@ DoFHexAccessor::child (const unsigned int i) const { template void DoFHexAccessor:: -distribute_local_to_global (const dVector &local_source, - dVector &global_destination) const { +distribute_local_to_global (const Vector &local_source, + Vector &global_destination) const { Assert (dof_handler != 0, ExcInvalidObject()); Assert (dof_handler->selected_fe != 0, ExcInvalidObject()); Assert (local_source.size() == (8*dof_handler->get_fe().dofs_per_vertex + @@ -569,8 +569,8 @@ distribute_local_to_global (const dVector &local_source, template void DoFHexAccessor:: -distribute_local_to_global (const dFMatrix &local_source, - dSMatrix &global_destination) const { +distribute_local_to_global (const FullMatrix &local_source, + SparseMatrix &global_destination) const { Assert (dof_handler != 0, ExcInvalidObject()); Assert (dof_handler->selected_fe != 0, ExcInvalidObject()); Assert (local_source.m() == (8*dof_handler->get_fe().dofs_per_vertex + @@ -660,8 +660,8 @@ DoFCellAccessor<1>::face (const unsigned int) const { template <> void -DoFCellAccessor<1>::get_dof_values (const dVector &values, - dVector &local_values) const { +DoFCellAccessor<1>::get_dof_values (const Vector &values, + Vector &local_values) const { Assert (dof_handler != 0, ExcInvalidObject()); Assert (&dof_handler->get_fe() != 0, ExcInvalidObject()); Assert (local_values.size() == dof_handler->get_fe().total_dofs, @@ -684,8 +684,8 @@ DoFCellAccessor<1>::get_dof_values (const dVector &values, template <> void -DoFCellAccessor<1>::set_dof_values (const dVector &local_values, - dVector &values) const { +DoFCellAccessor<1>::set_dof_values (const Vector &local_values, + Vector &values) const { Assert (dof_handler != 0, ExcInvalidObject()); Assert (&dof_handler->get_fe() != 0, ExcInvalidObject()); Assert (local_values.size() == dof_handler->get_fe().total_dofs, @@ -722,8 +722,8 @@ DoFCellAccessor<2>::face (const unsigned int i) const { template <> void -DoFCellAccessor<2>::get_dof_values (const dVector &values, - dVector &local_values) const { +DoFCellAccessor<2>::get_dof_values (const Vector &values, + Vector &local_values) const { Assert (dof_handler != 0, ExcInvalidObject()); Assert (&dof_handler->get_fe() != 0, ExcInvalidObject()); Assert (local_values.size() == dof_handler->get_fe().total_dofs, @@ -750,8 +750,8 @@ DoFCellAccessor<2>::get_dof_values (const dVector &values, template <> void -DoFCellAccessor<2>::set_dof_values (const dVector &local_values, - dVector &values) const { +DoFCellAccessor<2>::set_dof_values (const Vector &local_values, + Vector &values) const { Assert (dof_handler != 0, ExcInvalidObject()); Assert (&dof_handler->get_fe() != 0, ExcInvalidObject()); Assert (local_values.size() == dof_handler->get_fe().total_dofs, @@ -792,8 +792,8 @@ DoFCellAccessor<3>::face (const unsigned int i) const { template <> void -DoFCellAccessor<3>::get_dof_values (const dVector &values, - dVector &local_values) const { +DoFCellAccessor<3>::get_dof_values (const Vector &values, + Vector &local_values) const { Assert (dof_handler != 0, ExcInvalidObject()); Assert (&dof_handler->get_fe() != 0, ExcInvalidObject()); Assert (local_values.size() == dof_handler->get_fe().total_dofs, @@ -824,8 +824,8 @@ DoFCellAccessor<3>::get_dof_values (const dVector &values, template <> void -DoFCellAccessor<3>::set_dof_values (const dVector &local_values, - dVector &values) const { +DoFCellAccessor<3>::set_dof_values (const Vector &local_values, + Vector &values) const { Assert (dof_handler != 0, ExcInvalidObject()); Assert (&dof_handler->get_fe() != 0, ExcInvalidObject()); Assert (local_values.size() == dof_handler->get_fe().total_dofs, @@ -861,8 +861,8 @@ DoFCellAccessor<3>::set_dof_values (const dVector &local_values, template void -DoFCellAccessor::get_interpolated_dof_values (const dVector &values, - dVector &interpolated_values) const { +DoFCellAccessor::get_interpolated_dof_values (const Vector &values, + Vector &interpolated_values) const { const unsigned int total_dofs = dof_handler->get_fe().total_dofs; Assert (dof_handler != 0, ExcInvalidObject()); @@ -879,8 +879,8 @@ DoFCellAccessor::get_interpolated_dof_values (const dVector &values, else // otherwise clobber them from the children { - dVector tmp1(total_dofs); - dVector tmp2(total_dofs); + Vector tmp1(total_dofs); + Vector tmp2(total_dofs); interpolated_values.clear (); @@ -914,8 +914,8 @@ DoFCellAccessor::get_interpolated_dof_values (const dVector &values, template void -DoFCellAccessor::set_dof_values_by_interpolation (const dVector &local_values, - dVector &values) const { +DoFCellAccessor::set_dof_values_by_interpolation (const Vector &local_values, + Vector &values) const { const unsigned int total_dofs = dof_handler->get_fe().total_dofs; Assert (dof_handler != 0, ExcInvalidObject()); @@ -932,7 +932,7 @@ DoFCellAccessor::set_dof_values_by_interpolation (const dVector &local_valu else // otherwise distribute them to the children { - dVector tmp(total_dofs); + Vector tmp(total_dofs); for (unsigned int child=0; child::children_per_cell; ++child) diff --git a/deal.II/deal.II/source/dofs/dof_constraints.cc b/deal.II/deal.II/source/dofs/dof_constraints.cc index 81283580d3..8b9cc892db 100644 --- a/deal.II/deal.II/source/dofs/dof_constraints.cc +++ b/deal.II/deal.II/source/dofs/dof_constraints.cc @@ -4,8 +4,8 @@ #include -#include -#include +#include +#include #include #include #include @@ -119,8 +119,8 @@ void ConstraintMatrix::clear () { -void ConstraintMatrix::condense (const dSMatrixStruct &uncondensed, - dSMatrixStruct &condensed) const { +void ConstraintMatrix::condense (const SparseMatrixStruct &uncondensed, + SparseMatrixStruct &condensed) const { Assert (sorted == true, ExcMatrixNotClosed()); Assert (uncondensed.is_compressed() == true, ExcMatrixNotClosed()); Assert (uncondensed.n_rows() == uncondensed.n_cols(), @@ -228,7 +228,7 @@ void ConstraintMatrix::condense (const dSMatrixStruct &uncondensed, -void ConstraintMatrix::condense (dSMatrixStruct &sparsity) const { +void ConstraintMatrix::condense (SparseMatrixStruct &sparsity) const { Assert (sorted == true, ExcMatrixNotClosed()); Assert (sparsity.is_compressed() == false, ExcMatrixIsClosed()); Assert (sparsity.n_rows() == sparsity.n_cols(), @@ -311,9 +311,9 @@ void ConstraintMatrix::condense (dSMatrixStruct &sparsity) const { -void ConstraintMatrix::condense (const dSMatrix &uncondensed, - dSMatrix &condensed) const { - const dSMatrixStruct &uncondensed_struct = uncondensed.get_sparsity_pattern (); +void ConstraintMatrix::condense (const SparseMatrix &uncondensed, + SparseMatrix &condensed) const { + const SparseMatrixStruct &uncondensed_struct = uncondensed.get_sparsity_pattern (); Assert (sorted == true, ExcMatrixNotClosed()); Assert (uncondensed_struct.is_compressed() == true, ExcMatrixNotClosed()); @@ -434,8 +434,8 @@ void ConstraintMatrix::condense (const dSMatrix &uncondensed, -void ConstraintMatrix::condense (dSMatrix &uncondensed) const { - const dSMatrixStruct &sparsity = uncondensed.get_sparsity_pattern (); +void ConstraintMatrix::condense (SparseMatrix &uncondensed) const { + const SparseMatrixStruct &sparsity = uncondensed.get_sparsity_pattern (); Assert (sorted == true, ExcMatrixNotClosed()); Assert (sparsity.is_compressed() == true, ExcMatrixNotClosed()); @@ -555,8 +555,8 @@ void ConstraintMatrix::condense (dSMatrix &uncondensed) const { -void ConstraintMatrix::condense (const dVector &uncondensed, - dVector &condensed) const { +void ConstraintMatrix::condense (const Vector &uncondensed, + Vector &condensed) const { Assert (sorted == true, ExcMatrixNotClosed()); Assert (condensed.size()+n_constraints() == uncondensed.size(), ExcWrongDimension()); @@ -626,7 +626,7 @@ void ConstraintMatrix::condense (const dVector &uncondensed, -void ConstraintMatrix::condense (dVector &vec) const { +void ConstraintMatrix::condense (Vector &vec) const { Assert (sorted == true, ExcMatrixNotClosed()); if (lines.size() == 0) @@ -655,8 +655,8 @@ void ConstraintMatrix::condense (dVector &vec) const { -void ConstraintMatrix::distribute (const dVector &condensed, - dVector &uncondensed) const { +void ConstraintMatrix::distribute (const Vector &condensed, + Vector &uncondensed) const { Assert (sorted == true, ExcMatrixNotClosed()); Assert (condensed.size()+n_constraints() == uncondensed.size(), ExcWrongDimension()); @@ -725,7 +725,7 @@ void ConstraintMatrix::distribute (const dVector &condensed, -void ConstraintMatrix::distribute (dVector &vec) const { +void ConstraintMatrix::distribute (Vector &vec) const { Assert (sorted == true, ExcMatrixNotClosed()); vector::const_iterator next_constraint = lines.begin(); diff --git a/deal.II/deal.II/source/dofs/dof_handler.cc b/deal.II/deal.II/source/dofs/dof_handler.cc index 88667c5176..88928fd737 100644 --- a/deal.II/deal.II/source/dofs/dof_handler.cc +++ b/deal.II/deal.II/source/dofs/dof_handler.cc @@ -12,8 +12,9 @@ #include #include #include -#include -#include +#include +#include +#include #include #include @@ -1569,7 +1570,7 @@ void DoFHandler::renumber_dofs (const RenumberingMethod method, const bool use_constraints, const vector &starting_points) { // make the connection graph - dSMatrixStruct sparsity (n_dofs(), max_couplings_between_dofs()); + SparseMatrixStruct sparsity (n_dofs(), max_couplings_between_dofs()); make_sparsity_pattern (sparsity); if (use_constraints) @@ -2160,7 +2161,7 @@ void DoFHandler<3>::make_constraint_matrix (ConstraintMatrix &constraints) const template -void DoFHandler::make_sparsity_pattern (dSMatrixStruct &sparsity) const { +void DoFHandler::make_sparsity_pattern (SparseMatrixStruct &sparsity) const { Assert (selected_fe != 0, ExcNoFESelected()); Assert (sparsity.n_rows() == n_dofs(), ExcDifferentDimensions (sparsity.n_rows(), n_dofs())); @@ -2186,8 +2187,8 @@ void DoFHandler::make_sparsity_pattern (dSMatrixStruct &sparsity) const { #if deal_II_dimension == 1 template <> -void DoFHandler<1>::make_boundary_sparsity_pattern (const vector &, - dSMatrixStruct &) const { +void DoFHandler<1>::make_boundary_sparsity_pattern (const vector &, + SparseMatrixStruct &) const { Assert (selected_fe != 0, ExcNoFESelected()); Assert (false, ExcInternalError()); }; @@ -2195,9 +2196,9 @@ void DoFHandler<1>::make_boundary_sparsity_pattern (const vector &, template <> -void DoFHandler<1>::make_boundary_sparsity_pattern (const FunctionMap &, - const vector &, - dSMatrixStruct &) const { +void DoFHandler<1>::make_boundary_sparsity_pattern (const FunctionMap &, + const vector &, + SparseMatrixStruct &) const { Assert (selected_fe != 0, ExcNoFESelected()); Assert (false, ExcInternalError()); }; @@ -2207,8 +2208,8 @@ void DoFHandler<1>::make_boundary_sparsity_pattern (const FunctionMap &, template -void DoFHandler::make_boundary_sparsity_pattern (const vector &dof_to_boundary_mapping, - dSMatrixStruct &sparsity) const { +void DoFHandler::make_boundary_sparsity_pattern (const vector &dof_to_boundary_mapping, + SparseMatrixStruct &sparsity) const { Assert (selected_fe != 0, ExcNoFESelected()); Assert (dof_to_boundary_mapping.size() == n_dofs(), ExcInternalError()); Assert (sparsity.n_rows() == n_boundary_dofs(), @@ -2245,9 +2246,9 @@ void DoFHandler::make_boundary_sparsity_pattern (const vector &dof_to_ template -void DoFHandler::make_boundary_sparsity_pattern (const FunctionMap &boundary_indicators, - const vector &dof_to_boundary_mapping, - dSMatrixStruct &sparsity) const { +void DoFHandler::make_boundary_sparsity_pattern (const FunctionMap &boundary_indicators, + const vector &dof_to_boundary_mapping, + SparseMatrixStruct &sparsity) const { Assert (selected_fe != 0, ExcNoFESelected()); Assert (dof_to_boundary_mapping.size() == n_dofs(), ExcInternalError()); Assert (boundary_indicators.find(255) == boundary_indicators.end(), @@ -2289,7 +2290,7 @@ void DoFHandler::make_boundary_sparsity_pattern (const FunctionMap &boundar template void DoFHandler::make_transfer_matrix (const DoFHandler &transfer_from, - dSMatrixStruct &transfer_pattern) const { + SparseMatrixStruct &transfer_pattern) const { Assert (tria->n_cells(0) == transfer_from.tria->n_cells(0), ExcGridsDoNotMatch()); Assert (*selected_fe == *transfer_from.selected_fe, @@ -2325,7 +2326,7 @@ void DoFHandler::make_transfer_matrix (const DoFHandler &transfer_from template void DoFHandler::make_transfer_matrix (const DoFHandler &transfer_from, - dSMatrix &transfer_matrix) const { + SparseMatrix &transfer_matrix) const { cell_iterator old_cell = transfer_from.begin(0), new_cell = begin(0); unsigned int n_coarse_cells = tria->n_cells(0); @@ -2340,7 +2341,7 @@ void DoFHandler::make_transfer_matrix (const DoFHandler &transfer_from template void DoFHandler::transfer_cell (const typename DoFHandler::cell_iterator &old_cell, const typename DoFHandler::cell_iterator &new_cell, - dSMatrixStruct &transfer_pattern) const { + SparseMatrixStruct &transfer_pattern) const { if (!new_cell->active() && !old_cell->active()) // both cells have children; go deeper for (unsigned int child=0; child::children_per_cell; ++child) @@ -2421,7 +2422,7 @@ void DoFHandler::transfer_cell (const typename DoFHandler::cell_iterat template void DoFHandler::transfer_cell (const typename DoFHandler::cell_iterator &old_cell, const typename DoFHandler::cell_iterator &new_cell, - dSMatrix &transfer_matrix) const { + SparseMatrix &transfer_matrix) const { if (!new_cell->active() && !old_cell->active()) // both cells have children; go deeper for (unsigned int child=0; child::children_per_cell; ++child) @@ -2438,9 +2439,9 @@ void DoFHandler::transfer_cell (const typename DoFHandler::cell_iterat // copy dofs one-by-one for (unsigned int j=0; j:: as a workaround // for a bug in egcs - transfer_matrix.dSMatrix::set (new_dofs[j], old_dofs[j], 1.0); + transfer_matrix.SparseMatrix::set (new_dofs[j], old_dofs[j], 1.0); } else if (!new_cell->active() && old_cell->active()) @@ -2467,12 +2468,12 @@ void DoFHandler::transfer_cell (const typename DoFHandler::cell_iterat for (unsigned int k=0; ktotal_dofs; ++k) for (unsigned int j=0; jtotal_dofs; ++j) if (selected_fe->prolongate(c)(k,j) != 0.) - // use the dSMatrix:: + // use the SparseMatrix:: // as a workaround // for a bug in egcs - transfer_matrix.dSMatrix::set (child_dof_indices[k], - old_dof_indices[j], - selected_fe->prolongate(c)(k,j)); + transfer_matrix.SparseMatrix::set (child_dof_indices[k], + old_dof_indices[j], + selected_fe->prolongate(c)(k,j)); }; } else { // old cell has children, new one has not @@ -2497,13 +2498,13 @@ void DoFHandler::transfer_cell (const typename DoFHandler::cell_iterat for (unsigned int k=0; ktotal_dofs; ++k) for (unsigned int j=0; jtotal_dofs; ++j) if (selected_fe->restrict(c)(k,j) != 0.) - // use the dSMatrix:: as + // use the SparseMatrix:: as // a workaround // for a bug in egcs - transfer_matrix.dSMatrix::set (new_dof_indices[k], - child_dof_indices[j], - selected_fe->restrict(c)(k,j)); + transfer_matrix.SparseMatrix::set (new_dof_indices[k], + child_dof_indices[j], + selected_fe->restrict(c)(k,j)); }; }; }; @@ -2687,9 +2688,11 @@ unsigned int DoFHandler<3>::max_couplings_between_boundary_dofs () const { + template -void DoFHandler::distribute_cell_to_dof_vector (const dVector &cell_data, - dVector &dof_data) const { +template +void DoFHandler::distribute_cell_to_dof_vector (const Vector &cell_data, + Vector &dof_data) const { Assert (cell_data.size()==tria->n_active_cells(), ExcWrongSize (cell_data.size(), tria->n_active_cells())); @@ -2926,5 +2929,15 @@ void DoFHandler::clear_space () { /*-------------- Explicit Instantiations -------------------------------*/ template class DoFHandler; +template +void +DoFHandler::distribute_cell_to_dof_vector (const Vector &cell_data, + Vector &dof_data) const; + +template +void +DoFHandler::distribute_cell_to_dof_vector (const Vector &cell_data, + Vector &dof_data) const; + diff --git a/deal.II/deal.II/source/dofs/mg_dof_accessor.cc b/deal.II/deal.II/source/dofs/mg_dof_accessor.cc index 49b7f9c661..101f9344fe 100644 --- a/deal.II/deal.II/source/dofs/mg_dof_accessor.cc +++ b/deal.II/deal.II/source/dofs/mg_dof_accessor.cc @@ -10,9 +10,9 @@ #include #include -#include -#include -#include +#include +#include +#include @@ -349,8 +349,8 @@ MGDoFCellAccessor<1>::face (const unsigned int) const { template <> void -MGDoFCellAccessor<1>::get_mg_dof_values (const dVector &values, - dVector &dof_values) const { +MGDoFCellAccessor<1>::get_mg_dof_values (const Vector &values, + Vector &dof_values) const { Assert (dof_handler != 0, ExcInvalidObject()); Assert (mg_dof_handler != 0, ExcInvalidObject()); Assert (&dof_handler->get_fe() != 0, ExcInvalidObject()); @@ -385,8 +385,8 @@ MGDoFCellAccessor<2>::face (const unsigned int i) const { template <> void -MGDoFCellAccessor<2>::get_mg_dof_values (const dVector &values, - dVector &dof_values) const { +MGDoFCellAccessor<2>::get_mg_dof_values (const Vector &values, + Vector &dof_values) const { Assert (dof_handler != 0, ExcInvalidObject()); Assert (mg_dof_handler != 0, ExcInvalidObject()); Assert (&dof_handler->get_fe() != 0, ExcInvalidObject()); diff --git a/deal.II/deal.II/source/dofs/mg_dof_handler.cc b/deal.II/deal.II/source/dofs/mg_dof_handler.cc index c1ce677a99..f6092999ed 100644 --- a/deal.II/deal.II/source/dofs/mg_dof_handler.cc +++ b/deal.II/deal.II/source/dofs/mg_dof_handler.cc @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include @@ -1002,7 +1002,7 @@ unsigned int MGDoFHandler::n_dofs (const unsigned int level) const { template void MGDoFHandler::make_sparsity_pattern (const unsigned int level, - dSMatrixStruct &sparsity) const { + SparseMatrixStruct &sparsity) const { Assert (selected_fe != 0, ExcNoFESelected()); Assert (sparsity.n_rows() == n_dofs(level), ExcDifferentDimensions (sparsity.n_rows(), n_dofs(level))); @@ -1032,7 +1032,7 @@ void MGDoFHandler::renumber_dofs (const unsigned int level, const RenumberingMethod method, const vector &starting_points) { // make the connection graph - dSMatrixStruct sparsity (n_dofs(level), max_couplings_between_dofs()); + SparseMatrixStruct sparsity (n_dofs(level), max_couplings_between_dofs()); make_sparsity_pattern (level, sparsity); int n_dofs = sparsity.n_rows(); diff --git a/deal.II/deal.II/source/fe/fe.cc b/deal.II/deal.II/source/fe/fe.cc index 32c438a615..5cb3fc4ee8 100644 --- a/deal.II/deal.II/source/fe/fe.cc +++ b/deal.II/deal.II/source/fe/fe.cc @@ -165,7 +165,7 @@ FiniteElementBase::FiniteElementBase (const FiniteElementData &fe_data template -const dFMatrix & +const FullMatrix & FiniteElementBase::restrict (const unsigned int child) const { Assert (child::children_per_cell, ExcInvalidIndex(child)); return restriction[child]; @@ -174,7 +174,7 @@ FiniteElementBase::restrict (const unsigned int child) const { template -const dFMatrix & +const FullMatrix & FiniteElementBase::prolongate (const unsigned int child) const { Assert (child::children_per_cell, ExcInvalidIndex(child)); return prolongation[child]; @@ -183,7 +183,7 @@ FiniteElementBase::prolongate (const unsigned int child) const { template -const dFMatrix & +const FullMatrix & FiniteElementBase::constraints () const { if (dim==1) Assert ((interface_constraints.m()==1) && (interface_constraints.n()==1), @@ -237,7 +237,7 @@ void FiniteElement<1>::fill_fe_values (const DoFHandler<1>::cell_iterator &cell, const bool compute_support_points, vector > &q_points, const bool compute_q_points, - const dFMatrix &, + const FullMatrix &, const vector > > &, const Boundary<1> &boundary) const { Assert ((!compute_jacobians) || (jacobians.size() == unit_points.size()), @@ -296,7 +296,7 @@ void FiniteElement<1>::fill_fe_face_values (const DoFHandler<1>::cell_iterator & const bool , vector > &, const bool, - const dFMatrix &, + const FullMatrix &, const vector > > &, const Boundary<1> &) const { Assert (false, ExcNotImplemented()); @@ -319,7 +319,7 @@ void FiniteElement<1>::fill_fe_subface_values (const DoFHandler<1>::cell_iterato const bool , vector > &, const bool, - const dFMatrix &, + const FullMatrix &, const vector > > &, const Boundary<1> &) const { Assert (false, ExcNotImplemented()); @@ -388,7 +388,7 @@ void FiniteElement::fill_fe_values (const DoFHandler::cell_iterator &, const bool, vector > &, const bool, - const dFMatrix &, + const FullMatrix &, const vector > > &, const Boundary &) const { Assert (false, ExcPureFunctionCalled()); @@ -413,7 +413,7 @@ void FiniteElement::fill_fe_face_values (const DoFHandler::cell_iterat const bool compute_face_jacobians, vector > &normal_vectors, const bool compute_normal_vectors, - const dFMatrix &shape_values_transform, + const FullMatrix &shape_values_transform, const vector > > &shape_gradients_transform, const Boundary &boundary) const { Assert (jacobians.size() == unit_points.size(), @@ -465,7 +465,7 @@ void FiniteElement::fill_fe_subface_values (const DoFHandler::cell_ite const bool compute_face_jacobians, vector > &normal_vectors, const bool compute_normal_vectors, - const dFMatrix &shape_values_transform, + const FullMatrix &shape_values_transform, const vector > > &shape_gradients_transform, const Boundary &boundary) const { Assert (jacobians.size() == unit_points.size(), diff --git a/deal.II/deal.II/source/fe/fe_lib.criss_cross.cc b/deal.II/deal.II/source/fe/fe_lib.criss_cross.cc index 6000e8c3c3..c5c3562e7e 100644 --- a/deal.II/deal.II/source/fe/fe_lib.criss_cross.cc +++ b/deal.II/deal.II/source/fe/fe_lib.criss_cross.cc @@ -369,7 +369,7 @@ void FECrissCross<1>::get_face_support_points (const DoFHandler<1>::face_iterato template <> void FECrissCross<1>::get_local_mass_matrix (const DoFHandler<1>::cell_iterator &, const Boundary<1> &, - dFMatrix &) const { + FullMatrix &) const { Assert (false, ExcNotUseful()); }; @@ -446,7 +446,7 @@ void FECrissCross<1>::fill_fe_values (const DoFHandler<1>::cell_iterator &, const bool , vector > &, const bool , - const dFMatrix &, + const FullMatrix &, const vector > > &, const Boundary<1> &) const { Assert (false, ExcNotUseful()); @@ -657,7 +657,7 @@ void FECrissCross<2>::get_face_support_points (const DoFHandler<2>::face_iterato template <> void FECrissCross<2>::get_local_mass_matrix (const DoFHandler<2>::cell_iterator &cell, const Boundary<2> &, - dFMatrix &mass_matrix) const { + FullMatrix &mass_matrix) const { Assert (mass_matrix.n() == total_dofs, ExcWrongFieldDimension(mass_matrix.n(),total_dofs)); Assert (mass_matrix.m() == total_dofs, @@ -942,7 +942,7 @@ void FECrissCross::fill_fe_values (const DoFHandler::cell_iterator &ce const bool compute_support_points, vector > &q_points, const bool compute_q_points, - const dFMatrix &shape_values_transform, + const FullMatrix &shape_values_transform, const vector > > &/*shape_grad_transform*/, const Boundary &boundary) const { Assert (jacobians.size() == unit_points.size(), diff --git a/deal.II/deal.II/source/fe/fe_lib.cubic.cc b/deal.II/deal.II/source/fe/fe_lib.cubic.cc index ca55db78f4..916ab0829e 100644 --- a/deal.II/deal.II/source/fe/fe_lib.cubic.cc +++ b/deal.II/deal.II/source/fe/fe_lib.cubic.cc @@ -201,7 +201,7 @@ void FECubicSub<1>::get_face_support_points (const typename DoFHandler<1>::face_ template <> void FECubicSub<1>::get_local_mass_matrix (const DoFHandler<1>::cell_iterator &cell, const Boundary<1> &, - dFMatrix &local_mass_matrix) const { + FullMatrix &local_mass_matrix) const { Assert (local_mass_matrix.n() == total_dofs, ExcWrongFieldDimension(local_mass_matrix.n(),total_dofs)); Assert (local_mass_matrix.m() == total_dofs, @@ -923,7 +923,7 @@ FECubicSub<2>::shape_grad_grad (const unsigned int i, template <> void FECubicSub<2>::get_local_mass_matrix (const DoFHandler<2>::cell_iterator &cell, const Boundary<2> &, - dFMatrix &local_mass_matrix) const { + FullMatrix &local_mass_matrix) const { Assert (local_mass_matrix.n() == total_dofs, ExcWrongFieldDimension(local_mass_matrix.n(),total_dofs)); Assert (local_mass_matrix.m() == total_dofs, @@ -11397,7 +11397,7 @@ return_value[2][2] = 2.0*(729.0/2.0*xi-1458.0*xi*xi+2187.0/2.0*xi*xi*xi)*eta+2.0 template <> void FECubicSub<3>::get_local_mass_matrix (const DoFHandler<3>::cell_iterator &, const Boundary<3> &, - dFMatrix &local_mass_matrix) const { + FullMatrix &local_mass_matrix) const { Assert (local_mass_matrix.n() == total_dofs, ExcWrongFieldDimension(local_mass_matrix.n(),total_dofs)); Assert (local_mass_matrix.m() == total_dofs, diff --git a/deal.II/deal.II/source/fe/fe_lib.dg.cc b/deal.II/deal.II/source/fe/fe_lib.dg.cc index bf0d9454d1..826460237c 100644 --- a/deal.II/deal.II/source/fe/fe_lib.dg.cc +++ b/deal.II/deal.II/source/fe/fe_lib.dg.cc @@ -27,7 +27,7 @@ FEDGQuarticSub::FEDGQuarticSub(): template -const dFMatrix & +const FullMatrix & FEDGLinear::restrict (const unsigned int child) const { Assert (false, ExcNotImplemented()); return restriction[child]; @@ -35,7 +35,7 @@ FEDGLinear::restrict (const unsigned int child) const { template -const dFMatrix & +const FullMatrix & FEDGQuadraticSub::restrict (const unsigned int child) const { Assert (false, ExcNotImplemented()); return restriction[child]; @@ -44,7 +44,7 @@ FEDGQuadraticSub::restrict (const unsigned int child) const { template -const dFMatrix & +const FullMatrix & FEDGCubicSub::restrict (const unsigned int child) const { Assert (false, ExcNotImplemented()); return restriction[child]; @@ -53,7 +53,7 @@ FEDGCubicSub::restrict (const unsigned int child) const { template -const dFMatrix & +const FullMatrix & FEDGQuarticSub::restrict (const unsigned int child) const { Assert (false, ExcNotImplemented()); return restriction[child]; diff --git a/deal.II/deal.II/source/fe/fe_lib.dg.constant.cc b/deal.II/deal.II/source/fe/fe_lib.dg.constant.cc index 1a4e9e7835..7e87de1c1e 100644 --- a/deal.II/deal.II/source/fe/fe_lib.dg.constant.cc +++ b/deal.II/deal.II/source/fe/fe_lib.dg.constant.cc @@ -127,7 +127,7 @@ FEDGConstant::shape_grad_grad (const unsigned int i, template void FEDGConstant::get_local_mass_matrix (const DoFHandler::cell_iterator &cell, const Boundary &, - dFMatrix &local_mass_matrix) const { + FullMatrix &local_mass_matrix) const { Assert (local_mass_matrix.n() == total_dofs, ExcWrongFieldDimension(local_mass_matrix.n(),total_dofs)); Assert (local_mass_matrix.m() == total_dofs, @@ -176,7 +176,7 @@ FEDGConstant::get_face_support_points (const typename DoFHandler::face template -const dFMatrix & +const FullMatrix & FEDGConstant::restrict (const unsigned int child) const { Assert (false, ExcNotImplemented()); return restriction[child]; diff --git a/deal.II/deal.II/source/fe/fe_lib.linear.cc b/deal.II/deal.II/source/fe/fe_lib.linear.cc index 5334f6f5c4..89cc701118 100644 --- a/deal.II/deal.II/source/fe/fe_lib.linear.cc +++ b/deal.II/deal.II/source/fe/fe_lib.linear.cc @@ -146,7 +146,7 @@ void FELinear<1>::get_face_support_points (const typename DoFHandler<1>::face_it template <> void FELinear<1>::get_local_mass_matrix (const DoFHandler<1>::cell_iterator &cell, const Boundary<1> &, - dFMatrix &local_mass_matrix) const { + FullMatrix &local_mass_matrix) const { Assert (local_mass_matrix.n() == total_dofs, ExcWrongFieldDimension(local_mass_matrix.n(),total_dofs)); Assert (local_mass_matrix.m() == total_dofs, @@ -314,7 +314,7 @@ FELinear<2>::shape_grad_grad (const unsigned int i, template <> void FELinear<2>::get_local_mass_matrix (const DoFHandler<2>::cell_iterator &cell, const Boundary<2> &, - dFMatrix &local_mass_matrix) const { + FullMatrix &local_mass_matrix) const { Assert (local_mass_matrix.n() == total_dofs, ExcWrongFieldDimension(local_mass_matrix.n(),total_dofs)); Assert (local_mass_matrix.m() == total_dofs, @@ -850,7 +850,7 @@ FELinear<3>::shape_grad_grad (const unsigned int i, template <> void FELinear<3>::get_local_mass_matrix (const DoFHandler<3>::cell_iterator &, const Boundary<3> &, - dFMatrix &local_mass_matrix) const { + FullMatrix &local_mass_matrix) const { Assert (local_mass_matrix.n() == total_dofs, ExcWrongFieldDimension(local_mass_matrix.n(),total_dofs)); Assert (local_mass_matrix.m() == total_dofs, diff --git a/deal.II/deal.II/source/fe/fe_lib.quadratic.cc b/deal.II/deal.II/source/fe/fe_lib.quadratic.cc index 7f60977ba7..f56c40959c 100644 --- a/deal.II/deal.II/source/fe/fe_lib.quadratic.cc +++ b/deal.II/deal.II/source/fe/fe_lib.quadratic.cc @@ -212,7 +212,7 @@ void FEQuadraticSub<1>::get_face_support_points (const typename DoFHandler<1>::f template <> void FEQuadraticSub<1>::get_local_mass_matrix (const DoFHandler<1>::cell_iterator &cell, const Boundary<1> &, - dFMatrix &local_mass_matrix) const { + FullMatrix &local_mass_matrix) const { Assert (local_mass_matrix.n() == total_dofs, ExcWrongFieldDimension(local_mass_matrix.n(),total_dofs)); Assert (local_mass_matrix.m() == total_dofs, @@ -787,7 +787,7 @@ FEQuadraticSub<2>::shape_grad_grad (const unsigned int i, template <> void FEQuadraticSub<2>::get_local_mass_matrix (const DoFHandler<2>::cell_iterator &cell, const Boundary<2> &, - dFMatrix &local_mass_matrix) const { + FullMatrix &local_mass_matrix) const { Assert (local_mass_matrix.n() == total_dofs, ExcWrongFieldDimension(local_mass_matrix.n(),total_dofs)); Assert (local_mass_matrix.m() == total_dofs, @@ -2777,7 +2777,7 @@ return_value[2][2] = 2.0*(-64.0*xi+64.0*xi*xi)*eta+2.0*(64.0*xi-64.0*xi*xi)*eta* template <> void FEQuadraticSub<3>::get_local_mass_matrix (const DoFHandler<3>::cell_iterator &, const Boundary<3> &, - dFMatrix &local_mass_matrix) const { + FullMatrix &local_mass_matrix) const { Assert (local_mass_matrix.n() == total_dofs, ExcWrongFieldDimension(local_mass_matrix.n(),total_dofs)); Assert (local_mass_matrix.m() == total_dofs, diff --git a/deal.II/deal.II/source/fe/fe_lib.quartic.cc b/deal.II/deal.II/source/fe/fe_lib.quartic.cc index 3d3c27be8c..6d2264ab12 100644 --- a/deal.II/deal.II/source/fe/fe_lib.quartic.cc +++ b/deal.II/deal.II/source/fe/fe_lib.quartic.cc @@ -168,7 +168,7 @@ void FEQuarticSub<1>::get_face_support_points (const typename DoFHandler<1>::fac template <> void FEQuarticSub<1>::get_local_mass_matrix (const DoFHandler<1>::cell_iterator &cell, const Boundary<1> &, - dFMatrix &local_mass_matrix) const { + FullMatrix &local_mass_matrix) const { Assert (local_mass_matrix.n() == total_dofs, ExcWrongFieldDimension(local_mass_matrix.n(),total_dofs)); Assert (local_mass_matrix.m() == total_dofs, @@ -1341,7 +1341,7 @@ FEQuarticSub<2>::shape_grad_grad (const unsigned int i, template <> void FEQuarticSub<2>::get_local_mass_matrix (const DoFHandler<2>::cell_iterator &cell, const Boundary<2> &, - dFMatrix &local_mass_matrix) const { + FullMatrix &local_mass_matrix) const { Assert (local_mass_matrix.n() == total_dofs, ExcWrongFieldDimension(local_mass_matrix.n(),total_dofs)); Assert (local_mass_matrix.m() == total_dofs, diff --git a/deal.II/deal.II/source/fe/fe_linear_mapping.cc b/deal.II/deal.II/source/fe/fe_linear_mapping.cc index bef427b76a..8bd04122be 100644 --- a/deal.II/deal.II/source/fe/fe_linear_mapping.cc +++ b/deal.II/deal.II/source/fe/fe_linear_mapping.cc @@ -122,7 +122,7 @@ void FELinearMapping<1>::fill_fe_values (const DoFHandler<1>::cell_iterator &cel const bool compute_support_points, vector > &q_points, const bool compute_q_points, - const dFMatrix &shape_values_transform, + const FullMatrix &shape_values_transform, const vector > > &shape_gradients_transform, const Boundary<1> &boundary) const { // simply pass down @@ -565,7 +565,7 @@ void FELinearMapping::fill_fe_values (const DoFHandler::cell_iterator const bool compute_support_points, vector > &q_points, const bool compute_q_points, - const dFMatrix &shape_values_transform, + const FullMatrix &shape_values_transform, const vector > > &/*shape_grad_transform*/, const Boundary &boundary) const { @@ -636,7 +636,7 @@ void FELinearMapping::fill_fe_values (const DoFHandler::cell_iterator if (compute_jacobians) { - dFMatrix M(dim,dim); + FullMatrix M(dim,dim); for (unsigned int l=0; l::fill_fe_values (const DoFHandler::cell_iterator #include #include #include - #include + #include int main () { Triangulation<2> tria; @@ -691,7 +691,7 @@ void FELinearMapping::fill_fe_values (const DoFHandler::cell_iterator fevalues.reinit (dof.begin_active(),b); - dVector val(4); + Vector val(4); val(2) = 1; vector > grads(4); diff --git a/deal.II/deal.II/source/fe/fe_system.cc b/deal.II/deal.II/source/fe/fe_system.cc index 6ea9c6f79a..b9ae5a99b2 100644 --- a/deal.II/deal.II/source/fe/fe_system.cc +++ b/deal.II/deal.II/source/fe/fe_system.cc @@ -1,5 +1,5 @@ /* $Id$ */ -/* Copyright W. Bangerth, G. Kanschat University of Heidelberg, 1990 */ +/* Copyright W. Bangerth, G. Kanschat University of Heidelberg, 1999 */ #include @@ -344,7 +344,7 @@ void FESystem::get_face_support_points (const DoFHandler::face_iterato template void FESystem::get_local_mass_matrix (const DoFHandler::cell_iterator &/*cell*/, const Boundary &/*boundary*/, - dFMatrix &/*local_mass_matrix*/) const + FullMatrix &/*local_mass_matrix*/) const { Assert(false, ExcNotImplemented()); /* @@ -355,7 +355,7 @@ void FESystem::get_local_mass_matrix (const DoFHandler::cell_iterator // first get the local mass matrix for // the base object - dFMatrix base_mass_matrix (base_element->total_dofs, + FullMatrix base_mass_matrix (base_element->total_dofs, base_element->total_dofs); base_element->get_local_mass_matrix (cell, boundary, base_mass_matrix); @@ -452,7 +452,7 @@ FESystem::fill_fe_values (const DoFHandler::cell_iterator &cell, const bool compute_support_points, vector > &q_points, const bool compute_q_points, - const dFMatrix &shape_values_transform, + const FullMatrix &shape_values_transform, const vector > > &shape_grad_transform, const Boundary &boundary) const { diff --git a/deal.II/deal.II/source/fe/fe_values.cc b/deal.II/deal.II/source/fe/fe_values.cc index 870594cd7a..67c57e16fa 100644 --- a/deal.II/deal.II/source/fe/fe_values.cc +++ b/deal.II/deal.II/source/fe/fe_values.cc @@ -9,7 +9,7 @@ #include #include #include -#include +#include /*------------------------------- FEValuesBase ---------------------------*/ @@ -26,7 +26,7 @@ FEValuesBase::FEValuesBase (const unsigned int n_q_points, n_quadrature_points (n_q_points), total_dofs (total_dofs), n_transform_functions (n_transform_functions), - shape_values (n_values_arrays, dFMatrix(total_dofs, n_q_points)), + shape_values (n_values_arrays, FullMatrix(total_dofs, n_q_points)), shape_gradients (total_dofs, vector >(n_q_points)), shape_2nd_derivatives (total_dofs, vector >(n_q_points)), weights (n_q_points, 0), @@ -36,8 +36,8 @@ FEValuesBase::FEValuesBase (const unsigned int n_q_points, jacobi_matrices (n_q_points, Tensor<2,dim>()), jacobi_matrices_grad (n_q_points, Tensor<3,dim>()), shape_values_transform (n_values_arrays, - dFMatrix(n_transform_functions, - n_quadrature_points)), + FullMatrix(n_transform_functions, + n_quadrature_points)), selected_dataset (0), update_flags (update_flags), fe(&fe) {}; @@ -61,8 +61,8 @@ double FEValuesBase::shape_value (const unsigned int i, template -void FEValuesBase::get_function_values (const dVector &fe_function, - vector &values) const +void FEValuesBase::get_function_values (const Vector &fe_function, + vector &values) const { Assert (fe->n_components == 1, ExcWrongNoOfComponents()); @@ -73,7 +73,7 @@ void FEValuesBase::get_function_values (const dVector &fe_function, // get function values of dofs // on this cell - dVector dof_values (total_dofs); + Vector dof_values (total_dofs); present_cell->get_dof_values (fe_function, dof_values); // initialize with zero @@ -89,7 +89,7 @@ void FEValuesBase::get_function_values (const dVector &fe_function, template -void FEValuesBase::get_function_values (const dVector &fe_function, +void FEValuesBase::get_function_values (const Vector &fe_function, vector< vector > &values) const { Assert (fe->n_components == values.size(), @@ -102,7 +102,7 @@ void FEValuesBase::get_function_values (const dVector &fe_function, // get function values of dofs // on this cell - dVector dof_values (total_dofs); + Vector dof_values (total_dofs); present_cell->get_dof_values (fe_function, dof_values); // initialize with zero @@ -136,14 +136,14 @@ FEValuesBase::shape_grad (const unsigned int i, template -void FEValuesBase::get_function_grads (const dVector &fe_function, +void FEValuesBase::get_function_grads (const Vector &fe_function, vector > &gradients) const { Assert (gradients.size() == n_quadrature_points, ExcWrongVectorSize(gradients.size(), n_quadrature_points)); // get function values of dofs // on this cell - dVector dof_values (total_dofs); + Vector dof_values (total_dofs); present_cell->get_dof_values (fe_function, dof_values); // initialize with zero @@ -178,14 +178,14 @@ FEValuesBase::shape_2nd_derivative (const unsigned int i, template -void FEValuesBase::get_function_2nd_derivatives (const dVector &fe_function, +void FEValuesBase::get_function_2nd_derivatives (const Vector &fe_function, vector > &second_derivatives) const { Assert (second_derivatives.size() == n_quadrature_points, ExcWrongVectorSize(second_derivatives.size(), n_quadrature_points)); // get function values of dofs // on this cell - dVector dof_values (total_dofs); + Vector dof_values (total_dofs); present_cell->get_dof_values (fe_function, dof_values); // initialize with zero diff --git a/deal.II/deal.II/source/grid/tria.cc b/deal.II/deal.II/source/grid/tria.cc index 252765c8fe..4835a1fcfa 100644 --- a/deal.II/deal.II/source/grid/tria.cc +++ b/deal.II/deal.II/source/grid/tria.cc @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include @@ -3759,8 +3759,8 @@ void Triangulation<3>::print_gnuplot (ostream &out, template -void Triangulation::refine (const dVector &criteria, - const double threshold) { +void Triangulation::refine (const Vector &criteria, + const double threshold) { Assert (criteria.size() == n_active_cells(), ExcInvalidVectorSize(criteria.size(), n_active_cells())); @@ -3783,8 +3783,8 @@ void Triangulation::refine (const dVector &criteria, template -void Triangulation::coarsen (const dVector &criteria, - const double threshold) { +void Triangulation::coarsen (const Vector &criteria, + const double threshold) { Assert (criteria.size() == n_active_cells(), ExcInvalidVectorSize(criteria.size(), n_active_cells())); @@ -3799,9 +3799,9 @@ void Triangulation::coarsen (const dVector &criteria, template -void Triangulation::refine_and_coarsen_fixed_number (const dVector &criteria, - const double top_fraction, - const double bottom_fraction) { +void Triangulation::refine_and_coarsen_fixed_number (const Vector &criteria, + const double top_fraction, + const double bottom_fraction) { // correct number of cells is // checked in #refine# Assert ((top_fraction>=0) && (top_fraction<=1), ExcInvalidParameterValue()); @@ -3814,7 +3814,7 @@ void Triangulation::refine_and_coarsen_fixed_number (const dVector &criteri const int coarsen_cells = max(static_cast(bottom_fraction*criteria.size()), 1); - dVector tmp(criteria); + Vector tmp(criteria); nth_element (tmp.begin(), tmp.begin()+refine_cells, tmp.end(), greater()); @@ -3838,9 +3838,9 @@ double sqr(double a) { template void -Triangulation::refine_and_coarsen_fixed_fraction (const dVector &criteria, - const double top_fraction, - const double bottom_fraction) { +Triangulation::refine_and_coarsen_fixed_fraction (const Vector &criteria, + const double top_fraction, + const double bottom_fraction) { // correct number of cells is // checked in #refine# Assert ((top_fraction>=0) && (top_fraction<=1), ExcInvalidParameterValue()); @@ -3851,15 +3851,15 @@ Triangulation::refine_and_coarsen_fixed_fraction (const dVector &criteria, // error, which is what we have to sum // up and compare with // #fraction_of_error*total_error#. - dVector tmp(criteria); + Vector tmp(criteria); const double total_error = tmp.l1_norm(); - - dVector partial_sums(criteria.size()); + + Vector partial_sums(criteria.size()); sort (tmp.begin(), tmp.end(), greater()); partial_sum (tmp.begin(), tmp.end(), partial_sums.begin()); // compute thresholds - dVector::const_iterator p; + Vector::const_iterator p; double top_threshold, bottom_threshold; p = lower_bound (partial_sums.begin(), partial_sums.end(), top_fraction*total_error); 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 49b7f9c661..101f9344fe 100644 --- a/deal.II/deal.II/source/multigrid/mg_dof_accessor.cc +++ b/deal.II/deal.II/source/multigrid/mg_dof_accessor.cc @@ -10,9 +10,9 @@ #include #include -#include -#include -#include +#include +#include +#include @@ -349,8 +349,8 @@ MGDoFCellAccessor<1>::face (const unsigned int) const { template <> void -MGDoFCellAccessor<1>::get_mg_dof_values (const dVector &values, - dVector &dof_values) const { +MGDoFCellAccessor<1>::get_mg_dof_values (const Vector &values, + Vector &dof_values) const { Assert (dof_handler != 0, ExcInvalidObject()); Assert (mg_dof_handler != 0, ExcInvalidObject()); Assert (&dof_handler->get_fe() != 0, ExcInvalidObject()); @@ -385,8 +385,8 @@ MGDoFCellAccessor<2>::face (const unsigned int i) const { template <> void -MGDoFCellAccessor<2>::get_mg_dof_values (const dVector &values, - dVector &dof_values) const { +MGDoFCellAccessor<2>::get_mg_dof_values (const Vector &values, + Vector &dof_values) const { Assert (dof_handler != 0, ExcInvalidObject()); Assert (mg_dof_handler != 0, ExcInvalidObject()); Assert (&dof_handler->get_fe() != 0, ExcInvalidObject()); 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 c1ce677a99..f6092999ed 100644 --- a/deal.II/deal.II/source/multigrid/mg_dof_handler.cc +++ b/deal.II/deal.II/source/multigrid/mg_dof_handler.cc @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include @@ -1002,7 +1002,7 @@ unsigned int MGDoFHandler::n_dofs (const unsigned int level) const { template void MGDoFHandler::make_sparsity_pattern (const unsigned int level, - dSMatrixStruct &sparsity) const { + SparseMatrixStruct &sparsity) const { Assert (selected_fe != 0, ExcNoFESelected()); Assert (sparsity.n_rows() == n_dofs(level), ExcDifferentDimensions (sparsity.n_rows(), n_dofs(level))); @@ -1032,7 +1032,7 @@ void MGDoFHandler::renumber_dofs (const unsigned int level, const RenumberingMethod method, const vector &starting_points) { // make the connection graph - dSMatrixStruct sparsity (n_dofs(level), max_couplings_between_dofs()); + SparseMatrixStruct sparsity (n_dofs(level), max_couplings_between_dofs()); make_sparsity_pattern (level, sparsity); int n_dofs = sparsity.n_rows(); diff --git a/deal.II/deal.II/source/multigrid/multigrid.cc b/deal.II/deal.II/source/multigrid/multigrid.cc index e7fdaf0785..e45aa11e36 100644 --- a/deal.II/deal.II/source/multigrid/multigrid.cc +++ b/deal.II/deal.II/source/multigrid/multigrid.cc @@ -2,10 +2,10 @@ // Copyright Guido Kanschat, Universitaet Heidelberg, 1999 #include -#include +#include void -MultiGrid::vmult(dVector& dst, const dVector& src) const +MultiGrid::vmult(Vector& dst, const Vector& src) const { dst = 0.; @@ -20,7 +20,7 @@ MultiGrid::vmult(dVector& dst, const dVector& src) const void -MultiGrid::precondition(dVector& dst, const dVector& src) const +MultiGrid::precondition(Vector& dst, const Vector& src) const { copy_to_mg(s,src); copy_to_mg(d,dst); @@ -44,7 +44,7 @@ MultiGrid::level_mgstep(unsigned level) const void MultiGrid::post_smooth(unsigned level, - dVector& dst, const dVector& src, + Vector& dst, const Vector& src, unsigned steps) const { smooth(level, dst, src, steps); diff --git a/deal.II/deal.II/source/numerics/assembler.cc b/deal.II/deal.II/source/numerics/assembler.cc index fa493e4001..c1dbc9ba70 100644 --- a/deal.II/deal.II/source/numerics/assembler.cc +++ b/deal.II/deal.II/source/numerics/assembler.cc @@ -6,9 +6,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include template @@ -18,8 +18,8 @@ Equation::Equation (const unsigned int n_equations) : template -void Equation::assemble (dFMatrix &, - dVector &, +void Equation::assemble (FullMatrix &, + Vector &, const FEValues &, const typename DoFHandler::cell_iterator &) const { Assert (false, ExcPureVirtualFunctionCalled()); @@ -28,7 +28,7 @@ void Equation::assemble (dFMatrix &, template -void Equation::assemble (dFMatrix &, +void Equation::assemble (FullMatrix &, const FEValues &, const typename DoFHandler::cell_iterator &) const { Assert (false, ExcPureVirtualFunctionCalled()); @@ -37,7 +37,7 @@ void Equation::assemble (dFMatrix &, template -void Equation::assemble (dVector &, +void Equation::assemble (Vector &, const FEValues &, const typename DoFHandler::cell_iterator &) const { Assert (false, ExcPureVirtualFunctionCalled()); @@ -50,8 +50,8 @@ template AssemblerData::AssemblerData (const DoFHandler &dof, const bool assemble_matrix, const bool assemble_rhs, - dSMatrix &matrix, - dVector &rhs_vector, + SparseMatrix &matrix, + Vector &rhs_vector, const Quadrature &quadrature, const FiniteElement &fe, const UpdateFlags &update_flags, @@ -76,7 +76,7 @@ Assembler::Assembler (Triangulation *tria, const AssemblerData *local_data) : DoFCellAccessor (tria,level,index, &local_data->dof), cell_matrix (dof_handler->get_fe().total_dofs), - cell_vector (dVector(dof_handler->get_fe().total_dofs)), + cell_vector (Vector(dof_handler->get_fe().total_dofs)), assemble_matrix (local_data->assemble_matrix), assemble_rhs (local_data->assemble_rhs), matrix(local_data->matrix), diff --git a/deal.II/deal.II/source/numerics/base.cc b/deal.II/deal.II/source/numerics/base.cc index edbbb09f57..afa767ca69 100644 --- a/deal.II/deal.II/source/numerics/base.cc +++ b/deal.II/deal.II/source/numerics/base.cc @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include @@ -141,8 +141,8 @@ void ProblemBase::solve () { Assert ((tria!=0) && (dof_handler!=0), ExcNoTriaSelected()); SolverControl control(4000, 1e-16); - PrimitiveVectorMemory memory; - SolverCG cg(control,memory); + PrimitiveVectorMemory > memory; + SolverCG,Vector > cg(control,memory); // solve cg.solve (system_matrix, solution, right_hand_side); diff --git a/deal.II/deal.II/source/numerics/data_io.cc b/deal.II/deal.II/source/numerics/data_io.cc index 49edbc694c..da9a132577 100644 --- a/deal.II/deal.II/source/numerics/data_io.cc +++ b/deal.II/deal.II/source/numerics/data_io.cc @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include @@ -181,7 +181,7 @@ DataOut::DataEntry::DataEntry () : template -DataOut::DataEntry::DataEntry (const dVector *data, +DataOut::DataEntry::DataEntry (const Vector *data, const string name, const string units) : data(data), name(name), units(units) {}; @@ -203,7 +203,7 @@ void DataOut::attach_dof_handler (DoFHandler &d) { template -void DataOut::add_data_vector (const dVector &vec, +void DataOut::add_data_vector (const Vector &vec, const string &name, const string &units) { Assert (dofs != 0, ExcNoDoFHandlerSelected ()); diff --git a/deal.II/deal.II/source/numerics/error_estimator.cc b/deal.II/deal.II/source/numerics/error_estimator.cc index fcdd9673ab..4c4a508280 100644 --- a/deal.II/deal.II/source/numerics/error_estimator.cc +++ b/deal.II/deal.II/source/numerics/error_estimator.cc @@ -10,7 +10,8 @@ #include #include #include -#include +#include +#include #include #include @@ -32,8 +33,8 @@ void KellyErrorEstimator<1>::estimate_error (const DoFHandler<1> &, const FiniteElement<1> &, const Boundary<1> &, const FunctionMap &, - const dVector &, - dVector &, + const Vector &, + Vector &, const Function<1> *) { Assert(false, ExcNotImplemented()); }; @@ -47,8 +48,8 @@ void KellyErrorEstimator::estimate_error (const DoFHandler &dof, const FiniteElement &fe, const Boundary &boundary, const FunctionMap &neumann_bc, - const dVector &solution, - dVector &error, + const Vector &solution, + Vector &error, const Function *coefficient) { Assert (neumann_bc.find(255) == neumann_bc.end(), ExcInvalidBoundaryIndicator()); @@ -195,7 +196,7 @@ void KellyErrorEstimator<1>::integrate_over_regular_face (const active_cell_iter FEFaceValues<1> &, FEFaceValues<1> &, FaceIntegrals &, - const dVector &, + const Vector &, const Function<1> *) { Assert (false, ExcInternalError()); }; @@ -212,7 +213,7 @@ integrate_over_irregular_face (const active_cell_iterator &, FEFaceValues<1> &, FESubfaceValues<1> &, FaceIntegrals &, - const dVector &, + const Vector &, const Function<1> *) { Assert (false, ExcInternalError()); }; @@ -232,7 +233,7 @@ integrate_over_regular_face (const active_cell_iterator &cell, FEFaceValues &fe_face_values_cell, FEFaceValues &fe_face_values_neighbor, FaceIntegrals &face_integrals, - const dVector &solution, + const Vector &solution, const Function *coefficient) { const DoFHandler::face_iterator face = cell->face(face_no); @@ -386,7 +387,7 @@ integrate_over_irregular_face (const active_cell_iterator &cell, FEFaceValues &fe_face_values, FESubfaceValues &fe_subface_values, FaceIntegrals &face_integrals, - const dVector &solution, + const Vector &solution, const Function *coefficient) { const DoFHandler::cell_iterator neighbor = cell->neighbor(face_no); Assert (neighbor.state() == valid, ExcInternalError()); diff --git a/deal.II/deal.II/source/numerics/matrices.cc b/deal.II/deal.II/source/numerics/matrices.cc index 45cddee698..e0cf9b03e1 100644 --- a/deal.II/deal.II/source/numerics/matrices.cc +++ b/deal.II/deal.II/source/numerics/matrices.cc @@ -10,8 +10,8 @@ #include #include #include -#include -#include +#include +#include #include #include @@ -23,11 +23,11 @@ template void MatrixCreator::create_mass_matrix (const DoFHandler &dof, const Quadrature &q, const Boundary &boundary, - dSMatrix &matrix, + SparseMatrix &matrix, const Function * const a) { const FiniteElement &fe = dof.get_fe(); - dVector dummy; // no entries, should give an error if accessed + Vector dummy; // no entries, should give an error if accessed UpdateFlags update_flags = update_JxW_values; if (a != 0) update_flags = UpdateFlags (update_flags | update_q_points); @@ -55,9 +55,9 @@ template void MatrixCreator::create_mass_matrix (const DoFHandler &dof, const Quadrature &q, const Boundary &boundary, - dSMatrix &matrix, + SparseMatrix &matrix, const Function &rhs, - dVector &rhs_vector, + Vector &rhs_vector, const Function * const a) { const FiniteElement &fe = dof.get_fe(); @@ -85,13 +85,13 @@ void MatrixCreator::create_mass_matrix (const DoFHandler &dof, template void MatrixCreator::create_mass_matrix (const DoFHandler &dof, const Boundary &boundary, - dSMatrix &matrix) { + SparseMatrix &matrix) { const FiniteElement &fe = dof.get_fe(); const unsigned int total_dofs = fe.total_dofs; - dFMatrix local_mass_matrix (total_dofs, total_dofs); - vector dofs_on_this_cell (total_dofs); + FullMatrix local_mass_matrix (total_dofs, total_dofs); + vector dofs_on_this_cell (total_dofs); DoFHandler::active_cell_iterator cell = dof.begin_active(), endc = dof.end(); @@ -115,9 +115,9 @@ template <> void MatrixCreator<1>::create_boundary_mass_matrix (const DoFHandler<1> &, const Quadrature<0> &, const Boundary<1> &, - dSMatrix &, + SparseMatrix &, const FunctionMap &, - dVector &, + Vector &, vector &, const Function<1> *) { Assert (false, ExcNotImplemented()); @@ -131,9 +131,9 @@ template void MatrixCreator::create_boundary_mass_matrix (const DoFHandler &dof, const Quadrature &q, const Boundary &boundary, - dSMatrix &matrix, + SparseMatrix &matrix, const FunctionMap &rhs, - dVector &rhs_vector, + Vector &rhs_vector, vector &dof_to_boundary_mapping, const Function *a) { const FiniteElement &fe = dof.get_fe(); @@ -150,8 +150,8 @@ void MatrixCreator::create_boundary_mass_matrix (const DoFHandler & const unsigned int dofs_per_cell = fe.total_dofs, dofs_per_face = fe.dofs_per_face; - dFMatrix cell_matrix(dofs_per_cell, dofs_per_cell); - dVector cell_vector(dofs_per_cell); + FullMatrix cell_matrix(dofs_per_cell, dofs_per_cell); + Vector cell_vector(dofs_per_cell); UpdateFlags update_flags = UpdateFlags (update_JxW_values | update_q_points); @@ -170,9 +170,9 @@ void MatrixCreator::create_boundary_mass_matrix (const DoFHandler & fe_values.reinit (cell, face, boundary); - const dFMatrix &values = fe_values.get_shape_values (); - const vector &weights = fe_values.get_JxW_values (); - vector rhs_values (fe_values.n_quadrature_points); + const FullMatrix &values = fe_values.get_shape_values (); + const vector &weights = fe_values.get_JxW_values (); + vector rhs_values (fe_values.n_quadrature_points); rhs.find(cell->face(face)->boundary_indicator()) ->second->value_list (fe_values.get_quadrature_points(), rhs_values); @@ -326,11 +326,11 @@ template void MatrixCreator::create_laplace_matrix (const DoFHandler &dof, const Quadrature &q, const Boundary &boundary, - dSMatrix &matrix, + SparseMatrix &matrix, const Function * const a) { const FiniteElement &fe = dof.get_fe(); - dVector dummy; // no entries, should give an error if accessed + Vector dummy; // no entries, should give an error if accessed UpdateFlags update_flags = UpdateFlags(update_gradients | update_JxW_values); if (a != 0) @@ -358,9 +358,9 @@ template void MatrixCreator::create_laplace_matrix (const DoFHandler &dof, const Quadrature &q, const Boundary &boundary, - dSMatrix &matrix, + SparseMatrix &matrix, const Function &rhs, - dVector &rhs_vector, + Vector &rhs_vector, const Function * const a) { const FiniteElement &fe = dof.get_fe(); @@ -393,9 +393,9 @@ void MatrixCreator::create_laplace_matrix (const DoFHandler &dof, template void MatrixTools::apply_boundary_values (const map &boundary_values, - dSMatrix &matrix, - dVector &solution, - dVector &right_hand_side) { + SparseMatrix &matrix, + Vector &solution, + Vector &right_hand_side) { Assert (matrix.n() == matrix.m(), ExcDimensionsDontMatch(matrix.n(), matrix.m())); Assert (matrix.n() == right_hand_side.size(), @@ -411,7 +411,7 @@ void MatrixTools::apply_boundary_values (const map &boundary_va map::const_iterator dof = boundary_values.begin(), endd = boundary_values.end(); const unsigned int n_dofs = matrix.m(); - const dSMatrixStruct &sparsity = matrix.get_sparsity_pattern(); + const SparseMatrixStruct &sparsity = matrix.get_sparsity_pattern(); const unsigned int *sparsity_rowstart = sparsity.get_rowstart_indices(); const int *sparsity_colnums = sparsity.get_column_numbers(); @@ -460,10 +460,10 @@ void MatrixTools::apply_boundary_values (const map &boundary_va break; }; - // use the dSMatrix:: as a workaround + // use the SparseMatrix:: as a workaround // for a bug in egcs - matrix.dSMatrix::set(dof_number, dof_number, - first_diagonal_entry); + matrix.SparseMatrix::set(dof_number, dof_number, + first_diagonal_entry); new_rhs = right_hand_side(dof_number) = dof->second * first_diagonal_entry; }; @@ -546,8 +546,8 @@ MassMatrix::MassMatrix (const Function * const rhs, template -void MassMatrix::assemble (dFMatrix &cell_matrix, - const FEValues &fe_values, +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; @@ -558,8 +558,8 @@ void MassMatrix::assemble (dFMatrix &cell_matrix, ExcWrongSize(cell_matrix.m(), total_dofs)); Assert (cell_matrix.all_zero(), ExcObjectNotEmpty()); - const dFMatrix &values = fe_values.get_shape_values (); - const vector &weights = fe_values.get_JxW_values (); + const FullMatrix &values = fe_values.get_shape_values (); + const vector &weights = fe_values.get_JxW_values (); if (coefficient != 0) @@ -587,8 +587,8 @@ void MassMatrix::assemble (dFMatrix &cell_matrix, template -void MassMatrix::assemble (dFMatrix &cell_matrix, - dVector &rhs, +void MassMatrix::assemble (FullMatrix &cell_matrix, + Vector &rhs, const FEValues &fe_values, const DoFHandler::cell_iterator &) const { Assert (right_hand_side != 0, ExcNoRHSSelected()); @@ -605,9 +605,9 @@ void MassMatrix::assemble (dFMatrix &cell_matrix, Assert (cell_matrix.all_zero(), ExcObjectNotEmpty()); Assert (rhs.all_zero(), ExcObjectNotEmpty()); - const dFMatrix &values = fe_values.get_shape_values (); - const vector &weights = fe_values.get_JxW_values (); - vector rhs_values (fe_values.n_quadrature_points); + const FullMatrix &values = fe_values.get_shape_values (); + const vector &weights = fe_values.get_JxW_values (); + vector rhs_values (fe_values.n_quadrature_points); right_hand_side->value_list (fe_values.get_quadrature_points(), rhs_values); if (coefficient != 0) @@ -645,7 +645,7 @@ void MassMatrix::assemble (dFMatrix &cell_matrix, template -void MassMatrix::assemble (dVector &rhs, +void MassMatrix::assemble (Vector &rhs, const FEValues &fe_values, const DoFHandler::cell_iterator &) const { Assert (right_hand_side != 0, ExcNoRHSSelected()); @@ -656,9 +656,9 @@ void MassMatrix::assemble (dVector &rhs, Assert (rhs.size() == total_dofs, ExcWrongSize(rhs.size(), total_dofs)); Assert (rhs.all_zero(), ExcObjectNotEmpty()); - const dFMatrix &values = fe_values.get_shape_values (); - const vector &weights = fe_values.get_JxW_values (); - vector rhs_values(fe_values.n_quadrature_points); + const FullMatrix &values = fe_values.get_shape_values (); + const vector &weights = fe_values.get_JxW_values (); + vector rhs_values(fe_values.n_quadrature_points); right_hand_side->value_list (fe_values.get_quadrature_points(), rhs_values); for (unsigned int point=0; point::LaplaceMatrix (const Function * const rhs, template -void LaplaceMatrix::assemble (dFMatrix &cell_matrix, - dVector &rhs, - const FEValues &fe_values, +void LaplaceMatrix::assemble (FullMatrix &cell_matrix, + Vector &rhs, + const FEValues &fe_values, const DoFHandler::cell_iterator &) const { Assert (right_hand_side != 0, ExcNoRHSSelected()); @@ -700,7 +700,7 @@ void LaplaceMatrix::assemble (dFMatrix &cell_matrix, Assert (rhs.all_zero(), ExcObjectNotEmpty()); const vector > >&gradients = fe_values.get_shape_grads (); - const dFMatrix &values = fe_values.get_shape_values (); + const FullMatrix &values = fe_values.get_shape_values (); vector rhs_values(fe_values.n_quadrature_points); const vector &weights = fe_values.get_JxW_values (); right_hand_side->value_list (fe_values.get_quadrature_points(), rhs_values); @@ -741,7 +741,7 @@ void LaplaceMatrix::assemble (dFMatrix &cell_matrix, template -void LaplaceMatrix::assemble (dFMatrix &cell_matrix, +void LaplaceMatrix::assemble (FullMatrix &cell_matrix, const FEValues &fe_values, const DoFHandler::cell_iterator &) const { const unsigned int total_dofs = fe_values.total_dofs, @@ -781,7 +781,7 @@ void LaplaceMatrix::assemble (dFMatrix &cell_matrix, template -void LaplaceMatrix::assemble (dVector &rhs, +void LaplaceMatrix::assemble (Vector &rhs, const FEValues &fe_values, const DoFHandler::cell_iterator &) const { Assert (right_hand_side != 0, ExcNoRHSSelected()); @@ -792,8 +792,8 @@ void LaplaceMatrix::assemble (dVector &rhs, Assert (rhs.size() == total_dofs, ExcWrongSize(rhs.size(), total_dofs)); Assert (rhs.all_zero(), ExcObjectNotEmpty()); - const dFMatrix &values = fe_values.get_shape_values (); - const vector &weights = fe_values.get_JxW_values (); + const FullMatrix &values = fe_values.get_shape_values (); + const vector &weights = fe_values.get_JxW_values (); vector rhs_values(fe_values.n_quadrature_points); right_hand_side->value_list (fe_values.get_quadrature_points(), rhs_values); @@ -807,7 +807,7 @@ void LaplaceMatrix::assemble (dVector &rhs, template void MatrixCreator::create_interpolation_matrix(const FiniteElement &high, const FiniteElement &low, - dFMatrix& result) + FullMatrix& result) { result.reinit (low.total_dofs, high.total_dofs); diff --git a/deal.II/deal.II/source/numerics/multigrid.cc b/deal.II/deal.II/source/numerics/multigrid.cc index e7fdaf0785..e45aa11e36 100644 --- a/deal.II/deal.II/source/numerics/multigrid.cc +++ b/deal.II/deal.II/source/numerics/multigrid.cc @@ -2,10 +2,10 @@ // Copyright Guido Kanschat, Universitaet Heidelberg, 1999 #include -#include +#include void -MultiGrid::vmult(dVector& dst, const dVector& src) const +MultiGrid::vmult(Vector& dst, const Vector& src) const { dst = 0.; @@ -20,7 +20,7 @@ MultiGrid::vmult(dVector& dst, const dVector& src) const void -MultiGrid::precondition(dVector& dst, const dVector& src) const +MultiGrid::precondition(Vector& dst, const Vector& src) const { copy_to_mg(s,src); copy_to_mg(d,dst); @@ -44,7 +44,7 @@ MultiGrid::level_mgstep(unsigned level) const void MultiGrid::post_smooth(unsigned level, - dVector& dst, const dVector& src, + Vector& dst, const Vector& src, unsigned steps) const { smooth(level, dst, src, steps); diff --git a/deal.II/deal.II/source/numerics/vectors.cc b/deal.II/deal.II/source/numerics/vectors.cc index 58fe08915e..31330e7b62 100644 --- a/deal.II/deal.II/source/numerics/vectors.cc +++ b/deal.II/deal.II/source/numerics/vectors.cc @@ -14,8 +14,8 @@ #include #include #include -#include -#include +#include +#include #include #include @@ -45,7 +45,7 @@ template void VectorTools::interpolate (const DoFHandler &dof, const Boundary &boundary, const Function &function, - dVector &vec) + Vector &vec) { const FiniteElement &fe = dof.get_fe(); @@ -75,12 +75,12 @@ void VectorTools::interpolate (const DoFHandler &dof, template void VectorTools::interpolate(const DoFHandler &high_dof, const DoFHandler &low_dof, - const dFMatrix &transfer, - const dVector &high, - dVector &low) + const FullMatrix &transfer, + const Vector &high, + Vector &low) { - dVector cell_high(high_dof.get_fe().total_dofs); - dVector cell_low(low_dof.get_fe().total_dofs); + Vector cell_high(high_dof.get_fe().total_dofs); + Vector cell_low(low_dof.get_fe().total_dofs); DoFHandler::active_cell_iterator h = high_dof.begin_active(); DoFHandler::active_cell_iterator l = low_dof.begin_active(); @@ -102,7 +102,7 @@ void VectorTools<1>::project (const DoFHandler<1> &, const Boundary<1> &, const Quadrature<1> &, const Function<1> &, - dVector &, + Vector &, const bool , const Quadrature<0> &, const bool ) { @@ -126,7 +126,7 @@ void VectorTools::project (const DoFHandler &dof, const Boundary &boundary, const Quadrature &q, const Function &function, - dVector &vec, + Vector &vec, const bool enforce_zero_boundary, const Quadrature &q_boundary, const bool project_to_boundary_first) { @@ -173,14 +173,14 @@ void VectorTools::project (const DoFHandler &dof, // set up mass matrix and right hand side vec.reinit (dof.n_dofs()); - dSMatrixStruct sparsity(dof.n_dofs(), - dof.n_dofs(), - dof.max_couplings_between_dofs()); + SparseMatrixStruct sparsity(dof.n_dofs(), + dof.n_dofs(), + dof.max_couplings_between_dofs()); dof.make_sparsity_pattern (sparsity); constraints.condense (sparsity); - dSMatrix mass_matrix (sparsity); - dVector tmp (mass_matrix.n()); + SparseMatrix mass_matrix (sparsity); + Vector tmp (mass_matrix.n()); MatrixCreator::create_mass_matrix (dof, boundary, mass_matrix); VectorTools::create_right_hand_side (dof, q, boundary, function, tmp); @@ -191,8 +191,8 @@ void VectorTools::project (const DoFHandler &dof, mass_matrix, vec, tmp); SolverControl control(1000,1e-16); - PrimitiveVectorMemory memory; - SolverCG cg(control,memory); + PrimitiveVectorMemory > memory; + SolverCG,Vector > cg(control,memory); // solve cg.solve (mass_matrix, vec, tmp); @@ -208,12 +208,12 @@ void VectorTools::create_right_hand_side (const DoFHandler &dof, const Quadrature &q, const Boundary &boundary, const Function &rhs, - dVector &rhs_vector) { + Vector &rhs_vector) { const FiniteElement &fe = dof.get_fe(); UpdateFlags update_flags = UpdateFlags(update_q_points | update_JxW_values); - dSMatrix dummy; + SparseMatrix dummy; const AssemblerData data (dof, false, true, dummy, rhs_vector, @@ -304,8 +304,8 @@ VectorTools::project_boundary_values (const DoFHandler &dof, dof.map_dof_to_boundary_indices (boundary_functions, dof_to_boundary_mapping); // set up sparsity structure - dSMatrixStruct sparsity(dof.n_boundary_dofs(boundary_functions), - dof.max_couplings_between_boundary_dofs()); + SparseMatrixStruct sparsity(dof.n_boundary_dofs(boundary_functions), + dof.max_couplings_between_boundary_dofs()); dof.make_boundary_sparsity_pattern (boundary_functions, dof_to_boundary_mapping, sparsity); @@ -330,8 +330,8 @@ VectorTools::project_boundary_values (const DoFHandler &dof, // make mass matrix and right hand side - dSMatrix mass_matrix(sparsity); - dVector rhs(sparsity.n_rows()); + SparseMatrix mass_matrix(sparsity); + Vector rhs(sparsity.n_rows()); MatrixTools::create_boundary_mass_matrix (dof, q, boundary, @@ -343,11 +343,11 @@ VectorTools::project_boundary_values (const DoFHandler &dof, Assert (dim<3, ExcNotImplemented()); - dVector boundary_projection (rhs.size()); + Vector boundary_projection (rhs.size()); SolverControl control(1000, 1e-16); - PrimitiveVectorMemory memory; - SolverCG cg(control,memory); + PrimitiveVectorMemory > memory; + SolverCG,Vector > cg(control,memory); // solve cg.solve (mass_matrix, boundary_projection, rhs); @@ -370,9 +370,9 @@ VectorTools::project_boundary_values (const DoFHandler &dof, template void VectorTools::integrate_difference (const DoFHandler &dof, - const dVector &fe_function, + const Vector &fe_function, const Function &exact_solution, - dVector &difference, + Vector &difference, const Quadrature &q, const NormType &norm, const Boundary &boundary) { @@ -555,193 +555,195 @@ void VectorTools::integrate_difference (const DoFHandler &dof, }; }; -template -void VectorTools::integrate_difference (const DoFHandler &dof, - const dVector &fe_function, - const TensorFunction<1,dim> &exact_solution, - dVector &difference, - const Quadrature &q, - const FiniteElement &fe, - const NormType &norm, - const Boundary &boundary) { - Assert (fe == dof.get_fe(), ExcInvalidFE()); + + +// template +// void VectorTools::integrate_difference (const DoFHandler &dof, +// const Vector &fe_function, +// const TensorFunction<1,dim>&exact_solution, +// Vector &difference, +// const Quadrature &q, +// const FiniteElement &fe, +// const NormType &norm, +// const Boundary &boundary) { +// Assert (fe == dof.get_fe(), ExcInvalidFE()); - difference.reinit (dof.get_tria().n_active_cells()); +// difference.reinit (dof.get_tria().n_active_cells()); - UpdateFlags update_flags = UpdateFlags (update_q_points | - update_JxW_values); - if ((norm==H1_seminorm) || (norm==H1_norm)) - update_flags = UpdateFlags (update_flags | update_gradients); - FEValues fe_values(fe, q, update_flags); +// UpdateFlags update_flags = UpdateFlags (update_q_points | +// update_JxW_values); +// if ((norm==H1_seminorm) || (norm==H1_norm)) +// update_flags = UpdateFlags (update_flags | update_gradients); +// FEValues fe_values(fe, q, update_flags); - // loop over all cells - DoFHandler::active_cell_iterator cell = dof.begin_active(), - endc = dof.end(); - for (unsigned int index=0; cell != endc; ++cell, ++index) - { - double diff=0; - // initialize for this cell - fe_values.reinit (cell, boundary); - - switch (norm) - { - case mean: - case L1_norm: - case L2_norm: - case Linfty_norm: - case H1_norm: - { - // we need the finite element - // function \psi at the different - // integration points. Compute - // it like this: - // \psi(x_j)=\sum_i v_i \phi_i(x_j) - // with v_i the nodal values of the - // fe_function and \phi_i(x_j) the - // matrix of the trial function - // values at the integration point - // x_j. Then the vector - // of the \psi(x_j) is v*Phi with - // v being the vector of nodal - // values on this cell and Phi - // the matrix. - // - // we then need the difference: - // reference_function(x_j)-\psi_j - // and assign that to the vector - // \psi. - const unsigned int n_q_points = q.n_quadrature_points; - vector psi (n_q_points); - - // in praxi: first compute - // exact fe_function vector - exact_solution.value_list (fe_values.get_quadrature_points(), - psi); - // then subtract finite element - // fe_function - if (true) - { - vector< vector > function_values (fe.n_components, vector(n_q_points, 0)); - fe_values.get_function_values (fe_function, function_values); - - transform (psi.begin(), psi.end(), - function_values.begin(), - psi.begin(), - minus()); - }; - - // for L1_norm and Linfty_norm: - // take absolute - // value, for the L2_norm take - // square of psi - switch (norm) - { - case mean: - break; - case L1_norm: - case Linfty_norm: - transform (psi.begin(), psi.end(), - psi.begin(), ptr_fun(fabs)); - break; - case L2_norm: - case H1_norm: - transform (psi.begin(), psi.end(), - psi.begin(), ptr_fun(sqr)); - break; - default: - Assert (false, ExcNotImplemented()); - }; - - // ok, now we have the integrand, - // let's compute the integral, - // which is - // sum_j psi_j JxW_j - // (or |psi_j| or |psi_j|^2 - switch (norm) - { - case mean: - case L1_norm: - diff = inner_product (psi.begin(), psi.end(), - fe_values.get_JxW_values().begin(), - 0.0); - break; - case L2_norm: - case H1_norm: - diff = sqrt(inner_product (psi.begin(), psi.end(), - fe_values.get_JxW_values().begin(), - 0.0)); - break; - case Linfty_norm: - diff = *max_element (psi.begin(), psi.end()); - break; - default: - Assert (false, ExcNotImplemented()); - }; - - // note: the H1_norm uses the result - // of the L2_norm and control goes - // over to the next case statement! - if (norm != H1_norm) - break; - }; - - case H1_seminorm: - { - // note: the computation of the - // H1_norm starts at the previous - // case statement, but continues - // here! - - // for H1_norm: re-square L2_norm. - diff = sqr(diff); - - // same procedure as above, but now - // psi is a vector of gradients - const unsigned int n_q_points = q.n_quadrature_points; - vector > psi (n_q_points); - - // in praxi: first compute - // exact fe_function vector - exact_solution.gradient_list (fe_values.get_quadrature_points(), - psi); +// // loop over all cells +// DoFHandler::active_cell_iterator cell = dof.begin_active(), +// endc = dof.end(); +// for (unsigned int index=0; cell != endc; ++cell, ++index) +// { +// double diff=0; +// // initialize for this cell +// fe_values.reinit (cell, boundary); + +// switch (norm) +// { +// case mean: +// case L1_norm: +// case L2_norm: +// case Linfty_norm: +// case H1_norm: +// { +// // we need the finite element +// // function \psi at the different +// // integration points. Compute +// // it like this: +// // \psi(x_j)=\sum_i v_i \phi_i(x_j) +// // with v_i the nodal values of the +// // fe_function and \phi_i(x_j) the +// // matrix of the trial function +// // values at the integration point +// // x_j. Then the vector +// // of the \psi(x_j) is v*Phi with +// // v being the vector of nodal +// // values on this cell and Phi +// // the matrix. +// // +// // we then need the difference: +// // reference_function(x_j)-\psi_j +// // and assign that to the vector +// // \psi. +// const unsigned int n_q_points = q.n_quadrature_points; +// vector psi (n_q_points); + +// // in praxi: first compute +// // exact fe_function vector +// exact_solution.value_list (fe_values.get_quadrature_points(), +// psi); +// // then subtract finite element +// // fe_function +// if (true) +// { +// vector< vector > function_values (fe.n_components, vector(n_q_points, 0)); +// fe_values.get_function_values (fe_function, function_values); + +// transform (psi.begin(), psi.end(), +// function_values.begin(), +// psi.begin(), +// minus()); +// }; + +// // for L1_norm and Linfty_norm: +// // take absolute +// // value, for the L2_norm take +// // square of psi +// switch (norm) +// { +// case mean: +// break; +// case L1_norm: +// case Linfty_norm: +// transform (psi.begin(), psi.end(), +// psi.begin(), ptr_fun(fabs)); +// break; +// case L2_norm: +// case H1_norm: +// transform (psi.begin(), psi.end(), +// psi.begin(), ptr_fun(sqr)); +// break; +// default: +// Assert (false, ExcNotImplemented()); +// }; + +// // ok, now we have the integrand, +// // let's compute the integral, +// // which is +// // sum_j psi_j JxW_j +// // (or |psi_j| or |psi_j|^2 +// switch (norm) +// { +// case mean: +// case L1_norm: +// diff = inner_product (psi.begin(), psi.end(), +// fe_values.get_JxW_values().begin(), +// 0.0); +// break; +// case L2_norm: +// case H1_norm: +// diff = sqrt(inner_product (psi.begin(), psi.end(), +// fe_values.get_JxW_values().begin(), +// 0.0)); +// break; +// case Linfty_norm: +// diff = *max_element (psi.begin(), psi.end()); +// break; +// default: +// Assert (false, ExcNotImplemented()); +// }; + +// // note: the H1_norm uses the result +// // of the L2_norm and control goes +// // over to the next case statement! +// if (norm != H1_norm) +// break; +// }; + +// case H1_seminorm: +// { +// // note: the computation of the +// // H1_norm starts at the previous +// // case statement, but continues +// // here! + +// // for H1_norm: re-square L2_norm. +// diff = sqr(diff); + +// // same procedure as above, but now +// // psi is a vector of gradients +// const unsigned int n_q_points = q.n_quadrature_points; +// vector > psi (n_q_points); + +// // in praxi: first compute +// // exact fe_function vector +// exact_solution.gradient_list (fe_values.get_quadrature_points(), +// psi); - // then subtract finite element - // fe_function - if (true) - { - vector > function_grads (n_q_points, Tensor<1,dim>()); - fe_values.get_function_grads (fe_function, function_grads); - - transform (psi.begin(), psi.end(), - function_grads.begin(), - psi.begin(), - minus >()); - }; - // take square of integrand - vector psi_square (psi.size(), 0.0); - for (unsigned int i=0; i > function_grads (n_q_points, Tensor<1,dim>()); +// fe_values.get_function_grads (fe_function, function_grads); + +// transform (psi.begin(), psi.end(), +// function_grads.begin(), +// psi.begin(), +// minus >()); +// }; +// // take square of integrand +// vector psi_square (psi.size(), 0.0); +// for (unsigned int i=0; i; diff --git a/tests/big-tests/convergence/convergence.cc b/tests/big-tests/convergence/convergence.cc index b3a3373277..2584e4fe46 100644 --- a/tests/big-tests/convergence/convergence.cc +++ b/tests/big-tests/convergence/convergence.cc @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include @@ -36,14 +36,14 @@ class PoissonEquation : public Equation { Equation(1), right_hand_side (rhs) {}; - virtual void assemble (dFMatrix &cell_matrix, - dVector &rhs, + virtual void assemble (FullMatrix &cell_matrix, + Vector &rhs, const FEValues &fe_values, const DoFHandler::cell_iterator &cell) const; - virtual void assemble (dFMatrix &cell_matrix, + virtual void assemble (FullMatrix &cell_matrix, const FEValues &fe_values, const DoFHandler::cell_iterator &cell) const; - virtual void assemble (dVector &rhs, + virtual void assemble (Vector &rhs, const FEValues &fe_values, const DoFHandler::cell_iterator &cell) const; protected: @@ -149,8 +149,8 @@ Tensor<1,2> Solution<2>::gradient (const Point<2> &p) const { template <> -void PoissonEquation<2>::assemble (dFMatrix &cell_matrix, - dVector &rhs, +void PoissonEquation<2>::assemble (FullMatrix &cell_matrix, + Vector &rhs, const FEValues<2> &fe_values, const DoFHandler<2>::cell_iterator &) const { for (unsigned int point=0; point::assemble (dFMatrix &cell_matrix, template -void PoissonEquation::assemble (dFMatrix &, +void PoissonEquation::assemble (FullMatrix &, const FEValues &, const DoFHandler::cell_iterator &) const { Assert (false, ExcPureVirtualFunctionCalled()); @@ -178,7 +178,7 @@ void PoissonEquation::assemble (dFMatrix &, template -void PoissonEquation::assemble (dVector &, +void PoissonEquation::assemble (Vector &, const FEValues &, const DoFHandler::cell_iterator &) const { Assert (false, ExcPureVirtualFunctionCalled()); @@ -330,8 +330,8 @@ int PoissonProblem::run (const unsigned int level) { solve (); Solution sol; - dVector l1_error_per_cell, l2_error_per_cell, linfty_error_per_cell; - dVector h1_seminorm_error_per_cell, h1_error_per_cell; + Vector l1_error_per_cell, l2_error_per_cell, linfty_error_per_cell; + Vector h1_seminorm_error_per_cell, h1_error_per_cell; cout << " Calculating L1 error... "; VectorTools::integrate_difference (*dof_handler, @@ -375,8 +375,8 @@ int PoissonProblem::run (const unsigned int level) { if (dof->n_dofs()<=5000) { - dVector l1_error_per_dof, l2_error_per_dof, linfty_error_per_dof; - dVector h1_seminorm_error_per_dof, h1_error_per_dof; + Vector l1_error_per_dof, l2_error_per_dof, linfty_error_per_dof; + Vector h1_seminorm_error_per_dof, h1_error_per_dof; dof->distribute_cell_to_dof_vector (l1_error_per_cell, l1_error_per_dof); dof->distribute_cell_to_dof_vector (l2_error_per_cell, l2_error_per_dof); dof->distribute_cell_to_dof_vector (linfty_error_per_cell, @@ -385,7 +385,7 @@ int PoissonProblem::run (const unsigned int level) { h1_seminorm_error_per_dof); dof->distribute_cell_to_dof_vector (h1_error_per_cell, h1_error_per_dof); -// dVector projected_solution; +// Vector projected_solution; // ConstraintMatrix constraints; // constraints.close (); // VectorTools::project (*dof, constraints, *fe, diff --git a/tests/big-tests/dof/dof_test.cc b/tests/big-tests/dof/dof_test.cc index a176758e01..9144ac0f11 100644 --- a/tests/big-tests/dof/dof_test.cc +++ b/tests/big-tests/dof/dof_test.cc @@ -9,7 +9,7 @@ #include #include #include -#include +#include #include #include @@ -356,8 +356,8 @@ void TestCases::run (ParameterHandler &prm) { cout << " Renumbering degrees of freedom..." << endl; dof->renumber_dofs (Cuthill_McKee, false); - dSMatrixStruct sparsity (dof->n_dofs(), - dof->max_couplings_between_dofs()); + SparseMatrixStruct sparsity (dof->n_dofs(), + dof->max_couplings_between_dofs()); dof->make_sparsity_pattern (sparsity); diff --git a/tests/big-tests/error-estimation/error-estimation.cc b/tests/big-tests/error-estimation/error-estimation.cc index 54e1c13f2d..9c8db1acae 100644 --- a/tests/big-tests/error-estimation/error-estimation.cc +++ b/tests/big-tests/error-estimation/error-estimation.cc @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include @@ -45,14 +45,14 @@ class PoissonEquation : public Equation { right_hand_side (rhs), coefficient (coefficient) {}; - virtual void assemble (dFMatrix &cell_matrix, - dVector &rhs, + virtual void assemble (FullMatrix &cell_matrix, + Vector &rhs, const FEValues &fe_values, const DoFHandler::cell_iterator &cell) const; - virtual void assemble (dFMatrix &cell_matrix, + virtual void assemble (FullMatrix &cell_matrix, const FEValues &fe_values, const DoFHandler::cell_iterator &cell) const; - virtual void assemble (dVector &rhs, + virtual void assemble (Vector &rhs, const FEValues &fe_values, const DoFHandler::cell_iterator &cell) const; protected: @@ -256,8 +256,8 @@ double RHS<2>::Kink::operator () (const Point<2> &) const { template <> -void PoissonEquation<2>::assemble (dFMatrix &cell_matrix, - dVector &rhs, +void PoissonEquation<2>::assemble (FullMatrix &cell_matrix, + Vector &rhs, const FEValues<2> &fe_values, const DoFHandler<2>::cell_iterator &) const { for (unsigned int point=0; point::assemble (dFMatrix &cell_matrix, template -void PoissonEquation::assemble (dFMatrix &, +void PoissonEquation::assemble (FullMatrix &, const FEValues &, const DoFHandler::cell_iterator &) const { Assert (false, ExcPureVirtualFunctionCalled()); @@ -291,7 +291,7 @@ void PoissonEquation::assemble (dFMatrix &, template -void PoissonEquation::assemble (dVector &, +void PoissonEquation::assemble (Vector &, const FEValues &, const DoFHandler::cell_iterator &) const { Assert (false, ExcPureVirtualFunctionCalled()); @@ -465,8 +465,8 @@ void PoissonProblem::run (ParameterHandler &prm) { cout << " Solving..." << endl; solve (); - dVector l2_error_per_cell, linfty_error_per_cell, h1_error_per_cell; - dVector estimated_error_per_cell; + Vector l2_error_per_cell, linfty_error_per_cell, h1_error_per_cell; + Vector estimated_error_per_cell; QGauss3 q; cout << " Calculating L2 error... "; @@ -505,9 +505,9 @@ void PoissonProblem::run (ParameterHandler &prm) { cout << estimated_error_per_cell.l2_norm() << endl; estimated_error.push_back (estimated_error_per_cell.l2_norm()); - dVector l2_error_per_dof, linfty_error_per_dof; - dVector h1_error_per_dof, estimated_error_per_dof; - dVector error_ratio; + Vector l2_error_per_dof, linfty_error_per_dof; + Vector h1_error_per_dof, estimated_error_per_dof; + Vector error_ratio; dof->distribute_cell_to_dof_vector (l2_error_per_cell, l2_error_per_dof); dof->distribute_cell_to_dof_vector (linfty_error_per_cell, linfty_error_per_dof); diff --git a/tests/big-tests/multigrid/multigrid.cc b/tests/big-tests/multigrid/multigrid.cc index b3d4c57e96..4b41c688f8 100644 --- a/tests/big-tests/multigrid/multigrid.cc +++ b/tests/big-tests/multigrid/multigrid.cc @@ -19,8 +19,8 @@ #include #include -#include -#include +#include +#include #include #include @@ -41,14 +41,14 @@ class PoissonEquation : public Equation { Equation(1), right_hand_side (rhs) {}; - virtual void assemble (dFMatrix &cell_matrix, - dVector &rhs, + virtual void assemble (FullMatrix &cell_matrix, + Vector &rhs, const FEValues &fe_values, const DoFHandler::cell_iterator &cell) const; - virtual void assemble (dFMatrix &cell_matrix, + virtual void assemble (FullMatrix &cell_matrix, const FEValues &fe_values, const DoFHandler::cell_iterator &cell) const; - virtual void assemble (dVector &rhs, + virtual void assemble (Vector &rhs, const FEValues &fe_values, const DoFHandler::cell_iterator &cell) const; protected: @@ -125,22 +125,22 @@ class PoissonProblem { /** * Sparsity pattern of the system matrix. */ - dSMatrixStruct system_sparsity; + SparseMatrixStruct system_sparsity; /** * System matrix. */ - dSMatrix system_matrix; + SparseMatrix system_matrix; /** * Vector storing the right hand side. */ - dVector right_hand_side; + Vector right_hand_side; /** * Solution vector. */ - dVector solution; + Vector solution; /** * List of constraints introduced by @@ -228,8 +228,8 @@ Tensor<1,2> Solution<2>::gradient (const Point<2> &p) const { template <> -void PoissonEquation<2>::assemble (dFMatrix &cell_matrix, - dVector &rhs, +void PoissonEquation<2>::assemble (FullMatrix &cell_matrix, + Vector &rhs, const FEValues<2> &fe_values, const DoFHandler<2>::cell_iterator &) const { for (unsigned int point=0; point::assemble (dFMatrix &cell_matrix, template -void PoissonEquation::assemble (dFMatrix &, +void PoissonEquation::assemble (FullMatrix &, const FEValues &, const DoFHandler::cell_iterator &) const { Assert (false, ExcPureVirtualFunctionCalled()); @@ -257,7 +257,7 @@ void PoissonEquation::assemble (dFMatrix &, template -void PoissonEquation::assemble (dVector &, +void PoissonEquation::assemble (Vector &, const FEValues &, const DoFHandler::cell_iterator &) const { Assert (false, ExcPureVirtualFunctionCalled()); @@ -393,8 +393,8 @@ void PoissonProblem::solve () { Assert ((tria!=0) && (dof!=0), ExcNoTriaSelected()); SolverControl control(4000, 1e-16); - PrimitiveVectorMemory memory; - SolverCG cg(control,memory); + PrimitiveVectorMemory > memory; + SolverCG,Vector > cg(control,memory); // solve cg.solve (system_matrix, solution, right_hand_side); @@ -486,8 +486,8 @@ int PoissonProblem::run (const unsigned int level) { solve (); Solution sol; - dVector l1_error_per_cell, l2_error_per_cell, linfty_error_per_cell; - dVector h1_seminorm_error_per_cell, h1_error_per_cell; + Vector l1_error_per_cell, l2_error_per_cell, linfty_error_per_cell; + Vector h1_seminorm_error_per_cell, h1_error_per_cell; cout << " Calculating L1 error... "; VectorTools::integrate_difference (*dof, @@ -531,8 +531,8 @@ int PoissonProblem::run (const unsigned int level) { if (dof->DoFHandler::n_dofs()<=5000) { - dVector l1_error_per_dof, l2_error_per_dof, linfty_error_per_dof; - dVector h1_seminorm_error_per_dof, h1_error_per_dof; + Vector l1_error_per_dof, l2_error_per_dof, linfty_error_per_dof; + Vector h1_seminorm_error_per_dof, h1_error_per_dof; dof->distribute_cell_to_dof_vector (l1_error_per_cell, l1_error_per_dof); dof->distribute_cell_to_dof_vector (l2_error_per_cell, l2_error_per_dof); dof->distribute_cell_to_dof_vector (linfty_error_per_cell, @@ -541,7 +541,7 @@ int PoissonProblem::run (const unsigned int level) { h1_seminorm_error_per_dof); dof->distribute_cell_to_dof_vector (h1_error_per_cell, h1_error_per_dof); -// dVector projected_solution; +// Vector projected_solution; // ConstraintMatrix constraints; // constraints.close (); // VectorTools::project (*dof, constraints, *fe, diff --git a/tests/big-tests/poisson/equation.cc b/tests/big-tests/poisson/equation.cc index ed7b4ebabe..17dc3ead17 100644 --- a/tests/big-tests/poisson/equation.cc +++ b/tests/big-tests/poisson/equation.cc @@ -3,15 +3,15 @@ #include "poisson.h" -#include +#include #if deal_II_dimension == 1 template <> -void PoissonEquation<1>::assemble (dFMatrix &cell_matrix, - dVector &rhs, +void PoissonEquation<1>::assemble (FullMatrix &cell_matrix, + Vector &rhs, const FEValues<1> &fe_values, const DoFHandler<1>::cell_iterator &) const { for (unsigned int point=0; point::assemble (dFMatrix &cell_matrix, //#if deal_II_dimension >= 2 template -void PoissonEquation::assemble (dFMatrix &cell_matrix, - dVector &rhs, +void PoissonEquation::assemble (FullMatrix &cell_matrix, + Vector &rhs, const FEValues &fe_values, const DoFHandler::cell_iterator &) const { const vector > >&gradients = fe_values.get_shape_grads (); - const dFMatrix &values = fe_values.get_shape_values (); + const FullMatrix &values = fe_values.get_shape_values (); vector rhs_values (fe_values.n_quadrature_points); const vector &weights = fe_values.get_JxW_values (); @@ -63,7 +63,7 @@ void PoissonEquation::assemble (dFMatrix &cell_matrix, template -void PoissonEquation::assemble (dFMatrix &, +void PoissonEquation::assemble (FullMatrix &, const FEValues &, const DoFHandler::cell_iterator &) const { Assert (false, ExcPureVirtualFunctionCalled()); @@ -72,7 +72,7 @@ void PoissonEquation::assemble (dFMatrix &, template -void PoissonEquation::assemble (dVector &, +void PoissonEquation::assemble (Vector &, const FEValues &, const DoFHandler::cell_iterator &) const { Assert (false, ExcPureVirtualFunctionCalled()); diff --git a/tests/big-tests/poisson/poisson.cc b/tests/big-tests/poisson/poisson.cc index b4017ea350..6c657c1b33 100644 --- a/tests/big-tests/poisson/poisson.cc +++ b/tests/big-tests/poisson/poisson.cc @@ -4,7 +4,7 @@ #include "poisson.h" -#include +#include diff --git a/tests/big-tests/poisson/poisson.h b/tests/big-tests/poisson/poisson.h index f85471ab30..36756276b7 100644 --- a/tests/big-tests/poisson/poisson.h +++ b/tests/big-tests/poisson/poisson.h @@ -20,15 +20,14 @@ #include #include #include -#include +#include #include #include #include -extern "C" { -# include -} +#include + @@ -42,14 +41,14 @@ class PoissonEquation : public Equation { Equation(1), right_hand_side (rhs) {}; - virtual void assemble (dFMatrix &cell_matrix, - dVector &rhs, + virtual void assemble (FullMatrix &cell_matrix, + Vector &rhs, const FEValues &fe_values, const DoFHandler::cell_iterator &cell) const; - virtual void assemble (dFMatrix &cell_matrix, + virtual void assemble (FullMatrix &cell_matrix, const FEValues &fe_values, const DoFHandler::cell_iterator &cell) const; - virtual void assemble (dVector &rhs, + virtual void assemble (Vector &rhs, const FEValues &fe_values, const DoFHandler::cell_iterator &cell) const; protected: diff --git a/tests/big-tests/poisson/problem.cc b/tests/big-tests/poisson/problem.cc index 20ffc09441..2a8452b97c 100644 --- a/tests/big-tests/poisson/problem.cc +++ b/tests/big-tests/poisson/problem.cc @@ -4,7 +4,7 @@ #include "poisson.h" -#include +#include -- 2.39.5