mesh refinement on a multilayerd hyperball (for Mie scattering problem)

35 views
Skip to first unread message

Alberto Salvadori

unread,
Nov 23, 2017, 6:16:07 AM11/23/17
to deal.II User Group
Dear community,

this might be a little "off topic" but perhaps of interest anyway.

I am using the multilayerd hyperball proposed by Konstantin Ladutenko in the post https://groups.google.com/forum/#!searchin/dealii/sphere$20mesh%7Csort:date/dealii/pvqNQUM3eyM/o0USYKbGBQAJ.
I find it a neat way of meshing a sphere, particularly I am interested in meshing an "egg" with a stiffer nucleus. 

However I noticed that when the mesh is refined and coarsened as in this example,


  Vector<float> error_per_cell (this->triangulation.n_active_cells());

  

  KellyErrorEstimator<dim>::estimate (this->dof_handler,

                                      QGauss<dim-1>(2),

                                      typename FunctionMap<dim>::type(),

                                      this->accumulated_displacement, // incremental_displacement,

                                      error_per_cell,

                                      ComponentMask(),

                                      0,

                                      MultithreadInfo::n_threads(),

                                      this->this_mpi_process);

  

  

  

  const unsigned int n_local_cells = this->triangulation.n_locally_owned_active_cells ();

  

  PETScWrappers::MPI::Vector

  distributed_error_per_cell (this->mpi_communicator,

                              this->triangulation.n_active_cells(),

                              n_local_cells);

  

  for (unsigned int i=0; i<error_per_cell.size(); ++i)

    if (error_per_cell(i) != 0)

      distributed_error_per_cell(i) = error_per_cell(i);

  

  distributed_error_per_cell.compress (VectorOperation::insert);

  error_per_cell = distributed_error_per_cell;

  GridRefinement::refine_and_coarsen_fixed_number (this->triangulation,

                                                   error_per_cell,

                                                   0.35, 0.03);

  

  this->triangulation.execute_coarsening_and_refinement ();

  


mesh inconsistencies arise (see figures). Typically, if the inner part of the "egg" in not refined concurrently with the outer shell, a gap is created. Did anyone notice this issue before? Perhaps any suggestion for solving it?

Thank you
Alberto



Screen Shot 2017-11-23 at 12.02.14 PM.png

Wolfgang Bangerth

unread,
Nov 25, 2017, 12:53:33 AM11/25/17
to dea...@googlegroups.com
On 11/23/2017 04:16 AM, Alberto Salvadori wrote:
>
> mesh inconsistencies arise (see figures). Typically, if the inner part of the
> "egg" in not refined concurrently with the outer shell, a gap is created. Did
> anyone notice this issue before? Perhaps any suggestion for solving it?
> The meshing code is in the
> post https://groups.google.com/forum/#!searchin/dealii/sphere$20mesh%7Csort:date/dealii/pvqNQUM3eyM/o0USYKbGBQAJ.

Is this this issue?

https://github.com/dealii/dealii/wiki/Frequently-Asked-Questions#in-my-graphical-output-the-solution-appears-discontinuous-at-hanging-nodes

The FAQ talks about a higher-order solution field, but if you use curved cells
in the interior by using a manifold, you'd get the same issue.

We've all been led astray by this at one point or other :-)

Cheers
W.

--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/

Reply all
Reply to author
Forward
0 new messages