On 9/19/21 12:51 AM, Toddy Liu wrote:
>
> Are there any possible ways to do value-based mesh refinement? For example, I
> want to refine the mesh where the solution varible at the quadrature ranges 0
> to 1. Any advice or learning material will be appreciated.
Yes, we do this in all sorts of situations.
step-1 already shows you how you flag cells for refinement. The only new step
is that you need to evaluate your solution-dependent criterion to decide
whether or not you want to refine. This is typically done using a call such as
fe_values.get_function_values(...)
where you get the values of the solution at the quadrature points of a cell.
(And if you choose QMidpoint, you'd have only a single evaluation point to
deal with.) You would then evaluate whether the value you have warrants mesh
refinement, and if so call
cell->set_refine_flag()
Best
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email:
bang...@colostate.edu
www:
http://www.math.colostate.edu/~bangerth/