[cig-commits] commit: Change from Q2 Q1 to Q2 P-1, and now always refine to reduce the error

Mercurial hg at geodynamics.org
Thu Apr 7 20:53:12 PDT 2011


changeset:   4:54bc181a2779
tag:         tip
user:        Walter Landry <wlandry at caltech.edu>
date:        Thu Apr 07 20:48:22 2011 -0700
files:       madds-1.cc
description:
Change from Q2 Q1 to Q2 P-1, and now always refine to reduce the error


diff -r 82190c9edc01 -r 54bc181a2779 madds-1.cc
--- a/madds-1.cc	Sun Feb 20 23:33:15 2011 -0800
+++ b/madds-1.cc	Thu Apr 07 20:48:22 2011 -0700
@@ -46,6 +46,7 @@
 #include <dofs/dof_tools.h>
 
 #include <fe/fe_q.h>
+#include <fe/fe_dgp.h>
 #include <fe/fe_system.h>
 #include <fe/fe_values.h>
 #include <fe/mapping_q1.h>
@@ -473,7 +474,8 @@ StokesProblem<dim>::StokesProblem (const
 		parameters (prm_filename),
                 triangulation (Triangulation<dim>::maximum_smoothing),
                 fe (FE_Q<dim>(parameters.fe_degree+1), dim,
-                    FE_Q<dim>(parameters.fe_degree), 1),
+                    FE_DGP<dim>(parameters.fe_degree), 1),
+                    // FE_Q<dim>(parameters.fe_degree), 1),
                 dof_handler (triangulation)
 {}
 
@@ -770,12 +772,12 @@ StokesProblem<dim>::refine_mesh ()
                                       estimated_error_per_cell,
                                       component_mask);
 
-  // GridRefinement::refine (triangulation,
-  //                         estimated_error_per_cell,
-  //                         1.0e-4);
-  GridRefinement::refine_and_coarsen_fixed_number (triangulation,
-                                                   estimated_error_per_cell,
-                                                   0.3, 0.0);
+  GridRefinement::refine (triangulation,
+                          estimated_error_per_cell,
+                          1.0e-4);
+  // GridRefinement::refine_and_coarsen_fixed_number (triangulation,
+  //                                                  estimated_error_per_cell,
+  //                                                  0.3, 0.0);
   triangulation.execute_coarsening_and_refinement ();
 }
 



More information about the CIG-COMMITS mailing list