Changes between Version 2 and Version 3 of RefinementObjects


Ignore:
Timestamp:
07/23/12 14:47:02 (12 years ago)
Author:
Jonathan
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • RefinementObjects

    v2 v3  
    3131  CALL AddRefinementCriterion(Mass_Field)
    3232}}}
     33[[Image(DensityBasedRefinement.png, width=400)]]
     34
    3335
    3436The tolerance for each refinement object is then adjusted by the value of qTolerance for the grids level
     
    5860}}}
    5961
     62or 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
    6068 == Geometric Based Refinement ==
    6169Shapes can be used to modify refinement in 4 ways - but all using ShapeObjects. 
     
    7280  CALL CreateRefinement(Refinement)
    7381  CALL CreateShape(Refinement%Shape)
    74   Refinement%Shape%size_param=(/2d0,2d0,2d0/)
     82  Refinement%Shape%size_param=(/1d0,1d0,1d0/)
    7583  Refinement%Shape%vel=(/1d0,0d0,0d0/)
    7684  CALL SetShapeBounds(Refinement%Shape)
    77   Refinement%BufferCells=2
     85  Refinement%BufferCells=4
    7886}}}
    7987
    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
     92Note 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]
    8193
    8294 === Gradient based refinement within shapes ===
     
    96108{{{
    97109  Refinement%field=Mass_Field
    98   Refinement%Threshold(0:4)=(/10d0,20d0, 40d0,80d0,160d0/)
     110  Refinement%Threshold(0:4)=(/10d0,20d0,40d0/)
    99111}}}
    100112
     
    103115
    104116 === 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
    106118{{{
    107   Refienment%tolerance = -1d0
     119  Refinement%tolerance = -1d0
    108120}}}
    109121
     122Below 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
    110128 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
    111131
    112132 == Default Refinement Objects ==