On 11/30/20 12:36 PM, Kaushik Das wrote:
saveRefinement<3> SaveRefinement(triangulation);
Unrelated to your question, but this convention is very hard to read for most
programmers: You name a class with lower-case first letter and a variable with
upper-case first letter. Both use CamelCase. It's quite difficult to see from
the name what's a variable and what's a class.
triangulation.signals.pre_refinement.connect([&SaveRefinement] {
SaveRefinement(); })
/// refine the mesh
....
triangulation.load_coarsen_flags(SaveRefinement.cellRefined);
triangulation.execute_coarsening_and_refinement();
At this point, I am hitting Assert(v.size() == n_active_cells(),
ExcGridReadError()) in load_coarsen_flags.
Which also makes sense to me now, because those flags saved from
save_refine_flags are now parent cells, and I have to mark their child cells
for coarsening.
That's correct.
I will greatly appreciate any hint on how that can be done.
You need to store a map from the old cell to the flags. You could use
std::map<Triangulation::cell_iterator,bool>
for example.
I looked into the Step-26 example. There is another reason I wanted to refine
the mesh based on geometric criteria. In addition to the laser spot, I would
like to refine the mesh near the layer that is being printed at the given time
step. And coarsen the layers underneath it. I am trying to simulation a layer
upon layer printing process following a paper by Claire Bruna-Rosso et al.,
who also used deal.ii. They used the FE_Nothing element to exclude the layers
that are yet to be printed from the solution.
You can refine by your geometric argument, but it might be easiest to coarsen
based on the general indicators.
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/696423e9-f1ac-6394-04a4-676fb6668040%40colostate.edu.