[cig-commits] commit: Clast example. Does not work past refinement cycle 4

Mercurial hg at geodynamics.org
Mon Feb 21 00:15:46 PST 2011


changeset:   2:bcf3f0757289
user:        Walter Landry <wlandry at caltech.edu>
date:        Sun Feb 20 23:02:33 2011 -0800
files:       madds-1.cc madds-1.prm
description:
Clast example.  Does not work past refinement cycle 4


diff -r 99033ff21ab4 -r bcf3f0757289 madds-1.cc
--- a/madds-1.cc	Sat Feb 19 11:35:27 2011 -0800
+++ b/madds-1.cc	Sun Feb 20 23:02:33 2011 -0800
@@ -379,9 +379,11 @@ class RightHandSide : public Function<di
 
 template <int dim>
 double
-RightHandSide<dim>::value (const Point<dim>  &/*p*/,
-                           const unsigned int /*component*/) const
+RightHandSide<dim>::value (const Point<dim>  &p,
+                           const unsigned int component) const
 {
+  // if(component==1)
+  //   return 10;
   return 0;
 }
 
@@ -494,13 +496,6 @@ void StokesProblem<dim>::setup_dofs ()
         				      RightBoundaryValues<dim>(),
         				      constraints,
         				      component_mask);
-
-    // component_mask[dim-1] = true;
-    // VectorTools::interpolate_boundary_values (dof_handler,
-    //     				      0,
-    //     				      ZeroFunction<dim>(dim+1),
-    //     				      constraints,
-    //     				      component_mask);
     DoFTools::make_hanging_node_constraints (dof_handler,
 					     constraints);
   }
@@ -553,14 +548,17 @@ double StokesProblem<dim>::get_viscosity
 double StokesProblem<dim>::get_viscosity (const Point<dim> &p) const
 {
   bool inside_high_viscosity_region = true;
-  for (unsigned int d=0; d<dim; ++d)
-    if ((p[d] < 1./3)
-	||
-	(p[d] > 2./3))
-      {
-	inside_high_viscosity_region = false;
-	break;
-      }
+  if(p[0]*p[0] + p[1]*p[1] < 0.2*0.2)
+    inside_high_viscosity_region = false;
+    
+  // for (unsigned int d=0; d<dim; ++d)
+  //   if ((p[d] < 1./3)
+  //       ||
+  //       (p[d] > 2./3))
+  //     {
+  //       inside_high_viscosity_region = false;
+  //       break;
+  //     }
   if (inside_high_viscosity_region)
     return parameters.eta_jump * parameters.eta;
   else
@@ -768,6 +766,9 @@ 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);
diff -r 99033ff21ab4 -r bcf3f0757289 madds-1.prm
--- a/madds-1.prm	Sat Feb 19 11:35:27 2011 -0800
+++ b/madds-1.prm	Sun Feb 20 23:02:33 2011 -0800
@@ -14,4 +14,4 @@ set eta                   = 1
 set eta                   = 1
 
 # Jump in the viscosity in the interior of the domain.
-set Jump in eta           = 1e0
+set Jump in eta           = 10e0



More information about the CIG-COMMITS mailing list