[cig-commits] commit: Comment out Geomod extension BC's and apply a BC for pressure even for dirichlet conditions. This is so that the adaptivity criterion does not go bananas on the boundary

Mercurial hg at geodynamics.org
Fri Apr 15 06:01:48 PDT 2011


changeset:   156:e29f15019029
tag:         tip
user:        Walter Landry <wlandry at caltech.edu>
date:        Thu Apr 14 13:25:39 2011 -0700
files:       set_boundary.C
description:
Comment out Geomod extension BC's and apply a BC for pressure even for dirichlet conditions.  This is so that the adaptivity criterion does not go bananas on the boundary


diff -r 39e11db3c0a4 -r e29f15019029 set_boundary.C
--- a/set_boundary.C	Thu Apr 14 13:23:29 2011 -0700
+++ b/set_boundary.C	Thu Apr 14 13:25:39 2011 -0700
@@ -24,11 +24,14 @@ void set_boundary(const SAMRAI::hier::Pa
   double lower_boundary[]={0,0,0};
   bool lower_dirichlet[]={true,true,true};
 
-  double upper_boundary[]={-6.94444444444e4,0,0};
-  bool upper_dirichlet[]={true,false,true};
+  // double upper_boundary[]={-6.94444444444e4,0,0};
+  // bool upper_dirichlet[]={true,false,true};
 
   // bool upper_dirichlet[]={true,true,true};
   // double upper_boundary[]={-1,1,0};
+
+  bool upper_dirichlet[]={true,true,true};
+  double upper_boundary[]={0,0,0};
 
   if(p_id!=-1)
     {
@@ -45,12 +48,14 @@ void set_boundary(const SAMRAI::hier::Pa
               if(center[ix]<pbox.lower(ix)
                  && geom->getTouchesRegularBoundary(ix,0))
                 {
+                  p(center)=2*p(center+pp[ix])-p(center+pp[ix]*2);
                   if(!lower_dirichlet[ix])
                     p(center)=p(center+pp[ix]);
                 }
               else if(center[ix]>pbox.upper(ix)
                       && geom->getTouchesRegularBoundary(ix,1))
                 {
+                  p(center)=2*p(center-pp[ix])-p(center-pp[ix]*2);
                   if(!upper_dirichlet[ix])
                     {
                       // p(center)=p(center-pp[ix]);
@@ -111,27 +116,27 @@ void set_boundary(const SAMRAI::hier::Pa
                     {
                       v(x)=v(x+pp[iy]);
 
-                      if(ix==0 && iy==1)
-                        {
-                          if(pos_x<0.1 || rhs)
-                            {
-                              v(x)=-v(x+pp[iy]);
-                            }
-                          else
-                            {
-                              v(x)=-v(x+pp[iy]) + 2*upper_boundary[0];
-                            }
-                        }
+                      // if(ix==0 && iy==1)
+                      //   {
+                      //     if(pos_x<0.1 || rhs)
+                      //       {
+                      //         v(x)=-v(x+pp[iy]);
+                      //       }
+                      //     else
+                      //       {
+                      //         v(x)=-v(x+pp[iy]) + 2*upper_boundary[0];
+                      //       }
+                      //   }
                     }
                   else if(x[iy]>pbox.upper(iy)
                           && geom->getTouchesRegularBoundary(iy,1))
                     {
                       v(x)=v(x-pp[iy]);
 
-                      if(ix==1 && iy==0)
-                        {
-                          v(x)=-v(x-pp[iy]);
-                        }
+                      // if(ix==1 && iy==0)
+                      //   {
+                      //     v(x)=-v(x-pp[iy]);
+                      //   }
                     }
                 }
             }



More information about the CIG-COMMITS mailing list