]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Make one function static and change its name.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 4 May 1999 15:35:28 +0000 (15:35 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 4 May 1999 15:35:28 +0000 (15:35 +0000)
git-svn-id: https://svn.dealii.org/trunk@1266 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/Attic/examples/error-estimation/error-estimation.cc
deal.II/deal.II/include/numerics/error_estimator.h
deal.II/deal.II/source/numerics/error_estimator.cc
tests/big-tests/error-estimation/error-estimation.cc

index 26b768a808c2df0b50e225ef7b784bda9afa6aa0..7d56178f24555243c074cf7f9948b6920dd302a0 100644 (file)
@@ -523,14 +523,14 @@ void PoissonProblem<dim>::run (ParameterHandler &prm) {
       h1_error.push_back (h1_error_per_cell.l2_norm());
 
       cout << "    Estimating H1 error... ";
-      KellyErrorEstimator<dim> ee;
+
       QSimpson<dim-1> eq;
-      ee.estimate_error (*dof, eq,
-                        KellyErrorEstimator<dim>::FunctionMap(),
-                        solution,
-                        estimated_error_per_cell,
-                        ((prm.get("Test case")=="Kink") ?
-                         &kink_coefficient : 0 ));
+      KellyErrorEstimator<dim>::estimate (*dof, eq,
+                                         KellyErrorEstimator<dim>::FunctionMap(),
+                                         solution,
+                                         estimated_error_per_cell,
+                                         ((prm.get("Test case")=="Kink") ?
+                                          &kink_coefficient : 0 ));
       cout << estimated_error_per_cell.l2_norm() << endl;
       estimated_error.push_back (estimated_error_per_cell.l2_norm());
 
index b188e0af5d778c388432814345a14fd255a3b45d..0d09f52c55d83ff275606f1460a7ad2301a192a6 100644 (file)
@@ -166,12 +166,12 @@ class KellyErrorEstimator {
                                      * value which denotes the constant
                                      * coefficient with value one.
                                      */
-    static void estimate_error (const DoFHandler<dim>    &dof,
-                               const Quadrature<dim-1>  &quadrature,
-                               const FunctionMap        &neumann_bc,
-                               const Vector<double>     &solution,
-                               Vector<float>            &error,
-                               const Function<dim>      *coefficient = 0);
+    static void estimate (const DoFHandler<dim>    &dof,
+                         const Quadrature<dim-1>  &quadrature,
+                         const FunctionMap        &neumann_bc,
+                         const Vector<double>     &solution,
+                         Vector<float>            &error,
+                         const Function<dim>      *coefficient = 0);
 
                                     /**
                                      * Exception
@@ -249,6 +249,7 @@ class KellyErrorEstimator {
 
 
 
+
 /*----------------------------   error_estimator.h     ---------------------------*/
 /* end of #ifndef __error_estimator_H */
 #endif
index 71406b231e1bc61d986472ebc6508cdc38a33a30..c72052848c95a69f087771de96e054b988cfde3e 100644 (file)
@@ -28,12 +28,12 @@ inline static double sqr (const double x) {
 #if deal_II_dimension == 1
 
 template <>
-void KellyErrorEstimator<1>::estimate_error (const DoFHandler<1> &,
-                                            const Quadrature<0> &,
-                                            const FunctionMap &,
-                                            const Vector<double> &,
-                                            Vector<float> &,
-                                            const Function<1> *) {
+void KellyErrorEstimator<1>::estimate (const DoFHandler<1> &,
+                                      const Quadrature<0> &,
+                                      const FunctionMap &,
+                                      const Vector<double> &,
+                                      Vector<float> &,
+                                      const Function<1> *) {
   Assert(false, ExcNotImplemented());
 };
 
@@ -41,12 +41,13 @@ void KellyErrorEstimator<1>::estimate_error (const DoFHandler<1> &,
 
 
 template <int dim>
-void KellyErrorEstimator<dim>::estimate_error (const DoFHandler<dim>    &dof,
-                                              const Quadrature<dim-1>  &quadrature,
-                                              const FunctionMap        &neumann_bc,
-                                              const Vector<double>     &solution,
-                                              Vector<float>            &error,
-                                              const Function<dim> *coefficient) {
+void KellyErrorEstimator<dim>::estimate (const DoFHandler<dim>    &dof,
+                                        const Quadrature<dim-1>  &quadrature,
+                                        const FunctionMap        &neumann_bc,
+                                        const Vector<double>     &solution,
+                                        Vector<float>            &error,
+                                        const Function<dim> *coefficient)
+{
   Assert (neumann_bc.find(255) == neumann_bc.end(),
          ExcInvalidBoundaryIndicator());
 
index 26b768a808c2df0b50e225ef7b784bda9afa6aa0..7d56178f24555243c074cf7f9948b6920dd302a0 100644 (file)
@@ -523,14 +523,14 @@ void PoissonProblem<dim>::run (ParameterHandler &prm) {
       h1_error.push_back (h1_error_per_cell.l2_norm());
 
       cout << "    Estimating H1 error... ";
-      KellyErrorEstimator<dim> ee;
+
       QSimpson<dim-1> eq;
-      ee.estimate_error (*dof, eq,
-                        KellyErrorEstimator<dim>::FunctionMap(),
-                        solution,
-                        estimated_error_per_cell,
-                        ((prm.get("Test case")=="Kink") ?
-                         &kink_coefficient : 0 ));
+      KellyErrorEstimator<dim>::estimate (*dof, eq,
+                                         KellyErrorEstimator<dim>::FunctionMap(),
+                                         solution,
+                                         estimated_error_per_cell,
+                                         ((prm.get("Test case")=="Kink") ?
+                                          &kink_coefficient : 0 ));
       cout << estimated_error_per_cell.l2_norm() << endl;
       estimated_error.push_back (estimated_error_per_cell.l2_norm());
 

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.