]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Check in the large patches needed to make the transition from dVector to Vector<doubl...
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 24 Feb 1999 19:22:35 +0000 (19:22 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 24 Feb 1999 19:22:35 +0000 (19:22 +0000)
git-svn-id: https://svn.dealii.org/trunk@900 0785d39b-7218-0410-832d-ea1e28bc413d

71 files changed:
deal.II/deal.II/Attic/examples/convergence/convergence.cc
deal.II/deal.II/Attic/examples/dof/dof_test.cc
deal.II/deal.II/Attic/examples/error-estimation/error-estimation.cc
deal.II/deal.II/Attic/examples/multigrid/multigrid.cc
deal.II/deal.II/Attic/examples/poisson/equation.cc
deal.II/deal.II/Attic/examples/poisson/poisson.cc
deal.II/deal.II/Attic/examples/poisson/poisson.h
deal.II/deal.II/Attic/examples/poisson/problem.cc
deal.II/deal.II/include/dofs/dof_accessor.h
deal.II/deal.II/include/dofs/dof_constraints.h
deal.II/deal.II/include/dofs/dof_handler.h
deal.II/deal.II/include/dofs/dof_levels.h
deal.II/deal.II/include/dofs/mg_dof_accessor.h
deal.II/deal.II/include/dofs/mg_dof_handler.h
deal.II/deal.II/include/fe/fe.h
deal.II/deal.II/include/fe/fe_lib.criss_cross.h
deal.II/deal.II/include/fe/fe_lib.dg.h
deal.II/deal.II/include/fe/fe_lib.lagrange.h
deal.II/deal.II/include/fe/fe_linear_mapping.h
deal.II/deal.II/include/fe/fe_system.h
deal.II/deal.II/include/fe/fe_values.h
deal.II/deal.II/include/grid/tria.h
deal.II/deal.II/include/grid/tria_accessor.h
deal.II/deal.II/include/grid/tria_boundary.h
deal.II/deal.II/include/grid/tria_iterator.h
deal.II/deal.II/include/grid/tria_quad.h
deal.II/deal.II/include/multigrid/mg_dof_accessor.h
deal.II/deal.II/include/multigrid/mg_dof_handler.h
deal.II/deal.II/include/multigrid/multigrid.h
deal.II/deal.II/include/numerics/assembler.h
deal.II/deal.II/include/numerics/base.h
deal.II/deal.II/include/numerics/data_io.h
deal.II/deal.II/include/numerics/error_estimator.h
deal.II/deal.II/include/numerics/matrices.h
deal.II/deal.II/include/numerics/multigrid.h
deal.II/deal.II/include/numerics/vectors.h
deal.II/deal.II/source/dofs/dof_accessor.cc
deal.II/deal.II/source/dofs/dof_constraints.cc
deal.II/deal.II/source/dofs/dof_handler.cc
deal.II/deal.II/source/dofs/mg_dof_accessor.cc
deal.II/deal.II/source/dofs/mg_dof_handler.cc
deal.II/deal.II/source/fe/fe.cc
deal.II/deal.II/source/fe/fe_lib.criss_cross.cc
deal.II/deal.II/source/fe/fe_lib.cubic.cc
deal.II/deal.II/source/fe/fe_lib.dg.cc
deal.II/deal.II/source/fe/fe_lib.dg.constant.cc
deal.II/deal.II/source/fe/fe_lib.linear.cc
deal.II/deal.II/source/fe/fe_lib.quadratic.cc
deal.II/deal.II/source/fe/fe_lib.quartic.cc
deal.II/deal.II/source/fe/fe_linear_mapping.cc
deal.II/deal.II/source/fe/fe_system.cc
deal.II/deal.II/source/fe/fe_values.cc
deal.II/deal.II/source/grid/tria.cc
deal.II/deal.II/source/multigrid/mg_dof_accessor.cc
deal.II/deal.II/source/multigrid/mg_dof_handler.cc
deal.II/deal.II/source/multigrid/multigrid.cc
deal.II/deal.II/source/numerics/assembler.cc
deal.II/deal.II/source/numerics/base.cc
deal.II/deal.II/source/numerics/data_io.cc
deal.II/deal.II/source/numerics/error_estimator.cc
deal.II/deal.II/source/numerics/matrices.cc
deal.II/deal.II/source/numerics/multigrid.cc
deal.II/deal.II/source/numerics/vectors.cc
tests/big-tests/convergence/convergence.cc
tests/big-tests/dof/dof_test.cc
tests/big-tests/error-estimation/error-estimation.cc
tests/big-tests/multigrid/multigrid.cc
tests/big-tests/poisson/equation.cc
tests/big-tests/poisson/poisson.cc
tests/big-tests/poisson/poisson.h
tests/big-tests/poisson/problem.cc

index b3a337327729b9dcf276838e9552c70eeb8a1bbc..2584e4fe4614490e6f4f55f2a29c00ba53a2609d 100644 (file)
@@ -17,7 +17,7 @@
 #include <numerics/base.h>
 #include <numerics/assembler.h>
 #include <numerics/vectors.h>
-#include <lac/dvector.h>
+#include <lac/vector.h>
 
 #include <map>
 #include <fstream>
@@ -36,14 +36,14 @@ class PoissonEquation :  public Equation<dim> {
                    Equation<dim>(1),
                    right_hand_side (rhs)  {};
 
-    virtual void assemble (dFMatrix            &cell_matrix,
-                          dVector             &rhs,
+    virtual void assemble (FullMatrix<double>  &cell_matrix,
+                          Vector<double>      &rhs,
                           const FEValues<dim> &fe_values,
                           const DoFHandler<dim>::cell_iterator &cell) const;
-    virtual void assemble (dFMatrix            &cell_matrix,
+    virtual void assemble (FullMatrix<double>  &cell_matrix,
                           const FEValues<dim> &fe_values,
                           const DoFHandler<dim>::cell_iterator &cell) const;
-    virtual void assemble (dVector             &rhs,
+    virtual void assemble (Vector<double>      &rhs,
                           const FEValues<dim> &fe_values,
                           const DoFHandler<dim>::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<double>  &cell_matrix,
+                                  Vector<double>      &rhs,
                                   const FEValues<2>   &fe_values,
                                   const DoFHandler<2>::cell_iterator &) const {
   for (unsigned int point=0; point<fe_values.n_quadrature_points; ++point)
@@ -169,7 +169,7 @@ void PoissonEquation<2>::assemble (dFMatrix            &cell_matrix,
 
 
 template <int dim>
-void PoissonEquation<dim>::assemble (dFMatrix            &,
+void PoissonEquation<dim>::assemble (FullMatrix<double>  &,
                                     const FEValues<dim> &,
                                     const DoFHandler<dim>::cell_iterator &) const {
   Assert (false, ExcPureVirtualFunctionCalled());
@@ -178,7 +178,7 @@ void PoissonEquation<dim>::assemble (dFMatrix            &,
 
 
 template <int dim>
-void PoissonEquation<dim>::assemble (dVector             &,
+void PoissonEquation<dim>::assemble (Vector<double>      &,
                                     const FEValues<dim> &,
                                     const DoFHandler<dim>::cell_iterator &) const {
   Assert (false, ExcPureVirtualFunctionCalled());
@@ -330,8 +330,8 @@ int PoissonProblem<dim>::run (const unsigned int level) {
   solve ();
 
   Solution<dim> 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<float>       l1_error_per_cell, l2_error_per_cell, linfty_error_per_cell;
+  Vector<float>       h1_seminorm_error_per_cell, h1_error_per_cell;
   
   cout << "    Calculating L1 error... ";
   VectorTools<dim>::integrate_difference (*dof_handler,
@@ -375,8 +375,8 @@ int PoissonProblem<dim>::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<double> l1_error_per_dof, l2_error_per_dof, linfty_error_per_dof;
+      Vector<double> 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<dim>::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<double> projected_solution;
 //       ConstraintMatrix constraints;
 //       constraints.close ();
 //       VectorTools<dim>::project (*dof, constraints, *fe,
index a176758e018bbada9d03a9892bc9ed50cac9a77d..9144ac0f1165559f1a086d49ede8487e48700c00 100644 (file)
@@ -9,7 +9,7 @@
 #include <grid/tria_boundary.h>
 #include <grid/tria_iterator.h>
 #include <grid/tria_accessor.h>
-#include <lac/dsmatrix.h>
+#include <lac/sparsematrix.h>
 #include <base/parameter_handler.h>
 #include <grid/dof_constraints.h>
 
@@ -356,8 +356,8 @@ void TestCases<dim>::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);
index 54e1c13f2d2f8da68de1f14f25aabb41462eecc7..9c8db1acaec5770382d5eb7caaa4a773a93332db 100644 (file)
@@ -18,7 +18,7 @@
 #include <numerics/assembler.h>
 #include <numerics/vectors.h>
 #include <numerics/error_estimator.h>
-#include <lac/dvector.h>
+#include <lac/vector.h>
 
 #include <map.h>
 #include <fstream.h>
@@ -45,14 +45,14 @@ class PoissonEquation :  public Equation<dim> {
                    right_hand_side (rhs),
                    coefficient (coefficient) {};
 
-    virtual void assemble (dFMatrix            &cell_matrix,
-                          dVector             &rhs,
+    virtual void assemble (FullMatrix<double>  &cell_matrix,
+                          Vector<double>      &rhs,
                           const FEValues<dim> &fe_values,
                           const DoFHandler<dim>::cell_iterator &cell) const;
-    virtual void assemble (dFMatrix            &cell_matrix,
+    virtual void assemble (FullMatrix<double>  &cell_matrix,
                           const FEValues<dim> &fe_values,
                           const DoFHandler<dim>::cell_iterator &cell) const;
-    virtual void assemble (dVector             &rhs,
+    virtual void assemble (Vector<double>      &rhs,
                           const FEValues<dim> &fe_values,
                           const DoFHandler<dim>::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<double>  &cell_matrix,
+                                  Vector<double>      &rhs,
                                   const FEValues<2>   &fe_values,
                                   const DoFHandler<2>::cell_iterator &) const {
   for (unsigned int point=0; point<fe_values.n_quadrature_points; ++point) 
@@ -282,7 +282,7 @@ void PoissonEquation<2>::assemble (dFMatrix            &cell_matrix,
 
 
 template <int dim>
-void PoissonEquation<dim>::assemble (dFMatrix            &,
+void PoissonEquation<dim>::assemble (FullMatrix<double>  &,
                                     const FEValues<dim> &,
                                     const DoFHandler<dim>::cell_iterator &) const {
   Assert (false, ExcPureVirtualFunctionCalled());
@@ -291,7 +291,7 @@ void PoissonEquation<dim>::assemble (dFMatrix            &,
 
 
 template <int dim>
-void PoissonEquation<dim>::assemble (dVector             &,
+void PoissonEquation<dim>::assemble (Vector<double>      &,
                                     const FEValues<dim> &,
                                     const DoFHandler<dim>::cell_iterator &) const {
   Assert (false, ExcPureVirtualFunctionCalled());
@@ -465,8 +465,8 @@ void PoissonProblem<dim>::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<float>       l2_error_per_cell, linfty_error_per_cell, h1_error_per_cell;
+      Vector<float>       estimated_error_per_cell;
       QGauss3<dim>  q;
   
       cout << "    Calculating L2 error... ";
@@ -505,9 +505,9 @@ void PoissonProblem<dim>::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<double> l2_error_per_dof, linfty_error_per_dof;
+      Vector<double> h1_error_per_dof, estimated_error_per_dof;
+      Vector<double> 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);
index b3d4c57e96167d543205bee0382d614b09d114b8..4b41c688f81feb06fcb9c3ef6f7de98cfdd10245 100644 (file)
@@ -19,8 +19,8 @@
 #include <numerics/vectors.h>
 #include <numerics/matrices.h>
 
-#include <lac/dvector.h>
-#include <lac/dsmatrix.h>
+#include <lac/vector.h>
+#include <lac/sparsematrix.h>
 #include <lac/solver_cg.h>
 #include <lac/vector_memory.h>
 
@@ -41,14 +41,14 @@ class PoissonEquation :  public Equation<dim> {
                    Equation<dim>(1),
                    right_hand_side (rhs)  {};
 
-    virtual void assemble (dFMatrix            &cell_matrix,
-                          dVector             &rhs,
+    virtual void assemble (FullMatrix<double>  &cell_matrix,
+                          Vector<double>      &rhs,
                           const FEValues<dim> &fe_values,
                           const DoFHandler<dim>::cell_iterator &cell) const;
-    virtual void assemble (dFMatrix            &cell_matrix,
+    virtual void assemble (FullMatrix<double>  &cell_matrix,
                           const FEValues<dim> &fe_values,
                           const DoFHandler<dim>::cell_iterator &cell) const;
-    virtual void assemble (dVector             &rhs,
+    virtual void assemble (Vector<double>      &rhs,
                           const FEValues<dim> &fe_values,
                           const DoFHandler<dim>::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<double> system_matrix;
 
                                     /**
                                      * Vector storing the right hand side.
                                      */
-    dVector             right_hand_side;
+    Vector<double>      right_hand_side;
 
                                     /**
                                      * Solution vector.
                                      */
-    dVector             solution;
+    Vector<double>      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<double>  &cell_matrix,
+                                  Vector<double>      &rhs,
                                   const FEValues<2>   &fe_values,
                                   const DoFHandler<2>::cell_iterator &) const {
   for (unsigned int point=0; point<fe_values.n_quadrature_points; ++point)
@@ -248,7 +248,7 @@ void PoissonEquation<2>::assemble (dFMatrix            &cell_matrix,
 
 
 template <int dim>
-void PoissonEquation<dim>::assemble (dFMatrix            &,
+void PoissonEquation<dim>::assemble (FullMatrix<double>  &,
                                     const FEValues<dim> &,
                                     const DoFHandler<dim>::cell_iterator &) const {
   Assert (false, ExcPureVirtualFunctionCalled());
@@ -257,7 +257,7 @@ void PoissonEquation<dim>::assemble (dFMatrix            &,
 
 
 template <int dim>
-void PoissonEquation<dim>::assemble (dVector             &,
+void PoissonEquation<dim>::assemble (Vector<double>      &,
                                     const FEValues<dim> &,
                                     const DoFHandler<dim>::cell_iterator &) const {
   Assert (false, ExcPureVirtualFunctionCalled());
@@ -393,8 +393,8 @@ void PoissonProblem<dim>::solve () {
   Assert ((tria!=0) && (dof!=0), ExcNoTriaSelected());
   
   SolverControl                    control(4000, 1e-16);
-  PrimitiveVectorMemory<dVector>   memory;
-  SolverCG<dSMatrix,dVector>       cg(control,memory);
+  PrimitiveVectorMemory<Vector<double> >   memory;
+  SolverCG<SparseMatrix<double>,Vector<double> >       cg(control,memory);
 
                                   // solve
   cg.solve (system_matrix, solution, right_hand_side);
@@ -486,8 +486,8 @@ int PoissonProblem<dim>::run (const unsigned int level) {
   solve ();
 
   Solution<dim> 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<float>       l1_error_per_cell, l2_error_per_cell, linfty_error_per_cell;
+  Vector<float>       h1_seminorm_error_per_cell, h1_error_per_cell;
   
   cout << "    Calculating L1 error... ";
   VectorTools<dim>::integrate_difference (*dof,
@@ -531,8 +531,8 @@ int PoissonProblem<dim>::run (const unsigned int level) {
 
   if (dof->DoFHandler<dim>::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<double> l1_error_per_dof, l2_error_per_dof, linfty_error_per_dof;
+      Vector<double> 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<dim>::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<double> projected_solution;
 //       ConstraintMatrix constraints;
 //       constraints.close ();
 //       VectorTools<dim>::project (*dof, constraints, *fe,
index ed7b4ebabe041cce83cba4525d3205f3f8ef9864..17dc3ead17ad1f47e2f6b2b771f1960d563b4759 100644 (file)
@@ -3,15 +3,15 @@
 
 
 #include "poisson.h"
-#include <lac/dvector.h>
+#include <lac/vector.h>
 
 
 
 #if deal_II_dimension == 1
 
 template <>
-void PoissonEquation<1>::assemble (dFMatrix            &cell_matrix,
-                                  dVector             &rhs,
+void PoissonEquation<1>::assemble (FullMatrix<double>  &cell_matrix,
+                                  Vector<double>      &rhs,
                                   const FEValues<1>   &fe_values,
                                   const DoFHandler<1>::cell_iterator &) const {
   for (unsigned int point=0; point<fe_values.n_quadrature_points; ++point)
@@ -34,12 +34,12 @@ void PoissonEquation<1>::assemble (dFMatrix            &cell_matrix,
 //#if deal_II_dimension >= 2
 
 template <int dim>
-void PoissonEquation<dim>::assemble (dFMatrix            &cell_matrix,
-                                    dVector             &rhs,
+void PoissonEquation<dim>::assemble (FullMatrix<double>  &cell_matrix,
+                                    Vector<double>      &rhs,
                                     const FEValues<dim> &fe_values,
                                     const DoFHandler<dim>::cell_iterator &) const {
   const vector<vector<Tensor<1,dim> > >&gradients = fe_values.get_shape_grads ();
-  const dFMatrix       &values    = fe_values.get_shape_values ();
+  const FullMatrix<double>            &values    = fe_values.get_shape_values ();
   vector<double>        rhs_values (fe_values.n_quadrature_points);
   const vector<double> &weights   = fe_values.get_JxW_values ();
 
@@ -63,7 +63,7 @@ void PoissonEquation<dim>::assemble (dFMatrix            &cell_matrix,
 
 
 template <int dim>
-void PoissonEquation<dim>::assemble (dFMatrix            &,
+void PoissonEquation<dim>::assemble (FullMatrix<double>  &,
                                     const FEValues<dim> &,
                                     const DoFHandler<dim>::cell_iterator &) const {
   Assert (false, ExcPureVirtualFunctionCalled());
@@ -72,7 +72,7 @@ void PoissonEquation<dim>::assemble (dFMatrix            &,
 
 
 template <int dim>
-void PoissonEquation<dim>::assemble (dVector             &,
+void PoissonEquation<dim>::assemble (Vector<double>      &,
                                     const FEValues<dim> &,
                                     const DoFHandler<dim>::cell_iterator &) const {
   Assert (false, ExcPureVirtualFunctionCalled());
index b4017ea350464bb52df0123247cbc064eb54ca82..6c657c1b338cff10d9d574394840d52e43ae2b65 100644 (file)
@@ -4,7 +4,7 @@
 
 
 #include "poisson.h"
-#include <lac/dvector.h>
+#include <lac/vector.h>
 
 
 
index f85471ab30202d752ceab2a553cf1ee66ddf9cd7..36756276b757a154d6a3b762b172badd5a315051 100644 (file)
 #include <base/quadrature_lib.h>
 #include <numerics/base.h>
 #include <numerics/assembler.h>
-#include <lac/dsmatrix.h>
+#include <lac/sparsematrix.h>
 
 
 #include <map.h>
 #include <fstream.h>
 #include <cmath>
-extern "C" {
-#  include <stdlib.h>
-}
+#include <cstdlib>
+
 
 
 
@@ -42,14 +41,14 @@ class PoissonEquation :  public Equation<dim> {
                    Equation<dim>(1),
                    right_hand_side (rhs)  {};
 
-    virtual void assemble (dFMatrix            &cell_matrix,
-                          dVector             &rhs,
+    virtual void assemble (FullMatrix<double>  &cell_matrix,
+                          Vector<double>      &rhs,
                           const FEValues<dim> &fe_values,
                           const DoFHandler<dim>::cell_iterator &cell) const;
-    virtual void assemble (dFMatrix            &cell_matrix,
+    virtual void assemble (FullMatrix<double>  &cell_matrix,
                           const FEValues<dim> &fe_values,
                           const DoFHandler<dim>::cell_iterator &cell) const;
-    virtual void assemble (dVector             &rhs,
+    virtual void assemble (Vector<double>      &rhs,
                           const FEValues<dim> &fe_values,
                           const DoFHandler<dim>::cell_iterator &cell) const;
   protected:
index 20ffc0944150f54ea6bd813ed830d7daeb4ccd05..2a8452b97ce78401508615a1d356de2dc61bd8fd 100644 (file)
@@ -4,7 +4,7 @@
 
 
 #include "poisson.h"
-#include <lac/dvector.h>
+#include <lac/vector.h>
 
 
 
index 02da83439d9861b0f6985057333429994a70b6aa..ee9a549db43562eafcb9b89470563c1533f95275 100644 (file)
@@ -6,14 +6,8 @@
 /*----------------------------   dof_iterator.h     ---------------------------*/
 
 
-template <int dim> class Triangulation;
-template <int dim> class DoFHandler;
-class dVector;
-class dFMatrix;
-class dSMatrix;
-
-
 #include <grid/tria_accessor.h>
+#include <lac/forward-declarations.h>
 #include <vector>
 
 
@@ -257,8 +251,8 @@ class DoFLineAccessor :  public DoFAccessor<dim>, 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<double> &local_source,
+                                    Vector<double>       &global_destination) const;
 
                                     /**
                                      * This function does much the same as the
@@ -268,8 +262,8 @@ class DoFLineAccessor :  public DoFAccessor<dim>, 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<double> &local_source,
+                                    SparseMatrix<double>     &global_destination) const;
     
                                     /**
                                      * Implement the copy operator needed
@@ -383,8 +377,8 @@ class DoFQuadAccessor :  public DoFAccessor<dim>, 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<double> &local_source,
+                                    Vector<double>       &global_destination) const;
 
                                     /**
                                      * This function does much the same as the
@@ -394,8 +388,8 @@ class DoFQuadAccessor :  public DoFAccessor<dim>, 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<double> &local_source,
+                                    SparseMatrix<double>     &global_destination) const;
     
                                     /**
                                      * Implement the copy operator needed
@@ -515,8 +509,8 @@ class DoFHexAccessor :  public DoFAccessor<dim>, 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<double> &local_source,
+                                    Vector<double>       &global_destination) const;
 
                                     /**
                                      * This function does much the same as the
@@ -526,8 +520,8 @@ class DoFHexAccessor :  public DoFAccessor<dim>, 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<double> &local_source,
+                                    SparseMatrix<double>     &global_destination) const;
     
                                     /**
                                      * Implement the copy operator needed
@@ -765,8 +759,8 @@ class DoFCellAccessor :  public DoFSubstructAccessor<dim> {
                                      * function is only callable for active
                                      * cells.
                                      */
-    void get_dof_values (const dVector &values,
-                        dVector       &local_values) const;
+    void get_dof_values (const Vector<double> &values,
+                        Vector<double>       &local_values) const;
 
                                     /**
                                      * Return the interpolation of the given
@@ -807,8 +801,8 @@ class DoFCellAccessor :  public DoFSubstructAccessor<dim> {
                                      * 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<double> &values,
+                                     Vector<double>       &interpolated_values) const;
 
                                     /**
                                      * This function is the counterpart to
@@ -832,8 +826,8 @@ class DoFCellAccessor :  public DoFSubstructAccessor<dim> {
                                      * 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<double> &local_values,
+                        Vector<double>       &values) const;
 
                                     /**
                                      * This, again, is the counterpart to
@@ -888,8 +882,8 @@ class DoFCellAccessor :  public DoFSubstructAccessor<dim> {
                                      * 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<double> &local_values,
+                                         Vector<double>       &values) const;
     
                                     /**
                                      *  Exception
index 5d8c57b67e1ad113108963cc8e5505d16d0521bf..dd3685f7416d832190d7eda99d1a4962a68d58e1 100644 (file)
@@ -9,15 +9,10 @@
 #include <vector>
 #include <utility>
 #include <base/exceptions.h>
+#include <lac/forward-declarations.h>
 
 
 
-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<double> &uncondensed,
+                  SparseMatrix<double>       &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<double> &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<double> &uncondensed,
+                  Vector<double>       &condensed) const;
 
                                     /**
                                      * Condense the given vector in-place.
                                      */
-    void condense (dVector &vec) const;
+    void condense (Vector<double> &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<double> &condensed,
+                    Vector<double>       &uncondensed) const;
 
                                     /**
                                      * Re-distribute the elements of the vector
                                      * in-place.
                                      */
-    void distribute (dVector &vec) const;
+    void distribute (Vector<double> &vec) const;
     
     
                                     /**
index 1929f2acd286d361d65339dd6139f18d327b21d0..76a27b25ad52e1f3dab8d87257c789a553f39937 100644 (file)
@@ -8,37 +8,10 @@
 #include <vector>
 #include <map>
 #include <base/exceptions.h>
+#include <base/forward-declarations.h>
 #include <base/smartpointer.h>
-
-template <int dim> class TriaAccessor;
-template <int dim> class LineAccessor;
-template <int dim> class QuadAccessor;
-template <int dim> class HexAccessor;
-template <int dim> class CellAccessor;
-
-template <int dim, class BaseClass> class DoFLineAccessor;
-template <int dim, class BaseClass> class DoFQuadAccessor;
-template <int dim, class BaseClass> class DoFHexAccessor;
-template <int dim> class DoFCellAccessor;
-
-template <int dim> class DoFLevel;
-
-
-template <int dim, class Accessor> class TriaRawIterator;
-template <int dim, class Accessor> class TriaIterator;
-template <int dim, class Accessor> class TriaActiveIterator;
-
-template <int dim> class Triangulation;
-template <int dim> class FiniteElement;
-template <int dim> class Function;
-
-class dVector;
-class dSMatrix;
-class dSMatrixStruct;
-class ConstraintMatrix;
-
-
-
+#include <basic/forward-declarations.h>
+#include <lac/forward-declarations.h>
 
 
 
@@ -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<double> 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<dim> {
                                      * 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<dim> {
                                      * 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<int> &dof_to_boundary_mapping,
-                                        dSMatrixStruct &) const; 
+                                        SparseMatrixStruct &) const; 
 
                                     /**
                                      * Write the sparsity structure of the
@@ -712,9 +685,9 @@ class DoFHandler : public DoFDimensionInfo<dim> {
                                      * in one spatial dimension, it is not
                                      * implemented.
                                      */
-    void make_boundary_sparsity_pattern (const FunctionMap &boundary_indicators,
-                                        const vector<int> &dof_to_boundary_mapping,
-                                        dSMatrixStruct    &sparsity) const; 
+    void make_boundary_sparsity_pattern (const FunctionMap  &boundary_indicators,
+                                        const vector<int>  &dof_to_boundary_mapping,
+                                        SparseMatrixStruct &sparsity) const; 
 
     
                                     /**
@@ -740,7 +713,7 @@ class DoFHandler : public DoFDimensionInfo<dim> {
                                      * documentation for this class.
                                      */
     void make_transfer_matrix (const DoFHandler<dim> &transfer_from,
-                              dSMatrixStruct        &transfer_pattern) const;
+                              SparseMatrixStruct    &transfer_pattern) const;
 
                                     /**
                                      * Make up the transfer matrix which
@@ -760,7 +733,7 @@ class DoFHandler : public DoFDimensionInfo<dim> {
                                      * documentation for this class.
                                      */
     void make_transfer_matrix (const DoFHandler<dim> &transfer_from,
-                              dSMatrix              &transfer_matrix) const;
+                              SparseMatrix<double>  &transfer_matrix) const;
 
                                     /**
                                      * Return the maximum number of
@@ -770,7 +743,7 @@ class DoFHandler : public DoFDimensionInfo<dim> {
                                      * 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<dim> {
                                      * 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 <typename Number>
+    void distribute_cell_to_dof_vector (const Vector<Number> &cell_data,
+                                       Vector<double>       &dof_data) const;
 
                                     /**
                                      * Create a mapping from degree of freedom
@@ -1585,15 +1566,15 @@ class DoFHandler : public DoFDimensionInfo<dim> {
                                      */
     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<double> &transfer_matrix) const;
 
                                     /**
                                      * Space to store the DoF numbers for the
index e5b460d0b4f1984164ffe5ec62c0d0c940358662..0cb5c84a6e5116ea37fac77119b7582a157b4bd1 100644 (file)
  * other types than those explicitely instantiated.
  */
 template <int N>
-class DoFLevel;
+class DoFLevel {
+  private:
+                                    /**
+                                     * Make the constructor private to avoid
+                                     * that someone uses this class.
+                                     */
+    DoFLevel ();
+};
 
 
 
index 0ee7b25e6bed867eff4452e1916f1114da4410d6..31e9920f5ea45ec2273d45582ad84aedbef245ab 100644 (file)
@@ -9,10 +9,6 @@
 #include <grid/dof_accessor.h>
 
 
-// forward declaration
-template <int dim> class MGDoFHandler;
-
-
 
 
 /**
@@ -668,8 +664,8 @@ class MGDoFCellAccessor :  public MGDoFSubstructAccessor<dim> {
                                      * 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<double> &values,
+                           Vector<double>       &dof_values) const;
 
 
                                     /**
index 6f80e19be70741f35348e9d4d267e9266c8dc0d9..f3d661171b7bb5a04a005b7175211e44cc8b4a73 100644 (file)
 
 
 
-// forward declarations
-template <int dim, typename BaseClass> class MGDoFLineAccessor;
-template <int dim, typename BaseClass> class MGDoFQuadAccessor;
-template <int dim> 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<dim> {
                                      * 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; 
 
                                     /*--------------------------------------*/
     
index b6d47ef7f4d89e7254ae20f4cdbe83e682e6c217..188b11f66a19dc0d461bf00a98f0100aaab5a958 100644 (file)
 #include <base/tensor.h>
 #include <grid/dof.h>
 #include <grid/geometry_info.h>
-#include <lac/dfmatrix.h>
+#include <lac/fullmatrix.h>
 
 
 
-template <int dim> class Boundary;
-template <int dim> 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<double> & 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<double> & 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<double> & 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<dim>::children_per_cell];
+    FullMatrix<double> restriction[GeometryInfo<dim>::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<dim>::children_per_cell];
+    FullMatrix<double> prolongation[GeometryInfo<dim>::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<double> interface_constraints;
 
                                     /**
                                      * Map between linear dofs and component dofs.
@@ -875,7 +871,7 @@ class FiniteElement : public FiniteElementBase<dim> {
                                 const bool                 compute_support_points,
                                 vector<Point<dim> >       &q_points,
                                 const bool                 compute_q_points,
-                                const dFMatrix            &shape_values_transform,
+                                const FullMatrix<double>            &shape_values_transform,
                                 const vector<vector<Tensor<1,dim> > > &shape_grads_transform,
                                 const Boundary<dim> &boundary) const;
 
@@ -999,7 +995,7 @@ class FiniteElement : public FiniteElementBase<dim> {
                                      const bool           compute_face_jacobians,
                                      vector<Point<dim> > &normal_vectors,
                                      const bool           compute_normal_vectors,
-                                     const dFMatrix      &shape_values_transform,
+                                     const FullMatrix<double>      &shape_values_transform,
                                      const vector<vector<Tensor<1,dim> > > &shape_grads_transform,
                                      const Boundary<dim> &boundary) const;
 
@@ -1046,7 +1042,7 @@ class FiniteElement : public FiniteElementBase<dim> {
                                         const bool           compute_face_jacobians,
                                         vector<Point<dim> > &normal_vectors,
                                         const bool           compute_normal_vectors,
-                                        const dFMatrix      &shape_values_transform,
+                                        const FullMatrix<double>      &shape_values_transform,
                                         const vector<vector<Tensor<1,dim> > > &shape_grads_transform,
                                         const Boundary<dim> &boundary) const;
 
@@ -1317,8 +1313,8 @@ class FiniteElement : public FiniteElementBase<dim> {
                                      * documentation.
                                      */
     virtual void get_local_mass_matrix (const DoFHandler<dim>::cell_iterator &cell,
-                                       const Boundary<dim> &boundary, 
-                                       dFMatrix            &local_mass_matrix) const =0;
+                                       const Boundary<dim>           &boundary, 
+                                       FullMatrix<double>            &local_mass_matrix) const =0;
 
                                     /**
                                      * Exception
index c703a736c90722c4f6cb928f62b5ac191fc5fb7e..6381a946ffa52f5b82c7f35d14a8abd65a8dd731 100644 (file)
@@ -8,7 +8,8 @@
 
 #include <fe/fe.h>
 #include <base/quadrature.h>
-#include <math.h>
+#include <cmath>
+
 
 /**
  * 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<dim> {
                                      */
     virtual void get_local_mass_matrix (const DoFHandler<dim>::cell_iterator &cell,
                                        const Boundary<dim> &boundary,
-                                       dFMatrix &local_mass_matrix) const;
+                                       FullMatrix<double> &local_mass_matrix) const;
 
                                     /**
                                      * Return the value of the #i#th shape
@@ -340,7 +341,7 @@ class FECrissCross : public FiniteElement<dim> {
                                 const bool              compute_support_points,
                                 vector<Point<dim> >    &q_points,
                                 const bool              compute_q_points,
-                                const dFMatrix         &shape_values_transform,
+                                const FullMatrix<double>         &shape_values_transform,
                                 const vector<vector<Tensor<1,dim> > > &shape_grad_transform,
                                 const Boundary<dim> &boundary) const;
 
index ce5e8c2f14dee3241877de26ebdac9521b4f6f4d..63ca7269b30d55c8603a487df48e51ad3344f984 100644 (file)
@@ -76,7 +76,7 @@ class FEDGConstant : public FELinearMapping<dim> {
                                      */
     virtual void get_local_mass_matrix (const DoFHandler<dim>::cell_iterator &cell,
                                        const Boundary<dim> &boundary,
-                                       dFMatrix &local_mass_matrix) const;
+                                       FullMatrix<double> &local_mass_matrix) const;
   
                                     /**
                                      * Return a readonly reference to the
@@ -90,7 +90,7 @@ class FEDGConstant : public FELinearMapping<dim> {
                                      * matrices is not yet finally decided
                                      * about.
                                      */
-    const dFMatrix & restrict (const unsigned int) const;
+    const FullMatrix<double> & restrict (const unsigned int) const;
   
                                     /**
                                      * Exception
@@ -136,7 +136,7 @@ class FEDGLinear : public FELinear<dim>{
                                      * matrices is not yet finally decided
                                      * about.
                                      */
-    const dFMatrix & restrict (const unsigned int) const;
+    const FullMatrix<double> & restrict (const unsigned int) const;
 };
 
 
@@ -176,7 +176,7 @@ class FEDGQuadraticSub : public FEQuadraticSub<dim>{
                                      * matrices is not yet finally decided
                                      * about.
                                      */
-    const dFMatrix & restrict (const unsigned int) const;
+    const FullMatrix<double> & restrict (const unsigned int) const;
 };
 
 
@@ -217,7 +217,7 @@ class FEDGCubicSub : public FECubicSub<dim>{
                                      * matrices is not yet finally decided
                                      * about.
                                      */
-    const dFMatrix & restrict (const unsigned int) const;
+    const FullMatrix<double> & restrict (const unsigned int) const;
 };
 
 
@@ -257,7 +257,7 @@ class FEDGQuarticSub : public FEQuarticSub<dim>{
                                      * matrices is not yet finally decided
                                      * about.
                                      */
-    const dFMatrix & restrict (const unsigned int) const;
+    const FullMatrix<double> & restrict (const unsigned int) const;
 };
 
 
index 9842e8d8543507dfb01b53cc9e921a7ed2e25017..cabbf3d545e5aa299263fa7bc9fe33bd90857770 100644 (file)
@@ -110,7 +110,7 @@ class FELinear : public FELinearMapping<dim> {
                                      */
     virtual void get_local_mass_matrix (const DoFHandler<dim>::cell_iterator &cell,
                                        const Boundary<dim> &boundary,
-                                       dFMatrix &local_mass_matrix) const;
+                                       FullMatrix<double> &local_mass_matrix) const;
 
   private:
 
@@ -291,7 +291,7 @@ class FEQuadraticSub : public FELinearMapping<dim> {
                                      */
     virtual void get_local_mass_matrix (const DoFHandler<dim>::cell_iterator &cell,
                                        const Boundary<dim> &boundary,
-                                       dFMatrix &local_mass_matrix) const;
+                                       FullMatrix<double> &local_mass_matrix) const;
 
   private:
 
@@ -416,7 +416,7 @@ class FECubicSub : public FELinearMapping<dim> {
                                      */
     virtual void get_local_mass_matrix (const DoFHandler<dim>::cell_iterator &cell,
                                        const Boundary<dim> &boundary,
-                                       dFMatrix &local_mass_matrix) const;
+                                       FullMatrix<double> &local_mass_matrix) const;
 
   private:
 
@@ -542,7 +542,7 @@ class FEQuarticSub : public FELinearMapping<dim> {
                                      */
     virtual void get_local_mass_matrix (const DoFHandler<dim>::cell_iterator &cell,
                                        const Boundary<dim> &boundary,
-                                       dFMatrix &local_mass_matrix) const;
+                                       FullMatrix<double> &local_mass_matrix) const;
 
   private:
 
index b9001fb258a625a6b3d13fb915cd6deb894b198f..67cd6426e20a591d16a08058c129f38df0714ebd 100644 (file)
@@ -6,7 +6,7 @@
 /*----------------------------   fe_linear_mapping.h     ---------------------------*/
 
 
-#include <math.h>
+#include <cmath>
 #include <fe/fe.h>
 
 
@@ -146,7 +146,7 @@ class FELinearMapping : public FiniteElement<dim> {
                                 const bool              compute_support_points,
                                 vector<Point<dim> >    &q_points,
                                 const bool              compute_q_points,
-                                const dFMatrix         &shape_values_transform,
+                                const FullMatrix<double>         &shape_values_transform,
                                 const vector<vector<Tensor<1,dim> > > &shape_grad_transform,
                                 const Boundary<dim> &boundary) const;
 
index 00c152ec23fb0d1ceb744750ed9d956e3649464f..1dca911bb1bcd6513ec32b6d20bfd6ad89201002 100644 (file)
@@ -9,6 +9,8 @@
 #include <vector>
 #include <pair.h>
 
+
+
 /**
  * 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<dim>
                                      */
     virtual void get_local_mass_matrix (const DoFHandler<dim>::cell_iterator &cell,
                                        const Boundary<dim> &boundary,
-                                       dFMatrix &local_mass_matrix) const;
+                                       FullMatrix<double> &local_mass_matrix) const;
 
                                     /**
                                      * Return the value of the #i#th shape
@@ -329,7 +331,7 @@ class FESystem : public FiniteElement<dim>
                                 const bool           compute_support_points,
                                 vector<Point<dim> > &q_points,
                                 const bool           compute_q_points,
-                                const dFMatrix      &shape_values_transform,
+                                const FullMatrix<double>  &shape_values_transform,
                                 const vector<vector<Tensor<1,dim> > > &shape_grad_transform,
                                 const Boundary<dim> &boundary) const;
     
index 273e0fbeb71fae407dca321c861c87666b860a3b..b57150d59f7c58efaf2af882f5323b1cb4652cd4 100644 (file)
@@ -8,17 +8,12 @@
 
 #include <base/exceptions.h>
 #include <base/subscriptor.h>
-#include <lac/dfmatrix.h>
+#include <lac/fullmatrix.h>
 #include <base/point.h>
 #include <grid/tria.h>
 #include <fe/fe_update_flags.h>
 
 
-// forward declarations
-template <int dim> class Boundary;
-template <int dim> class FiniteElement;
-template <int dim> 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<double> & 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<double>     &values) const;
+    void get_function_values (const Vector<double> &fe_function,
+                             vector<double>       &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<vector<double> >     &values) const;
+    void get_function_values (const Vector<double>    &fe_function,
+                             vector<vector<double> > &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<double>   &fe_function,
                             vector<Tensor<1,dim> > &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<double>   &fe_function,
                                       vector<Tensor<2,dim> > &second_derivatives) const;
 
                                     /**
@@ -529,7 +524,7 @@ class FEValuesBase {
                                      * is determined by the #selected_dataset#
                                      * variable.
                                      */
-    vector<dFMatrix>     shape_values;
+    vector<FullMatrix<double> >     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<dFMatrix>     shape_values_transform;
+    vector<FullMatrix<double> >     shape_values_transform;
 
                                     /**
                                      * Store which of the data sets in the
@@ -1207,7 +1202,7 @@ class FESubfaceValues : public FEFaceValuesBase<dim> {
 
 template <int dim>
 inline
-const dFMatrix & FEValuesBase<dim>::get_shape_values () const {
+const FullMatrix<double> & FEValuesBase<dim>::get_shape_values () const {
   Assert (selected_dataset<shape_values.size(),
          ExcInvalidIndex (selected_dataset, shape_values.size()));
   return shape_values[selected_dataset];
index 1e2165fff29d435e72d1bdbdffbabf82c20e4de0..e3d6de9137d68df74fe7ae2de5613fd0dd531f90 100644 (file)
@@ -6,35 +6,14 @@
 /*----------------------------   tria.h     ---------------------------*/
 
 #include <vector>
+#include <basic/forward-declarations.h>
+#include <lac/forward-declarations.h>
+#include <base/forward-declarations.h>
 #include <base/point.h>
 #include <grid/geometry_info.h>
 #include <base/subscriptor.h>
 
 
-//forward declaration needed
-template <int dim> class Boundary;
-
-template <int dim> class TriaAccessor;
-template <int dim> class LineAccessor;
-template <int dim> class QuadAccessor;
-template <int dim> class HexAccessor;
-template <int dim> class CellAccessor;
-
-template <int dim> class TriangulationLevel;
-
-template <int dim, class Accessor> class TriaRawIterator;
-template <int dim, class Accessor> class TriaIterator;
-template <int dim, class Accessor> class TriaActiveIterator;
-
-template <int dim> class DoFHandler;
-template <int dim> 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<float> &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<float> &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<dim>, 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<float> &criteria,
+                const double         threshold);
 
                                     /**
                                      * Analogue to the #refine# function:
@@ -1700,9 +1685,15 @@ class Triangulation : public TriaDimensionInfo<dim>, 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<float> &criteria,
+                 const double         threshold);
     
                                     /**
                                      * Refine the triangulation by refining
@@ -1718,10 +1709,16 @@ class Triangulation : public TriaDimensionInfo<dim>, 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<float> &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<dim>, 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<float> &criteria,
+                                           const double         top_fraction,
+                                           const double         bottom_fraction);
     
                                     /**
                                      *  Refine all cells on all levels which
index 3b3c39f8bbf40f74d83a466bd7cca8174a8be564..35fbf9bcb442effee9a904c2f46b15ad287c7c9e 100644 (file)
@@ -7,30 +7,8 @@
 
 
 #include <base/exceptions.h>
-
-
-// forward declaration needed
-class Line;
-class Quad;
-class Hexahedron;
-
-template <int dim> class Point;
-
-
-template <int dim> class TriaAccessor;
-template <int dim> class LineAccessor;
-template <int dim> class QuadAccessor;
-template <int dim> class CellAccessor;
-
-template <int dim> class DoFCellAccessor;
-template <int dim, class BaseClass> class DoFLineAccessor;
-
-template <int dim, class Accessor> class TriaRawIterator;
-template <int dim, class Accessor> class TriaIterator;
-template <int dim, class Accessor> class TriaActiveIterator;
-
-template <int dim> class Triangulation;
-
+#include <base/forward-declarations.h>
+#include <basic/forward-declarations.h>
 
 
 
index d6153543fea4681389b55a078a9aadae56879771..bc2a07c4a689a6c0808b8d98d447d6d01b5eadde 100644 (file)
@@ -8,9 +8,7 @@
 #include <base/point.h>
 #include <base/subscriptor.h>
 #include <grid/geometry_info.h>
-
-
-template <int dim> class Triangulation;
+#include <basic/forward-declarations.h>
 
 
 
index 62943461952d8949994c410fe992c287c0e6e3f8..5e7ef319e3b7109d1d314cae4082cede25a119d7 100644 (file)
 
 
 
-// forward declaration needed
-template <int dim> class Triangulation;
-
-
-
-
-
-
 
 
 /**
index 3ce7b84c0c8507ae3385f86dced20efe93c35a61..0fddc1bbb5d8a140d4c674b07dc7a94242bdc586 100644 (file)
@@ -9,7 +9,6 @@
 #include <base/exceptions.h>
 
 
-template <int dim> class Triangulation;
 
 
 /**
index 0ee7b25e6bed867eff4452e1916f1114da4410d6..31e9920f5ea45ec2273d45582ad84aedbef245ab 100644 (file)
@@ -9,10 +9,6 @@
 #include <grid/dof_accessor.h>
 
 
-// forward declaration
-template <int dim> class MGDoFHandler;
-
-
 
 
 /**
@@ -668,8 +664,8 @@ class MGDoFCellAccessor :  public MGDoFSubstructAccessor<dim> {
                                      * 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<double> &values,
+                           Vector<double>       &dof_values) const;
 
 
                                     /**
index 6f80e19be70741f35348e9d4d267e9266c8dc0d9..f3d661171b7bb5a04a005b7175211e44cc8b4a73 100644 (file)
 
 
 
-// forward declarations
-template <int dim, typename BaseClass> class MGDoFLineAccessor;
-template <int dim, typename BaseClass> class MGDoFQuadAccessor;
-template <int dim> 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<dim> {
                                      * 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; 
 
                                     /*--------------------------------------*/
     
index 4b25e6ad19ce42106c5f1cdd755291a57c633199..7cc7cfa6a42118fb425355f8545013b4aa6fbe69 100644 (file)
@@ -4,7 +4,10 @@
 #define __multigrid_H
 /*----------------------------   multigrid.h     ---------------------------*/
 
-class dVector;
+
+#include <lac/forward-declarations.h>
+
+
 
 /**
  * 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<double>& operator[](unsigned l);
+    
+                                    /**
+                                     * Access to data on a specific
+                                     level.
+                                    */
+    const Vector<double>& 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<double>& src) const;
 
                                   /**
                                    * Transfer from MGVector to
-                                   * dVector.
+                                   * Vector<double>.
                                    *
                                    * Copies data from active portions
                                    * of an MGVector into the
                                    * respective positions of a
-                                   * dVector. All other entries of
+                                   * Vector<double>. All other entries of
                                    * #src# are zero.
                                    */
-  void copy_from_mg(dVector& dst, const MGVector& src) const;
+  void copy_from_mg(Vector<double>& 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<double>& x,
+                     const Vector<double>& b,
                      unsigned steps) const;
 
                                   /**
@@ -153,8 +155,8 @@ protected:
                                    * Defaults to #smooth#.
                                    */
   virtual void post_smooth(unsigned level,
-                          dVector& dst,
-                          const dVector& src,
+                          Vector<double>& dst,
+                          const Vector<double>& src,
                           unsigned steps) const;
 
                                   /**
@@ -163,8 +165,8 @@ protected:
                                    *
                                    */
   virtual void level_vmult(unsigned level,
-                          dVector& dst,
-                          const dVector& src) const;
+                          Vector<double>& dst,
+                          const Vector<double>& 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<double>& dst,
+                                 const Vector<double>& 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<double>& dst,
+                          const Vector<double>& 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<double>& dst,
+                           const Vector<double>& src) const;
 
                                   /**
                                    * Solve exactly on coarsest grid.
                                    */
   virtual void coarse_grid_solution(unsigned l,
-                                   dVector& dst,
-                                   const dVector& src) const;
+                                   Vector<double>& dst,
+                                   const Vector<double>& src) const;
   
 
   
@@ -227,14 +229,14 @@ public:
                                    * the outer iteration.
                                    *
                                    */
-  void vmult(dVector& dst, const dVector& src) const;
+  void vmult(Vector<double>& dst, const Vector<double>& 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<double>& dst, const Vector<double>& src) const;
 };
 
 
index 17c57229770f0b0fc3d68df4e6163d1873770c19..d7d12350e011d01f4ab62a3c9986ed763542044c 100644 (file)
 #include <vector>
 
 
-// forward declarations
-template <int dim> class FiniteElement;
-template <int dim> 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<double>  &cell_matrix,
+                          Vector<double>      &rhs,
                           const FEValues<dim> &fe_values,
                           const DoFHandler<dim>::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<double>  &cell_matrix,
                           const FEValues<dim> &fe_values,
                           const DoFHandler<dim>::cell_iterator &cell) const;
 
@@ -91,7 +84,7 @@ class Equation {
                                      * #ExcWrongSize# and #ExcObjectNotEmpty#
                                      * are declared.
                                      */
-    virtual void assemble (dVector             &rhs,
+    virtual void assemble (Vector<double>      &rhs,
                           const FEValues<dim> &fe_values,
                           const DoFHandler<dim>::cell_iterator &cell) const;
 
@@ -146,11 +139,11 @@ struct AssemblerData {
     AssemblerData (const DoFHandler<dim>    &dof,
                   const bool                assemble_matrix,
                   const bool                assemble_rhs,
-                  dSMatrix                 &matrix,
-                  dVector                  &rhs_vector,
+                  SparseMatrix<double>     &matrix,
+                  Vector<double>           &rhs_vector,
                   const Quadrature<dim>    &quadrature,
                   const FiniteElement<dim> &fe,
-                  const UpdateFlags       &update_flags,
+                  const UpdateFlags        &update_flags,
                   const Boundary<dim>      &boundary);
     
                                     /**
@@ -172,7 +165,7 @@ struct AssemblerData {
                                      * to clear this object (set all entries
                                      * to zero) before use.
                                      */
-    dSMatrix               &matrix;
+    SparseMatrix<double>   &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<double>         &rhs_vector;
     
                                     /**
                                      * Pointer to a quadrature object to be
@@ -280,12 +273,12 @@ class Assembler : public DoFCellAccessor<dim> {
                                     /**
                                      * Store a local cell matrix.
                                      */
-    dFMatrix          cell_matrix;
+    FullMatrix<double>  cell_matrix;
 
                                     /**
                                      * Right hand side local to cell.
                                      */
-    dVector           cell_vector;
+    Vector<double>    cell_vector;
 
                                     /**
                                      * Store whether to assemble the
@@ -303,13 +296,13 @@ class Assembler : public DoFCellAccessor<dim> {
                                      * Pointer to the matrix to be assembled
                                      * by this object.
                                      */
-    dSMatrix         &matrix;
+    SparseMatrix<double>    &matrix;
 
                                     /**
                                      * Pointer to the vector to be assembled
                                      * by this object.
                                      */
-    dVector          &rhs_vector;
+    Vector<double>          &rhs_vector;
 
                                     /**
                                      * Pointer to the finite element used for
index d311a073d020e629dc3fffdd3ea4c76adbf669ff..df6bacb1cbb07f74f4d36cbe6ac03a6cc3a76c00 100644 (file)
@@ -6,25 +6,13 @@
 /*----------------------------   problem_base.h     ---------------------------*/
 
 
-#include <lac/dsmatrix.h>
+#include <lac/sparsematrix.h>
 #include <base/exceptions.h>
 #include <grid/dof_constraints.h>
 #include <fe/fe_update_flags.h>
 #include <map>
 
 
-// forward declaration
-template <int dim> class Triangulation;
-template <int dim> class DoFHandler;
-template <int dim> class FiniteElement;
-template <int dim> class Quadrature;
-template <int dim> class DataOut;
-template <int dim> class Equation;
-template <int dim> class Assembler;
-template <int dim> class Boundary;
-template <int dim> class StraightBoundary;
-template <int dim> 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<double>    system_matrix;
 
                                     /**
                                      * Vector storing the right hand side.
                                      */
-    dVector             right_hand_side;
+    Vector<double>             right_hand_side;
 
                                     /**
                                      * Solution vector.
                                      */
-    dVector             solution;
+    Vector<double>             solution;
 
                                     /**
                                      * List of constraints introduced by
index 9b9c6fed9a2713a1688dc53bb54a5961b126a4c1..87f2a6a5b493f1e39a60246bebe26c397ef9200a 100644 (file)
@@ -6,15 +6,11 @@
 /*----------------------------   data_io.h     ---------------------------*/
 
 #include <base/exceptions.h>
+#include <basic/forward-declarations.h>
+#include <lac/forward-declarations.h>
 #include <vector>
 #include <string>
 
-template <int dim> class Triangulation;
-template <int dim> 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="<dimensionless>");
+    void add_data_vector (const Vector<double> &data,
+                         const string         &name,
+                         const string         &units="<dimensionless>");
 
                                     /**
                                      * 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<double> *data, const string name, const string units);
        
                                         /**
                                          * Pointer to the data vector.
                                          */
-       const dVector *data;
+       const Vector<double> *data;
+       
                                         /**
                                          * Name of this component.
                                          */
        string   name;
+       
                                         /**
                                          * Physical unit name of this
                                          * component.
index d80d0f8110a322202ef25388b456c1b70679dba5..e54f3a41b97e3e65ec9f38bfedb9392d50119962 100644 (file)
 #include <map>
 
 
-// forward declarations
-template <int dim> class DoFHandler;
-template <int dim> class Quadrature;
-template <int dim> class FiniteElement;
-template <int dim> class FEFaceValues;
-template <int dim> class FESubfaceValues;
-template <int dim> class Boundary;
-template <int dim> 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<dim>::refine_*# functions.
+ *  can be used to feed the #Triangulation<dim>::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<dim> &fe,
                                const Boundary<dim>      &boundary,
                                const FunctionMap        &neumann_bc,
-                               const dVector            &solution,
-                               dVector                  &error,
+                               const Vector<double>     &solution,
+                               Vector<float>            &error,
                                const Function<dim>      *coefficient = 0);
 
                                     /**
@@ -234,7 +226,7 @@ class KellyErrorEstimator {
                                             FEFaceValues<dim>   &fe_face_values_cell,
                                             FEFaceValues<dim>   &fe_face_values_neighbor,
                                             FaceIntegrals       &face_integrals,
-                                            const dVector       &solution,
+                                            const Vector<double>&solution,
                                             const Function<dim> *coefficient);
 
                                     /**
@@ -253,7 +245,7 @@ class KellyErrorEstimator {
                                               FEFaceValues<dim>    &fe_face_values,
                                               FESubfaceValues<dim> &fe_subface_values,
                                               FaceIntegrals        &face_integrals,
-                                              const dVector        &solution,
+                                              const Vector<double> &solution,
                                               const Function<dim> *coefficient);
 };
 
index d5e9b088fca3e41a3f235e2ca0bff002895949bd..4156e0ede4f2418c8ab5af13ae245985d19eba02 100644 (file)
 #include <base/exceptions.h>
 #include <map>
 
-template <int dim> class Triangulation;
-template <int dim> class DoFHandler;
-template <int dim> class FiniteElement;
-template <int dim> class FEValues;
-template <int dim> class Quadrature;
-template <int dim> class Function;
-template <int dim> class Boundary;
-template <int dim> 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<dim>::make_sparsity_pattern#
  * function.
@@ -196,7 +184,7 @@ class MatrixCreator {
     static void create_mass_matrix (const DoFHandler<dim>    &dof,
                                    const Quadrature<dim>    &q,
                                    const Boundary<dim>      &boundary,
-                                   dSMatrix                 &matrix,
+                                   SparseMatrix<double>     &matrix,
                                    const Function<dim>      *a = 0);
 
                                     /**
@@ -219,9 +207,9 @@ class MatrixCreator {
     static void create_mass_matrix (const DoFHandler<dim>    &dof,
                                    const Quadrature<dim>    &q,
                                    const Boundary<dim>      &boundary,
-                                   dSMatrix                 &matrix,
+                                   SparseMatrix<double>     &matrix,
                                    const Function<dim>      &rhs,
-                                   dVector                  &rhs_vector,
+                                   Vector<double>           &rhs_vector,
                                    const Function<dim>      *a = 0);
 
                                     /**
@@ -245,7 +233,7 @@ class MatrixCreator {
                                      */
     static void create_mass_matrix (const DoFHandler<dim>    &dof,
                                    const Boundary<dim>      &boundary,
-                                   dSMatrix                 &matrix);
+                                   SparseMatrix<double>     &matrix);
     
                                     /**
                                      * Assemble the mass matrix and a right
@@ -265,9 +253,9 @@ class MatrixCreator {
     static void create_boundary_mass_matrix (const DoFHandler<dim>    &dof,
                                             const Quadrature<dim-1>  &q,
                                             const Boundary<dim>      &boundary,
-                                            dSMatrix                 &matrix,
+                                            SparseMatrix<double>     &matrix,
                                             const FunctionMap        &rhs,
-                                            dVector                  &rhs_vector,
+                                            Vector<double>           &rhs_vector,
                                             vector<int>              &vec_to_dof_mapping,
                                             const Function<dim>      *a = 0);
 
@@ -282,7 +270,7 @@ class MatrixCreator {
     static void create_laplace_matrix (const DoFHandler<dim>    &dof,
                                       const Quadrature<dim>    &q,
                                       const Boundary<dim>      &boundary,
-                                      dSMatrix &matrix,
+                                      SparseMatrix<double>     &matrix,
                                       const Function<dim>      *a = 0);
 
                                     /**
@@ -297,9 +285,9 @@ class MatrixCreator {
     static void create_laplace_matrix (const DoFHandler<dim>    &dof,
                                       const Quadrature<dim>    &q,
                                       const Boundary<dim>      &boundary,
-                                      dSMatrix &matrix,
+                                      SparseMatrix<double>     &matrix,
                                       const Function<dim>      &rhs,
-                                      dVector                  &rhs_vector,
+                                      Vector<double>           &rhs_vector,
                                       const Function<dim>      *a = 0);
 
                                     /**
@@ -309,7 +297,7 @@ class MatrixCreator {
                                      */
     static void create_interpolation_matrix(const FiniteElement<dim> &high,
                                            const FiniteElement<dim> &low,
-                                           dFMatrix& result);
+                                           FullMatrix<double>& result);
 
 
                                     /**
@@ -404,9 +392,9 @@ class MatrixTools : public MatrixCreator<dim> {
                                      * documentation.
                                      */
     static void apply_boundary_values (const map<int,double> &boundary_values,
-                                      dSMatrix              &matrix,
-                                      dVector               &solution,
-                                      dVector               &right_hand_side);
+                                      SparseMatrix<double>  &matrix,
+                                      Vector<double>        &solution,
+                                      Vector<double>        &right_hand_side);
 
                                     /**
                                      * Exception
@@ -522,8 +510,8 @@ class MassMatrix :  public Equation<dim> {
                                      * 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<double>  &cell_matrix,
+                          Vector<double>      &rhs,
                           const FEValues<dim> &fe_values,
                           const typename DoFHandler<dim>::cell_iterator &) const;
 
@@ -532,7 +520,7 @@ class MassMatrix :  public Equation<dim> {
                                      * If a coefficient was given to the
                                      * constructor, it is used.
                                      */
-    virtual void assemble (dFMatrix            &cell_matrix,
+    virtual void assemble (FullMatrix<double>  &cell_matrix,
                           const FEValues<dim> &fe_values,
                           const typename DoFHandler<dim>::cell_iterator &) const;
 
@@ -543,7 +531,7 @@ class MassMatrix :  public Equation<dim> {
                                      * constructor in order to call this
                                      * function.
                                      */
-    virtual void assemble (dVector             &rhs,
+    virtual void assemble (Vector<double>      &rhs,
                           const FEValues<dim> &fe_values,
                           const typename DoFHandler<dim>::cell_iterator &) const;
     
@@ -625,8 +613,8 @@ class LaplaceMatrix :  public Equation<dim> {
                                      * a coefficient was given to the
                                      * constructor, it is used.
                                      */
-    virtual void assemble (dFMatrix            &cell_matrix,
-                          dVector             &rhs,
+    virtual void assemble (FullMatrix<double>  &cell_matrix,
+                          Vector<double>      &rhs,
                           const FEValues<dim> &fe_values,
                           const typename DoFHandler<dim>::cell_iterator &) const;
 
@@ -635,7 +623,7 @@ class LaplaceMatrix :  public Equation<dim> {
                                      * If a coefficient was given to the
                                      * constructor, it is used.
                                      */
-    virtual void assemble (dFMatrix            &cell_matrix,
+    virtual void assemble (FullMatrix<double>  &cell_matrix,
                           const FEValues<dim> &fe_values,
                           const typename DoFHandler<dim>::cell_iterator &) const;
 
@@ -646,7 +634,7 @@ class LaplaceMatrix :  public Equation<dim> {
                                      * constructor in order to call this
                                      * function.
                                      */
-    virtual void assemble (dVector             &rhs,
+    virtual void assemble (Vector<double>      &rhs,
                           const FEValues<dim> &fe_values,
                           const typename DoFHandler<dim>::cell_iterator &) const;
 
index 4b25e6ad19ce42106c5f1cdd755291a57c633199..7cc7cfa6a42118fb425355f8545013b4aa6fbe69 100644 (file)
@@ -4,7 +4,10 @@
 #define __multigrid_H
 /*----------------------------   multigrid.h     ---------------------------*/
 
-class dVector;
+
+#include <lac/forward-declarations.h>
+
+
 
 /**
  * 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<double>& operator[](unsigned l);
+    
+                                    /**
+                                     * Access to data on a specific
+                                     level.
+                                    */
+    const Vector<double>& 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<double>& src) const;
 
                                   /**
                                    * Transfer from MGVector to
-                                   * dVector.
+                                   * Vector<double>.
                                    *
                                    * Copies data from active portions
                                    * of an MGVector into the
                                    * respective positions of a
-                                   * dVector. All other entries of
+                                   * Vector<double>. All other entries of
                                    * #src# are zero.
                                    */
-  void copy_from_mg(dVector& dst, const MGVector& src) const;
+  void copy_from_mg(Vector<double>& 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<double>& x,
+                     const Vector<double>& b,
                      unsigned steps) const;
 
                                   /**
@@ -153,8 +155,8 @@ protected:
                                    * Defaults to #smooth#.
                                    */
   virtual void post_smooth(unsigned level,
-                          dVector& dst,
-                          const dVector& src,
+                          Vector<double>& dst,
+                          const Vector<double>& src,
                           unsigned steps) const;
 
                                   /**
@@ -163,8 +165,8 @@ protected:
                                    *
                                    */
   virtual void level_vmult(unsigned level,
-                          dVector& dst,
-                          const dVector& src) const;
+                          Vector<double>& dst,
+                          const Vector<double>& 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<double>& dst,
+                                 const Vector<double>& 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<double>& dst,
+                          const Vector<double>& 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<double>& dst,
+                           const Vector<double>& src) const;
 
                                   /**
                                    * Solve exactly on coarsest grid.
                                    */
   virtual void coarse_grid_solution(unsigned l,
-                                   dVector& dst,
-                                   const dVector& src) const;
+                                   Vector<double>& dst,
+                                   const Vector<double>& src) const;
   
 
   
@@ -227,14 +229,14 @@ public:
                                    * the outer iteration.
                                    *
                                    */
-  void vmult(dVector& dst, const dVector& src) const;
+  void vmult(Vector<double>& dst, const Vector<double>& 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<double>& dst, const Vector<double>& src) const;
 };
 
 
index 90720acd888fdc2b20b46d64b32f7e84d9b92e3e..a4567f8a75f0b021e30f3797f72801c45371bfa9 100644 (file)
@@ -6,20 +6,10 @@
 /*----------------------------   vectors.h     ---------------------------*/
 
 
-
+#include <base/forward-declarations.h>
 #include <base/exceptions.h>
 #include <map>
 
-template <int dim> class DoFHandler;
-template <int dim> class Function;
-template <int dim> class Quadrature;
-template <int dim> class QGauss2;
-template <int dim> class FiniteElement;
-template <int dim> class Boundary;
-template <int dim> 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<double>::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<double>::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<double>::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<dim>    &dof,
                             const Boundary<dim>      &boundary,
                             const Function<dim>      &function,
-                            dVector                  &vec);
+                            Vector<double>           &vec);
 
                                     /**
                                      * Interpolate different finite
@@ -295,9 +285,9 @@ class VectorTools {
                                      */
     static void interpolate(const DoFHandler<dim>    &high_dof,
                            const DoFHandler<dim>    &low_dof,
-                           const dFMatrix           &transfer,
-                           const dVector            &high,
-                           dVector                  &low);
+                           const FullMatrix<double> &transfer,
+                           const Vector<double>     &high,
+                           Vector<double>           &low);
                          
                                     /**
                                      * Compute the projection of
@@ -320,7 +310,7 @@ class VectorTools {
                         const Boundary<dim>      &boundary,
                         const Quadrature<dim>    &q,
                         const Function<dim>      &function,
-                        dVector                  &vec,
+                        Vector<double>           &vec,
                         const bool                enforce_zero_boundary = false,
                         const Quadrature<dim-1>  &q_boundary = QGauss2<dim-1>(),
                         const bool                project_to_boundary_first = false);
@@ -335,7 +325,7 @@ class VectorTools {
                                        const Quadrature<dim>    &q,
                                        const Boundary<dim>      &boundary,
                                        const Function<dim>      &rhs,
-                                       dVector                  &rhs_vector);
+                                       Vector<double>           &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<dim>    &dof,
-                                     const dVector            &fe_function,
+                                     const Vector<double>     &fe_function,
                                      const Function<dim>      &exact_solution,
-                                     dVector                  &difference,
+                                     Vector<float>            &difference,
                                      const Quadrature<dim>    &q,
                                      const NormType           &norm,
-                                     const Boundary<dim> &boundary=StraightBoundary<dim>());
+                                     const Boundary<dim>      &boundary=StraightBoundary<dim>());
 
                                     /**
                                      * Compute the error for the solution of a system.
                                      * See the other #integrate_difference#.
                                      */
-    static void integrate_difference (const DoFHandler<dim>    &dof,
-                                     const dVector            &fe_function,
-                                     const VectorFunction     &exact_solution,
-                                     dVector                  &difference,
-                                     const Quadrature<dim>    &q,
-                                     const FiniteElement<dim> &fe,
-                                     const NormType           &norm,
-                                     const Boundary<dim>      &boundary);
+//     static void integrate_difference (const DoFHandler<dim>    &dof,
+//                                   const Vector<double>     &fe_function,
+//                                   const TensorFunction<1,dim>&exact_solution,
+//                                   Vector<float>            &difference,
+//                                   const Quadrature<dim>    &q,
+//                                   const FiniteElement<dim> &fe,
+//                                   const NormType           &norm,
+//                                   const Boundary<dim>      &boundary);
     
 
                                     /**
index 8de719c16ae27dc4a95eebb01789bd00da56afc1..3a6d94f78ba545832b7182605b43ff9a925a18df 100644 (file)
@@ -10,9 +10,9 @@
 #include <grid/tria_iterator.templates.h>
 #include <fe/fe.h>
 
-#include <lac/dvector.h>
-#include <lac/dfmatrix.h>
-#include <lac/dsmatrix.h>
+#include <lac/vector.h>
+#include <lac/fullmatrix.h>
+#include <lac/sparsematrix.h>
 
 #include <vector>
 
@@ -134,8 +134,8 @@ DoFLineAccessor<dim,BaseClass>::child (const unsigned int i) const {
 
 template <int dim, typename BaseClass>
 void DoFLineAccessor<dim,BaseClass>::
-distribute_local_to_global (const dVector &local_source,
-                           dVector       &global_destination) const {
+distribute_local_to_global (const Vector<double> &local_source,
+                           Vector<double>       &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 <int dim, typename BaseClass>
 void DoFLineAccessor<dim,BaseClass>::
-distribute_local_to_global (const dFMatrix &local_source,
-                           dSMatrix       &global_destination) const {
+distribute_local_to_global (const FullMatrix<double> &local_source,
+                           SparseMatrix<double>     &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<dim,BaseClass>::child (const unsigned int i) const {
 
 template <int dim, typename BaseClass>
 void DoFQuadAccessor<dim,BaseClass>::
-distribute_local_to_global (const dVector &local_source,
-                           dVector       &global_destination) const {
+distribute_local_to_global (const Vector<double> &local_source,
+                           Vector<double>       &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 <int dim, typename BaseClass>
 void DoFQuadAccessor<dim,BaseClass>::
-distribute_local_to_global (const dFMatrix &local_source,
-                           dSMatrix       &global_destination) const {
+distribute_local_to_global (const FullMatrix<double> &local_source,
+                           SparseMatrix<double>     &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<dim,BaseClass>::child (const unsigned int i) const {
 
 template <int dim, typename BaseClass>
 void DoFHexAccessor<dim,BaseClass>::
-distribute_local_to_global (const dVector &local_source,
-                           dVector       &global_destination) const {
+distribute_local_to_global (const Vector<double> &local_source,
+                           Vector<double>       &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 <int dim, typename BaseClass>
 void DoFHexAccessor<dim,BaseClass>::
-distribute_local_to_global (const dFMatrix &local_source,
-                           dSMatrix       &global_destination) const {
+distribute_local_to_global (const FullMatrix<double> &local_source,
+                           SparseMatrix<double>     &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<double> &values,
+                                   Vector<double>       &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<double> &local_values,
+                                   Vector<double>       &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<double> &values,
+                                   Vector<double>       &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<double> &local_values,
+                                   Vector<double>       &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<double> &values,
+                                   Vector<double>       &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<double> &local_values,
+                                   Vector<double>       &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 <int dim>
 void
-DoFCellAccessor<dim>::get_interpolated_dof_values (const dVector &values,
-                                                  dVector       &interpolated_values) const {
+DoFCellAccessor<dim>::get_interpolated_dof_values (const Vector<double> &values,
+                                                  Vector<double>       &interpolated_values) const {
   const unsigned int total_dofs = dof_handler->get_fe().total_dofs;
   
   Assert (dof_handler != 0, ExcInvalidObject());
@@ -879,8 +879,8 @@ DoFCellAccessor<dim>::get_interpolated_dof_values (const dVector &values,
   else
                                     // otherwise clobber them from the children
     {
-      dVector tmp1(total_dofs);
-      dVector tmp2(total_dofs);
+      Vector<double> tmp1(total_dofs);
+      Vector<double> tmp2(total_dofs);
       
       interpolated_values.clear ();
 
@@ -914,8 +914,8 @@ DoFCellAccessor<dim>::get_interpolated_dof_values (const dVector &values,
 
 template <int dim>
 void
-DoFCellAccessor<dim>::set_dof_values_by_interpolation (const dVector &local_values,
-                                                      dVector       &values) const {
+DoFCellAccessor<dim>::set_dof_values_by_interpolation (const Vector<double> &local_values,
+                                                      Vector<double>       &values) const {
   const unsigned int total_dofs = dof_handler->get_fe().total_dofs;
   
   Assert (dof_handler != 0, ExcInvalidObject());
@@ -932,7 +932,7 @@ DoFCellAccessor<dim>::set_dof_values_by_interpolation (const dVector &local_valu
   else
                                     // otherwise distribute them to the children
     {
-      dVector tmp(total_dofs);
+      Vector<double> tmp(total_dofs);
       
       for (unsigned int child=0; child<GeometryInfo<dim>::children_per_cell;
           ++child)
index 81283580d38f0159c33307e30a1ccd90b874955b..8b9cc892db7c49096c57ba51842ac0f4219b553b 100644 (file)
@@ -4,8 +4,8 @@
 
 
 #include <grid/dof_constraints.h>
-#include <lac/dsmatrix.h>
-#include <lac/dvector.h>
+#include <lac/sparsematrix.h>
+#include <lac/vector.h>
 #include <iostream>
 #include <algorithm>
 #include <numeric>
@@ -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<double> &uncondensed,
+                                SparseMatrix<double>       &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<double> &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<double> &uncondensed,
+                                Vector<double>       &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<double> &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<double> &condensed,
+                                  Vector<double>       &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<double> &vec) const {
   Assert (sorted == true, ExcMatrixNotClosed());
 
   vector<ConstraintLine>::const_iterator next_constraint = lines.begin();
index 88667c5176530d7c0f1c52ef166764e0bbdf8efd..88928fd737306dd7bea94914924ae710952900d8 100644 (file)
@@ -12,8 +12,9 @@
 #include <grid/tria.h>
 #include <grid/geometry_info.h>
 #include <fe/fe.h>
-#include <lac/dsmatrix.h>
-#include <lac/dvector.h>
+#include <lac/sparsematrix.h>
+#include <lac/vector.h>
+#include <lac/vector.h>
 
 #include <map>
 #include <set>
@@ -1569,7 +1570,7 @@ void DoFHandler<dim>::renumber_dofs (const RenumberingMethod method,
                                     const bool use_constraints,
                                     const vector<int> &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 <int dim>
-void DoFHandler<dim>::make_sparsity_pattern (dSMatrixStruct &sparsity) const {
+void DoFHandler<dim>::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<dim>::make_sparsity_pattern (dSMatrixStruct &sparsity) const {
 #if deal_II_dimension == 1
 
 template <>
-void DoFHandler<1>::make_boundary_sparsity_pattern (const vector<int> &,
-                                                   dSMatrixStruct &) const {
+void DoFHandler<1>::make_boundary_sparsity_pattern (const vector<int>  &,
+                                                   SparseMatrixStruct &) const {
     Assert (selected_fe != 0, ExcNoFESelected());
     Assert (false, ExcInternalError());
 };
@@ -2195,9 +2196,9 @@ void DoFHandler<1>::make_boundary_sparsity_pattern (const vector<int> &,
 
 
 template <>
-void DoFHandler<1>::make_boundary_sparsity_pattern (const FunctionMap &,
-                                                   const vector<int> &,
-                                                   dSMatrixStruct &) const {
+void DoFHandler<1>::make_boundary_sparsity_pattern (const FunctionMap  &,
+                                                   const vector<int>  &,
+                                                   SparseMatrixStruct &) const {
   Assert (selected_fe != 0, ExcNoFESelected());
   Assert (false, ExcInternalError());
 };
@@ -2207,8 +2208,8 @@ void DoFHandler<1>::make_boundary_sparsity_pattern (const FunctionMap &,
 
 
 template <int dim>
-void DoFHandler<dim>::make_boundary_sparsity_pattern (const vector<int> &dof_to_boundary_mapping,
-                                                     dSMatrixStruct &sparsity) const {
+void DoFHandler<dim>::make_boundary_sparsity_pattern (const vector<int>  &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<dim>::make_boundary_sparsity_pattern (const vector<int> &dof_to_
 
 
 template <int dim>
-void DoFHandler<dim>::make_boundary_sparsity_pattern (const FunctionMap &boundary_indicators,
-                                                     const vector<int> &dof_to_boundary_mapping,
-                                                     dSMatrixStruct &sparsity) const {
+void DoFHandler<dim>::make_boundary_sparsity_pattern (const FunctionMap  &boundary_indicators,
+                                                     const vector<int>  &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<dim>::make_boundary_sparsity_pattern (const FunctionMap &boundar
 
 template <int dim>
 void DoFHandler<dim>::make_transfer_matrix (const DoFHandler<dim> &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<dim>::make_transfer_matrix (const DoFHandler<dim> &transfer_from
 
 template <int dim>
 void DoFHandler<dim>::make_transfer_matrix (const DoFHandler<dim> &transfer_from,
-                                           dSMatrix              &transfer_matrix) const {
+                                           SparseMatrix<double>  &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<dim>::make_transfer_matrix (const DoFHandler<dim> &transfer_from
 template <int dim>
 void DoFHandler<dim>::transfer_cell (const typename DoFHandler<dim>::cell_iterator &old_cell,
                                     const typename DoFHandler<dim>::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<GeometryInfo<dim>::children_per_cell; ++child)
@@ -2421,7 +2422,7 @@ void DoFHandler<dim>::transfer_cell (const typename DoFHandler<dim>::cell_iterat
 template <int dim>
 void DoFHandler<dim>::transfer_cell (const typename DoFHandler<dim>::cell_iterator &old_cell,
                                     const typename DoFHandler<dim>::cell_iterator &new_cell,
-                                    dSMatrix            &transfer_matrix) const {
+                                    SparseMatrix<double>            &transfer_matrix) const {
   if (!new_cell->active() && !old_cell->active())
                                     // both cells have children; go deeper
     for (unsigned int child=0; child<GeometryInfo<dim>::children_per_cell; ++child)
@@ -2438,9 +2439,9 @@ void DoFHandler<dim>::transfer_cell (const typename DoFHandler<dim>::cell_iterat
 
                                         // copy dofs one-by-one
        for (unsigned int j=0; j<old_dofs.size(); ++j)
-                                          // use the dSMatrix:: as a workaround
+                                          // use the SparseMatrix<double>:: as a workaround
                                           // for a bug in egcs
-         transfer_matrix.dSMatrix::set (new_dofs[j], old_dofs[j], 1.0);
+         transfer_matrix.SparseMatrix<double>::set (new_dofs[j], old_dofs[j], 1.0);
       }
     else
       if (!new_cell->active() && old_cell->active())
@@ -2467,12 +2468,12 @@ void DoFHandler<dim>::transfer_cell (const typename DoFHandler<dim>::cell_iterat
              for (unsigned int k=0; k<selected_fe->total_dofs; ++k)
                for (unsigned int j=0; j<selected_fe->total_dofs; ++j)
                  if (selected_fe->prolongate(c)(k,j) != 0.) 
-                                                    // use the dSMatrix::
+                                                    // use the SparseMatrix<double>::
                                                     // 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<double>::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<dim>::transfer_cell (const typename DoFHandler<dim>::cell_iterat
              for (unsigned int k=0; k<selected_fe->total_dofs; ++k)
                for (unsigned int j=0; j<selected_fe->total_dofs; ++j)
                  if (selected_fe->restrict(c)(k,j) != 0.)
-                                                    // use the dSMatrix:: as
+                                                    // use the SparseMatrix<double>:: 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<double>::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 <int dim>
-void DoFHandler<dim>::distribute_cell_to_dof_vector (const dVector &cell_data,
-                                                    dVector       &dof_data) const {
+template <typename Number>
+void DoFHandler<dim>::distribute_cell_to_dof_vector (const Vector<Number> &cell_data,
+                                                    Vector<double>       &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<dim>::clear_space () {
 /*-------------- Explicit Instantiations -------------------------------*/
 template class DoFHandler<deal_II_dimension>;
 
+template
+void
+DoFHandler<deal_II_dimension>::distribute_cell_to_dof_vector (const Vector<float>  &cell_data,
+                                                             Vector<double>       &dof_data) const;
+
+template
+void
+DoFHandler<deal_II_dimension>::distribute_cell_to_dof_vector (const Vector<double> &cell_data,
+                                                             Vector<double>       &dof_data) const;
+
 
 
index 49b7f9c6616ddbef78e56ece3a6411ddbbcced76..101f9344fea71eaa9415595b2296e732d5d8d9e3 100644 (file)
@@ -10,9 +10,9 @@
 #include <grid/tria_iterator.templates.h>
 #include <fe/fe.h>
 
-#include <lac/dvector.h>
-#include <lac/dfmatrix.h>
-#include <lac/dsmatrix.h>
+#include <lac/vector.h>
+#include <lac/fullmatrix.h>
+#include <lac/sparsematrix.h>
 
 
 
@@ -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<double> &values,
+                                        Vector<double>       &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<double> &values,
+                                        Vector<double>       &dof_values) const {
   Assert (dof_handler != 0, ExcInvalidObject());
   Assert (mg_dof_handler != 0, ExcInvalidObject());
   Assert (&dof_handler->get_fe() != 0, ExcInvalidObject());
index c1ce677a99cc40215dde75fe3be2ba364be5d8df..f6092999edb63da450a06a83d2b5b82270bb9e73 100644 (file)
@@ -12,7 +12,7 @@
 #include <grid/tria.h>
 #include <grid/geometry_info.h>
 #include <fe/fe.h>
-#include <lac/dsmatrix.h>
+#include <lac/sparsematrix.h>
 
 #include <algorithm>
 
@@ -1002,7 +1002,7 @@ unsigned int MGDoFHandler<dim>::n_dofs (const unsigned int level) const {
 
 template <int dim>
 void MGDoFHandler<dim>::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<dim>::renumber_dofs (const unsigned int      level,
                                       const RenumberingMethod method,
                                       const vector<int>      &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();
index 32c438a6155cf125f8243eb7297ab7c866a199b1..5cb3fc4ee8a694080729180c5c1debca50835864 100644 (file)
@@ -165,7 +165,7 @@ FiniteElementBase<dim>::FiniteElementBase (const FiniteElementData<dim> &fe_data
 
 
 template <int dim>
-const dFMatrix &
+const FullMatrix<double> &
 FiniteElementBase<dim>::restrict (const unsigned int child) const {
   Assert (child<GeometryInfo<dim>::children_per_cell, ExcInvalidIndex(child));
   return restriction[child];
@@ -174,7 +174,7 @@ FiniteElementBase<dim>::restrict (const unsigned int child) const {
 
 
 template <int dim>
-const dFMatrix &
+const FullMatrix<double> &
 FiniteElementBase<dim>::prolongate (const unsigned int child) const {
   Assert (child<GeometryInfo<dim>::children_per_cell, ExcInvalidIndex(child));
   return prolongation[child];
@@ -183,7 +183,7 @@ FiniteElementBase<dim>::prolongate (const unsigned int child) const {
 
 
 template <int dim>
-const dFMatrix &
+const FullMatrix<double> &
 FiniteElementBase<dim>::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<Point<1> >    &q_points,
                                       const bool            compute_q_points,
-                                      const dFMatrix       &,
+                                      const FullMatrix<double>       &,
                                       const vector<vector<Tensor<1,1> > > &,
                                       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<Point<1> >       &,
                                            const bool,
-                                           const dFMatrix          &,
+                                           const FullMatrix<double>          &,
                                            const vector<vector<Tensor<1,1> > > &,
                                            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<Point<1> >       &,
                                               const bool,
-                                              const dFMatrix          &,
+                                              const FullMatrix<double>          &,
                                               const vector<vector<Tensor<1,1> > > &,
                                               const Boundary<1>       &) const {
   Assert (false, ExcNotImplemented());
@@ -388,7 +388,7 @@ void FiniteElement<dim>::fill_fe_values (const DoFHandler<dim>::cell_iterator &,
                                         const bool,
                                         vector<Point<dim> > &,
                                         const bool,
-                                        const dFMatrix      &,
+                                        const FullMatrix<double>      &,
                                         const vector<vector<Tensor<1,dim> > > &,
                                         const Boundary<dim> &) const {
   Assert (false, ExcPureFunctionCalled());
@@ -413,7 +413,7 @@ void FiniteElement<dim>::fill_fe_face_values (const DoFHandler<dim>::cell_iterat
                                              const bool           compute_face_jacobians,
                                              vector<Point<dim> > &normal_vectors,
                                              const bool           compute_normal_vectors,
-                                             const dFMatrix      &shape_values_transform,
+                                             const FullMatrix<double>      &shape_values_transform,
                                              const vector<vector<Tensor<1,dim> > > &shape_gradients_transform,
                                              const Boundary<dim> &boundary) const {
   Assert (jacobians.size() == unit_points.size(),
@@ -465,7 +465,7 @@ void FiniteElement<dim>::fill_fe_subface_values (const DoFHandler<dim>::cell_ite
                                                 const bool           compute_face_jacobians,
                                                 vector<Point<dim> > &normal_vectors,
                                                 const bool           compute_normal_vectors,
-                                                const dFMatrix      &shape_values_transform,
+                                                const FullMatrix<double>      &shape_values_transform,
                                                 const vector<vector<Tensor<1,dim> > > &shape_gradients_transform,
                                                 const Boundary<dim> &boundary) const {
   Assert (jacobians.size() == unit_points.size(),
index 6000e8c3c3f248dc24ea34513d2ac4278fba5851..c5c3562e7e7a440f0bf3958e04ce8586361e9654 100644 (file)
@@ -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<double> &) const {
   Assert (false, ExcNotUseful());
 };
 
@@ -446,7 +446,7 @@ void FECrissCross<1>::fill_fe_values (const DoFHandler<1>::cell_iterator &,
                                       const bool            ,
                                       vector<Point<1> >    &,
                                       const bool            ,
-                                      const dFMatrix       &,
+                                      const FullMatrix<double>       &,
                                       const vector<vector<Tensor<1,1> > > &,
                                       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<double> &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<dim>::fill_fe_values (const DoFHandler<dim>::cell_iterator &ce
                                        const bool compute_support_points,
                                        vector<Point<dim> >    &q_points,
                                        const bool              compute_q_points,
-                                       const dFMatrix         &shape_values_transform,
+                                       const FullMatrix<double>         &shape_values_transform,
                                        const vector<vector<Tensor<1,dim> > > &/*shape_grad_transform*/,
                                        const Boundary<dim> &boundary) const {
   Assert (jacobians.size() == unit_points.size(),
index ca55db78f4253a87d6122ee4ad2d6c83bbf16426..916ab0829e9b1483388b1e82984134619bc6d900 100644 (file)
@@ -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<double> &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<double> &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<double> &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,
index bf0d9454d15f0a87a776819c591288b70dd21284..826460237c1a40715797ee18f43022f742f9909c 100644 (file)
@@ -27,7 +27,7 @@ FEDGQuarticSub<dim>::FEDGQuarticSub():
 
 
 template <int dim>
-const dFMatrix & 
+const FullMatrix<double> & 
 FEDGLinear<dim>::restrict (const unsigned int child) const {
   Assert (false, ExcNotImplemented());
   return restriction[child];
@@ -35,7 +35,7 @@ FEDGLinear<dim>::restrict (const unsigned int child) const {
 
 
 template <int dim>
-const dFMatrix & 
+const FullMatrix<double> & 
 FEDGQuadraticSub<dim>::restrict (const unsigned int child) const {
   Assert (false, ExcNotImplemented());
   return restriction[child];
@@ -44,7 +44,7 @@ FEDGQuadraticSub<dim>::restrict (const unsigned int child) const {
 
 
 template <int dim>
-const dFMatrix & 
+const FullMatrix<double> & 
 FEDGCubicSub<dim>::restrict (const unsigned int child) const {
   Assert (false, ExcNotImplemented());
   return restriction[child];
@@ -53,7 +53,7 @@ FEDGCubicSub<dim>::restrict (const unsigned int child) const {
 
 
 template <int dim>
-const dFMatrix & 
+const FullMatrix<double> & 
 FEDGQuarticSub<dim>::restrict (const unsigned int child) const {
   Assert (false, ExcNotImplemented());
   return restriction[child];
index 1a4e9e7835b5b74776c1bbcc66f696ad71984567..7e87de1c1e33db6e1ea111419b5887edd7cd4b51 100644 (file)
@@ -127,7 +127,7 @@ FEDGConstant<dim>::shape_grad_grad (const unsigned int i,
 template <int dim>
 void FEDGConstant<dim>::get_local_mass_matrix (const DoFHandler<dim>::cell_iterator &cell,
                                               const Boundary<dim> &,
-                                              dFMatrix &local_mass_matrix) const {
+                                              FullMatrix<double> &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<dim>::get_face_support_points (const typename DoFHandler<dim>::face
 
 
 template <int dim>
-const dFMatrix & 
+const FullMatrix<double> & 
 FEDGConstant<dim>::restrict (const unsigned int child) const {
   Assert (false, ExcNotImplemented());
   return restriction[child];
index 5334f6f5c49af11aeacff2361ea3a98b74c8a830..89cc701118faab999a5abcaeee40490689e1b332 100644 (file)
@@ -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<double> &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<double> &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<double> &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,
index 7f60977ba7ce41c08aab68239677366b0fc8a24a..f56c40959c4212a403e77ea84f7f383ce29fb743 100644 (file)
@@ -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<double> &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<double> &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<double> &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,
index 3d3c27be8c8c6b17189084cfbf024592b7ceeffa..6d2264ab12c0ff8bc6709f4c96eeaafbe3ae110c 100644 (file)
@@ -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<double> &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<double> &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,
index bef427b76a3f667972f7cbb4ec880212ff2f89ca..8bd04122bef1beff4d05ed2d0bc428724a7b9bce 100644 (file)
@@ -122,7 +122,7 @@ void FELinearMapping<1>::fill_fe_values (const DoFHandler<1>::cell_iterator &cel
                                         const bool            compute_support_points,
                                         vector<Point<1> >    &q_points,
                                         const bool            compute_q_points,
-                                        const dFMatrix       &shape_values_transform,
+                                        const FullMatrix<double>       &shape_values_transform,
                                         const vector<vector<Tensor<1,1> > > &shape_gradients_transform,
                                         const Boundary<1> &boundary) const {
                                   // simply pass down
@@ -565,7 +565,7 @@ void FELinearMapping<dim>::fill_fe_values (const DoFHandler<dim>::cell_iterator
                                           const bool           compute_support_points,
                                           vector<Point<dim> > &q_points,
                                           const bool           compute_q_points,
-                                          const dFMatrix      &shape_values_transform,
+                                          const FullMatrix<double>      &shape_values_transform,
                                           const vector<vector<Tensor<1,dim> > > &/*shape_grad_transform*/,
                                           const Boundary<dim> &boundary) const
 {
@@ -636,7 +636,7 @@ void FELinearMapping<dim>::fill_fe_values (const DoFHandler<dim>::cell_iterator
   
   if (compute_jacobians) 
     {
-      dFMatrix M(dim,dim);
+      FullMatrix<double> M(dim,dim);
       for (unsigned int l=0; l<n_points; ++l) 
        {
          M.clear ();
@@ -674,7 +674,7 @@ void FELinearMapping<dim>::fill_fe_values (const DoFHandler<dim>::cell_iterator
   #include <base/quadrature_lib.h>
   #include <grid/tria_iterator.h>
   #include <grid/dof_accessor.h>
-  #include <lac/dvector.h>
+  #include <lac/vector.h>
 
   int main () {
     Triangulation<2> tria;
@@ -691,7 +691,7 @@ void FELinearMapping<dim>::fill_fe_values (const DoFHandler<dim>::cell_iterator
     fevalues.reinit (dof.begin_active(),b);
   
   
-    dVector val(4);
+    Vector<double> val(4);
     val(2) = 1;
 
     vector<Point<2> > grads(4);
index 6ea9c6f79a452683f433ab61e417dbe07ed7b07f..b9ae5a99b249a79c31f34e0d98bf49f570c1eb8e 100644 (file)
@@ -1,5 +1,5 @@
 /* $Id$ */
-/* Copyright W. Bangerth, G. Kanschat University of Heidelberg, 1990 */
+/* Copyright W. Bangerth, G. Kanschat University of Heidelberg, 1999 */
 
 
 #include <fe/fe_system.h>
@@ -344,7 +344,7 @@ void FESystem<dim>::get_face_support_points (const DoFHandler<dim>::face_iterato
 template <int dim>
 void FESystem<dim>::get_local_mass_matrix (const DoFHandler<dim>::cell_iterator &/*cell*/,
                                           const Boundary<dim> &/*boundary*/,
-                                          dFMatrix            &/*local_mass_matrix*/) const
+                                          FullMatrix<double>  &/*local_mass_matrix*/) const
 {
   Assert(false, ExcNotImplemented());
 /*
@@ -355,7 +355,7 @@ void FESystem<dim>::get_local_mass_matrix (const DoFHandler<dim>::cell_iterator
 
                                   // first get the local mass matrix for
                                   // the base object
-  dFMatrix base_mass_matrix (base_element->total_dofs,
+  FullMatrix<double> 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<dim>::fill_fe_values (const DoFHandler<dim>::cell_iterator &cell,
                               const bool           compute_support_points,
                               vector<Point<dim> > &q_points,
                               const bool           compute_q_points,
-                              const dFMatrix      &shape_values_transform,
+                              const FullMatrix<double>  &shape_values_transform,
                               const vector<vector<Tensor<1,dim> > > &shape_grad_transform,
                               const Boundary<dim> &boundary) const
 {
index 870594cd7a29178e3a653617ac1956634eb72bc9..67c57e16fa9c4fa13dff6fe11a83ad68f8728b73 100644 (file)
@@ -9,7 +9,7 @@
 #include <grid/tria_accessor.h>
 #include <grid/tria_boundary.h>
 #include <grid/dof_accessor.h>
-#include <lac/dvector.h>
+#include <lac/vector.h>
 
 
 /*------------------------------- FEValuesBase ---------------------------*/
@@ -26,7 +26,7 @@ FEValuesBase<dim>::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<double>(total_dofs, n_q_points)),
                shape_gradients (total_dofs, vector<Tensor<1,dim> >(n_q_points)),
                shape_2nd_derivatives (total_dofs, vector<Tensor<2,dim> >(n_q_points)),
                weights (n_q_points, 0),
@@ -36,8 +36,8 @@ FEValuesBase<dim>::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<double>(n_transform_functions,
+                                                          n_quadrature_points)),
                selected_dataset (0),
                update_flags (update_flags),
                fe(&fe)        {};
@@ -61,8 +61,8 @@ double FEValuesBase<dim>::shape_value (const unsigned int i,
 
 
 template <int dim>
-void FEValuesBase<dim>::get_function_values (const dVector  &fe_function,
-                                            vector<double> &values) const
+void FEValuesBase<dim>::get_function_values (const Vector<double> &fe_function,
+                                            vector<double>       &values) const
 {
   Assert (fe->n_components == 1,
          ExcWrongNoOfComponents());
@@ -73,7 +73,7 @@ void FEValuesBase<dim>::get_function_values (const dVector  &fe_function,
 
                                   // get function values of dofs
                                   // on this cell
-  dVector dof_values (total_dofs);
+  Vector<double> dof_values (total_dofs);
   present_cell->get_dof_values (fe_function, dof_values);
 
                                   // initialize with zero
@@ -89,7 +89,7 @@ void FEValuesBase<dim>::get_function_values (const dVector  &fe_function,
 
 
 template <int dim>
-void FEValuesBase<dim>::get_function_values (const dVector  &fe_function,
+void FEValuesBase<dim>::get_function_values (const Vector<double>     &fe_function,
                                             vector< vector<double> > &values) const
 {
   Assert (fe->n_components == values.size(),
@@ -102,7 +102,7 @@ void FEValuesBase<dim>::get_function_values (const dVector  &fe_function,
 
                                   // get function values of dofs
                                   // on this cell
-  dVector dof_values (total_dofs);
+  Vector<double> dof_values (total_dofs);
   present_cell->get_dof_values (fe_function, dof_values);
 
                                   // initialize with zero
@@ -136,14 +136,14 @@ FEValuesBase<dim>::shape_grad (const unsigned int i,
 
 
 template <int dim>
-void FEValuesBase<dim>::get_function_grads (const dVector          &fe_function,
+void FEValuesBase<dim>::get_function_grads (const Vector<double>   &fe_function,
                                            vector<Tensor<1,dim> > &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<double> dof_values (total_dofs);
   present_cell->get_dof_values (fe_function, dof_values);
 
                                   // initialize with zero
@@ -178,14 +178,14 @@ FEValuesBase<dim>::shape_2nd_derivative (const unsigned int i,
 
 
 template <int dim>
-void FEValuesBase<dim>::get_function_2nd_derivatives (const dVector &fe_function,
+void FEValuesBase<dim>::get_function_2nd_derivatives (const Vector<double>   &fe_function,
                                                      vector<Tensor<2,dim> > &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<double> dof_values (total_dofs);
   present_cell->get_dof_values (fe_function, dof_values);
 
                                   // initialize with zero
index 252765c8feb95dd8fd3fbf94773297be0924eb6c..4835a1fcfa9e0d6a84d6b33c05a7aa5ca81c0ab3 100644 (file)
@@ -8,7 +8,7 @@
 #include <grid/tria_iterator.h>
 #include <grid/geometry_info.h>
 #include <basic/magic_numbers.h>
-#include <lac/dvector.h>
+#include <lac/vector.h>
 #include <iostream>
 #include <algorithm>
 #include <numeric>
@@ -3759,8 +3759,8 @@ void Triangulation<3>::print_gnuplot (ostream &out,
 
 
 template <int dim>
-void Triangulation<dim>::refine (const dVector &criteria,
-                                const double   threshold) {
+void Triangulation<dim>::refine (const Vector<float> &criteria,
+                                const double         threshold) {
   Assert (criteria.size() == n_active_cells(),
          ExcInvalidVectorSize(criteria.size(), n_active_cells()));
 
@@ -3783,8 +3783,8 @@ void Triangulation<dim>::refine (const dVector &criteria,
 
 
 template <int dim>
-void Triangulation<dim>::coarsen (const dVector &criteria,
-                                 const double   threshold) {
+void Triangulation<dim>::coarsen (const Vector<float> &criteria,
+                                 const double         threshold) {
   Assert (criteria.size() == n_active_cells(),
          ExcInvalidVectorSize(criteria.size(), n_active_cells()));
 
@@ -3799,9 +3799,9 @@ void Triangulation<dim>::coarsen (const dVector &criteria,
 
 
 template <int dim>
-void Triangulation<dim>::refine_and_coarsen_fixed_number (const dVector &criteria,
-                                                         const double   top_fraction,
-                                                         const double   bottom_fraction) {
+void Triangulation<dim>::refine_and_coarsen_fixed_number (const Vector<float> &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<dim>::refine_and_coarsen_fixed_number (const dVector &criteri
   const int coarsen_cells = max(static_cast<int>(bottom_fraction*criteria.size()),
                                1);
   
-  dVector tmp(criteria);  
+  Vector<float> tmp(criteria);  
   nth_element (tmp.begin(), tmp.begin()+refine_cells,
               tmp.end(),
               greater<double>());
@@ -3838,9 +3838,9 @@ double sqr(double a) {
 
 template <int dim>
 void
-Triangulation<dim>::refine_and_coarsen_fixed_fraction (const dVector &criteria,
-                                                      const double   top_fraction,
-                                                      const double   bottom_fraction) {
+Triangulation<dim>::refine_and_coarsen_fixed_fraction (const Vector<float> &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<dim>::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<float> tmp(criteria);
   const double total_error = tmp.l1_norm();
-  
-  dVector partial_sums(criteria.size());
+
+  Vector<float> partial_sums(criteria.size());
   sort (tmp.begin(), tmp.end(), greater<double>());
   partial_sum (tmp.begin(), tmp.end(), partial_sums.begin());
 
                                   // compute thresholds
-  dVector::const_iterator p;
+  Vector<float>::const_iterator p;
   double top_threshold, bottom_threshold;
   p = lower_bound (partial_sums.begin(), partial_sums.end(),
                   top_fraction*total_error);
index 49b7f9c6616ddbef78e56ece3a6411ddbbcced76..101f9344fea71eaa9415595b2296e732d5d8d9e3 100644 (file)
@@ -10,9 +10,9 @@
 #include <grid/tria_iterator.templates.h>
 #include <fe/fe.h>
 
-#include <lac/dvector.h>
-#include <lac/dfmatrix.h>
-#include <lac/dsmatrix.h>
+#include <lac/vector.h>
+#include <lac/fullmatrix.h>
+#include <lac/sparsematrix.h>
 
 
 
@@ -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<double> &values,
+                                        Vector<double>       &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<double> &values,
+                                        Vector<double>       &dof_values) const {
   Assert (dof_handler != 0, ExcInvalidObject());
   Assert (mg_dof_handler != 0, ExcInvalidObject());
   Assert (&dof_handler->get_fe() != 0, ExcInvalidObject());
index c1ce677a99cc40215dde75fe3be2ba364be5d8df..f6092999edb63da450a06a83d2b5b82270bb9e73 100644 (file)
@@ -12,7 +12,7 @@
 #include <grid/tria.h>
 #include <grid/geometry_info.h>
 #include <fe/fe.h>
-#include <lac/dsmatrix.h>
+#include <lac/sparsematrix.h>
 
 #include <algorithm>
 
@@ -1002,7 +1002,7 @@ unsigned int MGDoFHandler<dim>::n_dofs (const unsigned int level) const {
 
 template <int dim>
 void MGDoFHandler<dim>::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<dim>::renumber_dofs (const unsigned int      level,
                                       const RenumberingMethod method,
                                       const vector<int>      &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();
index e7fdaf0785a0a0c1aded7e257c832351a911d940..e45aa11e36012cf3652420fcf523e0528351e856 100644 (file)
@@ -2,10 +2,10 @@
 // Copyright Guido Kanschat, Universitaet Heidelberg, 1999
 
 #include <numerics/multigrid.h>
-#include <lac/dvector.h>
+#include <lac/vector.h>
 
 void
-MultiGrid::vmult(dVector& dst, const dVector& src) const
+MultiGrid::vmult(Vector<double>& dst, const Vector<double>& 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<double>& dst, const Vector<double>& 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<double>& dst, const Vector<double>& src,
                            unsigned steps) const
 {
   smooth(level, dst, src, steps);
index fa493e400179d1fd1eea1bfdae649776a74d1119..c1dbc9ba70eed50be4068c7dfa532e27f3d1a4ed 100644 (file)
@@ -6,9 +6,9 @@
 #include <grid/tria_iterator.h>
 #include <grid/tria_iterator.templates.h>
 #include <fe/fe.h>
-#include <lac/dfmatrix.h>
-#include <lac/dvector.h>
-#include <lac/dsmatrix.h>
+#include <lac/fullmatrix.h>
+#include <lac/vector.h>
+#include <lac/sparsematrix.h>
 
 
 template <int dim>
@@ -18,8 +18,8 @@ Equation<dim>::Equation (const unsigned int n_equations) :
 
 
 template <int dim>
-void Equation<dim>::assemble (dFMatrix          &,
-                             dVector           &,
+void Equation<dim>::assemble (FullMatrix<double>          &,
+                             Vector<double>           &,
                              const FEValues<dim> &,
                              const typename DoFHandler<dim>::cell_iterator &) const {
   Assert (false, ExcPureVirtualFunctionCalled());
@@ -28,7 +28,7 @@ void Equation<dim>::assemble (dFMatrix          &,
 
 
 template <int dim>
-void Equation<dim>::assemble (dFMatrix          &,
+void Equation<dim>::assemble (FullMatrix<double>          &,
                              const FEValues<dim> &,
                              const typename DoFHandler<dim>::cell_iterator &) const {
   Assert (false, ExcPureVirtualFunctionCalled());
@@ -37,7 +37,7 @@ void Equation<dim>::assemble (dFMatrix          &,
 
 
 template <int dim>
-void Equation<dim>::assemble (dVector           &,
+void Equation<dim>::assemble (Vector<double>           &,
                              const FEValues<dim> &,
                              const typename DoFHandler<dim>::cell_iterator &) const {
   Assert (false, ExcPureVirtualFunctionCalled());
@@ -50,8 +50,8 @@ template <int dim>
 AssemblerData<dim>::AssemblerData (const DoFHandler<dim>    &dof,
                                   const bool                assemble_matrix,
                                   const bool                assemble_rhs,
-                                  dSMatrix                 &matrix,
-                                  dVector                  &rhs_vector,
+                                  SparseMatrix<double>     &matrix,
+                                  Vector<double>           &rhs_vector,
                                   const Quadrature<dim>    &quadrature,
                                   const FiniteElement<dim> &fe,
                                   const UpdateFlags        &update_flags,
@@ -76,7 +76,7 @@ Assembler<dim>::Assembler (Triangulation<dim> *tria,
                           const AssemblerData<dim> *local_data) :
                DoFCellAccessor<dim> (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<double>(dof_handler->get_fe().total_dofs)),
                assemble_matrix (local_data->assemble_matrix),
                assemble_rhs (local_data->assemble_rhs),
                matrix(local_data->matrix),
index edbbb09f573b9358b7892e06ecb4b25a9e3e8ad6..afa767ca69685ef5ca3e100a1183bb6502a39c99 100644 (file)
@@ -12,7 +12,7 @@
 #include <base/function.h>
 #include <fe/fe.h>
 #include <base/quadrature.h>
-#include <lac/dvector.h>
+#include <lac/vector.h>
 #include <lac/solver_cg.h>
 #include <lac/vector_memory.h>
 
@@ -141,8 +141,8 @@ void ProblemBase<dim>::solve () {
   Assert ((tria!=0) && (dof_handler!=0), ExcNoTriaSelected());
   
   SolverControl                    control(4000, 1e-16);
-  PrimitiveVectorMemory<dVector>   memory;
-  SolverCG<dSMatrix,dVector>       cg(control,memory);
+  PrimitiveVectorMemory<Vector<double> >   memory;
+  SolverCG<SparseMatrix<double>,Vector<double> >       cg(control,memory);
 
                                   // solve
   cg.solve (system_matrix, solution, right_hand_side);
index 49edbc694cec749a40de54cfeb8a233e51fca346..da9a132577044c1aa7ecf02a93f3adb4e4cf1898 100644 (file)
@@ -12,7 +12,7 @@
 #include <base/quadrature_lib.h>
 #include <fe/fe_values.h>
 #include <fe/fe.h>
-#include <lac/dvector.h>
+#include <lac/vector.h>
 
 #include <map>
 #include <iostream>
@@ -181,7 +181,7 @@ DataOut<dim>::DataEntry::DataEntry () :
 
 
 template <int dim>
-DataOut<dim>::DataEntry::DataEntry (const dVector *data,
+DataOut<dim>::DataEntry::DataEntry (const Vector<double> *data,
                                    const string name,
                                    const string units) :
                        data(data), name(name), units(units) {};
@@ -203,7 +203,7 @@ void DataOut<dim>::attach_dof_handler (DoFHandler<dim> &d) {
 
 
 template <int dim>
-void DataOut<dim>::add_data_vector (const dVector &vec,
+void DataOut<dim>::add_data_vector (const Vector<double> &vec,
                                    const string  &name,
                                    const string  &units) {
   Assert (dofs != 0, ExcNoDoFHandlerSelected ());
index fcdd9673ab9de936b5a27ca3f773f0f3def3f33d..4c4a50828059fc15e4821a8560687943b5bdd450 100644 (file)
@@ -10,7 +10,8 @@
 #include <grid/tria_iterator.h>
 #include <grid/dof_accessor.h>
 #include <grid/geometry_info.h>
-#include <lac/dvector.h>
+#include <lac/vector.h>
+#include <lac/vector.h>
 
 #include <numeric>
 #include <algorithm>
@@ -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<double> &,
+                                            Vector<float> &,
                                             const Function<1> *) {
   Assert(false, ExcNotImplemented());
 };
@@ -47,8 +48,8 @@ void KellyErrorEstimator<dim>::estimate_error (const DoFHandler<dim>    &dof,
                                               const FiniteElement<dim> &fe,
                                               const Boundary<dim>      &boundary,
                                               const FunctionMap        &neumann_bc,
-                                              const dVector            &solution,
-                                              dVector                  &error,
+                                              const Vector<double>     &solution,
+                                              Vector<float>            &error,
                                               const Function<dim> *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<double>   &,
                                                          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<double>       &,
                               const Function<1>          *) {
   Assert (false, ExcInternalError());
 };
@@ -232,7 +233,7 @@ integrate_over_regular_face (const active_cell_iterator &cell,
                             FEFaceValues<dim>          &fe_face_values_cell,
                             FEFaceValues<dim>          &fe_face_values_neighbor,
                             FaceIntegrals              &face_integrals,
-                            const dVector              &solution,
+                            const Vector<double>       &solution,
                             const Function<dim>        *coefficient) {
   const DoFHandler<dim>::face_iterator face = cell->face(face_no);
   
@@ -386,7 +387,7 @@ integrate_over_irregular_face (const active_cell_iterator &cell,
                               FEFaceValues<dim>          &fe_face_values,
                               FESubfaceValues<dim>       &fe_subface_values,
                               FaceIntegrals              &face_integrals,
-                              const dVector              &solution,
+                              const Vector<double>       &solution,
                               const Function<dim>        *coefficient) {
   const DoFHandler<dim>::cell_iterator neighbor = cell->neighbor(face_no);
   Assert (neighbor.state() == valid, ExcInternalError());
index 45cddee698d326dbe372de0e5d6e13f030a46147..e0cf9b03e1a9de4b3a5fe340008f3afac81e9d76 100644 (file)
@@ -10,8 +10,8 @@
 #include <fe/fe_values.h>
 #include <numerics/matrices.h>
 #include <numerics/assembler.h>
-#include <lac/dvector.h>
-#include <lac/dsmatrix.h>
+#include <lac/vector.h>
+#include <lac/sparsematrix.h>
 
 #include <algorithm>
 #include <set>
@@ -23,11 +23,11 @@ template <int dim>
 void MatrixCreator<dim>::create_mass_matrix (const DoFHandler<dim>    &dof,
                                             const Quadrature<dim>    &q,
                                             const Boundary<dim>      &boundary,
-                                            dSMatrix                 &matrix,
+                                            SparseMatrix<double>     &matrix,
                                             const Function<dim> * const a) {
   const FiniteElement<dim> &fe = dof.get_fe();
 
-  dVector dummy;    // no entries, should give an error if accessed
+  Vector<double> 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 <int dim>
 void MatrixCreator<dim>::create_mass_matrix (const DoFHandler<dim>    &dof,
                                             const Quadrature<dim>    &q,
                                             const Boundary<dim>      &boundary,
-                                            dSMatrix                 &matrix,
+                                            SparseMatrix<double>     &matrix,
                                             const Function<dim>      &rhs,
-                                            dVector                  &rhs_vector,
+                                            Vector<double>           &rhs_vector,
                                             const Function<dim> * const a) {
   const FiniteElement<dim> &fe = dof.get_fe();
 
@@ -85,13 +85,13 @@ void MatrixCreator<dim>::create_mass_matrix (const DoFHandler<dim>    &dof,
 template <int dim>
 void MatrixCreator<dim>::create_mass_matrix (const DoFHandler<dim>    &dof,
                                             const Boundary<dim>      &boundary,
-                                            dSMatrix                 &matrix) {
+                                            SparseMatrix<double>     &matrix) {
   const FiniteElement<dim> &fe = dof.get_fe();
 
   const unsigned int total_dofs = fe.total_dofs;
   
-  dFMatrix    local_mass_matrix (total_dofs, total_dofs);
-  vector<int> dofs_on_this_cell (total_dofs);
+  FullMatrix<double>  local_mass_matrix (total_dofs, total_dofs);
+  vector<int>         dofs_on_this_cell (total_dofs);
   
   DoFHandler<dim>::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<double>   &,
                                                    const FunctionMap      &,
-                                                   dVector                &,
+                                                   Vector<double>         &,
                                                    vector<int>            &,
                                                    const Function<1>      *) {
   Assert (false, ExcNotImplemented());
@@ -131,9 +131,9 @@ template <int dim>
 void MatrixCreator<dim>::create_boundary_mass_matrix (const DoFHandler<dim>    &dof,
                                                      const Quadrature<dim-1>  &q,
                                                      const Boundary<dim>      &boundary,
-                                                     dSMatrix                 &matrix,
+                                                     SparseMatrix<double>     &matrix,
                                                      const FunctionMap        &rhs,
-                                                     dVector                  &rhs_vector,
+                                                     Vector<double>           &rhs_vector,
                                                      vector<int>              &dof_to_boundary_mapping,
                                                      const Function<dim>      *a) {
   const FiniteElement<dim> &fe = dof.get_fe();
@@ -150,8 +150,8 @@ void MatrixCreator<dim>::create_boundary_mass_matrix (const DoFHandler<dim>    &
   
   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<double> cell_matrix(dofs_per_cell, dofs_per_cell);
+  Vector<double>     cell_vector(dofs_per_cell);
   
   
   UpdateFlags update_flags = UpdateFlags (update_JxW_values | update_q_points);
@@ -170,9 +170,9 @@ void MatrixCreator<dim>::create_boundary_mass_matrix (const DoFHandler<dim>    &
          
          fe_values.reinit (cell, face, boundary);
 
-         const dFMatrix       &values    = fe_values.get_shape_values ();
-         const vector<double> &weights   = fe_values.get_JxW_values ();
-         vector<double>        rhs_values (fe_values.n_quadrature_points);
+         const FullMatrix<double> &values    = fe_values.get_shape_values ();
+         const vector<double>     &weights   = fe_values.get_JxW_values ();
+         vector<double>           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 <int dim>
 void MatrixCreator<dim>::create_laplace_matrix (const DoFHandler<dim>    &dof,
                                                const Quadrature<dim>    &q,
                                                const Boundary<dim>      &boundary,
-                                               dSMatrix                 &matrix,
+                                               SparseMatrix<double>     &matrix,
                                                const Function<dim> * const a) {
   const FiniteElement<dim> &fe = dof.get_fe();
 
-  dVector dummy;   // no entries, should give an error if accessed
+  Vector<double> 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 <int dim>
 void MatrixCreator<dim>::create_laplace_matrix (const DoFHandler<dim>    &dof,
                                                const Quadrature<dim>    &q,
                                                const Boundary<dim>      &boundary,
-                                               dSMatrix                 &matrix,
+                                               SparseMatrix<double>     &matrix,
                                                const Function<dim>      &rhs,
-                                               dVector                  &rhs_vector,
+                                               Vector<double>           &rhs_vector,
                                                const Function<dim> * const a) {
   const FiniteElement<dim> &fe = dof.get_fe();
 
@@ -393,9 +393,9 @@ void MatrixCreator<dim>::create_laplace_matrix (const DoFHandler<dim>    &dof,
 
 template <int dim>
 void MatrixTools<dim>::apply_boundary_values (const map<int,double> &boundary_values,
-                                             dSMatrix  &matrix,
-                                             dVector   &solution,
-                                             dVector   &right_hand_side) {
+                                             SparseMatrix<double>  &matrix,
+                                             Vector<double>   &solution,
+                                             Vector<double>   &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<dim>::apply_boundary_values (const map<int,double> &boundary_va
   map<int,double>::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<dim>::apply_boundary_values (const map<int,double> &boundary_va
                break;
              };
 
-                                          // use the dSMatrix:: as a workaround
+                                          // use the SparseMatrix<double>:: as a workaround
                                           // for a bug in egcs
-         matrix.dSMatrix::set(dof_number, dof_number,
-                              first_diagonal_entry);
+         matrix.SparseMatrix<double>::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<dim>::MassMatrix (const Function<dim> * const rhs,
 
 
 template <int dim>
-void MassMatrix<dim>::assemble (dFMatrix            &cell_matrix,
-                               const FEValues<dim> &fe_values,
+void MassMatrix<dim>::assemble (FullMatrix<double>      &cell_matrix,
+                               const FEValues<dim>     &fe_values,
                                const typename DoFHandler<dim>::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<dim>::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<double> &weights   = fe_values.get_JxW_values ();
+  const FullMatrix<double> &values    = fe_values.get_shape_values ();
+  const vector<double>     &weights   = fe_values.get_JxW_values ();
 
   
   if (coefficient != 0)
@@ -587,8 +587,8 @@ void MassMatrix<dim>::assemble (dFMatrix            &cell_matrix,
 
 
 template <int dim>
-void MassMatrix<dim>::assemble (dFMatrix            &cell_matrix,
-                               dVector             &rhs,
+void MassMatrix<dim>::assemble (FullMatrix<double>  &cell_matrix,
+                               Vector<double>      &rhs,
                                const FEValues<dim> &fe_values,
                                const DoFHandler<dim>::cell_iterator &) const {
   Assert (right_hand_side != 0, ExcNoRHSSelected());
@@ -605,9 +605,9 @@ void MassMatrix<dim>::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<double> &weights   = fe_values.get_JxW_values ();
-  vector<double>        rhs_values (fe_values.n_quadrature_points);
+  const FullMatrix<double> &values    = fe_values.get_shape_values ();
+  const vector<double>     &weights   = fe_values.get_JxW_values ();
+  vector<double>            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<dim>::assemble (dFMatrix            &cell_matrix,
 
 
 template <int dim>
-void MassMatrix<dim>::assemble (dVector             &rhs,
+void MassMatrix<dim>::assemble (Vector<double>      &rhs,
                                const FEValues<dim> &fe_values,
                                const DoFHandler<dim>::cell_iterator &) const {
   Assert (right_hand_side != 0, ExcNoRHSSelected());
@@ -656,9 +656,9 @@ void MassMatrix<dim>::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<double> &weights   = fe_values.get_JxW_values ();
-  vector<double>        rhs_values(fe_values.n_quadrature_points);
+  const FullMatrix<double> &values    = fe_values.get_shape_values ();
+  const vector<double>     &weights   = fe_values.get_JxW_values ();
+  vector<double>            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<n_q_points; ++point)
@@ -681,9 +681,9 @@ LaplaceMatrix<dim>::LaplaceMatrix (const Function<dim> * const rhs,
 
 
 template <int dim>
-void LaplaceMatrix<dim>::assemble (dFMatrix            &cell_matrix,
-                                  dVector             &rhs,
-                                  const FEValues<dim> &fe_values,
+void LaplaceMatrix<dim>::assemble (FullMatrix<double>         &cell_matrix,
+                                  Vector<double>             &rhs,
+                                  const FEValues<dim>        &fe_values,
                                   const DoFHandler<dim>::cell_iterator &) const {
   Assert (right_hand_side != 0, ExcNoRHSSelected());
   
@@ -700,7 +700,7 @@ void LaplaceMatrix<dim>::assemble (dFMatrix            &cell_matrix,
   Assert (rhs.all_zero(), ExcObjectNotEmpty());
 
   const vector<vector<Tensor<1,dim> > >&gradients = fe_values.get_shape_grads ();
-  const dFMatrix       &values    = fe_values.get_shape_values ();
+  const FullMatrix<double>             &values    = fe_values.get_shape_values ();
   vector<double>        rhs_values(fe_values.n_quadrature_points);
   const vector<double> &weights   = fe_values.get_JxW_values ();
   right_hand_side->value_list (fe_values.get_quadrature_points(), rhs_values);
@@ -741,7 +741,7 @@ void LaplaceMatrix<dim>::assemble (dFMatrix            &cell_matrix,
 
 
 template <int dim>
-void LaplaceMatrix<dim>::assemble (dFMatrix            &cell_matrix,
+void LaplaceMatrix<dim>::assemble (FullMatrix<double>  &cell_matrix,
                                   const FEValues<dim> &fe_values,
                                   const DoFHandler<dim>::cell_iterator &) const {
   const unsigned int total_dofs = fe_values.total_dofs,
@@ -781,7 +781,7 @@ void LaplaceMatrix<dim>::assemble (dFMatrix            &cell_matrix,
 
 
 template <int dim>
-void LaplaceMatrix<dim>::assemble (dVector             &rhs,
+void LaplaceMatrix<dim>::assemble (Vector<double>      &rhs,
                                   const FEValues<dim> &fe_values,
                                   const DoFHandler<dim>::cell_iterator &) const {
   Assert (right_hand_side != 0, ExcNoRHSSelected());
@@ -792,8 +792,8 @@ void LaplaceMatrix<dim>::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<double> &weights   = fe_values.get_JxW_values ();
+  const FullMatrix<double> &values    = fe_values.get_shape_values ();
+  const vector<double>     &weights   = fe_values.get_JxW_values ();
   vector<double>        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<dim>::assemble (dVector             &rhs,
 template<int dim> void
 MatrixCreator<dim>::create_interpolation_matrix(const FiniteElement<dim> &high,
                                                const FiniteElement<dim> &low,
-                                               dFMatrix& result)
+                                               FullMatrix<double>& result)
 {
   result.reinit (low.total_dofs, high.total_dofs);
 
index e7fdaf0785a0a0c1aded7e257c832351a911d940..e45aa11e36012cf3652420fcf523e0528351e856 100644 (file)
@@ -2,10 +2,10 @@
 // Copyright Guido Kanschat, Universitaet Heidelberg, 1999
 
 #include <numerics/multigrid.h>
-#include <lac/dvector.h>
+#include <lac/vector.h>
 
 void
-MultiGrid::vmult(dVector& dst, const dVector& src) const
+MultiGrid::vmult(Vector<double>& dst, const Vector<double>& 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<double>& dst, const Vector<double>& 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<double>& dst, const Vector<double>& src,
                            unsigned steps) const
 {
   smooth(level, dst, src, steps);
index 58fe08915ee436aeebe2a80a69e161f683a68f72..31330e7b628d7d2ebba12eda1c1e1b5f7a94bc38 100644 (file)
@@ -14,8 +14,8 @@
 #include <numerics/assembler.h>
 #include <numerics/vectors.h>
 #include <numerics/matrices.h>
-#include <lac/dvector.h>
-#include <lac/dsmatrix.h>
+#include <lac/vector.h>
+#include <lac/sparsematrix.h>
 #include <lac/solver_cg.h>
 #include <lac/vector_memory.h>
 
@@ -45,7 +45,7 @@ template <int dim>
 void VectorTools<dim>::interpolate (const DoFHandler<dim>    &dof,
                                    const Boundary<dim>      &boundary,
                                    const Function<dim>      &function,
-                                   dVector                  &vec)
+                                   Vector<double>           &vec)
 {
   const FiniteElement<dim> &fe = dof.get_fe();
   
@@ -75,12 +75,12 @@ void VectorTools<dim>::interpolate (const DoFHandler<dim>    &dof,
 template <int dim> void
 VectorTools<dim>::interpolate(const DoFHandler<dim>    &high_dof,
                              const DoFHandler<dim>    &low_dof,
-                             const dFMatrix           &transfer,
-                             const dVector            &high,
-                             dVector                  &low)
+                             const FullMatrix<double>        &transfer,
+                             const Vector<double>            &high,
+                             Vector<double>                  &low)
 {
-  dVector cell_high(high_dof.get_fe().total_dofs);
-  dVector cell_low(low_dof.get_fe().total_dofs);
+  Vector<double> cell_high(high_dof.get_fe().total_dofs);
+  Vector<double> cell_low(low_dof.get_fe().total_dofs);
   
   DoFHandler<dim>::active_cell_iterator h = high_dof.begin_active();
   DoFHandler<dim>::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<double>         &,
                              const bool              ,
                              const Quadrature<0>    &,
                              const bool              ) {
@@ -126,7 +126,7 @@ void VectorTools<dim>::project (const DoFHandler<dim>    &dof,
                                const Boundary<dim>      &boundary,
                                const Quadrature<dim>    &q,
                                const Function<dim>      &function,
-                               dVector                  &vec,
+                               Vector<double>           &vec,
                                const bool                enforce_zero_boundary,
                                const Quadrature<dim-1>  &q_boundary,
                                const bool                project_to_boundary_first) {
@@ -173,14 +173,14 @@ void VectorTools<dim>::project (const DoFHandler<dim>    &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<double> mass_matrix (sparsity);
+  Vector<double> tmp (mass_matrix.n());
   MatrixCreator<dim>::create_mass_matrix (dof, boundary, mass_matrix);
   VectorTools<dim>::create_right_hand_side (dof, q, boundary,
                                            function, tmp);
@@ -191,8 +191,8 @@ void VectorTools<dim>::project (const DoFHandler<dim>    &dof,
                                           mass_matrix, vec, tmp);
 
   SolverControl                    control(1000,1e-16);
-  PrimitiveVectorMemory<dVector>   memory;
-  SolverCG<dSMatrix,dVector>       cg(control,memory);
+  PrimitiveVectorMemory<Vector<double> >   memory;
+  SolverCG<SparseMatrix<double>,Vector<double> >       cg(control,memory);
 
                                   // solve
   cg.solve (mass_matrix, vec, tmp);
@@ -208,12 +208,12 @@ void VectorTools<dim>::create_right_hand_side (const DoFHandler<dim>    &dof,
                                               const Quadrature<dim>    &q,
                                               const Boundary<dim>      &boundary,
                                               const Function<dim>      &rhs,
-                                              dVector                  &rhs_vector) {
+                                              Vector<double>           &rhs_vector) {
   const FiniteElement<dim> &fe = dof.get_fe();
   
   UpdateFlags update_flags = UpdateFlags(update_q_points |
                                         update_JxW_values);
-  dSMatrix dummy;
+  SparseMatrix<double> dummy;
   const AssemblerData<dim> data (dof,
                                 false, true,
                                 dummy, rhs_vector,
@@ -304,8 +304,8 @@ VectorTools<dim>::project_boundary_values (const DoFHandler<dim>    &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<dim>::project_boundary_values (const DoFHandler<dim>    &dof,
   
 
                                   // make mass matrix and right hand side
-  dSMatrix       mass_matrix(sparsity);
-  dVector        rhs(sparsity.n_rows());
+  SparseMatrix<double> mass_matrix(sparsity);
+  Vector<double>       rhs(sparsity.n_rows());
   
 
   MatrixTools<dim>::create_boundary_mass_matrix (dof, q, boundary,
@@ -343,11 +343,11 @@ VectorTools<dim>::project_boundary_values (const DoFHandler<dim>    &dof,
   Assert (dim<3, ExcNotImplemented());
 
   
-  dVector boundary_projection (rhs.size());
+  Vector<double> boundary_projection (rhs.size());
 
   SolverControl                    control(1000, 1e-16);
-  PrimitiveVectorMemory<dVector>   memory;
-  SolverCG<dSMatrix,dVector>       cg(control,memory);
+  PrimitiveVectorMemory<Vector<double> >   memory;
+  SolverCG<SparseMatrix<double>,Vector<double> >       cg(control,memory);
 
                                   // solve
   cg.solve (mass_matrix, boundary_projection, rhs);
@@ -370,9 +370,9 @@ VectorTools<dim>::project_boundary_values (const DoFHandler<dim>    &dof,
 
 template <int dim>
 void VectorTools<dim>::integrate_difference (const DoFHandler<dim>    &dof,
-                                            const dVector            &fe_function,
+                                            const Vector<double>     &fe_function,
                                             const Function<dim>      &exact_solution,
-                                            dVector                  &difference,
+                                            Vector<float>            &difference,
                                             const Quadrature<dim>    &q,
                                             const NormType           &norm,
                                             const Boundary<dim>      &boundary) {
@@ -555,193 +555,195 @@ void VectorTools<dim>::integrate_difference (const DoFHandler<dim>    &dof,
     };
 };
 
-template <int dim>
-void VectorTools<dim>::integrate_difference (const DoFHandler<dim>    &dof,
-                                            const dVector            &fe_function,
-                                            const TensorFunction<1,dim>      &exact_solution,
-                                            dVector                  &difference,
-                                            const Quadrature<dim>    &q,
-                                            const FiniteElement<dim> &fe,
-                                            const NormType           &norm,
-                                            const Boundary<dim>      &boundary) {
-  Assert (fe == dof.get_fe(), ExcInvalidFE());
+
+
+// template <int dim>
+// void VectorTools<dim>::integrate_difference (const DoFHandler<dim>    &dof,
+//                                          const Vector<double>     &fe_function,
+//                                          const TensorFunction<1,dim>&exact_solution,
+//                                          Vector<float>            &difference,
+//                                          const Quadrature<dim>    &q,
+//                                          const FiniteElement<dim> &fe,
+//                                          const NormType           &norm,
+//                                          const Boundary<dim>      &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<dim> 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<dim> fe_values(fe, q, update_flags);
   
-                                  // loop over all cells
-  DoFHandler<dim>::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<double>   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<double> > function_values (fe.n_components, vector<double>(n_q_points, 0));
-               fe_values.get_function_values (fe_function, function_values);
-
-               transform (psi.begin(), psi.end(),
-                          function_values.begin(),
-                          psi.begin(),
-                          minus<double>());
-             };            
-
-                                            // 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<Tensor<1,dim> >   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<dim>::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<double>   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<double> > function_values (fe.n_components, vector<double>(n_q_points, 0));
+//             fe_values.get_function_values (fe_function, function_values);
+
+//             transform (psi.begin(), psi.end(),
+//                        function_values.begin(),
+//                        psi.begin(),
+//                        minus<double>());
+//           };            
+
+//                                          // 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<Tensor<1,dim> >   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<Tensor<1,dim> > 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<Tensor<1,dim> >());
-             };
-                                            // take square of integrand
-           vector<double> psi_square (psi.size(), 0.0);
-           for (unsigned int i=0; i<n_q_points; ++i)
-             psi_square[i] = sqr_point(psi[i]);
-
-                                            // add seminorm to L_2 norm or
-                                            // to zero
-           diff += inner_product (psi_square.begin(), psi_square.end(),
-                                  fe_values.get_JxW_values().begin(),
-                                  0.0);
-           diff = sqrt(diff);
-
-           break;
-         };
+//                                          // then subtract finite element
+//                                          // fe_function
+//         if (true) 
+//           {
+//             vector<Tensor<1,dim> > 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<Tensor<1,dim> >());
+//           };
+//                                          // take square of integrand
+//         vector<double> psi_square (psi.size(), 0.0);
+//         for (unsigned int i=0; i<n_q_points; ++i)
+//           psi_square[i] = sqr_point(psi[i]);
+
+//                                          // add seminorm to L_2 norm or
+//                                          // to zero
+//         diff += inner_product (psi_square.begin(), psi_square.end(),
+//                                fe_values.get_JxW_values().begin(),
+//                                0.0);
+//         diff = sqrt(diff);
+
+//         break;
+//       };
                                             
-         default:
-               Assert (false, ExcNotImplemented());
-       };
+//       default:
+//             Assert (false, ExcNotImplemented());
+//     };
 
       
-                                      // append result of this cell
-                                      // to the end of the vector
-      difference(index) = diff;
-    };
-};
+//                                    // append result of this cell
+//                                    // to the end of the vector
+//       difference(index) = diff;
+//     };
+// };
 
 
 template VectorTools<deal_II_dimension>;
index b3a337327729b9dcf276838e9552c70eeb8a1bbc..2584e4fe4614490e6f4f55f2a29c00ba53a2609d 100644 (file)
@@ -17,7 +17,7 @@
 #include <numerics/base.h>
 #include <numerics/assembler.h>
 #include <numerics/vectors.h>
-#include <lac/dvector.h>
+#include <lac/vector.h>
 
 #include <map>
 #include <fstream>
@@ -36,14 +36,14 @@ class PoissonEquation :  public Equation<dim> {
                    Equation<dim>(1),
                    right_hand_side (rhs)  {};
 
-    virtual void assemble (dFMatrix            &cell_matrix,
-                          dVector             &rhs,
+    virtual void assemble (FullMatrix<double>  &cell_matrix,
+                          Vector<double>      &rhs,
                           const FEValues<dim> &fe_values,
                           const DoFHandler<dim>::cell_iterator &cell) const;
-    virtual void assemble (dFMatrix            &cell_matrix,
+    virtual void assemble (FullMatrix<double>  &cell_matrix,
                           const FEValues<dim> &fe_values,
                           const DoFHandler<dim>::cell_iterator &cell) const;
-    virtual void assemble (dVector             &rhs,
+    virtual void assemble (Vector<double>      &rhs,
                           const FEValues<dim> &fe_values,
                           const DoFHandler<dim>::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<double>  &cell_matrix,
+                                  Vector<double>      &rhs,
                                   const FEValues<2>   &fe_values,
                                   const DoFHandler<2>::cell_iterator &) const {
   for (unsigned int point=0; point<fe_values.n_quadrature_points; ++point)
@@ -169,7 +169,7 @@ void PoissonEquation<2>::assemble (dFMatrix            &cell_matrix,
 
 
 template <int dim>
-void PoissonEquation<dim>::assemble (dFMatrix            &,
+void PoissonEquation<dim>::assemble (FullMatrix<double>  &,
                                     const FEValues<dim> &,
                                     const DoFHandler<dim>::cell_iterator &) const {
   Assert (false, ExcPureVirtualFunctionCalled());
@@ -178,7 +178,7 @@ void PoissonEquation<dim>::assemble (dFMatrix            &,
 
 
 template <int dim>
-void PoissonEquation<dim>::assemble (dVector             &,
+void PoissonEquation<dim>::assemble (Vector<double>      &,
                                     const FEValues<dim> &,
                                     const DoFHandler<dim>::cell_iterator &) const {
   Assert (false, ExcPureVirtualFunctionCalled());
@@ -330,8 +330,8 @@ int PoissonProblem<dim>::run (const unsigned int level) {
   solve ();
 
   Solution<dim> 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<float>       l1_error_per_cell, l2_error_per_cell, linfty_error_per_cell;
+  Vector<float>       h1_seminorm_error_per_cell, h1_error_per_cell;
   
   cout << "    Calculating L1 error... ";
   VectorTools<dim>::integrate_difference (*dof_handler,
@@ -375,8 +375,8 @@ int PoissonProblem<dim>::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<double> l1_error_per_dof, l2_error_per_dof, linfty_error_per_dof;
+      Vector<double> 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<dim>::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<double> projected_solution;
 //       ConstraintMatrix constraints;
 //       constraints.close ();
 //       VectorTools<dim>::project (*dof, constraints, *fe,
index a176758e018bbada9d03a9892bc9ed50cac9a77d..9144ac0f1165559f1a086d49ede8487e48700c00 100644 (file)
@@ -9,7 +9,7 @@
 #include <grid/tria_boundary.h>
 #include <grid/tria_iterator.h>
 #include <grid/tria_accessor.h>
-#include <lac/dsmatrix.h>
+#include <lac/sparsematrix.h>
 #include <base/parameter_handler.h>
 #include <grid/dof_constraints.h>
 
@@ -356,8 +356,8 @@ void TestCases<dim>::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);
index 54e1c13f2d2f8da68de1f14f25aabb41462eecc7..9c8db1acaec5770382d5eb7caaa4a773a93332db 100644 (file)
@@ -18,7 +18,7 @@
 #include <numerics/assembler.h>
 #include <numerics/vectors.h>
 #include <numerics/error_estimator.h>
-#include <lac/dvector.h>
+#include <lac/vector.h>
 
 #include <map.h>
 #include <fstream.h>
@@ -45,14 +45,14 @@ class PoissonEquation :  public Equation<dim> {
                    right_hand_side (rhs),
                    coefficient (coefficient) {};
 
-    virtual void assemble (dFMatrix            &cell_matrix,
-                          dVector             &rhs,
+    virtual void assemble (FullMatrix<double>  &cell_matrix,
+                          Vector<double>      &rhs,
                           const FEValues<dim> &fe_values,
                           const DoFHandler<dim>::cell_iterator &cell) const;
-    virtual void assemble (dFMatrix            &cell_matrix,
+    virtual void assemble (FullMatrix<double>  &cell_matrix,
                           const FEValues<dim> &fe_values,
                           const DoFHandler<dim>::cell_iterator &cell) const;
-    virtual void assemble (dVector             &rhs,
+    virtual void assemble (Vector<double>      &rhs,
                           const FEValues<dim> &fe_values,
                           const DoFHandler<dim>::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<double>  &cell_matrix,
+                                  Vector<double>      &rhs,
                                   const FEValues<2>   &fe_values,
                                   const DoFHandler<2>::cell_iterator &) const {
   for (unsigned int point=0; point<fe_values.n_quadrature_points; ++point) 
@@ -282,7 +282,7 @@ void PoissonEquation<2>::assemble (dFMatrix            &cell_matrix,
 
 
 template <int dim>
-void PoissonEquation<dim>::assemble (dFMatrix            &,
+void PoissonEquation<dim>::assemble (FullMatrix<double>  &,
                                     const FEValues<dim> &,
                                     const DoFHandler<dim>::cell_iterator &) const {
   Assert (false, ExcPureVirtualFunctionCalled());
@@ -291,7 +291,7 @@ void PoissonEquation<dim>::assemble (dFMatrix            &,
 
 
 template <int dim>
-void PoissonEquation<dim>::assemble (dVector             &,
+void PoissonEquation<dim>::assemble (Vector<double>      &,
                                     const FEValues<dim> &,
                                     const DoFHandler<dim>::cell_iterator &) const {
   Assert (false, ExcPureVirtualFunctionCalled());
@@ -465,8 +465,8 @@ void PoissonProblem<dim>::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<float>       l2_error_per_cell, linfty_error_per_cell, h1_error_per_cell;
+      Vector<float>       estimated_error_per_cell;
       QGauss3<dim>  q;
   
       cout << "    Calculating L2 error... ";
@@ -505,9 +505,9 @@ void PoissonProblem<dim>::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<double> l2_error_per_dof, linfty_error_per_dof;
+      Vector<double> h1_error_per_dof, estimated_error_per_dof;
+      Vector<double> 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);
index b3d4c57e96167d543205bee0382d614b09d114b8..4b41c688f81feb06fcb9c3ef6f7de98cfdd10245 100644 (file)
@@ -19,8 +19,8 @@
 #include <numerics/vectors.h>
 #include <numerics/matrices.h>
 
-#include <lac/dvector.h>
-#include <lac/dsmatrix.h>
+#include <lac/vector.h>
+#include <lac/sparsematrix.h>
 #include <lac/solver_cg.h>
 #include <lac/vector_memory.h>
 
@@ -41,14 +41,14 @@ class PoissonEquation :  public Equation<dim> {
                    Equation<dim>(1),
                    right_hand_side (rhs)  {};
 
-    virtual void assemble (dFMatrix            &cell_matrix,
-                          dVector             &rhs,
+    virtual void assemble (FullMatrix<double>  &cell_matrix,
+                          Vector<double>      &rhs,
                           const FEValues<dim> &fe_values,
                           const DoFHandler<dim>::cell_iterator &cell) const;
-    virtual void assemble (dFMatrix            &cell_matrix,
+    virtual void assemble (FullMatrix<double>  &cell_matrix,
                           const FEValues<dim> &fe_values,
                           const DoFHandler<dim>::cell_iterator &cell) const;
-    virtual void assemble (dVector             &rhs,
+    virtual void assemble (Vector<double>      &rhs,
                           const FEValues<dim> &fe_values,
                           const DoFHandler<dim>::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<double> system_matrix;
 
                                     /**
                                      * Vector storing the right hand side.
                                      */
-    dVector             right_hand_side;
+    Vector<double>      right_hand_side;
 
                                     /**
                                      * Solution vector.
                                      */
-    dVector             solution;
+    Vector<double>      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<double>  &cell_matrix,
+                                  Vector<double>      &rhs,
                                   const FEValues<2>   &fe_values,
                                   const DoFHandler<2>::cell_iterator &) const {
   for (unsigned int point=0; point<fe_values.n_quadrature_points; ++point)
@@ -248,7 +248,7 @@ void PoissonEquation<2>::assemble (dFMatrix            &cell_matrix,
 
 
 template <int dim>
-void PoissonEquation<dim>::assemble (dFMatrix            &,
+void PoissonEquation<dim>::assemble (FullMatrix<double>  &,
                                     const FEValues<dim> &,
                                     const DoFHandler<dim>::cell_iterator &) const {
   Assert (false, ExcPureVirtualFunctionCalled());
@@ -257,7 +257,7 @@ void PoissonEquation<dim>::assemble (dFMatrix            &,
 
 
 template <int dim>
-void PoissonEquation<dim>::assemble (dVector             &,
+void PoissonEquation<dim>::assemble (Vector<double>      &,
                                     const FEValues<dim> &,
                                     const DoFHandler<dim>::cell_iterator &) const {
   Assert (false, ExcPureVirtualFunctionCalled());
@@ -393,8 +393,8 @@ void PoissonProblem<dim>::solve () {
   Assert ((tria!=0) && (dof!=0), ExcNoTriaSelected());
   
   SolverControl                    control(4000, 1e-16);
-  PrimitiveVectorMemory<dVector>   memory;
-  SolverCG<dSMatrix,dVector>       cg(control,memory);
+  PrimitiveVectorMemory<Vector<double> >   memory;
+  SolverCG<SparseMatrix<double>,Vector<double> >       cg(control,memory);
 
                                   // solve
   cg.solve (system_matrix, solution, right_hand_side);
@@ -486,8 +486,8 @@ int PoissonProblem<dim>::run (const unsigned int level) {
   solve ();
 
   Solution<dim> 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<float>       l1_error_per_cell, l2_error_per_cell, linfty_error_per_cell;
+  Vector<float>       h1_seminorm_error_per_cell, h1_error_per_cell;
   
   cout << "    Calculating L1 error... ";
   VectorTools<dim>::integrate_difference (*dof,
@@ -531,8 +531,8 @@ int PoissonProblem<dim>::run (const unsigned int level) {
 
   if (dof->DoFHandler<dim>::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<double> l1_error_per_dof, l2_error_per_dof, linfty_error_per_dof;
+      Vector<double> 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<dim>::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<double> projected_solution;
 //       ConstraintMatrix constraints;
 //       constraints.close ();
 //       VectorTools<dim>::project (*dof, constraints, *fe,
index ed7b4ebabe041cce83cba4525d3205f3f8ef9864..17dc3ead17ad1f47e2f6b2b771f1960d563b4759 100644 (file)
@@ -3,15 +3,15 @@
 
 
 #include "poisson.h"
-#include <lac/dvector.h>
+#include <lac/vector.h>
 
 
 
 #if deal_II_dimension == 1
 
 template <>
-void PoissonEquation<1>::assemble (dFMatrix            &cell_matrix,
-                                  dVector             &rhs,
+void PoissonEquation<1>::assemble (FullMatrix<double>  &cell_matrix,
+                                  Vector<double>      &rhs,
                                   const FEValues<1>   &fe_values,
                                   const DoFHandler<1>::cell_iterator &) const {
   for (unsigned int point=0; point<fe_values.n_quadrature_points; ++point)
@@ -34,12 +34,12 @@ void PoissonEquation<1>::assemble (dFMatrix            &cell_matrix,
 //#if deal_II_dimension >= 2
 
 template <int dim>
-void PoissonEquation<dim>::assemble (dFMatrix            &cell_matrix,
-                                    dVector             &rhs,
+void PoissonEquation<dim>::assemble (FullMatrix<double>  &cell_matrix,
+                                    Vector<double>      &rhs,
                                     const FEValues<dim> &fe_values,
                                     const DoFHandler<dim>::cell_iterator &) const {
   const vector<vector<Tensor<1,dim> > >&gradients = fe_values.get_shape_grads ();
-  const dFMatrix       &values    = fe_values.get_shape_values ();
+  const FullMatrix<double>            &values    = fe_values.get_shape_values ();
   vector<double>        rhs_values (fe_values.n_quadrature_points);
   const vector<double> &weights   = fe_values.get_JxW_values ();
 
@@ -63,7 +63,7 @@ void PoissonEquation<dim>::assemble (dFMatrix            &cell_matrix,
 
 
 template <int dim>
-void PoissonEquation<dim>::assemble (dFMatrix            &,
+void PoissonEquation<dim>::assemble (FullMatrix<double>  &,
                                     const FEValues<dim> &,
                                     const DoFHandler<dim>::cell_iterator &) const {
   Assert (false, ExcPureVirtualFunctionCalled());
@@ -72,7 +72,7 @@ void PoissonEquation<dim>::assemble (dFMatrix            &,
 
 
 template <int dim>
-void PoissonEquation<dim>::assemble (dVector             &,
+void PoissonEquation<dim>::assemble (Vector<double>      &,
                                     const FEValues<dim> &,
                                     const DoFHandler<dim>::cell_iterator &) const {
   Assert (false, ExcPureVirtualFunctionCalled());
index b4017ea350464bb52df0123247cbc064eb54ca82..6c657c1b338cff10d9d574394840d52e43ae2b65 100644 (file)
@@ -4,7 +4,7 @@
 
 
 #include "poisson.h"
-#include <lac/dvector.h>
+#include <lac/vector.h>
 
 
 
index f85471ab30202d752ceab2a553cf1ee66ddf9cd7..36756276b757a154d6a3b762b172badd5a315051 100644 (file)
 #include <base/quadrature_lib.h>
 #include <numerics/base.h>
 #include <numerics/assembler.h>
-#include <lac/dsmatrix.h>
+#include <lac/sparsematrix.h>
 
 
 #include <map.h>
 #include <fstream.h>
 #include <cmath>
-extern "C" {
-#  include <stdlib.h>
-}
+#include <cstdlib>
+
 
 
 
@@ -42,14 +41,14 @@ class PoissonEquation :  public Equation<dim> {
                    Equation<dim>(1),
                    right_hand_side (rhs)  {};
 
-    virtual void assemble (dFMatrix            &cell_matrix,
-                          dVector             &rhs,
+    virtual void assemble (FullMatrix<double>  &cell_matrix,
+                          Vector<double>      &rhs,
                           const FEValues<dim> &fe_values,
                           const DoFHandler<dim>::cell_iterator &cell) const;
-    virtual void assemble (dFMatrix            &cell_matrix,
+    virtual void assemble (FullMatrix<double>  &cell_matrix,
                           const FEValues<dim> &fe_values,
                           const DoFHandler<dim>::cell_iterator &cell) const;
-    virtual void assemble (dVector             &rhs,
+    virtual void assemble (Vector<double>      &rhs,
                           const FEValues<dim> &fe_values,
                           const DoFHandler<dim>::cell_iterator &cell) const;
   protected:
index 20ffc0944150f54ea6bd813ed830d7daeb4ccd05..2a8452b97ce78401508615a1d356de2dc61bd8fd 100644 (file)
@@ -4,7 +4,7 @@
 
 
 #include "poisson.h"
-#include <lac/dvector.h>
+#include <lac/vector.h>
 
 
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.