#1875: SetMask_SphericalSurface: retain mask -------------------------------------+-------------------------------------- Reporter: cott@… | Owner: rhaas Type: enhancement | Status: review Priority: unset | Milestone: Component: Other | Version: development version Resolution: | Keywords: -------------------------------------+--------------------------------------
Comment (by rhaas):
The current code will do what you describe. The proposed code would use the last found surface information (since it ignores sf_valid which AHFinderDirect sets). AHFinderDirect behaves like this (src/driver/BH_diagnostics.cc) {{{ // only try to copy AH info if we've found AHs at this time level if (! AH_data.search_flag) { sf_valid[surface_number] = 0; return; } // did we actually *find* this horizon? if (! AH_data.found_flag) { sf_valid[surface_number] = -1; return; } sf_valid [surface_number] = 1; }}} ie it will set {{{sf_valid}}} to -1 if an AH was looked for but not found, so that current code that only accepts surfaces for which {{{sf_valid >= 0}}} will reject the surface. One *may* instead possibly use {{{sf_active[] && sf_valid[]}}} which should works about as well as the proposed change though it may differ in the time interval before the AH is found for the first time (but is already searched for).