Commits

Greg Bryan committed 00ffb65 Merge

merge

  • Participants
  • Parent commits 3762233, 481b264

Comments (0)

Files changed (4)

File src/inits/AutomaticSubgridGeneration.C

 	/* Compute the start and end indices in the coarse level grid.   This is the
 	   bit of code which actually sets the size of the regions. */
 
-	StartIndex[dim] = max(int(LevelDims[dim]*Parameters->RefineRegionLeftEdge[dim])-1, 0);
-	EndIndex[dim] = int(LevelDims[dim]*Parameters->RefineRegionRightEdge[dim])+1;
+	StartIndex[dim] = max(int(LevelDims[dim]*Parameters->RefineRegionLeftEdge[dim]) - Parameters->AutomaticSubgridBuffer, 0);
+	EndIndex[dim] = int(LevelDims[dim]*Parameters->RefineRegionRightEdge[dim]) + Parameters->AutomaticSubgridBuffer;
 
 	/* Convert to the most refined level for start index. */
 

File src/inits/Parameters.h

   FLOAT RefineRegionRightEdge[3];
   int RefineBy;
   int MaximumInitialRefinementLevel;
+  int AutomaticSubgridBuffer;
 
   /* Boolean flags. */
 

File src/inits/ReadParameterFile.C

     ret += sscanf(line, "RefineBy = %"ISYM, &Parameters->RefineBy);
     ret += sscanf(line, "MaximumInitialRefinementLevel = %"ISYM, 
 		  &Parameters->MaximumInitialRefinementLevel);
+    ret += sscanf(line, "AutomaticSubgridBuffer = %"ISYM, 
+		  &Parameters->AutomaticSubgridBuffer);
 
  
     if (sscanf(line, "ParticlePositionName = %s", dummy) == 1)

File src/inits/SetParameterDefaults.C

 
   Parameters->RefineBy = 2;
   Parameters->MaximumInitialRefinementLevel = INT_UNDEFINED;
+  Parameters->AutomaticSubgridBuffer = 1;
  
   return SUCCESS;
 }