On Sat, 1 May 2010, Boyce Griffith wrote: > I have a very simple adaptivity heuristic which I'd like to use to drive > mesh generation --- I want to flag active elements for refinement if the > maximum difference in a solution variable within that element is greater > than some threshold,
An ErrorEstimator subclass which evaluates this shouldn't be too hard to write. > and to prevent children of inactive elements which > satisfy this threshold from being coarsened. All other elements would > be flagged for coarsening. You mean that children of inactive elements which *don't* satisfy this threshold wouldn't be coarsened, right? In that case you'd just have to set the parent element ErrorVector components too. > Is there a straightforward way to do using MeshRefinement? Not quite straightforward. flag_elements_by_error_tolerance would almost do what you want if you set refine_fraction = coarsen_fraction = 1, but it tries to satisfy a global tolerance (typically on a squared norm of error IIRC) and it calculates a per-element tolerance by splitting that up by n_elem. > Or am I better off flagging elements "by hand"? Flagging by hand would be as easy as writing your own estimator. The only advantage of the MeshRefinement method is flexibility - it'd be easy to add hysteresis, experiment with less-than 100% refinement/coarsening fractions, or switch estimators later. --- Roy ------------------------------------------------------------------------------ _______________________________________________ Libmesh-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libmesh-users
