Changes between Version 2 and Version 3 of RefinementObjects
- Timestamp:
- 07/23/12 14:47:02 (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
RefinementObjects
v2 v3 31 31 CALL AddRefinementCriterion(Mass_Field) 32 32 }}} 33 [[Image(DensityBasedRefinement.png, width=400)]] 34 33 35 34 36 The tolerance for each refinement object is then adjusted by the value of qTolerance for the grids level … … 58 60 }}} 59 61 62 or we could do density based threshold refinement 63 {{{ 64 CALL AddRefinementThreshold(Mass_Field, GREATERTHAN, (/9d0,9d0,9d0/)) 65 }}} 66 [[Image(DensityThreshold.png, width=400)]] 67 60 68 == Geometric Based Refinement == 61 69 Shapes can be used to modify refinement in 4 ways - but all using ShapeObjects. … … 72 80 CALL CreateRefinement(Refinement) 73 81 CALL CreateShape(Refinement%Shape) 74 Refinement%Shape%size_param=(/ 2d0,2d0,2d0/)82 Refinement%Shape%size_param=(/1d0,1d0,1d0/) 75 83 Refinement%Shape%vel=(/1d0,0d0,0d0/) 76 84 CALL SetShapeBounds(Refinement%Shape) 77 Refinement%BufferCells= 285 Refinement%BufferCells=4 78 86 }}} 79 87 80 This creates a refinement object with default parameters, then creates a default shape (sphere located at 0,0,0 with radius 1) and then adjusts the radius to be 2 and puts the shape in motion to the right. Then the call to SetShapeBounds is needed after modifying the shapes original position or size or type. Then the number of buffer cells between the nested grids is set to be 2 which helps to ensure proper nesting. 88 This creates a refinement object with default parameters, then creates a default shape (sphere located at 0,0,0) and then sets the radius to be 1 and puts the shape in motion to the right. Then the call to SetShapeBounds is needed after modifying the shapes original position or size or type. Then the number of buffer cells between the nested grids is set to be 2 which helps to ensure proper nesting. 89 90 [[Image(SpaceBasedRefinement.png, width=400)]] 91 92 Note that since the shape has a velocity, the refined region will be moving to the left at a velocity of 1. See attached [attachment:SpaceBasedRefinement.gif movie] 81 93 82 94 === Gradient based refinement within shapes === … … 96 108 {{{ 97 109 Refinement%field=Mass_Field 98 Refinement%Threshold(0:4)=(/10d0,20d0, 40d0,80d0,160d0/)110 Refinement%Threshold(0:4)=(/10d0,20d0,40d0/) 99 111 }}} 100 112 … … 103 115 104 116 === Completely Derefining outside of a shape === 105 Finally to force nested derefinement outside of a shape, just set the tolerance to be negative (ie add the following...)117 Finally to force nested derefinement outside of a shape, just set the tolerance to be negative 106 118 {{{ 107 Refi enment%tolerance = -1d0119 Refinement%tolerance = -1d0 108 120 }}} 109 121 122 Below is the output from creating a rectangular prism that covers the right half of the domain. Anything not inside of this region is derefined - so in this case the left half is always de-refined - though in a nested manner. The right half is allowed to be refined and in this case a density threshold refinement is flagging the cells within the clump. 123 124 [[Image(DerefineExample.png, width=400)]] 125 126 127 110 128 If you do this - it should be the last refinement object you add since the refinement objects will trigger refinement in the order they are created. 129 130 111 131 112 132 == Default Refinement Objects ==