GfsRefineDistance
From Gerris
(Difference between revisions)
| Revision as of 02:10, 1 July 2008 GeordieMcBain (Talk | contribs) (noted restriction to surfaces given as GTS files) ← Previous diff |
Current revision Popinet (Talk | contribs) (examples cross-reference) |
||
| Line 5: | Line 5: | ||
| [ [[GfsRefineSurface]] ] | [ [[GfsRefineSurface]] ] | ||
| - | Unlike [[GfsRefineSurface]], GfsRefineDistance only works if the [[GfsSurface|surface]] is given by a GTS file, not implicitly as a level-set. | + | Unlike [[GfsRefineSurface]], GfsRefineDistance only works if the [[GfsSurface|surface]] is given by a GTS file, not implicitly as a level-set; for implicitly defined surfaces one should resort to [[GfsRefine]]. |
| Example: (from an input file [http://sourceforge.net/mailarchive/message.php?msg_id=8b53ae6f0708281307l3e2b4e39x384806392e3f52e5%40mail.gmail.com|posted posted to Gfs-users mailing list]) | Example: (from an input file [http://sourceforge.net/mailarchive/message.php?msg_id=8b53ae6f0708281307l3e2b4e39x384806392e3f52e5%40mail.gmail.com|posted posted to Gfs-users mailing list]) | ||
| RefineDistance (6*pow(Distance + 1, -12)+4) ../clarky.gts {tx = -0.145 ty = 0.0259056926297 tz = 0 rx = 0 ry = 0 rz = -7.19 sx = 0.3 sy = 0.3 sz = 0.3} | RefineDistance (6*pow(Distance + 1, -12)+4) ../clarky.gts {tx = -0.145 ty = 0.0259056926297 tz = 0 rx = 0 ry = 0 rz = -7.19 sx = 0.3 sy = 0.3 sz = 0.3} | ||
| + | |||
| + | <examples/> | ||
Current revision
For each candidate cell, GfsRefineDistance computes the distance from the cell center to the given surface, stores it in a new variable Distance, and makes it available to the user-defined function which computes the maximum level of refinement allowed.
The syntax in parameter files is
[ GfsRefineSurface ]
Unlike GfsRefineSurface, GfsRefineDistance only works if the surface is given by a GTS file, not implicitly as a level-set; for implicitly defined surfaces one should resort to GfsRefine.
Example: (from an input file posted to Gfs-users mailing list)
RefineDistance (6*pow(Distance + 1, -12)+4) ../clarky.gts {tx = -0.145 ty = 0.0259056926297 tz = 0 rx = 0 ry = 0 rz = -7.19 sx = 0.3 sy = 0.3 sz = 0.3}

