]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Use a Fullmatrix<float> instead one of doubles, to avoid *large*
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 27 Nov 2000 13:04:40 +0000 (13:04 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Mon, 27 Nov 2000 13:04:40 +0000 (13:04 +0000)
amounts of memory being eaten up! The memory consumption is still
roughly quadratic in the number of degrees of freedom, but at least
reduced to half of the previous value.

git-svn-id: https://svn.dealii.org/trunk@3505 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/dofs/dof_tools.h
deal.II/deal.II/source/dofs/dof_tools.cc

index 5b227216b99c62e0c89eac71be1d9ac56a4d439f..4b4e169ed5c3e5039b9a57a5fa618dd8473562cb 100644 (file)
@@ -886,7 +886,7 @@ class DoFTools
                               const InterGridMap<DoFHandler,dim> &coarse_to_fine_grid_map,
                               const vector<Vector<double> >      &parameter_dofs,
                               const vector<int>                  &weight_mapping,
-                              FullMatrix<double>                 &weights);
+                              FullMatrix<float>                  &weights);
 
                                     /**
                                      * This is a function that is
@@ -905,7 +905,7 @@ class DoFTools
                                 const InterGridMap<DoFHandler,dim> &coarse_to_fine_grid_map,
                                 const vector<Vector<double> >      &parameter_dofs,
                                 const vector<int>                  &weight_mapping,
-                                FullMatrix<double>                 &weights,
+                                FullMatrix<float>                  &weights,
                                 const typename DoFHandler<dim>::active_cell_iterator &begin,
                                 const typename DoFHandler<dim>::active_cell_iterator &end);
 };
index 46ab22e16c9cdddbe1bfdad67c946544ca8da0a7..1feec931a0abc646ef3381766031bc7ede7842dc 100644 (file)
@@ -1171,8 +1171,14 @@ DoFTools::compute_intergrid_constraints (const DoFHandler<dim>              &coa
                                   // weight_mapping is used to map the
                                   // global (fine grid) parameter dof
                                   // indices to the columns
-  FullMatrix<double> weights (n_coarse_dofs,
-                             n_parameters_on_fine_grid);
+                                  //
+                                  // note that the `weights' array
+                                  // can take up huge amounts of
+                                  // memory, and in particular is
+                                  // roughly quadratic in the memory
+                                  // consumption!
+  FullMatrix<float> weights (n_coarse_dofs,
+                            n_parameters_on_fine_grid);
                                   // this is this mapping. there is one
                                   // entry for each dof on the fine grid;
                                   // if it is a parameter dof, then its
@@ -1370,7 +1376,7 @@ DoFTools::compute_intergrid_weights (const DoFHandler<dim>              &coarse_
                                     const InterGridMap<DoFHandler,dim> &coarse_to_fine_grid_map,
                                     const vector<Vector<double> >      &parameter_dofs,
                                     const vector<int>                  &weight_mapping,
-                                    FullMatrix<double>                 &weights)
+                                    FullMatrix<float>                  &weights)
 {
                                   // simply distribute the range of
                                   // cells to different threads
@@ -1403,7 +1409,7 @@ DoFTools::compute_intergrid_weights_1 (const DoFHandler<dim>              &coars
                                       const InterGridMap<DoFHandler,dim> &coarse_to_fine_grid_map,
                                       const vector<Vector<double> >      &parameter_dofs,
                                       const vector<int>                  &weight_mapping,
-                                      FullMatrix<double>                 &weights,
+                                      FullMatrix<float>                  &weights,
                                       const typename DoFHandler<dim>::active_cell_iterator &begin,
                                       const typename DoFHandler<dim>::active_cell_iterator &end)
 {

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.