Professor Wolfgang,

Thanks for your teaching. I try that as you suggested and managed to solve
my problem.

Best,
Toddy

Wolfgang Bangerth <[email protected]> 于2021年9月20日周一 上午11:03写道:

> 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:                 [email protected]
>                             www: http://www.math.colostate.edu/~bangerth/
>
> --
> The deal.II project is located at http://www.dealii.org/
> For mailing list/forum options, see
> https://groups.google.com/d/forum/dealii?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "deal.II User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/dealii/2c2a9894-38b5-ca8f-a720-83dc23e476d8%40colostate.edu
> .
>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/CAGbW%2BYeQgZ1P5EQt0zQt0H8bmqBAZKZM5nZ0bcjvvTXn3ApHEw%40mail.gmail.com.

Reply via email to